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

best way to revert a file rename

From: Adrian Bridgett <adrian.bridgett_at_opsera.com>
Date: 2005-11-30 14:01:24 CET

Hi,

I'm trying to add undo support into svn_load_dirs (too many typos!) and
I wondered what the preferred way of revert a file rename is. After a
fair while googling I've only seen reverts of a deletion or of file
alteration discussed.

So imagine I've just done "svn mv foo.original foo.renamed" and now want
to revert this.

I'm pretty new to subversion, I tried a "mv" in the opposite direction
and got a message:
svn: Use --force to override this restriction
svn: Move will not be attempted unless forced
svn: 'foo.renamed' has local modifications

Trying to force this I get:

svn: 'foo.original' is scheduled for deletion; it must be committed
before being overwritten

Ideally I want SVN to forget I even tried to rename the file. One thing
I can guarantee is that no commit has been done - only a mv.

Hmm - looks like what I need is:

svn revert foo.original
svn revert foo.renamed
rm foo.renamed

Thanks

Adrian

-- 
Adrian Bridgett <adrian.bridgett@opsera.com>,  Software Architect
Mobile: +44 (0) 7773-778251
GoogleTalk: adrian.bridgett@gmail.com
Skype: abridgett
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 30 16:07:48 2005

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.