[Svnmerge] Conflict on svnmerge-blocked property

dustin at zmanda.com dustin at zmanda.com
Mon Apr 23 15:30:12 PDT 2007


> Piet-Hein Peeters wrote:
> > I do not have the knowlegde to do so, but I can describe the
> > testcase more precisly for you. In a repository I have a trunk,
> > branch A and branch B Merge strategy is as follows: Merge
> > changesets from Branch B to A and from branch A to trunk
> > 
> > revision x of branch B is blocked by setting "svnmerge.py block
> > -rx" on branch A revision y of branch A is blocked by setting
> > "svnmerge.py block -ry" on trunk
> > 
> > When a merge is done from branch A to trunk, I get the following
> > merge conflict: Trying to add new property 'svnmerge-blocked' with
> > value '/branches/branchB:x', but property already exists with value
> > '/branches/branchA:y'.

I had to interpret "a merge" in the final paragraph as meaning "merge
all available revisions", specifically the revision where revision x was
blocked on branch A.  A patch to the subversion test cases is attached
(although the name of the test case is probably not appropriate).  The
test case is configured such that Raman's patch should pass it, but I've
not tested that.  

Either way, it's worth having the test in there.

Dustin

-- 
        Dustin J. Mitchell
        Storage Software Engineer, Zmanda, Inc.
        http://www.zmanda.com/
-------------- next part --------------
Index: svnmerge-testcase/svnmerge_test.py
===================================================================
--- svnmerge-testcase.orig/svnmerge_test.py	2007-04-23 16:18:43.447802250 -0500
+++ svnmerge-testcase/svnmerge_test.py	2007-04-23 17:29:14.492226000 -0500
@@ -550,6 +550,54 @@
         # Check that no revisions are blocked
         self.svnmerge("avail -B", match=r"\A$")
 
+    def testTransitiveMerge(self):
+        os.chdir("..")
+        self.launch("svn co %(TEST_REPO_URL)s/branches/testYYY-branch testYYY-branch")
+
+	os.chdir("trunk")
+	self.launch("svn up")
+        self.svnmerge("init ../test-branch")
+	self.launch("svn ci -m 'init test-branch -> trunk'",
+	    match=r"Committed revision 14")
+
+	os.chdir("../test-branch")
+        self.svnmerge("init -r 1-6 ../testYYY-branch")
+	self.launch("svn ci -m 'init testYYY-branch -> test-branch'",
+	    match=r"Committed revision 15")
+
+	os.chdir("../testYYY-branch")
+	open("test4", "w").write("test4")
+	self.launch("svn add test4")
+	self.launch("svn ci -m 'add test4'",
+	    match=r"Committed revision 16")
+
+	os.chdir("../test-branch")
+	self.svnmerge("block -r 16")
+	self.launch("svn ci -m 'block r16'",
+	    match=r"Committed revision 17")
+
+	#os.chdir("../test-branch")
+	open("test5", "w").write("test5")
+	self.launch("svn add test5")
+	self.launch("svn ci -m 'add test5'",
+	    match=r"Committed revision 18")
+
+	os.chdir("../trunk")
+	self.svnmerge("block -r 18")
+	self.launch("svn ci -m 'block r18'",
+	    match=r"Committed revision 19")
+
+	#os.chdir("../trunk")
+	self.svnmerge("merge -r 17")
+	self.launch("svn ci -m 'merge r17 from test-branch'",
+	    match=r"Committed revision 20")
+
+	p = self.getBlockedProperty()
+	# ideally...
+	#   self.assertEqual(p, '/branches/testYYY-branch:16 /branches/test-branch:18')
+	# but this is better than nothing:
+	self.assertEqual(p, '/branches/test-branch:18')
+
     def testBasic(self):
         self.svnmerge("init")
         p = self.getproperty()


More information about the Svnmerge mailing list