[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r19653 - trunk/contrib/client-side

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2006-05-16 15:57:57 CEST

On Tue, 16 May 2006 17:49:45 +0530, <giovannibajo@tigris.org> wrote:

> Author: giovannibajo
> Date: Tue May 16 05:19:43 2006
> New Revision: 19653
>
> Modified:
> trunk/contrib/client-side/svnmerge.py
> trunk/contrib/client-side/svnmerge_test.py
>
> Log:
> Add the uninit command, which removes merge tracking information for a
> given
> head URL, including blocked revision information. This is especially
> useful
> if multiple heads are being tracked -- without uninit, this situation
> requires
> the new property value to be manually set by the user via svn propset.
>
> * svnmerge.py: Added uninit to command table.
> (action_uninit): New method for uninitialization of merge tracking
> info.

I think the following would be better...
(command_table): Added entry for uninit

[snip]
> (TestCase_TestRepo.getBlockedProperty): New method to get the value
> of the svnmerge blocked property.

Shouldnt we reuse svnmerge.get_block_props() instead? Pl. find attached
patch to fix this.

Log for the attached patch:
[[[
Remove redundant function TestCase_TestRepo.getBlockedProperty().
Use svnmerge.get_block_props() instead.

* contrib/client-side/svnmerge_test.py
   (TestCase_TestRepo.getBlockedProperty): Remove redundant function.
   (TestCase_TestRepo.TestUninit): Use svnmerge.get_block_props() instead
    of TestCase_TestRepo.getBlockedProperty().
]]]

Index: contrib/client-side/svnmerge_test.py
===================================================================
--- contrib/client-side/svnmerge_test.py (revision 19653)
+++ contrib/client-side/svnmerge_test.py (working copy)
@@ -468,13 +468,6 @@
         else:
             return out[0].strip()
 
- def getBlockedProperty(self):
- out = svnmerge.launch("svn pg %s ." % svnmerge.opts["block-prop"])
- if len(out) == 0:
- return None
- else:
- return out[0].strip()
-
     def testNoWc(self):
         os.mkdir("foo")
         os.chdir("foo")
@@ -630,6 +623,11 @@
         self.launch("svn commit -F svnmerge-commit-message.txt",
                     match=r"Committed revision 19")
 
+ pblocked = svnmerge.get_block_props(".")
+ self.assertEqual(len(pblocked), 2)
+ self.assertEqual(pblocked["/branches/test-branch"], '16')
+ self.assertEqual(pblocked["/branches/testYYY-branch"], '17')
+
         # Do the uninit
         self.svnmerge2(["uninit", "--source", self.test_repo_url + "/branches/testYYY-branch"])
 
@@ -640,8 +638,10 @@
 
         # Check that the blocked property for testYYY-branch was removed, but
         # not for test-branch
- pblocked = self.getBlockedProperty()
- self.assertEqual("/branches/test-branch:16", pblocked)
+ pblocked = svnmerge.get_block_props(".")
+ self.assertEqual(len(pblocked), 1)
+ self.assertEqual(pblocked.has_key("/branches/testYYY-branch"), False)
+ self.assertEqual(pblocked["/branches/test-branch"], '16')
 
         self.launch("svn commit -F svnmerge-commit-message.txt",
                     match=r"Committed revision 20")
@@ -652,8 +652,8 @@
         pmerged = self.getproperty()
         self.assertEqual(None, pmerged)
 
- pblocked = self.getBlockedProperty()
- self.assertEqual(None, pblocked)
+ pblocked = svnmerge.get_block_props(".")
+ self.assertEqual(len(pblocked), 0)
 
     def testUninitForce(self):
         self.svnmerge2(["init", self.test_repo_url + "/branches/test-branch"])

Remove redundant function TestCase_TestRepo.getBlockedProperty().
Use svnmerge.get_block_props() instead.

* contrib/client-side/svnmerge_test.py
  (TestCase_TestRepo.getBlockedProperty): Remove redundant function.
  (TestCase_TestRepo.TestUninit): Use svnmerge.get_block_props() instead
   of TestCase_TestRepo.getBlockedProperty().

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 16 15:29:20 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.