Rev 1190: Add known failure handling existing data in tree. in http://people.samba.org/bzr/jelmer/bzr-svn/dpush

Jelmer Vernooij jelmer at samba.org
Sun Jun 29 03:14:09 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/dpush

------------------------------------------------------------
revno: 1190
revision-id: jelmer at samba.org-20080629021407-vd1li8qqhku9jsa1
parent: jelmer at samba.org-20080629014306-shgxutyy3rtrrls8
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: dpush
timestamp: Sun 2008-06-29 04:14:07 +0200
message:
  Add known failure handling existing data in tree.
modified:
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
  tests/test_blackbox.py         test_blackbox.py-20070325150839-d10llf8arptpcfl6-1
=== modified file '__init__.py'
--- a/__init__.py	2008-06-29 01:38:04 +0000
+++ b/__init__.py	2008-06-29 02:14:07 +0000
@@ -422,10 +422,10 @@
         if not no_rebase:
             revno, old_last_revid = source_branch.last_revision_info()
             new_last_revid = revid_map[old_last_revid]
-            source_branch.repository.fetch(target_branch.repository, new_last_revid)
-            source_branch.set_last_revision_info(revno, new_last_revid)
             if source_wt is not None:
-                source_wt.set_last_revision(new_last_revid)
+                source_wt.pull(target_branch, overwrite=True, stop_revision=new_last_revid)
+            else:
+                source_branch.pull(target_branch, overwrite=True, stop_revision=new_last_revid)
 
 
 register_command(cmd_dpush)

=== modified file 'tests/test_blackbox.py'
--- a/tests/test_blackbox.py	2008-06-29 01:38:04 +0000
+++ b/tests/test_blackbox.py	2008-06-29 02:14:07 +0000
@@ -17,6 +17,7 @@
 
 from bzrlib.repository import Repository
 from bzrlib.tests.blackbox import ExternalBase
+from bzrlib.tests import KnownFailure
 from bzrlib.trace import mutter
 
 from bzrlib.plugins.svn.mapping3 import BzrSvnMappingv3FileProps
@@ -86,6 +87,22 @@
         self.run_bzr("dpush -d dc %s" % repos_url)
         self.check_output("", "status dc")
 
+    def test_dpush_wt_diff(self):
+        raise KnownFailure
+        repos_url = self.make_repository('d')
+        
+        dc = self.get_commit_editor(repos_url)
+        dc.add_file("foo").modify()
+        dc.close()
+
+        self.run_bzr("branch %s dc" % repos_url)
+        self.build_tree({"dc/foofile": "blaaaa"})
+        self.run_bzr("add dc/foofile")
+        self.run_bzr("commit -m msg dc")
+        self.build_tree({"dc/foofile": "blaaaal"})
+        self.run_bzr("dpush -d dc %s" % repos_url)
+        self.check_output('modified:\n  foofile\n', "status dc")
+
     def test_info_workingtree(self):
         repos_url = self.make_client('d', 'dc')
         self.run_bzr('info -v dc')




More information about the bazaar-commits mailing list