[svlug] Preventing a Revision Control Flamewar

Rick Moen rick at linuxmafia.com
Mon Oct 20 11:15:19 PDT 2008


Quoting N.J. Thomas (thomas at zaph.org):

> As someone else in this thread pointed out, svn does file renames while
> preserving history just fine -- and this has always been the case (i.e.
> there has never been a time when "svn mv" did not preserve revision
> history).

The point -- as very clearly stated -- was not that there's anything
wrong with "svn mv", but rather that _rename_ loses history.

You and Brian now officially owe me a refund of the time I wasted
re-finding this among other things:

 http://subversion.tigris.org/issues/show_bug.cgi?id=898
 Summary: implement true renames

And indeed, needing to implement "svn move" as a copy and delete (and thus
not as an atomic operation) is pretty ugly design.  As is this (for
MS-Windows users) from
http://tortoisesvn.net/docs/nightly/TortoiseSVN_hr/tsvn-dug-rename.html:

  Fortunately there are (at least) two possible methods to rename a file without
  losing its log history. It is important to rename it within subversion.
  Just renaming in the explorer will corrupt your working copy!

  Solution A) (recommended)

  1. Commit the changes in your working copy.

  2. Rename the file from UPPERcase to upperCASE directly in the repository
   using the repository browser.

   Update your working copy.

   Solution B)

   1. Rename from UPPERcase to UPPERcase_ with the rename command in the
   TortoiseSVN submenu.

   2. Commit the changes.

   3.  Rename from UPPERcase_ to upperCASE.

   Commit the changes.





More information about the svlug mailing list