ysap
ysap

Reputation: 8115

How to tell if a remote copy of a working file was changed with TortoiseSVN

When using ToroiseSVN, one may update his local copy of a repo with changes made by other parties and checked in to the remote repo.

If a remote file was changed while a local copy was in work, then updating the directory will not overwrite the local copy with the remote one (as it should be). However, TotoiseSVN's Update window does not indicate that there is a conflict.

Is there a way to get an indication for such conflict at the time of update?

Note: the Windows Explorer view shows the file as changed, so this is some sort of an indication, but if there are multiple files in multiple directories across the repo, I'd like to get a list of such at update time.

Upvotes: 0

Views: 291

Answers (1)

Chad Nouis
Chad Nouis

Reputation: 7041

This behaviour may be specific to TortoiseSVN.

The following Command Prompt session uses the command line SVN client to match your scenario. In the session, I do the following:

  • Checkout two working copies of the same repository.
  • Create a file named blocker.txt in the first working copy.
  • Create another file named blocker.txt in the second working copy.
  • Add and commit to the repository only the blocker.txt in the second working copy. DON'T add the blocker.txt from the first working copy.
  • Update the first working copy.

Command Prompt session

C:\>svn --version   | findstr /c:"svn, version"
svn, version 1.7.10 (r1485443)

C:\>svnadmin create C:\Temp\svn-test-repos

C:\>svn co file:///c:/Temp/svn-test-repos C:\Temp\wc1
Checked out revision 0.

C:\>svn co file:///c:/Temp/svn-test-repos C:\Temp\wc2
Checked out revision 0.

C:\>echo My first file  1>C:\Temp\wc1\blocker.txt

C:\>echo My second file  1>C:\Temp\wc2\blocker.txt

C:\>svn add C:\Temp\wc2\blocker.txt
A         Temp\wc2\blocker.txt

C:\>svn commit --message "blocker.txt added" C:\Temp\wc2
Adding         Temp\wc2\blocker.txt
Transmitting file data .
Committed revision 1.

The update of the first working copy results in the following error:

C:\>svn update --non-interactive C:\Temp\wc1
Updating 'Temp\wc1':
   C Temp\wc1\blocker.txt
At revision 1.
Summary of conflicts:
  Tree conflicts: 1

C:\>svn stat C:\Temp\wc1
D     C C:\Temp\wc1\blocker.txt
      >   local unversioned, incoming add upon update
Summary of conflicts:
  Tree conflicts: 1

Whereas TortoiseSVN updates the unversioned file without a conflict, the command line client has a conflict.

I don't know if you can use TortoiseSVN to get the behaviour you want. You may have to use the command line tool.

Upvotes: 1

Related Questions