You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Douglas Wilson <do...@gmail.com> on 2011/10/19 01:44:47 UTC

mergeinfo marked not inheritable on sparse checkout

If I have a sparse checkout of /trunk (say it has subdirectories dir1
and dir2, so I just have a working copy of /trunk/dir1), commit some
changes, switch my checkout to a branch, then try to merge the changes
I just committed, the mergeinfo property gets revisions marked with
"*" in the branch root, and updates mergeinfo in the directory with
the changes.

Is there any reason the merge has to have the "*", since there were no
changes outside of my working copy?


Re: mergeinfo marked not inheritable on sparse checkout

Posted by Douglas Wilson <do...@gmail.com>.

On Nov 1, 3:02 pm, Douglas Wilson <do...@gmail.com> wrote:
> On Oct 22, 2:25 am, Stefan Sperling <s....@elego.de> wrote:
> > Your reproduction recipe is incomplete.
>
> I think I left out the import..lemme try again:
...snip...

It looks like this is covered by issues 4056 and 4057 and targeted for
release 1.8.

Guess I'll just have to wait :-)

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Douglas Wilson <do...@gmail.com>.

On Oct 22, 2:25 am, Stefan Sperling <s....@elego.de> wrote:
>
> Your reproduction recipe is incomplete.

I think I left out the import..lemme try again:
DIR=$PWD
mkdir -p $DIR/src/trunk/dir1
mkdir -p $DIR/src/trunk/dir2
mkdir -p $DIR/src/branches

touch $DIR/src/trunk/dir1/file1.txt
touch $DIR/src/trunk/dir2/file2.txt

svnadmin create $DIR/testrepo

svn import -m "Import test directory" $DIR/src file://$DIR/testrepo

svn cp file://$DIR/testrepo/trunk file://$DIR/testrepo/branches/testbranch
-m "Create test branch"

svn co --non-recursive file://$DIR/testrepo/trunk test
svn update test/dir1

print "Changes" >$DIR/test/dir1/file1.txt
svn commit -m "Commit file1 changes" test

cd test
svn switch file://$DIR/testrepo/branches/testbranch

svn merge -r 2:3 file://$DIR/testrepo/trunk .
svn diff

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Stefan Sperling <st...@elego.de>.
On Sat, Oct 22, 2011 at 11:25:14AM +0200, Stefan Sperling wrote:
> On Fri, Oct 21, 2011 at 10:40:54AM -0700, Douglas Wilson wrote:
> Can you please explain in detail what your sparse working copy
> configuration loko like? 

Oops, "looks", not loko :)
Not sure how that typo happened. I blame vim...

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Douglas Wilson <do...@gmail.com>.

On Oct 22, 2:25 am, Stefan Sperling <s....@elego.de> wrote:
>
> Your reproduction recipe is incomplete.

Here is (I hope) a complete reproduction:
#!/bin/ksh

# Create repo
DIR=$PWD
mkdir -p $DIR/src/trunk/dir1
mkdir -p $DIR/src/trunk/dir2
mkdir -p $DIR/src/branches
touch $DIR/src/trunk/dir1/file1.txt
touch $DIR/src/trunk/dir2/file2.txt
svnadmin create $DIR/testrepo

# Create branch
svn cp file://$DIR/testrepo/trunk file://$DIR/testrepo/branches/testbranch
-m "Create test branch"

# Checkout just dir1
svn co --non-recursive file://$DIR/testrepo/trunk test
svn update test/dir1

# Make some changes
print "Changes" >$DIR/test/dir1/file1.txt
svn commit -m "Commit file1 changes" test

# Switch to branch and merge
cd test
svn switch file://$DIR/testrepo/branches/testbranch
svn merge -r 2:3 file://$DIR/testrepo/trunk .
svn diff

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Oct 21, 2011 at 10:40:54AM -0700, Douglas Wilson wrote:
> 
> 
> On Oct 21, 2:10 am, Stefan Sperling <s....@elego.de> wrote:
> > On Thu, Oct 20, 2011 at 02:02:48PM -0700, Douglas Wilson wrote:
> >
> > > On Oct 20, 10:45 am, Stefan Sperling <s....@elego.de> wrote:
> >
> > Does that make sense?
> Yes, I get that.
> 
> I was using Tortoise, but retested with command line SVN:
> 
> C:\SVN\Test>svn merge -r 3:4 --dry-run file:///C:/SVN/TestRepo/trunk .
> --- Merging r4 into 'Dir1':
> U    Dir1\file1.txt
> 
> C:\SVN\Test>svn merge -r 3:4  file:///C:/SVN/TestRepo/trunk .
> --- Merging r4 into 'Dir1':
> U    Dir1\file1.txt
> --- Recording mergeinfo for merge of r4 into '.':
>  U   .
> --- Recording mergeinfo for merge of r4 into 'Dir1':
>  U   Dir1
> 
> C:\SVN\Test>svn diff
> Index: .
> ===================================================================
> --- .   (revision 4)
> +++ .   (working copy)
> 
> Property changes on: .
> ___________________________________________________________________
> Added: svn:mergeinfo
>    Merged /trunk:r4*
> Index: Dir1
> ===================================================================
> --- Dir1        (revision 4)
> +++ Dir1        (working copy)
> 
> Property changes on: Dir1
> ___________________________________________________________________
> Added: svn:mergeinfo
>    Merged /trunk/Dir1:r4
> Index: Dir1/file1.txt
> ===================================================================
> --- Dir1/file1.txt      (revision 4)
> +++ Dir1/file1.txt      (working copy)
> @@ -0,0 +1 @@
> +New stuff
> 
> C:\SVN\Test>svn log -r 4 -v file:///C:/SVN/TestRepo
> ------------------------------------------------------------------------
> r4 | dwilson | 2011-10-20 15:07:07 -0700 (Thu, 20 Oct 2011) | 1 line
> Changed paths:
>    M /trunk/Dir1/file1.txt
> 
> Commit trunk changes
> ------------------------------------------------------------------------

Your reproduction recipe is incomplete.
How do you expect me to reproduce the problem based on the above?

How did you create the working copy?
Can you please explain in detail what your sparse working copy
configuration loko like? 

You mentioned a Dir1 and a Dir2 in your original mail.
Is Dir2 a child of Dir1? Which of them is sparse?

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Douglas Wilson <do...@gmail.com>.

On Oct 21, 2:10 am, Stefan Sperling <s....@elego.de> wrote:
> On Thu, Oct 20, 2011 at 02:02:48PM -0700, Douglas Wilson wrote:
>
> > On Oct 20, 10:45 am, Stefan Sperling <s....@elego.de> wrote:
>
> Does that make sense?
Yes, I get that.

I was using Tortoise, but retested with command line SVN:

C:\SVN\Test>svn merge -r 3:4 --dry-run file:///C:/SVN/TestRepo/trunk .
--- Merging r4 into 'Dir1':
U    Dir1\file1.txt

C:\SVN\Test>svn merge -r 3:4  file:///C:/SVN/TestRepo/trunk .
--- Merging r4 into 'Dir1':
U    Dir1\file1.txt
--- Recording mergeinfo for merge of r4 into '.':
 U   .
--- Recording mergeinfo for merge of r4 into 'Dir1':
 U   Dir1

C:\SVN\Test>svn diff
Index: .
===================================================================
--- .   (revision 4)
+++ .   (working copy)

Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk:r4*
Index: Dir1
===================================================================
--- Dir1        (revision 4)
+++ Dir1        (working copy)

Property changes on: Dir1
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk/Dir1:r4
Index: Dir1/file1.txt
===================================================================
--- Dir1/file1.txt      (revision 4)
+++ Dir1/file1.txt      (working copy)
@@ -0,0 +1 @@
+New stuff

C:\SVN\Test>svn log -r 4 -v file:///C:/SVN/TestRepo
------------------------------------------------------------------------
r4 | dwilson | 2011-10-20 15:07:07 -0700 (Thu, 20 Oct 2011) | 1 line
Changed paths:
   M /trunk/Dir1/file1.txt

Commit trunk changes
------------------------------------------------------------------------



Re: mergeinfo marked not inheritable on sparse checkout

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Oct 20, 2011 at 02:02:48PM -0700, Douglas Wilson wrote:
> 
> 
> On Oct 20, 10:45 am, Stefan Sperling <s....@elego.de> wrote:
> >
> > Which version of SVN are you running when you hit the problem
> > you described in your first post? 1.6 or 1.7?
> 
> Subversion 1.7.0

Ok, in that case what you are seeing is related to this change in
mergeinfo recording behaviour:
http://subversion.apache.org/docs/release-notes/1.7.html#svn-merge-sparse-no-tree-conflict
Quote:
  Merges into shallow working copies used to cause tree conflicts on nodes
  which were affected by the merge but not present in the working copy. In
  1.7, no tree conflict is flagged. Instead, non-inheritable subtree
  mergeinfo is created on the parents of missing nodes, so that later
  merges into working copies that are not sparse will pick up any missing
  changes for those nodes.

The case you described is similar to the case where 1.6 used to flag a tree
conflict. But it only flagged a tree conflict if the incoming delta of the
merge applies changes to a missing (shallow) subtree. It sounds like
in your case, the incoming delta does not touch the shallow subtree,
so svn 1.6 won't flag a conflict, but svn 1.7 for some reason it creates
non-inheritable mergeinfo on the parent anyway -- which would be wrong,
since the missing subtree isn't affected by the merge.

Does that make sense?

However, I cannot reproduce this problem in quick manual testing.
In my testing, non-inheritable mergeinfo is only created if the
incoming change does modify the missing subtree (see below).
Are you really sure that your merge does not modify the missing subtree?
Because if it does, there is no problem at all, and everything is working
as designed.

My simple test, where a merge wants to modify the file 'epsilon/zeta',
and we perform the merge once the file missing due to a shallow
subtree 'epsilon', and once with the file present but with a different
shallow subtree ('gamma') in the working copy.

$ cd svn-sandbox/trunk
$ echo foo >> epsilon/zeta
$ svn ci -mm
Sending        epsilon/zeta
Transmitting file data .
Committed revision 3.
$ cd ../branch/
$ svn up -set-depth=empty epsilon/
D         epsilon/zeta
Updating 'epsilon':
Updated to revision 3.
$ svn st
$ svn up
Updating '.':
At revision 3.
$ svn merge ^/trunk
Skipped missing target: 'epsilon/zeta'
--- Recording mergeinfo for merge of r2 through r3 into '.':
 U   .
--- Recording mergeinfo for merge of r2 through r3 into 'epsilon':
 U   epsilon
Summary of conflicts:
  Skipped paths: 1
$ svn st
 M      .
 M      epsilon
$ svn pl -v epsilon
Properties on 'epsilon':
  svn:mergeinfo
    /trunk/epsilon:2-3*
$ svn diff
Index: .
===================================================================
--- .   (revision 3)
+++ .   (working copy)

Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk:r2-3
Index: epsilon
===================================================================
--- epsilon     (revision 3)
+++ epsilon     (working copy)

Property changes on: epsilon
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk/epsilon:r2-3*
$ svn revert -R .
Reverted '.'
Reverted 'epsilon'
$ svn up --set-depth=infinity epsilon
Updating 'epsilon':
A    epsilon/zeta
Updated to revision 3.
$ svn up --set-depth empty gamma
D         gamma/delta
Updating 'gamma':
Updated to revision 3.
$ svn merge ^/trunk
--- Merging r2 through r3 into '.':
U    epsilon/zeta
--- Recording mergeinfo for merge of r2 through r3 into '.':
 U   .
$ svn st
 M      .
M       epsilon/zeta
$ svn diff
Index: .
===================================================================
--- .   (revision 3)
+++ .   (working copy)

Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk:r2-3
Index: epsilon/zeta
===================================================================
--- epsilon/zeta        (revision 3)
+++ epsilon/zeta        (working copy)
@@ -1 +1,2 @@
 zeta
+foo
$

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Douglas Wilson <do...@gmail.com>.

On Oct 20, 10:45 am, Stefan Sperling <s....@elego.de> wrote:
>
> Which version of SVN are you running when you hit the problem
> you described in your first post? 1.6 or 1.7?

Subversion 1.7.0

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Oct 20, 2011 at 10:35:41AM -0700, Douglas Wilson wrote:
> 
> On Oct 19, 11:06 am, Douglas Wilson <do...@gmail.com> wrote:
> > On Oct 19, 12:29 am, Johan Corveleyn <jc...@gmail.com> wrote:
> >
> > > There were a lot of merge-tracking improvements and bugfixes in 1.7,
> > > but I'm not sure if this particular issue has been addressed. See http://subversion.apache.org/docs/release-notes/1.7.html#merge-tracki....
> 
> I checked, there doesn't seem to be anything that specifically
> addressed this sort of situation.

Which version of SVN are you running when you hit the problem
you described in your first post? 1.6 or 1.7?

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Douglas Wilson <do...@gmail.com>.
On Oct 19, 11:06 am, Douglas Wilson <do...@gmail.com> wrote:
> On Oct 19, 12:29 am, Johan Corveleyn <jc...@gmail.com> wrote:
>
> > There were a lot of merge-tracking improvements and bugfixes in 1.7,
> > but I'm not sure if this particular issue has been addressed. See http://subversion.apache.org/docs/release-notes/1.7.html#merge-tracki....

I checked, there doesn't seem to be anything that specifically
addressed this sort of situation.

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Douglas Wilson <do...@gmail.com>.

On Oct 19, 12:29 am, Johan Corveleyn <jc...@gmail.com> wrote:
>
> Is this still the case with 1.7? Could you test that?
>
> There were a lot of merge-tracking improvements and bugfixes in 1.7,
> but I'm not sure if this particular issue has been addressed. Seehttp://subversion.apache.org/docs/release-notes/1.7.html#merge-tracki....

I tested with a local repo and TortoiseSVN:
TortoiseSVN 1.7.0, Build 22068 - 64 Bit , 2011/10/10 09:48:29
Subversion 1.7.0,
apr 1.4.5
apr-utils 1.3.12
neon 0.29.6
OpenSSL 1.0.0e 6 Sep 2011
zlib 1.2.5

I'll check the link also. Thanks.

Re: mergeinfo marked not inheritable on sparse checkout

Posted by Johan Corveleyn <jc...@gmail.com>.
On Wed, Oct 19, 2011 at 1:44 AM, Douglas Wilson
<do...@gmail.com> wrote:
> If I have a sparse checkout of /trunk (say it has subdirectories dir1
> and dir2, so I just have a working copy of /trunk/dir1), commit some
> changes, switch my checkout to a branch, then try to merge the changes
> I just committed, the mergeinfo property gets revisions marked with
> "*" in the branch root, and updates mergeinfo in the directory with
> the changes.
>
> Is there any reason the merge has to have the "*", since there were no
> changes outside of my working copy?

Is this still the case with 1.7? Could you test that?

There were a lot of merge-tracking improvements and bugfixes in 1.7,
but I'm not sure if this particular issue has been addressed. See
http://subversion.apache.org/docs/release-notes/1.7.html#merge-tracking-enhancements.

-- 
Johan