Merge the initial codes
Martin Pool
mbp at canonical.com
Mon Dec 22 03:28:57 GMT 2008
On 18 Dec 2008, 马旋(SuperMMX) <supermmx at gmail.com> wrote:
>
> Hi, Bazaar guys:
>
> bzr 1.9 on win32 (XP)
>
> I branch feature from the empty trunk, and merge it back, but when showing status,
> it displays "working tree is out of date, run 'bzr update'".
>
> It seems that you must have commits in the trunk, otherwise merging will not success.
That is probably true. bzr can't really represent the concept of the
first commit being a merge into that branch. Revisions have zero or
more parent revisions. Normally one parent for a regular commit, or two
for a merge. It's the fact that there are multiple parents that makes a
revision a merge. If there's no mainline parent, then the first
revision can't be a merge.
To avoid this, just make a commit on the trunk to start it before doing
anything else.
>
> Any thoughts?
>
> Thanks
>
> $ bzr init-repo --format 1.9 --no-trees test
> Shared repository (format: 1.9)
> Location:
> shared repository: test
>
> $ cd test/
> $ bzr init trunk
> Repository branch (format: unnamed)
> Location:
> shared repository: .
> repository branch: trunk
>
> $ bzr branch trunk/ feature
> Branched 0 revision(s).
>
> $ bzr co --lightweight feature/ wt
>
> $ cd wt/
> HACK, HACK
>
> $ bzr switch trunk
> Updated to revision 0.
> Switched to branch: C:/HOME/MyOwn/Projects/SuperMMX/bzr-repo/test/trunk/
>
> $ bzr merge ../feature/
> +N file.txt
> All changes applied successfully.
> $ bzr status
> working tree is out of date, run 'bzr update'
>
>
> --
> A. Because it makes the logic of the discussion difficult to follow.
> Q. Why shoudn't I top post?
> A. No.
> Q Should I top post?
>
> A: Because it destroys the flow of the conversation
> Q: Why is it bad?
> A: No, it's bad.
> Q: Should I top post in replies to mailing lists?
--
Martin <http://launchpad.net/~mbp>
More information about the bazaar
mailing list