You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <rh...@open.collab.net> on 2008/12/16 17:29:46 UTC

Issue #3119 - File '...' already exists" (Regression since 1.5.0)

Hi,

Restarting this topic in a new thread:
(This topic original hijacked a few others)

http://subversion.tigris.org/issues/show_bug.cgi?id=3119

Reproduction script on:
http://subversion.tigris.org/nonav/issues/showattachment.cgi/958/issue-3
119-1.sh
== <snippet>==
mkdir Data
svn co ${URL} Data/wc
mkdir Data/wc/tags
mkdir Data/wc/trunk
mkdir Data/wc/trunk/dir
cp /dev/null Data/wc/trunk/dir/file.cpp
${SVN} add Data/wc/t*
${SVN} ci -m"test" Data/wc

echo "ABC" >> Data/wc/trunk/dir/file.cpp

${SVN} ci -m"test" Data/wc

# Using http:// only, the next command fails with this error:
#
# subversion/libsvn_client/copy.c:1319: (apr_err=175005)
# svn: Commit failed (details follow):
# subversion/libsvn_ra_neon/commit.c:1036: (apr_err=175005)
# svn: File '/ms/repos/tags/V1.0.0/dir/file.cpp' already exists
#
${SVN} copy -m"tagging" Data/wc/trunk ${URL}/tags/V1.0.0
== </snippet> ==

Karl performed a diagnosis in:
http://svn.haxx.se/users/archive-2008-10/0829.shtml

And I added some addition research in
http://svn.haxx.se/dev/archive-2008-12/0309.shtml

Other references to this issue include
http://svn.haxx.se/users/archive-2008-11/0581.shtml
and http://svn.haxx.se/users/archive-2008-11/0603.shtml


It looks like r31692 introduced the regression described in issue #3119,
when fixing issue #2939 by moving a check on whether a node exists from
the HEAD url to the work url. (It was merged to 1.5.x before 1.5.1)

http://subversion.tigris.org/issues/show_bug.cgi?id=2939 

"Basically, it's possible for tools like gvn and svnmucc to create 
revisions which *cannot* be svnsync'd over http -- unless we apply this
fix."


The serf fix in r31695 looks like a much better fix of this issue (as it
really checks for the deleted case described in #2939), but this doesn't
map to the neon way of doing things.


Could somebody with more neon knowledge please look at this issue and
help me determine whether it would be a wise decision to revert r31692
to fix the normal client? 

It would reintroduce the issue that is only triggerable with gvn,
svnmucc or another custom application, which should then be fixed in
another way.

Thanks,
	Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=985114


Re: Issue #3119 - File '...' already exists" (Regression since 1.5.0)

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
[ this is largely a duplicate of a previous mail.  I sent it because tigris
complained about the first mail and claimed it wouldn't go through. ]

Hyrum K. Wright wrote:
> Bert Huijben wrote:
>> Hi,
>>
>> Restarting this topic in a new thread:
>> (This topic original hijacked a few others)
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=3119
>>
>> Reproduction script on:
>> http://subversion.tigris.org/nonav/issues/showattachment.cgi/958/issue-3
>> 119-1.sh
>> == <snippet>==
>> mkdir Data
>> svn co ${URL} Data/wc
>> mkdir Data/wc/tags
>> mkdir Data/wc/trunk
>> mkdir Data/wc/trunk/dir
>> cp /dev/null Data/wc/trunk/dir/file.cpp
>> ${SVN} add Data/wc/t*
>> ${SVN} ci -m"test" Data/wc
>>
>> echo "ABC" >> Data/wc/trunk/dir/file.cpp
>>
>> ${SVN} ci -m"test" Data/wc
>>
>> # Using http:// only, the next command fails with this error:
>> #
>> # subversion/libsvn_client/copy.c:1319: (apr_err=175005)
>> # svn: Commit failed (details follow):
>> # subversion/libsvn_ra_neon/commit.c:1036: (apr_err=175005)
>> # svn: File '/ms/repos/tags/V1.0.0/dir/file.cpp' already exists
>> #
>> ${SVN} copy -m"tagging" Data/wc/trunk ${URL}/tags/V1.0.0
>> == </snippet> ==
>>
>> Karl performed a diagnosis in:
>> http://svn.haxx.se/users/archive-2008-10/0829.shtml
>>
>> And I added some addition research in
>> http://svn.haxx.se/dev/archive-2008-12/0309.shtml
>>
>> Other references to this issue include
>> http://svn.haxx.se/users/archive-2008-11/0581.shtml
>> and http://svn.haxx.se/users/archive-2008-11/0603.shtml
>>
>>
>> It looks like r31692 introduced the regression described in issue #3119,
>> when fixing issue #2939 by moving a check on whether a node exists from
>> the HEAD url to the work url. (It was merged to 1.5.x before 1.5.1)
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=2939 
>>
>> "Basically, it's possible for tools like gvn and svnmucc to create 
>> revisions which *cannot* be svnsync'd over http -- unless we apply this
>> fix."
>>
>>
>> The serf fix in r31695 looks like a much better fix of this issue (as it
>> really checks for the deleted case described in #2939), but this doesn't
>> map to the neon way of doing things.
>>
>>
>> Could somebody with more neon knowledge please look at this issue and
>> help me determine whether it would be a wise decision to revert r31692
>> to fix the normal client? 
>>
>> It would reintroduce the issue that is only triggerable with gvn,
>> svnmucc or another custom application, which should then be fixed in
>> another way.
> 
> I've been looking at this a bit today, but haven't gotten very far.  I think
> this is related to the issue maven users have been having and described here:
> http://jira.codehaus.org/browse/SCM-406
> 
> I'm attempting to reproduce using the jira bug description.  It'd be good to fix
> this, of course, and other eyes are welcomed to look at it.
> 
> Thanks,
> -Hyrum
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=985149

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=985163

Re: Issue #3119 - File '...' already exists" (Regression since 1.5.0)

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Bert Huijben wrote:
> Hi,
> 
> Restarting this topic in a new thread:
> (This topic original hijacked a few others)
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=3119
> 
> Reproduction script on:
> http://subversion.tigris.org/nonav/issues/showattachment.cgi/958/issue-3
> 119-1.sh
> == <snippet>==
> mkdir Data
> svn co ${URL} Data/wc
> mkdir Data/wc/tags
> mkdir Data/wc/trunk
> mkdir Data/wc/trunk/dir
> cp /dev/null Data/wc/trunk/dir/file.cpp
> ${SVN} add Data/wc/t*
> ${SVN} ci -m"test" Data/wc
> 
> echo "ABC" >> Data/wc/trunk/dir/file.cpp
> 
> ${SVN} ci -m"test" Data/wc
> 
> # Using http:// only, the next command fails with this error:
> #
> # subversion/libsvn_client/copy.c:1319: (apr_err=175005)
> # svn: Commit failed (details follow):
> # subversion/libsvn_ra_neon/commit.c:1036: (apr_err=175005)
> # svn: File '/ms/repos/tags/V1.0.0/dir/file.cpp' already exists
> #
> ${SVN} copy -m"tagging" Data/wc/trunk ${URL}/tags/V1.0.0
> == </snippet> ==
> 
> Karl performed a diagnosis in:
> http://svn.haxx.se/users/archive-2008-10/0829.shtml
> 
> And I added some addition research in
> http://svn.haxx.se/dev/archive-2008-12/0309.shtml
> 
> Other references to this issue include
> http://svn.haxx.se/users/archive-2008-11/0581.shtml
> and http://svn.haxx.se/users/archive-2008-11/0603.shtml
> 
> 
> It looks like r31692 introduced the regression described in issue #3119,
> when fixing issue #2939 by moving a check on whether a node exists from
> the HEAD url to the work url. (It was merged to 1.5.x before 1.5.1)
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=2939 
> 
> "Basically, it's possible for tools like gvn and svnmucc to create 
> revisions which *cannot* be svnsync'd over http -- unless we apply this
> fix."
> 
> 
> The serf fix in r31695 looks like a much better fix of this issue (as it
> really checks for the deleted case described in #2939), but this doesn't
> map to the neon way of doing things.
> 
> 
> Could somebody with more neon knowledge please look at this issue and
> help me determine whether it would be a wise decision to revert r31692
> to fix the normal client? 
> 
> It would reintroduce the issue that is only triggerable with gvn,
> svnmucc or another custom application, which should then be fixed in
> another way.

I've been looking at this a bit today, but haven't gotten very far.  I think
this is related to the issue maven users have been having and described here:
http://jira.codehaus.org/browse/SCM-406

I'm attempting to reproduce using the jira bug description.  It'd be good to fix
this, of course, and other eyes are welcomed to look at it.

Thanks,
-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=985149

Re: Issue #3119 - File '...' already exists" (Regression since 1.5.0)

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Bert Huijben wrote:
> Hi,
> 
> Restarting this topic in a new thread:
> (This topic original hijacked a few others)
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=3119
> 
> Reproduction script on:
> http://subversion.tigris.org/nonav/issues/showattachment.cgi/958/issue-3
> 119-1.sh
> == <snippet>==
> mkdir Data
> svn co ${URL} Data/wc
> mkdir Data/wc/tags
> mkdir Data/wc/trunk
> mkdir Data/wc/trunk/dir
> cp /dev/null Data/wc/trunk/dir/file.cpp
> ${SVN} add Data/wc/t*
> ${SVN} ci -m"test" Data/wc
> 
> echo "ABC" >> Data/wc/trunk/dir/file.cpp
> 
> ${SVN} ci -m"test" Data/wc
> 
> # Using http:// only, the next command fails with this error:
> #
> # subversion/libsvn_client/copy.c:1319: (apr_err=175005)
> # svn: Commit failed (details follow):
> # subversion/libsvn_ra_neon/commit.c:1036: (apr_err=175005)
> # svn: File '/ms/repos/tags/V1.0.0/dir/file.cpp' already exists
> #
> ${SVN} copy -m"tagging" Data/wc/trunk ${URL}/tags/V1.0.0
> == </snippet> ==
> 
> Karl performed a diagnosis in:
> http://svn.haxx.se/users/archive-2008-10/0829.shtml
> 
> And I added some addition research in
> http://svn.haxx.se/dev/archive-2008-12/0309.shtml
> 
> Other references to this issue include
> http://svn.haxx.se/users/archive-2008-11/0581.shtml
> and http://svn.haxx.se/users/archive-2008-11/0603.shtml
> 
> 
> It looks like r31692 introduced the regression described in issue #3119,
> when fixing issue #2939 by moving a check on whether a node exists from
> the HEAD url to the work url. (It was merged to 1.5.x before 1.5.1)
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=2939 
> 
> "Basically, it's possible for tools like gvn and svnmucc to create 
> revisions which *cannot* be svnsync'd over http -- unless we apply this
> fix."
> 
> 
> The serf fix in r31695 looks like a much better fix of this issue (as it
> really checks for the deleted case described in #2939), but this doesn't
> map to the neon way of doing things.
> 
> 
> Could somebody with more neon knowledge please look at this issue and
> help me determine whether it would be a wise decision to revert r31692
> to fix the normal client? 
> 
> It would reintroduce the issue that is only triggerable with gvn,
> svnmucc or another custom application, which should then be fixed in
> another way.

I've been looking at this a bit today, but haven't gotten very far.  I'm trying
to reproduce the description found here:
http://jira.codehaus.org/browse/SCM-406

It'd be good to fix this, of course, and other eyes are welcomed to look at it.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=985146

Re: Issue #3119 - File '...' already exists" (Regression since 1.5.0)

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Bert Huijben wrote:
> Hi,
> 
> Restarting this topic in a new thread:
> (This topic original hijacked a few others)
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=3119
> 
> Reproduction script on:
> http://subversion.tigris.org/nonav/issues/showattachment.cgi/958/issue-3
> 119-1.sh
> == <snippet>==
> mkdir Data
> svn co ${URL} Data/wc
> mkdir Data/wc/tags
> mkdir Data/wc/trunk
> mkdir Data/wc/trunk/dir
> cp /dev/null Data/wc/trunk/dir/file.cpp
> ${SVN} add Data/wc/t*
> ${SVN} ci -m"test" Data/wc
> 
> echo "ABC" >> Data/wc/trunk/dir/file.cpp
> 
> ${SVN} ci -m"test" Data/wc
> 
> # Using http:// only, the next command fails with this error:
> #
> # subversion/libsvn_client/copy.c:1319: (apr_err=175005)
> # svn: Commit failed (details follow):
> # subversion/libsvn_ra_neon/commit.c:1036: (apr_err=175005)
> # svn: File '/ms/repos/tags/V1.0.0/dir/file.cpp' already exists
> #
> ${SVN} copy -m"tagging" Data/wc/trunk ${URL}/tags/V1.0.0
> == </snippet> ==
> 
> Karl performed a diagnosis in:
> http://svn.haxx.se/users/archive-2008-10/0829.shtml
> 
> And I added some addition research in
> http://svn.haxx.se/dev/archive-2008-12/0309.shtml
> 
> Other references to this issue include
> http://svn.haxx.se/users/archive-2008-11/0581.shtml
> and http://svn.haxx.se/users/archive-2008-11/0603.shtml
> 
> 
> It looks like r31692 introduced the regression described in issue #3119,
> when fixing issue #2939 by moving a check on whether a node exists from
> the HEAD url to the work url. (It was merged to 1.5.x before 1.5.1)
> 
> http://subversion.tigris.org/issues/show_bug.cgi?id=2939 
> 
> "Basically, it's possible for tools like gvn and svnmucc to create 
> revisions which *cannot* be svnsync'd over http -- unless we apply this
> fix."
> 
> 
> The serf fix in r31695 looks like a much better fix of this issue (as it
> really checks for the deleted case described in #2939), but this doesn't
> map to the neon way of doing things.
> 
> 
> Could somebody with more neon knowledge please look at this issue and
> help me determine whether it would be a wise decision to revert r31692
> to fix the normal client? 
> 
> It would reintroduce the issue that is only triggerable with gvn,
> svnmucc or another custom application, which should then be fixed in
> another way.

I've been trying to replicate this with a test, but to no avail.  I've been
working against the 1.5.4 tag, since that's the latest version with the bug in
the wild.  The patch for my new test is below, if somebody can look over it to
verify, followed by the results of running the test.

[[[
Index: subversion/tests/cmdline/copy_tests.py
===================================================================
--- subversion/tests/cmdline/copy_tests.py	(revision 34728)
+++ subversion/tests/cmdline/copy_tests.py	(working copy)
@@ -3892,6 +3892,38 @@
   finally:
     os.chdir(saved_cwd)

+
+def tag_from_mixed_rev_wc(sbox):
+  "create a tag from a modified wc"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  A_path = os.path.join(wc_dir, 'A')
+  mu_path = os.path.join(A_path, 'mu')
+
+  tag_url = sbox.repo_url + "/tag"
+
+  # Modify mu and commit, to get a mixed rev WC
+  svntest.main.file_write(mu_path, "What hath God wrought\n")
+  svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', 'jkl;',
+                                     mu_path)
+
+  # Now modify mu again
+  svntest.main.file_write(mu_path, "Mr. Watson -- come here -- \n" +
+                                   "I want to see you.\n")
+
+  # Attempt to create the tag
+  was_cwd = os.getcwd()
+  os.chdir(A_path)
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'cp', '-m', 'asdf',
+                                     '--non-interactive', '.', tag_url)
+  os.chdir(was_cwd)
+
+  # Update
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+
+
 ########################################################################
 # Run the tests

@@ -3971,7 +4003,8 @@
               copy_into_absent_dir,
               # svn_path_is_ancestor() is broken; see r33211.
               XFail(find_copyfrom_information_upstairs,
-                    svntest.main.is_os_windows)
+                    svntest.main.is_os_windows),
+              tag_from_mixed_rev_wc,
              ]

 if __name__ == '__main__':
]]]

hwright@spock:~/dev/svn-1.5.x/subversion/tests/cmdline$ ./copy_tests.py
--url=http://localhost:25313/ 73 --verbose
CMD: svnadmin create svn-test-work/local_tmp/repos --bdb-txn-nosync <TIME =
0.039292>
CMD: svn import -m "Log message for revision 1."
svn-test-work/local_tmp/greekfiles
http://localhost:25313/svn-test-work/local_tmp/repos --config-dir
/home/hwright/dev/svn-1.5.x/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom <TIME = 0.128389>
CMD: svnadmin create svn-test-work/repositories/copy_tests-73 --bdb-txn-nosync
<TIME = 0.047136>
CMD: svnadmin dump "svn-test-work/local_tmp/repos" | svnadmin load
"svn-test-work/repositories/copy_tests-73" --ignore-uuid <TIME = 0.013841>
CMD: svn co http://localhost:25313/svn-test-work/repositories/copy_tests-73
svn-test-work/working_copies/copy_tests-73 --config-dir
/home/hwright/dev/svn-1.5.x/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom <TIME = 0.090128>
CMD: svn ci -m "jkl;" svn-test-work/working_copies/copy_tests-73/A/mu
--config-dir
/home/hwright/dev/svn-1.5.x/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom <TIME = 0.089262>
CMD: svn cp -m asdf --non-interactive .
http://localhost:25313/svn-test-work/repositories/copy_tests-73/tag --config-dir
/home/hwright/dev/svn-1.5.x/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom <TIME = 0.102900>
CMD: svn up svn-test-work/working_copies/copy_tests-73 --config-dir
/home/hwright/dev/svn-1.5.x/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom <TIME = 0.091415>
PASS:  copy_tests.py 73: create a tag from a modified wc
hwright@spock:~/dev/svn-1.5.x/subversion/tests/cmdline$

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=985284