centralized workflow and tracking upstream questions

Tom Vaughan tom at software6.net
Wed Apr 2 03:13:26 BST 2008


On Tue, Apr 1, 2008 at 5:02 PM, Andrew Bennetts <andrew at canonical.com> wrote:
> Tom Vaughan wrote:
>  [...]
>
> > bzr init website/branches/vendor
>  > bzr init website/trunk
>  > bzr branch -r0 website/branches/vendor website/tags/template-0.1
>  > bzr branch -r0 website/branches/vendor website/tags/template-0.2
>
>  Here's the fundamental confusion, I think.  Doing "bzr branch -r0 ... foo" is
>  the same as doing "bzr init foo".  A branch with no revisions is exactly what
>  "bzr init" produces.
>
>  [...]
>
> > cd vendor
>  > bzr merge file:///srv/bzr/website/tags/template-0.2
>  >
>  > bzr: ERROR: Branches have no common ancestor, and no merge base
>  > revision was specified.
>  >
>  > Why is this? The tags share a parent branch. Or am I just completely
>  > off the mark on how this *should* be done.
>
>  What's happened here is that you made the tag branches with no history (i.e. no
>  revision), so thus they have no common history with anything.  So the message is
>  correct and expected.
>
>  Rather than creating these tag branches from "-r0" (i.e. no revision),
>  you probably want create them from an actual revision of an existing branch.
>  Then the rest of what you tried ought to work as expected.

Do you mean I should:

bzr init branches/vendor

bzr branch branches/vendor tags/template-0.1
bzr co tags/template-0.1
bzr add ...
bzr ci ...

bzr co branches/vendor
bzr merge tags/template-0.1
bzr ci --unchanged ...

bzr branch branches/vendor tags/template-0.2
bzr co tags/template-0.2

Besides that the paths aren't correct above, at this point I now have
template-0.1 in the template-0.2 tag. This is exactly what I want to
avoid. That's why I made sure I did -r0 so that I would start with an
empty branch.

>
>  [...]
>
> > Bonus Question: Why the use of "--unchanged" on some of the check-ins
>  > above? As I understand it I still need to check-in after the merge so
>  > that the updates are propagated to the centralized repository. No? So
>  > why would bzr tell me there's nothing to check-in when "--unchanged"
>  > is omitted? If I run `bzr log` after the check-in I have two new
>  > revisions which appear to be exactly the same.
>
>  You need "--unchanged" there because there were no changes: your "bzr merge"
>  invocation would have reported "Nothing to do.", i.e. no new revisions were
>  found in the branch being merged in.

Actually the merge added new files.

>
>  You can verify that nothing changed after such a merge by running "bzr status",
>  which will show no changes to files, and no "pending merges".

Yes. This is what "bzr status" reports. But, it's the central
repository that still needs to be updated, correct? If "bzr ci" still
needs to check-in changes to the central repository, doesn't that mean
that there is an operation that is pending? As far as the central
repository is concerned, it's empty. The local check-out contains new
additions.

>
>  I hope this helps,

Very much. Thanks for the response. Sorry for being so dense on this.
I'd really like to understand this. This is just a test case I cooked
up to understand how this works. Provided I can make sense of this
process, I may adopt this in my day job.

-Tom

P.S. This is bzr 1.3 from the PPA on Gutsy.



More information about the bazaar mailing list