質問

Scenario: Repository structure changed from /trunk/ to /projectName/trunk/ and the local copy is outdated and has a lot of modifications.

Question: How can I update the working copy directory path without updating the files.

Normally the solution to directory changes within the same repository would be to use the svn switch command. The problem is that it performs an update upon execution, the working copy is outdated and has a lot of local modifications that would conflict with the current revision.

What I'm looking for is the same behavior of the --relocate switch, which updates the path but doesn't update the files. This way I can regain the ability check the statuses and differences for each file separately while maintaining the local copy functional (this is my main concern).

The switch --help provides a few arguments to deal with conflicts but I could find nothing that would stop the update altogether.

Any ideas? Thanks a lot.

役に立ちましたか?

解決

The solution for this particular case was simpler than I thought.

svn switch performs an update to the latest revision in the repository by default, specifying the BASE revision (last revision obtained from the repository) of the working copy left most of the files untouched.

I got the BASE revision of my working copy (294) by issuing the svn info command.

Then just issuing the switch command with the BASE revision updated the repository path leaving most of the files untouched.

svn switch -r 294 /projectName/trunk/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top