Merge inconsistencies on initialised standalone branch?
roehnsch at informatik.hu-berlin.de
roehnsch at informatik.hu-berlin.de
Mon Dec 8 15:02:22 GMT 2008
Greetings,
I experienced bzr behaviour that I can't make sense of. Thanks for any help.
Let $FOO be some branch holding a revision history, e.g.
FOO=/home/u/branch (containing a file named foo).
Being in another directory $BAR, I used 'bzr merge $FOO' to merge $FOO
into $BAR.
With Bazaar 1.10. I experienced the following:
- if $BAR is an empty directory, I get:
bzr: ERROR: Branches have no common ancestor, and no merge base revision
was specified.
- if $BAR already has a revision (and is unrelated to $FOO), I also get:
bzr: ERROR: Branches have no common ancestor, and no merge base revision
was specified.
- but if $BAR still was empty, but already 'bzr init'ialised, I get:
+N foo
All changes applied successfully.
Now 'bzr status' will give:
working tree is out of date, run 'bzr update'
And 'bzr commit -m "merged FOO"' will give:
Committing to:
/home/roeh_al/Desktop/automation/devtest/bzrtest/merge_error/merge/
aborting commit write group: PointlessCommit(No changes to commit)
bzr: ERROR: no changes to commit. use --unchanged to commit anyhow
However, if I do 'bzr commit -m "merged FOO" --unchanged', $FOO
apparently has been merged.
Now the problems:
1. With the empty $BAR directory, I'd expect a message like 'cannot merge
into empty directory'. Why the 'branches have no common ancestor'?
2. With the initialised $BAR directory I'd either expect the 'no common
ancestor' message, or properly tagged changes to the working directory. So
'bzr status' would give the changes merged. Why is it possible to merge
$FOO? Apparently it isn't supposed to because the branches aren't related.
Cheers
Alexander
More information about the bazaar
mailing list