Rev 3487: (jam) RemoteBranch.pull should return the PullResult (bug #238149) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Jun 9 17:29:59 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3487
revision-id:pqm at pqm.ubuntu.com-20080609162951-vahrbo3jpwvbg7dr
parent: pqm at pqm.ubuntu.com-20080609160347-bbytjk1914u9qast
parent: john at arbash-meinel.com-20080609153714-w707328br3n253xc
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2008-06-09 17:29:51 +0100
message:
(jam) RemoteBranch.pull should return the PullResult (bug #238149)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/branch_implementations/test_pull.py test_pull.py-20060410103942-83c35b26657414fc
------------------------------------------------------------
revno: 3482.1.2
revision-id:john at arbash-meinel.com-20080609153714-w707328br3n253xc
parent: john at arbash-meinel.com-20080607221525-jfarlas0hrdt3r9m
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pull_traceback_238149
timestamp: Mon 2008-06-09 10:37:14 -0500
message:
remove the bogus pdb line
modified:
bzrlib/tests/branch_implementations/test_pull.py test_pull.py-20060410103942-83c35b26657414fc
------------------------------------------------------------
revno: 3482.1.1
revision-id:john at arbash-meinel.com-20080607221525-jfarlas0hrdt3r9m
parent: pqm at pqm.ubuntu.com-20080606135624-1ambbf8pct52xfh8
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pull_traceback_238149
timestamp: Sat 2008-06-07 17:15:25 -0500
message:
Fix bug #238149, RemoteBranch.pull needs to return the _real_branch's pull result.
The test won't actually test the fix until bug #238227 is closed.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/branch_implementations/test_pull.py test_pull.py-20060410103942-83c35b26657414fc
=== modified file 'NEWS'
--- a/NEWS 2008-06-09 16:03:47 +0000
+++ b/NEWS 2008-06-09 16:29:51 +0000
@@ -19,6 +19,10 @@
end of line, causing a knit snapshot in a 'knits' repository will no longer
cause KnitCorrupt. (Robert Collins)
+ * ``RemoteBranch.pull`` needs to return the ``self._real_branch``'s
+ pull result. It was instead just returning None, which breaks ``bzr
+ pull``. (John Arbash Meinel, #238149)
+
* Sanitize branch nick before using it as an attachment filename in
``bzr send``. (Lukáš Lalinský, #210218)
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2008-06-04 17:42:15 +0000
+++ b/bzrlib/branch.py 2008-06-07 22:15:25 +0000
@@ -2140,8 +2140,11 @@
:ivar old_revid: Tip revision id before pull.
:ivar new_revid: Tip revision id after pull.
:ivar source_branch: Source (local) branch object.
- :ivar master_branch: Master branch of the target, or None.
+ :ivar master_branch: Master branch of the target, or the target if no
+ Master
+ :ivar local_branch: target branch if there is a Master, else None
:ivar target_branch: Target/destination branch object.
+ :ivar tag_conflicts: A list of tag conflicts, see BasicTags.merge_to
"""
def __int__(self):
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2008-06-04 07:29:35 +0000
+++ b/bzrlib/remote.py 2008-06-07 22:15:25 +0000
@@ -1516,7 +1516,7 @@
# fixed. It should get a _override_hook_target branch,
# as push does. -- mbp 20070405
self._ensure_real()
- self._real_branch.pull(
+ return self._real_branch.pull(
source, overwrite=overwrite, stop_revision=stop_revision,
**kwargs)
=== modified file 'bzrlib/tag.py'
--- a/bzrlib/tag.py 2007-09-18 18:55:00 +0000
+++ b/bzrlib/tag.py 2008-06-07 22:15:25 +0000
@@ -196,7 +196,8 @@
:param overwrite: Overwrite conflicting tags in the target branch
:returns: A list of tags that conflicted, each of which is
- (tagname, source_target, dest_target).
+ (tagname, source_target, dest_target), or None if no copying was
+ done.
"""
if self.branch == to_tags.branch:
return
=== modified file 'bzrlib/tests/branch_implementations/test_pull.py'
--- a/bzrlib/tests/branch_implementations/test_pull.py 2008-03-10 13:37:31 +0000
+++ b/bzrlib/tests/branch_implementations/test_pull.py 2008-06-09 15:37:14 +0000
@@ -81,6 +81,23 @@
self.assertRaises(errors.BoundBranchConnectionFailure,
checkout.branch.pull, other.branch)
+ def test_pull_returns_result(self):
+ parent = self.make_branch_and_tree('parent')
+ parent.commit('1st post', rev_id='P1')
+ mine = parent.bzrdir.sprout('mine').open_workingtree()
+ mine.commit('my change', rev_id='M1')
+ result = parent.branch.pull(mine.branch)
+ self.assertIsNot(None, result)
+ self.assertIs(mine.branch, result.source_branch)
+ self.assertIs(parent.branch, result.target_branch)
+ self.assertIs(parent.branch, result.master_branch)
+ self.assertIs(None, result.local_branch)
+ self.assertEqual(1, result.old_revno)
+ self.assertEqual('P1', result.old_revid)
+ self.assertEqual(2, result.new_revno)
+ self.assertEqual('M1', result.new_revid)
+ self.assertEqual(None, result.tag_conflicts)
+
def test_pull_overwrite(self):
tree_a = self.make_branch_and_tree('tree_a')
tree_a.commit('message 1')
More information about the bazaar-commits
mailing list