Rev 3076: update the ignore list in one-go. in http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/status_after_merge_172657
John Arbash Meinel
john at arbash-meinel.com
Tue Dec 4 19:55:47 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/status_after_merge_172657
------------------------------------------------------------
revno: 3076
revision-id:john at arbash-meinel.com-20071204195523-3tong8h1fwvx0xgy
parent: john at arbash-meinel.com-20071204190203-vh8zea8nt8ravz0z
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: status_after_merge_172657
timestamp: Tue 2007-12-04 13:55:23 -0600
message:
update the ignore list in one-go.
Add a test that ancestors that are already listed are properly hidden.
modified:
bzrlib/status.py status.py-20050505062338-431bfa63ec9b19e6
bzrlib/tests/test_status.py test_status.py-20060516190614-fbf6432e4a6e8aa5
-------------- next part --------------
=== modified file 'bzrlib/status.py'
--- a/bzrlib/status.py 2007-12-04 19:02:03 +0000
+++ b/bzrlib/status.py 2007-12-04 19:55:23 +0000
@@ -158,7 +158,6 @@
ignore = set([None, last_revision, _mod_revision.NULL_REVISION])
graph = branch.repository.get_graph()
for merge in pending:
- ignore.add(merge)
# Find all of the revisions in the merge source, which are not in the
# last committed revision.
# We don't care about last_extra
@@ -210,4 +209,4 @@
prefix = ' '
to_file.write(prefix + ' ' + line_log(mm_revision, width - 5))
to_file.write('\n')
- ignore.add(mmerge)
+ ignore.update(merge_extra)
=== modified file 'bzrlib/tests/test_status.py'
--- a/bzrlib/tests/test_status.py 2007-12-04 19:02:03 +0000
+++ b/bzrlib/tests/test_status.py 2007-12-04 19:55:23 +0000
@@ -17,6 +17,7 @@
from StringIO import StringIO
+from bzrlib import config
from bzrlib.revisionspec import RevisionSpec
from bzrlib.status import show_pending_merges, show_tree_status
from bzrlib.tests import TestCaseWithTransport
@@ -41,6 +42,32 @@
tree2.unlock()
self.assertContainsRe(output.getvalue(), 'empty commit')
+ def test_multiple_pending(self):
+ config.GlobalConfig().set_user_option('email', 'Joe Foo <joe at foo.com>')
+ tree = self.make_branch_and_tree('a')
+ tree.commit('commit 1', timestamp=1196796819, timezone=0)
+ tree2 = tree.bzrdir.clone('b').open_workingtree()
+ tree.commit('commit 2', timestamp=1196796819, timezone=0)
+ tree2.commit('commit 2b', timestamp=1196796819, timezone=0)
+ tree3 = tree.bzrdir.clone('c').open_workingtree()
+ tree2.commit('commit 3b', timestamp=1196796819, timezone=0)
+ tree3.commit('commit 3c', timestamp=1196796819, timezone=0)
+ tree.merge_from_branch(tree2.branch)
+ tree.merge_from_branch(tree3.branch)
+ output = StringIO()
+ tree.lock_read()
+ try:
+ show_pending_merges(tree, output)
+ finally:
+ tree.unlock()
+ # Even though 2b is merged by 3c also, it should only be displayed
+ # the first time it shows u.
+ self.assertEqual('pending merges:\n'
+ ' Joe Foo 2007-12-04 commit 3b\n'
+ ' Joe Foo 2007-12-04 commit 2b\n'
+ ' Joe Foo 2007-12-04 commit 3c\n',
+ output.getvalue())
+
def tests_revision_to_revision(self):
"""doing a status between two revision trees should work."""
tree = self.make_branch_and_tree('.')
More information about the bazaar-commits
mailing list