Rev 3022: Merge --uncommitted can now specify single files (#136890, Lalinsky) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Sun Nov 25 16:56:40 GMT 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3022
revision-id:pqm at pqm.ubuntu.com-20071125165633-12tp1jm95scstieq
parent: pqm at pqm.ubuntu.com-20071123213500-mrqqeapz0f1mcfs3
parent: abentley at panoramicfeedback.com-20071123185526-omsci2vq6vun9bb5
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sun 2007-11-25 16:56:33 +0000
message:
Merge --uncommitted can now specify single files (#136890, Lalinsky)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_merge.py test_merge.py-20060323225809-9bc0459c19917f41
------------------------------------------------------------
revno: 3017.3.2
revision-id:abentley at panoramicfeedback.com-20071123185526-omsci2vq6vun9bb5
parent: abentley at panoramicfeedback.com-20071123174015-qkk7j1olrisxk66b
committer: Aaron Bentley <abentley at panoramicfeedback.com>
branch nick: merge
timestamp: Fri 2007-11-23 13:55:26 -0500
message:
Give credit to Lukáš Lalinský
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 3017.3.1
revision-id:abentley at panoramicfeedback.com-20071123174015-qkk7j1olrisxk66b
parent: pqm at pqm.ubuntu.com-20071123053719-gxfu09uacv4heh6w
committer: Aaron Bentley <abentley at panoramicfeedback.com>
branch nick: merge
timestamp: Fri 2007-11-23 12:40:15 -0500
message:
merge --uncommit can now specify single files (#136890)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_merge.py test_merge.py-20060323225809-9bc0459c19917f41
=== modified file 'NEWS'
--- a/NEWS 2007-11-23 21:35:00 +0000
+++ b/NEWS 2007-11-25 16:56:33 +0000
@@ -95,6 +95,9 @@
* Make sure Repository.fetch(self) is properly a no-op for all
Repository implementations. (John Arbash Meinel, #158333)
+ * ``merge --uncommitted`` can now operate on a single file.
+ (Aaron Bentley, Lukáš Lalinský, #136890)
+
* Obsolete packs are now cleaned up by pack and autopack operations.
(Robert Collins, #153789)
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-11-23 17:33:38 +0000
+++ b/bzrlib/builtins.py 2007-11-25 16:56:33 +0000
@@ -2831,6 +2831,8 @@
merger = _mod_merge.Merger.from_uncommitted(tree, other_tree,
pb)
allow_pending = False
+ if other_path != '':
+ merger.interesting_files = [other_path]
if merger is None:
merger, allow_pending = self._get_merger_from_branch(tree,
=== modified file 'bzrlib/tests/blackbox/test_merge.py'
--- a/bzrlib/tests/blackbox/test_merge.py 2007-09-25 19:01:48 +0000
+++ b/bzrlib/tests/blackbox/test_merge.py 2007-11-23 17:40:15 +0000
@@ -238,6 +238,18 @@
self.run_bzr_error(('Cannot use --uncommitted and --revision',),
'merge /a --uncommitted -r1 -d b')
+ def test_merge_uncommitted_file(self):
+ """It should be possible to merge changes from a single file."""
+ tree_a = self.make_branch_and_tree('tree_a')
+ tree_a.commit('initial commit')
+ tree_a.bzrdir.sprout('tree_b')
+ self.build_tree(['tree_a/file1', 'tree_a/file2'])
+ tree_a.add(['file1', 'file2'])
+ os.chdir('tree_b')
+ self.run_bzr(['merge', '--uncommitted', '../tree_a/file1'])
+ self.failUnlessExists('file1')
+ self.failIfExists('file2')
+
def pullable_branch(self):
tree_a = self.make_branch_and_tree('a')
self.build_tree(['a/file'])
More information about the bazaar-commits
mailing list