confused about push/pull/merge and append_revisions_only
Chris Hecker
checker at d6.com
Mon Jan 16 07:43:50 UTC 2012
> That is the difference between merging your branch into trunk, and
> merging trunk into your branch (direction matters)
I think I understand now, thanks everybody. The bummer is it makes the
workflow kinda crappy to have to have another clean branch on every
machine to merge into. For now I just set it back to False, but I need
to think more about this.
Thanks,
Chris
On 2012/01/15 06:37, John Arbash Meinel wrote:
> On 1/13/2012 10:52 PM, Chris Hecker wrote:
>
>> I have a repository I push to from multiple places. I recently
>> set append_revisions_only on it, because it's the main server repo,
>> and I was always weirded out by a bzr client's ability to modify
>> the existing history, which seemed to go against the idea of source
>> code control. However, I clearly don't understand something,
>> because now I can't push to the repo.
>
>> I did a pull, but my local history had diverged (this was
>> expected, since I'd done some work locally), so I did a merge from
>> the server and a local commit. Then I went to push, which was my
>> normal workflow, but I got this:
>
>> Using saved push location: /home/checker/bzr/spyparty/ bzr: ERROR:
>> Operation denied because it would change the main history, which is
>> not permitted by the append_revisions_only setting on branch
>> "/home/checker/bzr/spyparty/".
>
>> Now I'm not sure what my workflow should be. How do I push changes
>> back to the server repository? Do I not want
>> append_revisions_only?
>
>> Thanks, Chris
>
>
>
> Just to mention, this is the exact behavior you are asking for with
> append_revisions_only. If you don't have it set, no history is ever
> *lost* just rearranged. Looking at it from 'bzr log' perspective, what
> you have right now is:
>
> $ bzr log --include-merges trunk
>
> ------------------------------
> revno: 120
> message: Tip of trunk
> ...
>
>
> $ bzr log --include-merges mybranch
> ------------------------------
> revno: 123 [merge]
> message: My merge of trunk
> ...
> ------------------------------
> revno: 119.1.1
> message: Tip of trunk
> ...
> ------------------------------
> revno: 122
> message: The last commit of my branch
>
>
> With append_revisions_only=False (the default), we allow you to push
> mybranch's rev 123 over the trunk branch, because the branch's 119.1.1
> revision is the same as the current trunks 120 revision.
> You can see that the revno for the trunk tip revision will have
> changed. The revision is still in the ancestry, just not at the same
> place in the graph. With append_revisions_only you have to create a
> history that looks like:
>
> $ bzr log --include-merges correct-branch
>
> ------------------------------
> revno: 121 [merge]
> message: Merge of my feature
> ...
> ------------------------------
> revno: 113.1.10
> message: The last commit of my branch
> ...
> ------------------------------
> revno: 120
> message: Tip of trunk
> ...
>
> That is the difference between merging your branch into trunk, and
> merging trunk into your branch (direction matters).
>
> John
> =:->
>
More information about the bazaar
mailing list