When I first set up my projects I put them each under separate trees. I first learned this was a mistake when I wanted to move a file from one project to another. "Can't move files between different branches" - says Bazzar.
But luckily it is pretty easy to 'join' two branches into one!
My project was set up like this:
\MainDir
\MainDir\ProjectDisplay
\MainDir\ProjectLog
\MainDir\CommonSource
Because of a bug, the join command does not work if the main/root branch has no commits in it already. So if you don't have any files commited in the main directory yet, it's time to do so. First, the different project/branches was created like this:
Create common repository at main dir and make it a bazaar branch too
C:\MainDir>bzr init-repo . C:\MainDir>bzr init .Create a separate branch in each project directory
C:\MainDir\Dir1>bzr init . ...add and commit files in sub dir 1 C:\MainDir\Dir2>bzr init . ...add and commit files in sub dir 2Then do a join and commit
C:\MainDir\bzr join Dir1 C:\MainDir\bzr commmit -m "joining Dir1"The commands with output for joining two directories are shown here:
After the complete join the log history looks like this:
By default, only the main (important) revisions are shown. |
Bazaar nicely handles revision history in different branches. |
Ingen kommentarer:
Legg inn en kommentar