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

Re: How to rename an added (not committed) file

From: Hyuns Kim <sng2nara_at_gmail.com>
Date: 2004-10-30 06:32:37 CEST

You can use 'revert' command.

% svn add test.txt
A test.txt

% mv test.txt test2.txt

% svn status
? test2.txt
! test.txt

% svn revert test.txt
Reverted 'test.txt'

% svn add test2.txt
A test2.txt

;-)

On Fri, 29 Oct 2004 22:47:18 -0400, James FitzGibbon
<jfitzgibbon@primustel.ca> wrote:
> On Oct 29, 2004, at 9:16 PM, Andrew Arnott wrote:
>
> > 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?
>
> I use this sequence:
>
> [expn:james] ~/perl (5) % svn add foo
> A foo
> [expn:james] ~/perl (6) % mv foo bar
> [expn:james] ~/perl (8) % svn del foo
> D foo
> [expn:james] ~/perl (9) % svn add bar
> A bar
> [expn:james] ~/perl (10) % svn stat
> A bar
> [expn:james] ~/perl (11) %
>
> Because the pending add is cancelled out before the commit, the
> existence
> of foo is never reflected in the repo.
>
> Regards.
>
> --
> j.
>
> ----------------------------------------------------------------------------
> This electronic message contains information from Primus Telecommunications
> Canada Inc. ("PRIMUS") , which may be legally privileged and confidential.
> The information is intended to be for the use of the individual(s) or entity
> named above. If you are not the intended recipient, be aware that any
> disclosure, copying, distribution or use of the contents of this information
> is prohibited. If you have received this electronic message in error, please
> notify us by telephone or e-mail (to the number or address above)
> immediately. Any views, opinions or advice expressed in this electronic
> message are not necessarily the views, opinions or advice of PRIMUS.
> It is the responsibility of the recipient to ensure that
> any attachments are virus free and PRIMUS bears no responsibility
> for any loss or damage arising in any way from the use
> thereof.The term "PRIMUS" includes its affiliates.
> ----------------------------------------------------------------------------
> Pour la version en franšais de ce message, veuillez voir
> http://www.primustel.ca/fr/legal/cs.htm
> ----------------------------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Oct 30 06:33:01 2004

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