pull --overwrite

John A Meinel john at arbash-meinel.com
Thu Dec 1 13:49:00 GMT 2005


Robey Pointer wrote:
> There was a discussion earlier in the week that "pull --overwrite"
> should cause a branch to contain the same revisions as the original, and
> pivot the revision-history to match the original also.  I just tried it
> (on my private branch of bzr.dev) and it didn't work.  Below is a
> shorter example.
> 
> robey
> 

Thanks, I wanted to write a test case and fix that, I'll just use your
test case.

Specifically the issue is that --overwrite does this:

try:
  pull
except DivergedBranches:
  if overwrite:
     set_history(other_history)
  else:
     raise

Which means we only overwrite if they are actually diverged, not if it
is a child branch.

This just needs to be changed to do:

try:
  pull
except DivergedBranches:
  if not overwrite:
    raise

if overwrite:
  set_history(other_history)

So that it always sets the exact history if --overwrite is specified.

Thanks for the test, you should see this change show up in my
integration branch in a bit.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051201/7e6de28c/attachment.pgp 


More information about the bazaar mailing list