[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

How to rename an added (not committed) file

From: Andrew Arnott <andrewarnott_at_gmail.com>
Date: 2004-10-30 03:16:07 CEST

Hey, I've run into this problem repeatedly, and I'm asking you
experienced SVN users how to overcome it. I add a file, then realize
that the name doesn't fit very well. I haven't committed my changes
yet. But SVN makes it difficult to rename the file unless I commit
first, which seems like a waste: why commit something you know is
wrong?

Consider this console, done within a working copy:

andrew@ynot:/tmp/wc> touch torename
andrew@ynot:/tmp/wc> svn add torename
A torename
andrew@ynot:/tmp/wc> svn mv torename torename2
svn: Use --force to override this restriction
svn: Move will not be attempted unless forced
svn: 'torename' has local modifications
andrew@ynot:/tmp/wc> mv torename torename3
andrew@ynot:/tmp/wc> ls
another somedir some file torename3
andrew@ynot:/tmp/wc> svn st
? torename3
! torename
andrew@ynot:/tmp/wc>

How to overcome this without commiting or reverting first? Commit
saves a mistake, and revert erases the file, or maybe not---i'm not
sure on that point.

Any help would be greatly appreciated!

-- 
Andrew Arnott
Web Developer
Brigham Young University
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Oct 30 03:16:34 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.