Rev 2247: Update cmd_push to invoke the correct 'push' method on branch, rather than pull. This does not alter tests because the behaviour for push and pull is still symmetrical. in file:///home/robertc/source/baz/split-branch-pull/
Robert Collins
robertc at robertcollins.net
Tue Jan 30 21:06:13 GMT 2007
------------------------------------------------------------
revno: 2247
revision-id: robertc at robertcollins.net-20070130210611-6ogb9vztebubsqyx
parent: robertc at robertcollins.net-20070130205825-cagx4gvf17ioe2i5
committer: Robert Collins <robertc at robertcollins.net>
branch nick: split-branch-pull
timestamp: Wed 2007-01-31 08:06:11 +1100
message:
Update cmd_push to invoke the correct 'push' method on branch, rather than pull. This does not alter tests because the behaviour for push and pull is still symmetrical.
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-01-24 17:06:02 +0000
+++ b/bzrlib/builtins.py 2007-01-30 21:06:11 +0000
@@ -676,11 +676,16 @@
except errors.NotLocalUrl:
warning('This transport does not update the working '
'tree of: %s' % (br_to.base,))
- count = br_to.pull(br_from, overwrite)
+ count = br_from.push(br_to, overwrite)
except errors.NoWorkingTree:
- count = br_to.pull(br_from, overwrite)
+ count = br_from.push(br_to, overwrite)
else:
- count = tree_to.pull(br_from, overwrite)
+ tree_to.lock_write()
+ try:
+ count = br_from.push(tree_to.branch, overwrite)
+ tree_to.update()
+ finally:
+ tree_to.unlock()
except errors.DivergedBranches:
raise errors.BzrCommandError('These branches have diverged.'
' Try using "merge" and then "push".')
More information about the bazaar-commits
mailing list