You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Chen <qu...@cs.berkeley.edu> on 2005/09/17 00:39:33 UTC

contrib: svn-fixup-rename

Here's a client-side script for fixing renames.

I make this mistake all the time:
- Instead of "svn mv oldname newname", the user types "mv oldname
  newname".
- Even worse: the file might even be modified before or after the
  rename.
- Even worse: this may have happened for many files, e.g. "mv *.h
  include/".
    - svn (command-line) doesn't support a good way to do this
      anyway.

"svn-x-mv oldname newname" in this case fixes the problem for one
particular rename.  It's a complete hack - there must be a
wc-level way to do this elegantly (please tell me how).  This is
just a building block for the interesting one:

"svn-fixup-rename": heuristically matches up missing and new
files.  It Does The Right Thing.  Heuristics are based on file
contents and filename.


Does this sound useful to other people?  I can polish this,
improve heuristics...  svn-fixup-rename can even define a special
string to insert as a comment in the file, in effect emulating
Arch's solution to this problem (embedding metadata in the data).


-- 
Karl 2005-09-16 17:24

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: contrib: svn-fixup-rename

Posted by Karl Chen <qu...@cs.berkeley.edu>.
[[I accidentally didn't attach to the previous message...]]


Here's a client-side script for fixing renames.

I make this mistake all the time:
- Instead of "svn mv oldname newname", the user types "mv oldname
  newname".
- Even worse: the file might even be modified before or after the
  rename.
- Even worse: this may have happened for many files, e.g. "mv *.h
  include/".
    - svn (command-line) doesn't support a good way to do this
      anyway.

"svn-x-mv oldname newname" in this case fixes the problem for one
particular rename.  It's a complete hack - there must be a
wc-level way to do this elegantly (please tell me how).  This is
just a building block for the interesting one:

"svn-fixup-rename": heuristically matches up missing and new
files.  It Does The Right Thing.  Heuristics are based on file
contents and filename.


Does this sound useful to other people?  I can polish this,
improve heuristics...  svn-fixup-rename can even define a special
string to insert as a comment in the file, in effect emulating
Arch's solution to this problem (embedding metadata in the data).