how do I commit somewhere other than onto a tip?
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Oct 3 07:44:37 BST 2008
>>>>> "Vincent" == Vincent Broman <broman at spawar.navy.mil> writes:
Hi Vincent,
Vincent> I think I need the capability to commit versions
Vincent> that are not successors of a tip revision,
Basically you can't.
Vincent> e.g. I want to commit a new version which should be
Vincent> placed in between two successive versions already
Vincent> committed, or else to place it ahead of all the
Vincent> other versions, as a new version 1. It might even
Vincent> be a new branch off some parent version in the past.
Then create a new branch starting at the tip you're interested
in, commit there, and... either merge into your work-in-progress
trunk or merge in this new branch and makes it your new
work-in-progress trunk.
Vincent> Why? I have inherited a piece of software to
Vincent> maintain for which I have found many tens of copies
Vincent> of the source in various stages of development,
Vincent> stored in separate directory trees on various
Vincent> machines or backups.
Been there, done that, you're in for quite a journey, good luck,
it's a tough job, but the reward is high.
Vincent> From file modtimes and from looking at diffs, I have
Vincent> an approximate idea of the order they should appear
Vincent> in history. I would like to get everything into a
Vincent> version control system, to document it, but I cannot
Vincent> just start with the earliest and try to retrace
Vincent> everything from the big bang to the present in
Vincent> order.
That's the root of your problem, you don't know what the real
history is/was. My advice would be: try and refine.
So you may want to keep track of two histories:
- the project history as you can reconstruct it, subject to
changes as you get a better understanding,
- the history of your attempts to get there.
Give a try to bzr viz (available via the bzr-gtk plugin) and/or
bzr qlog (available via the qbzr plugin), it will show you the
history of a branch in a graphical way.
Vincent> As I go through I may change my mind as to the
Vincent> dependencies/order.
You may find the following interesting:
http://www.venge.net/mtn-wiki/DaggyFixes
It's related to you needs in that they explain how to apply bug
fixes at the Right Place (for various definitions of right :).
Vincent> I may find an additional version on a dusty backup
Vincent> after I have started. I may only have time to
Vincent> process the last 10-15 versions right now, then add
Vincent> in the other older versions as I have time to
Vincent> analyze them later.
Hence my proposal to handle two histories.
Vincent> My basic problem is recording history
Vincent> retrospectively, instead of as it happens.
Then build it as you think it happened and if you change your
mind, build it again.
Vincent> Is this possible in Bazaar?
May be not as easily as you want, but yes, it's doable.
Vincent> I do not like the idea of writing code to do surgery
Vincent> on archives in ways they were not designed to allow,
Vincent> but concatenating dump files is something subversion
Vincent> sort-of allows.
John Arbash Meinel proposed a simpler approach using bzr-rebase
in another mail that you may prefer.
Both approaches have pro and cons, but trying both should help
you find the right balance.
Hope that helps,
Vincent (vila)
More information about the bazaar
mailing list