Rev 3997: Show all merged revisions in commit template (Colin Bennett) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Feb 10 10:46:03 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3997
revision-id: pqm at pqm.ubuntu.com-20090210104600-o9xd7lm1d91067oj
parent: pqm at pqm.ubuntu.com-20090210062949-kj7rpejso2405ug1
parent: ian.clatworthy at canonical.com-20090210093043-nh3umt89gstbl89i
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-02-10 10:46:00 +0000
message:
Show all merged revisions in commit template (Colin Bennett)
modified:
bzrlib/msgeditor.py msgeditor.py-20050901111708-ef6d8de98f5d8f2f
bzrlib/tests/test_msgeditor.py test_msgeditor.py-20051202041359-920315ec6011ee51
------------------------------------------------------------
revno: 3996.1.1
revision-id: ian.clatworthy at canonical.com-20090210093043-nh3umt89gstbl89i
parent: pqm at pqm.ubuntu.com-20090210062949-kj7rpejso2405ug1
parent: colin at gibibit.com-20090130082438-hl7t8y6z6feejnnc
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Tue 2009-02-10 19:30:43 +1000
message:
Show all merged revisions in commit template (Colin Bennett)
modified:
bzrlib/msgeditor.py msgeditor.py-20050901111708-ef6d8de98f5d8f2f
bzrlib/tests/test_msgeditor.py test_msgeditor.py-20051202041359-920315ec6011ee51
------------------------------------------------------------
revno: 3968.1.1
revision-id: colin at gibibit.com-20090130082438-hl7t8y6z6feejnnc
parent: pqm at pqm.ubuntu.com-20090128215712-i4lsbqdybozsp19x
committer: Colin D Bennett <colin at gibibit.com>
branch nick: commit_show_all_merge_revisions
timestamp: Fri 2009-01-30 00:24:38 -0800
message:
Show all pending merge revisions in the commit message template.
Instead of showing only the merge tip revisions, show all pending merge
revisions like 'status -v' does, since it will not cause important
information to scroll off the screen as might happen in the status command.
modified:
bzrlib/msgeditor.py msgeditor.py-20050901111708-ef6d8de98f5d8f2f
bzrlib/tests/test_msgeditor.py test_msgeditor.py-20051202041359-920315ec6011ee51
=== modified file 'bzrlib/msgeditor.py'
--- a/bzrlib/msgeditor.py 2008-12-19 06:12:28 +0000
+++ b/bzrlib/msgeditor.py 2009-01-30 08:24:38 +0000
@@ -248,7 +248,7 @@
from bzrlib.status import show_tree_status
status_tmp = StringIO()
show_tree_status(working_tree, specific_files=specific_files,
- to_file=status_tmp)
+ to_file=status_tmp, verbose=True)
return status_tmp.getvalue()
=== modified file 'bzrlib/tests/test_msgeditor.py'
--- a/bzrlib/tests/test_msgeditor.py 2008-12-19 06:12:28 +0000
+++ b/bzrlib/tests/test_msgeditor.py 2009-01-30 08:24:38 +0000
@@ -81,6 +81,38 @@
hell\u00d8
""")
+ def make_multiple_pending_tree(self):
+ from bzrlib import config
+ config.GlobalConfig().set_user_option('email',
+ 'Bilbo Baggins <bb at hobbit.net>')
+ tree = self.make_branch_and_tree('a')
+ tree.commit('Initial checkin.', timestamp=1230912900, timezone=0)
+ tree2 = tree.bzrdir.clone('b').open_workingtree()
+ tree.commit('Minor tweak.', timestamp=1231977840, timezone=0)
+ tree2.commit('Feature X work.', timestamp=1233186240, timezone=0)
+ tree3 = tree2.bzrdir.clone('c').open_workingtree()
+ tree2.commit('Feature X finished.', timestamp=1233187680, timezone=0)
+ tree3.commit('Feature Y, based on initial X work.',
+ timestamp=1233285960, timezone=0)
+ tree.merge_from_branch(tree2.branch)
+ tree.merge_from_branch(tree3.branch)
+ return tree
+
+ def test_commit_template_pending_merges(self):
+ """Test building a commit message template when there are pending
+ merges. The commit message should show all pending merge revisions,
+ as does 'status -v', not only the merge tips.
+ """
+ working_tree = self.make_multiple_pending_tree()
+ template = msgeditor.make_commit_message_template(working_tree, None)
+ self.assertEqualDiff(template,
+u"""\
+pending merges:
+ Bilbo Baggins 2009-01-29 Feature X finished.
+ Bilbo Baggins 2009-01-28 Feature X work.
+ Bilbo Baggins 2009-01-30 Feature Y, based on initial X work.
+""")
+
def test_commit_template_encoded(self):
"""Test building a commit message template"""
working_tree = self.make_uncommitted_tree()
More information about the bazaar-commits
mailing list