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

Re: best way to restore a 'svn rm " file

From: Andy Levy <andy.levy_at_gmail.com>
Date: Wed, 27 Jan 2010 23:07:14 -0500

On Wed, Jan 27, 2010 at 23:02, Pat Farrell <pfarrell_at_pfarrell.com> wrote:
> One of my developers did a
> svn rm foo.java
> command, and committed it. He meant well, but it was not a good idea.
>
> I could retrieve the file from the repository with
>
> svn update foo.java -r 1234
>
> which would retrieve an older copy. svn would display a "A" with the file.
>
> but svn status
> showed nothing. Nothing to commit.
>
> and a subsequent
> svn update
> would delete the file again.
>
> What is the proper sequence of commands to get the file back and insert
> it back into the repository? I'd rather that the deletion be vanished,
> but if that is hard, what it the proper way to get it back and add it
> back to the stream of revisions?

You want a "reverse merge" - essentially undoing what was done. See
http://svnbook.red-bean.com/en/1.5/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.resurrect
Received on 2010-01-28 05:07:53 CET

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.