[Svnmerge] r22788: some discussion

lsuvkne at onemodel.org lsuvkne at onemodel.org
Fri Jul 13 11:11:11 PDT 2007


>>> On Thu, Jul 12, 2007 at  5:08 pm, in message <4696B467.9070609 at develer.com>,
Giovanni Bajo <rasky at develer.com> wrote: 
> [snip]
> I'll quote a mail of yours:
> The problem is that r22788 is initializing to the wrong revision number.  If
> we copy, say, branch from trunk (becoming, respectively, the merge source 
> and
> merge target??I prefer the names source and target in the code, since the
> merges could go in any direction), then there are 2 revision numbers of
> interest:
>     1) the particular revision number of the trunk (merge target) from which
>     the branch (merge source) was copied
>     2) and the revion number in which the copy was committed to create the
>     branch (merge source)
> #1 above is the one that r22788 uses. This causes problems I'll demonstrate
> below. #2 is the one that we want to use for initializing a branch in *this
> scenario*.  We want to use #2 because the changes that occur between 
> revisions
> #1 and #2 are not of interest (we are trying to merge in changes that 
> occurred
> ON the branch, which didn't exist before #2).
> ============================================================================
> =
> [snip]
> "trunk" or "branch" either. I think it's misleading. Let's call all of them 
> "branches".
> 
> We start from branch A. In commit r20, we create a new branch, B, as a copy 
> from A at 10.


Let's also say that the current revision in the repository is r30.


> Now, what should svnmerge init do?
> 
> * In A's working copy, "svnmerge init" should set the property to B:1?20. To 
> the best of my understanding, this is not what it does now.
> * In B's working copy, "svnmerge init" should set the property to A:1?10. To 
> the best of my understanding, this works now.
> 
> So, am I getting this right?


Yes, except the last one does not work now--it will set the property to
A:1-30.  I have another patch ready to fix that as well (not yet sent to
the list).  Here is a test that I should illustrate both (A is trunk and B is
branch):

    def testInitScenariosDefaultValues(self):
        """ Run various scenarios w/ svnmerge.py init and verify
        the default values that are set as the integrated
        revisions."""
        
        # run init with branch (B) as merge source and trunk (A) as
        # merge target
        os.chdir("..")
        os.chdir("trunk")
        self.svnmerge("init ../test-branch")
        #verify range ends at rev in which branch was created
        self.launch("svn proplist -v", match=r":1-13")
        self.revert()

        # run init with TRUNK (A) as merge source and BRANCH (B) as
        # merge target
        os.chdir("..")
        os.chdir("test-branch")
        self.svnmerge("init ../trunk")
        # verify range ends at rev of trunk which was copied to create
        # branch
        self.launch("svn proplist -v", match=r":1-6")
        self.revert()
        
-Luke



More information about the Svnmerge mailing list