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

Reverting tree conflicts may leave an working copy inconsistent with the repository

From: Jan Normann Nielsen <spam_at_dubbekarl.dk>
Date: Thu, 06 Aug 2009 12:56:16 +0200

Hi

I've noticed a (to me) very strange behavior with Subversion 1.6.3 when
reverting files with tree conflicts. I'm using this Subversion version:

http://subversion.tigris.org/files/documents/15/46144/svn-win32-1.6.3.zip

running on Windows XP Professional SP-3 with all the latest updates.

Attached are two files:

svn-error.txt: Actually a .bat file with a working example. Comments are
added which should make the contents understandable.
svn-error-output.txt: Output of the bat file.

The example shows a simple repository and a set of operations that make
a working copy inconsistent with the repository, although Subversion
shows no local modifications and an update doesn't retrieve anything.

Can anyone tell me if this is the expected behaviour or a bug?

Best wishes,
Jan

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].

rem Dump SVN details
svn --version

rem Create repos
mkdir C:\repos
svnadmin create C:\repos

rem Check out the repository
svn co file://localhost/C:/repos

rem Add file.txt
cd repos
echo Test > file.txt
svn add file.txt
svn commit -m "Add file.txt"

rem Update back to r0
svn update -r 0

rem Merge r1 changes from /trunk to show them as changes
svn merge -c 1 .

rem Update to most recent revision. This will give a tree conflict
svn update

rem Show the tree conflict
svn status

rem Revert the tree conflict and the merge info
svn revert file.txt
svn revert .

rem Show that file.txt has now somehow become unversioned although it's in the repository at this revision
svn status

rem Delete the unversioned file
del file.txt

rem Show that there are no local modifications of the working copy and just to make sure, update it again to the most recent revision
svn status
svn update

rem We now have an up-to-date working copy without file.txt but without any local modifications
pause

C:\Documents and Settings\Jan\Desktop>rem Dump SVN details

C:\Documents and Settings\Jan\Desktop>svn --version
svn, version 1.6.3 (r38063)
   compiled Jun 22 2009, 09:59:12

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

C:\Documents and Settings\Jan\Desktop>rem Create repos

C:\Documents and Settings\Jan\Desktop>mkdir C:\repos

C:\Documents and Settings\Jan\Desktop>svnadmin create C:\repos

C:\Documents and Settings\Jan\Desktop>rem Check out the repository

C:\Documents and Settings\Jan\Desktop>svn co file://localhost/C:/repos
Checked out revision 0.

C:\Documents and Settings\Jan\Desktop>rem Add file.txt

C:\Documents and Settings\Jan\Desktop>cd repos

C:\Documents and Settings\Jan\Desktop\repos>echo Test 1>file.txt

C:\Documents and Settings\Jan\Desktop\repos>svn add file.txt
A file.txt

C:\Documents and Settings\Jan\Desktop\repos>svn commit -m "Add file.txt"
Adding file.txt
Transmitting file data .
Committed revision 1.

C:\Documents and Settings\Jan\Desktop\repos>rem Update back to r0

C:\Documents and Settings\Jan\Desktop\repos>svn update -r 0
D file.txt
Updated to revision 0.

C:\Documents and Settings\Jan\Desktop\repos>rem Merge r1 changes from /trunk to show them as changes

C:\Documents and Settings\Jan\Desktop\repos>svn merge -c 1 .
--- Merging r1 into '.':
A file.txt

C:\Documents and Settings\Jan\Desktop\repos>rem Update to most recent revision. This will give a tree conflict

C:\Documents and Settings\Jan\Desktop\repos>svn update
   C file.txt
At revision 1.
Summary of conflicts:
  Tree conflicts: 1

C:\Documents and Settings\Jan\Desktop\repos>rem Show the tree conflict

C:\Documents and Settings\Jan\Desktop\repos>svn status
 M .
A + C file.txt
> local add, incoming add upon update

C:\Documents and Settings\Jan\Desktop\repos>rem Revert the tree conflict and the merge info

C:\Documents and Settings\Jan\Desktop\repos>svn revert file.txt
Reverted 'file.txt'

C:\Documents and Settings\Jan\Desktop\repos>svn revert .
Reverted '.'

C:\Documents and Settings\Jan\Desktop\repos>rem Show that file.txt has now somehow become unversioned although it's in the repository at this revision

C:\Documents and Settings\Jan\Desktop\repos>svn status
? file.txt

C:\Documents and Settings\Jan\Desktop\repos>rem Delete the unversioned file

C:\Documents and Settings\Jan\Desktop\repos>del file.txt

C:\Documents and Settings\Jan\Desktop\repos>rem Show that there are no local modifications of the working copy and just to make sure, update it again to the most
 recent revision

C:\Documents and Settings\Jan\Desktop\repos>svn status

C:\Documents and Settings\Jan\Desktop\repos>svn update
At revision 1.

C:\Documents and Settings\Jan\Desktop\repos>rem We now have an up-to-date working copy without file.txt but without any local modifications

C:\Documents and Settings\Jan\Desktop\repos>pause
Press any key to continue . . .
Received on 2009-08-06 13:00:59 CEST

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

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