Can I lose change information with svn move -force?

svn move allows you to move the file while maintaining traceability. Now I have the following script:

  • svn copy dir1 / file1 dir1 / file2
  • modified file dir1 / file1 and dir1 / file2
  • svn move dir1 / file1 to dir2 / file1

Subversion tells me that it does not move the file unless I use the --force , because there are changes to dir1 / file1. Suppose I do a forced move, what are the consequences for tracking changes to file1 and / or file2?

+4
source share
2 answers

No, you will not lose information about the change. But the -force option reminds you that you have local modifications and you might not want to move this file (for now). And you cannot “return” the movement using “svn revert” later without losing these local modifications. This is why you should use --force.

+2
source

Well, svn complains about file1 and file2, which are not executed before moving file1 to file2. If you force and commit, you will have changes to file1 in the repository, but local changes to file2 will be lost. However, this should not be a problem, when you move file1 to file2, you expect to overwrite the contents of file2.

Tracking is a provision, what you lose is local changes in the file2.

0
source

All Articles