[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Tree Conflicts: Edit lands on locally replaced without history file

From: Paul Burba <ptburba_at_gmail.com>
Date: Sun, 8 Feb 2009 21:08:59 -0500

While working on the Issue #3334 branch I keep coming across many
cases where we update and end up with a WC that can't be resolved and
committed. Usually the desired behavior is pretty obvious, but
update_tests.py 33 'update wc containing a replaced-with-history file'
demonstrates a case I'm not very certain about: An update brings down
a text edit on file that is locally replaced without history:

# We have this WC:

TRUNK.DBG>svn st -v update_tests-33
                 1 1 jrandom update_tests-33
                 1 1 jrandom update_tests-33\A
                 1 1 jrandom update_tests-33\A\B
                 1 1 jrandom update_tests-33\A\B\lambda
                 1 1 jrandom update_tests-33\A\B\E
                 1 1 jrandom update_tests-33\A\B\E\alpha
                 1 1 jrandom update_tests-33\A\B\E\beta
                 1 1 jrandom update_tests-33\A\B\F
                 1 1 jrandom update_tests-33\A\mu
                 1 1 jrandom update_tests-33\A\C
                 1 1 jrandom update_tests-33\A\D
                 1 1 jrandom update_tests-33\A\D\gamma
                 1 1 jrandom update_tests-33\A\D\G
                 1 1 jrandom update_tests-33\A\D\G\pi
                 1 1 jrandom update_tests-33\A\D\G\rho
                 1 1 jrandom update_tests-33\A\D\G\tau
                 1 1 jrandom update_tests-33\A\D\H
                 1 1 jrandom update_tests-33\A\D\H\chi
                 1 1 jrandom update_tests-33\A\D\H\omega
                 1 1 jrandom update_tests-33\A\D\H\psi
R 1 1 jrandom update_tests-33\iota

TRUNK.DBG>svn diff update_tests-33
Index: update_tests-33/iota
===================================================================
--- update_tests-33/iota (revision 1)
+++ update_tests-33/iota (working copy)
@@ -1 +0,0 @@
-This is the file 'iota'.

# Here is the incoming text change:

TRUNK.DBG>svn diff update_tests-33\iota -r1:HEAD
Index: update_tests-33/iota
===================================================================
--- update_tests-33/iota (revision 1)
+++ update_tests-33/iota (revision 2)
@@ -1 +1,2 @@
 This is the file 'iota'.
+New line in 'iota'

# We update and get the expected tree conflict:

TRUNK.DBG>svn up update_tests-33
Skipped 'update_tests-33\iota'
At revision 2.
Summary of conflicts:
  Skipped paths: 1

# But iota is still at rev 1...

TRUNK.DBG>svn st update_tests-33 -v
                 2 2 jrandom update_tests-33
                 2 1 jrandom update_tests-33\A
                 2 1 jrandom update_tests-33\A\B
                 2 1 jrandom update_tests-33\A\B\lambda
                 2 1 jrandom update_tests-33\A\B\E
                 2 1 jrandom update_tests-33\A\B\E\alpha
                 2 1 jrandom update_tests-33\A\B\E\beta
                 2 1 jrandom update_tests-33\A\B\F
                 2 1 jrandom update_tests-33\A\mu
                 2 1 jrandom update_tests-33\A\C
                 2 1 jrandom update_tests-33\A\D
                 2 1 jrandom update_tests-33\A\D\gamma
                 2 1 jrandom update_tests-33\A\D\G
                 2 1 jrandom update_tests-33\A\D\G\pi
                 2 1 jrandom update_tests-33\A\D\G\rho
                 2 1 jrandom update_tests-33\A\D\G\tau
                 2 1 jrandom update_tests-33\A\D\H
                 2 1 jrandom update_tests-33\A\D\H\chi
                 2 1 jrandom update_tests-33\A\D\H\omega
                 2 1 jrandom update_tests-33\A\D\H\psi
R C 1 1 jrandom update_tests-33\iota
> local delete, incoming edit upon update

TRUNK.DBG>svn diff update_tests-33
Index: update_tests-33/iota
===================================================================
--- update_tests-33/iota (revision 1)
+++ update_tests-33/iota (working copy)
@@ -1 +0,0 @@
-This is the file 'iota'.

# ...So even if we resolve, we can't commit because 'iota' is out of date.
# (and of course if we update we are back in the same position)

TRUNK.DBG>svn resolved -R update_tests-33
Resolved conflicted state of 'update_tests-33\iota'

TRUNK.DBG>svn ci -m "" update_tests-33
Replacing update_tests-33\iota
..\..\..\subversion\libsvn_client\commit.c:867: (apr_err=160028)
svn: Commit failed (details follow):
..\..\..\subversion\libsvn_repos\commit.c:124: (apr_err=160028)
svn: File '/iota' is out of date

So what would we like to see for behavior here? Should the text base
for iota simply be updated and a tree conflict generated on the delete
half of the replace, leaving us with a WC like this?

BETTER???>svn st update_tests-33 -v
                 2 2 jrandom update_tests-33
                 2 1 jrandom update_tests-33\A
                 2 1 jrandom update_tests-33\A\B
                 2 1 jrandom update_tests-33\A\B\lambda
                 2 1 jrandom update_tests-33\A\B\E
                 2 1 jrandom update_tests-33\A\B\E\alpha
                 2 1 jrandom update_tests-33\A\B\E\beta
                 2 1 jrandom update_tests-33\A\B\F
                 2 1 jrandom update_tests-33\A\mu
                 2 1 jrandom update_tests-33\A\C
                 2 1 jrandom update_tests-33\A\D
                 2 1 jrandom update_tests-33\A\D\gamma
                 2 1 jrandom update_tests-33\A\D\G
                 2 1 jrandom update_tests-33\A\D\G\pi
                 2 1 jrandom update_tests-33\A\D\G\rho
                 2 1 jrandom update_tests-33\A\D\G\tau
                 2 1 jrandom update_tests-33\A\D\H
                 2 1 jrandom update_tests-33\A\D\H\chi
                 2 1 jrandom update_tests-33\A\D\H\omega
                 2 1 jrandom update_tests-33\A\D\H\psi
R C 2 1 jrandom update_tests-33\iota
> local delete, incoming edit upon update

BETTER???>svn diff update_tests-33
Index: update_tests-33/iota
===================================================================
--- update_tests-33/iota (revision 2)
+++ update_tests-33/iota (working copy)
@@ -1,2 +0,0 @@
-This is the file 'iota'.
-New line in 'iota'

Paul

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1126976
Received on 2009-02-09 03:09:23 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.