Joining unrelated branches

Francois Deppierraz francois at ctrlaltdel.ch
Wed Jul 9 15:38:56 BST 2008


Aaron Bentley wrote:

> What you did wrong is you merged into a branch with no commits.  That
> doesn't work in Bazaar.

I'm not sure this is the actual problem.

Running the attached test script, I experienced the same problem with
merge-into and bzr 1.3.1 and 1.6b3 as well.

At the end of the run, file1 should be present in repo2.

$ ./test-merge-into.sh
+ mktemp -d
+ DIR=/tmp/tmp.ZJdKx23593
+ cd /tmp/tmp.ZJdKx23593
+ bzr init repo1
+ cd repo1
+ echo repo1
+ bzr add file1
added file1
+ bzr commit -m Add file1
Committing to: /tmp/tmp.ZJdKx23593/repo1/
added file1
Committed revision 1.
+ cd ..
+ bzr init repo2
+ cd repo2
+ echo repo2
+ bzr add file2
added file2
+ bzr commit -m Add file2
Committing to: /tmp/tmp.ZJdKx23593/repo2/
added file2
Committed revision 1.
+ bzr merge-into ../repo1 ./from-repo1
All changes applied successfully.
successful+ bzr commit -m merged repo1 in directory from-repo1
Committing to: /tmp/tmp.ZJdKx23593/repo2/
Committed revision 2.
+ bzr up
Tree is up to date at revision 2.
+ cd ..
+ ls -l repo1/
total 4
-rw-rw-r-- 1 francois francois 6 2008-07-09 16:36 file1
+ ls -l repo2/
total 4
-rw-rw-r-- 1 francois francois 6 2008-07-09 16:36 file2
+ rm -r /tmp/tmp.ZJdKx23593

François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-merge-into.sh
Type: application/x-sh
Size: 362 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080709/46c5eb39/attachment.sh 


More information about the bazaar mailing list