Rev 1737: add test for bug #277043 in http://people.samba.org/bzr/jelmer/bzr-svn/trunk

Jelmer Vernooij jelmer at samba.org
Sat Nov 8 18:05:42 GMT 2008


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

------------------------------------------------------------
revno: 1737
revision-id: jelmer at samba.org-20081108180540-1grspvd20lflzj0r
parent: jelmer at samba.org-20081108175315-4csugspukf6l6um4
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sat 2008-11-08 19:05:40 +0100
message:
  add test for bug #277043
modified:
  tests/test_blackbox.py         test_blackbox.py-20070325150839-d10llf8arptpcfl6-1
=== modified file 'tests/test_blackbox.py'
--- a/tests/test_blackbox.py	2008-09-01 16:48:52 +0000
+++ b/tests/test_blackbox.py	2008-11-08 18:05:40 +0000
@@ -391,3 +391,49 @@
 
         self.monkey_patch_gpg()
         self.run_bzr('sign-my-commits')
+
+    def test_knit_corruption(self):
+        cwd = os.getcwd()
+        svn_url = self.make_client('d', 'wc')
+
+        os.chdir('wc')
+        for d in ['trunk', 'branches', 'tags']:
+           os.mkdir(d)
+        f = open('trunk/file', 'wb')
+        f.write('Hi\n')
+        f.close()
+        self.client_add("trunk")
+        self.client_add("tags")
+        self.client_add("branches")
+        self.client_commit(".", "initial check-in")
+        self.client_update(".")
+        os.chdir(cwd)
+
+        self.run_bzr('init-repo --1.9-rich-root --no-trees shared')
+        os.chdir('shared')
+        self.run_bzr('branch %s/trunk trunk' % svn_url)
+        os.chdir(cwd)
+
+        self.run_bzr('branch shared/trunk bzr-branch')
+        os.chdir('bzr-branch')
+        f = open('file', 'ab')
+        f.write('Bye\n')
+        f.close()
+        self.run_bzr('ci -m "Add bye."')
+        f = open('file', 'ab')
+        f.write('Good riddance.\n')
+        f.close()
+        self.run_bzr('ci -m "Add good riddance."')
+
+        self.run_bzr('svn-push %s/branches/my-branch' % svn_url)
+        os.chdir(cwd)
+
+        self.run_bzr('co %s/trunk bzr-trunk' % svn_url)
+        os.chdir('bzr-trunk')
+        self.run_bzr('merge %s/branches/my-branch' % svn_url)
+        self.run_bzr('nick my-branch')
+        self.run_bzr('ci -m "Merge my-branch"')
+
+        os.chdir(cwd)
+        os.chdir('shared/trunk')
+        self.run_bzr('pull')




More information about the bazaar-commits mailing list