Does moving a file in SVN delete its revision history?
I realize this might be an easy question that I may have overlooked in the documentation, but I didn't find any other questions like this.
When I move a file,开发者_开发技巧 or in my case a whole ton of files (I moving everything into trunk from repo root) do I lose revision history? My thought is it looks a lot like it's deleting and adding files and I would therefore lose history. Thoughts?
No.
svn move
is equivalent to svn copy
, and then svn delete
. Copied files share their history with the originals.
You won't lose anything:
From svn help mv
:
Note: this subcommand is equivalent to a 'copy' and 'delete'.
Therefore, from svn help copy
:
copy (cp): Duplicate something in working copy or repository, remembering history.
If you remembered to use svn mv
then history will be preserved.
But if you manually worked with cp
, svn delete
and svn add
then history will not be preserved.
精彩评论