Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does moving a file in SVN delete its revision history?

Tags:

svn

revision

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?

like image 649
SeanDowney Avatar asked Apr 29 '11 23:04

SeanDowney


People also ask

Does svn move preserve history?

Moving/renaming in subversion keeps history intact. Save this answer.

Can I move svn folder to another location?

Moving files and folders select the files or directories you want to move. right drag them to the new location inside the working copy. release the right mouse button. in the popup menu select Context Menu → SVN Move versioned files here.

Where is svn history stored?

They are stored in the svn:log property. You can add the --revprop flag to the various property commands to view & edit this property.

How can I get previous revision from svn?

Use the revision log dialog Select the file or folder in which you need to revert the changes. If you want to revert all changes, this should be the top level folder. Select TortoiseSVN → Show Log to display a list of revisions. You may need to use Show All or Next 100 to show the revision(s) you are interested in.


2 Answers

No.

svn move is equivalent to svn copy, and then svn delete. Copied files share their history with the originals.

like image 174
Oliver Charlesworth Avatar answered Sep 20 '22 15:09

Oliver Charlesworth


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.

like image 43
blubb Avatar answered Sep 17 '22 15:09

blubb