Concerning Re: svn copy breaks on svn update
Stefan Sperling wrote on 26 Aug 2009, 19:16, at least in part:
> On Wed, Aug 26, 2009 at 07:32:45PM +0200, Jan Hendrik wrote:
> > Hi!
> > It seems that the source of a file svn copied to a new
> > location&name may not be edited until the copy is committed (and
> > probably all working copies updated).
> > In the course of some refactoring to remove duplicate content one
> > user did the following:
> > svn cp /trunk/foo.txt /trunk/common/bar.txt
> > He then edited /trunk/foo.txt to remove the content, leaving only
> > header & footer, and added an include statement for
> > /trunk/common/bar.txt. He did the same on a number of other foo.txt
> > in various directories.
> > He then edited /trunk/common/bar.txt to remove header & footer.
> > He then committed his changes successfully.
> > Updating other working copies now fails in /trunk/common:
> > Conflicted /trunk/common/bar.txt
> > Error in directory /trunk/common
> > Error Can't open file '/trunk/common/bar.txt':
> > Error The system cannot find the quoted file
> > (third line translated as good as possible).
> Can you provide a script that starts with an empty repository
> and ends with this error?
Well, here is a script which should be close enough, except that it
does not produce yesterday's experience. IOW with this things
work as one would expect. Besides the test file "foo.php" attached.
The usual fact aside that at demo time things don't work the way
they do/did in production, what startles me:
1) I have never before seen the extension ".copied" and was unable
to at least get a glimpse of it during the test update of test-wc2
2) Could it be there is a race condition in svn update? But then
Why would it try to replicate the svn copy when foo1.php even
might have been modified by someone else in an another revision
between the commit of svn copy and svn up?
3) Can it be that the commit of the svn copy together with the
modification has broken the repository in some way? Yet we still
can do commits successfully, even commits touching files from
that trouble revision (from the same working copy). However, we
have not tried any more svn updates today; we cannot afford to
render any further working copy useless nor spend hours for
checking out one after the other at this moment.
Here's the script now:
svnadmin create d:/testrepos --fs-type bdb
svn mkdir file:///d:/testrepos/trunk -m "Add trunk"
svn mkdir file:///d:/testrepos/trunk/common -m "Add common"
svn co file:///d:/testrepos/trunk d:/tmp/test-wc1
svn co file:///d:/testrepos/trunk d:/tmp/test-wc2
cd /d d:\tmp\test-wc1
copy \someplace\foo.php foo1.php
copy \someplace\foo.php foo2.php
svn add foo1.php foo2.php
svn ci -m "Add foo?.php in trunk"
svn up d:/tmp/test-wc2
svn cp ./foo1.php ./common/bar1.inc
svn cp ./foo2.php ./common/bar2.inc
; edit foo?.php: remove all paragraphs except first & last
; edit common/bar?.inc: remove first & last paragraph
; A + common/bar1.inc
; A + common/bar2.inc
; M foo1.php
; M foo2.php
svn ci -m "Copy foo?.php to common/bar?.inc, strip out header&footer; remove content from foo?.php"
; committed rev. 4
; A common/bar1.inc
; A common/bar2.inc
; U foo1.php
; U foo2.php
; Updated to rev. 4
foo.php is attached for peruse.
Any suggestion greatly appreciated.
Some may try and tell us that this is the end of an era.
But what they overlook is that in America every day is a new beginning,
and every sunset is merely the latest milestone on a voyage that never ends.
-- Ronald Reagan, January 1993
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-27 13:43:23 CEST
- Application/Octet-stream attachment: foo.php