You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Joakim Tjernlund <jo...@transmode.se> on 2010/05/22 20:52:32 UTC

file externals fails to commit after merge

rm -rf my_repo
rm -rf my_wc
REPO=file:///"$PWD"/my_repo
svnadmin create my_repo
mkdir -p my_wc/trunk
mkdir -p my_wc/tags
mkdir -p my_wc/branches
svn import -m "std layout" my_wc $REPO
rm -rf my_wc
svn mkdir -m "mkdir bin" $REPO/trunk/bin
svn mkdir -m "mkdir proj" $REPO/trunk/proj
svn co $REPO my_wc
echo rev1 > my_wc/trunk/bin/file
svn add my_wc/trunk/bin/file
svn propset svn:externals "../bin/file file" my_wc/trunk/proj
svn commit -m "svn:externals ../bin/file file" my_wc
svn copy -m "branch b1" $REPO/trunk/ $REPO/branches/b1
svn up my_wc
echo rev2 >> my_wc/trunk/proj/file
svn commit -m "rev2" my_wc
svn up my_wc
svn merge -c 6 $REPO/trunk/ my_wc/branches/b1
svn up my_wc
svn commit -m "merge" my_wc

#fails with:
#svn: Commit failed (details follow):
#svn: Cannot commit both '/usr/local/src/my_wc/branches/b1/proj/file' and '/usr/local/src/my_wc/branches/b1/bin/file' as they refer to the same URL

#svn, version 1.6.9 (r901367)

Re: file externals fails to commit after merge

Posted by Joakim Tjernlund <jo...@transmode.se>.
Senthil Kumaran S <se...@collab.net> wrote on 2010/05/24 09:07:20:
>
> Joakim Tjernlund wrote:
> > #fails with:
> > #svn: Commit failed (details follow):
> > #svn: Cannot commit both '/usr/local/src/my_wc/branches/b1/proj/file' and '/
> usr/local/src/my_wc/branches/b1/bin/file' as they refer to the same URL
> >
> > #svn, version 1.6.9 (r901367)
>
> This behavior stands corrected in trunk. But still 1.6.x branch behaves the
> same way as you observe. Additionally, in trunk we get the following error,
> when we do an 'svn up' in some steps,

I see, I noticed that the error seems to caused by excessive svn:mergeinfo
being added:
svn diff my_wc

Property changes on: my_wc/branches/b1
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk:r6

Index: my_wc/branches/b1/bin/file
===================================================================
--- my_wc/branches/b1/bin/file	(revision 6)
+++ my_wc/branches/b1/bin/file	(working copy)
@@ -1 +1,2 @@
 rev1
+rev2

Property changes on: my_wc/branches/b1/proj
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk/proj:r6*


Property changes on: my_wc/branches/b1/proj/file
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk/proj/file:r6

svn propdel -R svn:mergeinfo my_wc/branches/proj
fixes it.
This appears to be a bug as well, svn:mergeinfo should not be added
in this case as far as I can tell.

>
> <snip>
> Fetching external item into 'my_wc/trunk/proj/file'
> svn: warning: The file external from 'file:///tmp/my_repo/trunk/bin/file'
> cannot overwrite the existing versioned item at '/tmp/my_wc/trunk/proj/file'
> </snip>
>
> The above error does not pop up in svn 1.6.x versions. I am looking into it. We
> should not try overwriting an already fetched file externals item.

hmm, I recall seeing this at one of my coworkers computer after a similar
merge. This was on subversion 1.6.x

Re: file externals fails to commit after merge

Posted by Joakim Tjernlund <jo...@transmode.se>.
Senthil Kumaran S <se...@collab.net> wrote on 2010/05/24 09:07:20:
> Joakim Tjernlund wrote:
> > #fails with:
> > #svn: Commit failed (details follow):
> > #svn: Cannot commit both '/usr/local/src/my_wc/branches/b1/proj/file' and '/
> usr/local/src/my_wc/branches/b1/bin/file' as they refer to the same URL
> >
> > #svn, version 1.6.9 (r901367)
>
> This behavior stands corrected in trunk. But still 1.6.x branch behaves the
> same way as you observe. Additionally, in trunk we get the following error,
> when we do an 'svn up' in some steps,
>
> <snip>
> Fetching external item into 'my_wc/trunk/proj/file'
> svn: warning: The file external from 'file:///tmp/my_repo/trunk/bin/file'
> cannot overwrite the existing versioned item at '/tmp/my_wc/trunk/proj/file'
> </snip>
> The above error does not pop up in svn 1.6.x versions. I am looking into it. We
> should not try overwriting an already fetched file externals item.

It just did again in 1.6.9. The trigger might be that there are already svn:mergeinfo
attached to both trunk/proj and trunk/proj/file before the merge.

 Jocke

Re: file externals fails to commit after merge

Posted by Senthil Kumaran S <se...@collab.net>.
Joakim Tjernlund wrote:
> #fails with:
> #svn: Commit failed (details follow):
> #svn: Cannot commit both '/usr/local/src/my_wc/branches/b1/proj/file' and '/usr/local/src/my_wc/branches/b1/bin/file' as they refer to the same URL
> 
> #svn, version 1.6.9 (r901367)

This behavior stands corrected in trunk. But still 1.6.x branch behaves the 
same way as you observe. Additionally, in trunk we get the following error, 
when we do an 'svn up' in some steps,

<snip>
Fetching external item into 'my_wc/trunk/proj/file'
svn: warning: The file external from 'file:///tmp/my_repo/trunk/bin/file' 
cannot overwrite the existing versioned item at '/tmp/my_wc/trunk/proj/file'
</snip>

The above error does not pop up in svn 1.6.x versions. I am looking into it. We 
should not try overwriting an already fetched file externals item.

-- 
Senthil Kumaran S
http://www.stylesen.org/