You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Res Pons <po...@hotmail.com> on 2007/04/16 19:11:40 UTC

What's the command to restore a deleted file

I'm using svn for window dos client and I don't see any commands to restore 
a deleted file. Help!

_________________________________________________________________
The average US Credit Score is 675. The cost to see yours: $0 by Experian. 
http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE

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

Re: What's the command to restore a deleted file

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 16, 2007, at 14:11, Res Pons wrote:

> I'm using svn for window dos client and I don't see any commands to  
> restore a deleted file. Help!

This is covered in the book, here:

http://svnbook.red-bean.com/en/1.2/ 
svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.resurrect


-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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

Re: What's the command to restore a deleted file

Posted by Res Pons <po...@hotmail.com>.
OK, I see Ryan's emails now and I see what I did wrong:

I did svn cp -r url file and I should've done svn cp -r url ./file

----Original Message Follows----
From: "Res Pons" <po...@hotmail.com>
To: jwg@google.com, users@subversion.tigris.org
Subject: Re: What's the command to restore a deleted file
Date: Mon, 16 Apr 2007 13:08:02 -0700

Thanks guys for all your help.  That command restored the file o'right but 
it also restored the entire subfolder and files from the previous revision 
and marked it as an added new folder to the current directory structure 
pending a commit?!

I hope, in the future versions svn, they will add an 'undelete' command to 
simply restore the latest head revisions of a deleted file automatically 
unless a revision is specified.

----Original Message Follows----
From: "Josh Gilkerson" <jw...@google.com>
To: "Res Pons" <po...@hotmail.com>, users@subversion.tigris.org
Subject: Re: What's the command to restore a deleted file
Date: Mon, 16 Apr 2007 12:39:35 -0700

Make a copy first!!!!!

Ok, now that I got that out of my system.  I assumed you removed the
file locally, but not in the repository.  ie 'rm filename', not 'svn
rm filename; svn commit;'.

I'm probably not the best to ask about this, but I'll take a stab at
it.  Someone else please correct me if there is a better/easier way.

You need to figure out what the last revision of this file that was checked 
in.
If you know the revision or a date, use them.
If you are on a project without a lot of commits, you might be able to
'svn info .', start with the revision given and work your way back
until one works.

svn cp -r <revision> <url> filename

then check it in.

On 4/16/07, Res Pons <po...@hotmail.com> wrote:
>I though svn revert will discard my local changes and refreshes or rather
>runs svn update to get the latest.  I did a "svn revert filename" in the
>folder where the file was deleted and svn echoed, "skipped"?!  There were a
>lot of updates in that folder and I don't any of the current new changes to
>be undone except to retrieve the one file.
>
>----Original Message Follows----
>From: "Josh Gilkerson" <jw...@google.com>
>To: "Res Pons" <po...@hotmail.com>
>CC: users@subversion.tigris.org
>Subject: Re: What's the command to restore a deleted file
>Date: Mon, 16 Apr 2007 12:15:00 -0700
>
>svn revert <filename>
>
>Will give you back the version repository as of your last update.
>
>On 4/16/07, Res Pons <po...@hotmail.com> wrote:
> >I'm using svn for window dos client and I don't see any commands to 
>restore
> >a deleted file. Help!
> >
> >_________________________________________________________________
> >The average US Credit Score is 675. The cost to see yours: $0 by 
>Experian.
> >http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> >For additional commands, e-mail: users-help@subversion.tigris.org
> >
> >
>
>
>--
>Josh Gilkerson
>Software Engineer
>Google, Inc � MV-1600 Plymouth (HQ)
>+1 (650) 253-1667 direct
>+1 (859) 608-7827 cell
>jwg@google.com
>
>_________________________________________________________________
>Interest Rates Fall Again! $430,000 Mortgage for $1,399/mo - Calculate new
>payment
>http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18679&moid=7581
>
>


--
Josh Gilkerson
Software Engineer
Google, Inc � MV-1600 Plymouth (HQ)
+1 (650) 253-1667 direct
+1 (859) 608-7827 cell
jwg@google.com

_________________________________________________________________
Download Messenger. Join the i�m Initiative. Help make a difference today. 
http://im.live.com/messenger/im/home/?source=TAGHM_APR07

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

_________________________________________________________________
Mortgage refinance is Hot. *Terms. Get a 5.375%* fix rate. Check savings 
https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h2bbb&disc=y&vers=925&s=4056&p=5117

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

Re: What's the command to restore a deleted file

Posted by Res Pons <po...@hotmail.com>.
Thanks guys for all your help.  That command restored the file o'right but 
it also restored the entire subfolder and files from the previous revision 
and marked it as an added new folder to the current directory structure 
pending a commit?!

I hope, in the future versions svn, they will add an 'undelete' command to 
simply restore the latest head revisions of a deleted file automatically 
unless a revision is specified.

----Original Message Follows----
From: "Josh Gilkerson" <jw...@google.com>
To: "Res Pons" <po...@hotmail.com>, users@subversion.tigris.org
Subject: Re: What's the command to restore a deleted file
Date: Mon, 16 Apr 2007 12:39:35 -0700

Make a copy first!!!!!

Ok, now that I got that out of my system.  I assumed you removed the
file locally, but not in the repository.  ie 'rm filename', not 'svn
rm filename; svn commit;'.

I'm probably not the best to ask about this, but I'll take a stab at
it.  Someone else please correct me if there is a better/easier way.

You need to figure out what the last revision of this file that was checked 
in.
If you know the revision or a date, use them.
If you are on a project without a lot of commits, you might be able to
'svn info .', start with the revision given and work your way back
until one works.

svn cp -r <revision> <url> filename

then check it in.

On 4/16/07, Res Pons <po...@hotmail.com> wrote:
>I though svn revert will discard my local changes and refreshes or rather
>runs svn update to get the latest.  I did a "svn revert filename" in the
>folder where the file was deleted and svn echoed, "skipped"?!  There were a
>lot of updates in that folder and I don't any of the current new changes to
>be undone except to retrieve the one file.
>
>----Original Message Follows----
>From: "Josh Gilkerson" <jw...@google.com>
>To: "Res Pons" <po...@hotmail.com>
>CC: users@subversion.tigris.org
>Subject: Re: What's the command to restore a deleted file
>Date: Mon, 16 Apr 2007 12:15:00 -0700
>
>svn revert <filename>
>
>Will give you back the version repository as of your last update.
>
>On 4/16/07, Res Pons <po...@hotmail.com> wrote:
> >I'm using svn for window dos client and I don't see any commands to 
>restore
> >a deleted file. Help!
> >
> >_________________________________________________________________
> >The average US Credit Score is 675. The cost to see yours: $0 by 
>Experian.
> >http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> >For additional commands, e-mail: users-help@subversion.tigris.org
> >
> >
>
>
>--
>Josh Gilkerson
>Software Engineer
>Google, Inc � MV-1600 Plymouth (HQ)
>+1 (650) 253-1667 direct
>+1 (859) 608-7827 cell
>jwg@google.com
>
>_________________________________________________________________
>Interest Rates Fall Again! $430,000 Mortgage for $1,399/mo - Calculate new
>payment
>http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18679&moid=7581
>
>


--
Josh Gilkerson
Software Engineer
Google, Inc � MV-1600 Plymouth (HQ)
+1 (650) 253-1667 direct
+1 (859) 608-7827 cell
jwg@google.com

_________________________________________________________________
Download Messenger. Join the i�m Initiative. Help make a difference today. 
http://im.live.com/messenger/im/home/?source=TAGHM_APR07

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

Re: What's the command to restore a deleted file

Posted by Josh Gilkerson <jw...@google.com>.
Make a copy first!!!!!

Ok, now that I got that out of my system.  I assumed you removed the
file locally, but not in the repository.  ie 'rm filename', not 'svn
rm filename; svn commit;'.

I'm probably not the best to ask about this, but I'll take a stab at
it.  Someone else please correct me if there is a better/easier way.

You need to figure out what the last revision of this file that was checked in.
If you know the revision or a date, use them.
If you are on a project without a lot of commits, you might be able to
'svn info .', start with the revision given and work your way back
until one works.

svn cp -r <revision> <url> filename

then check it in.

On 4/16/07, Res Pons <po...@hotmail.com> wrote:
> I though svn revert will discard my local changes and refreshes or rather
> runs svn update to get the latest.  I did a "svn revert filename" in the
> folder where the file was deleted and svn echoed, "skipped"?!  There were a
> lot of updates in that folder and I don't any of the current new changes to
> be undone except to retrieve the one file.
>
> ----Original Message Follows----
> From: "Josh Gilkerson" <jw...@google.com>
> To: "Res Pons" <po...@hotmail.com>
> CC: users@subversion.tigris.org
> Subject: Re: What's the command to restore a deleted file
> Date: Mon, 16 Apr 2007 12:15:00 -0700
>
> svn revert <filename>
>
> Will give you back the version repository as of your last update.
>
> On 4/16/07, Res Pons <po...@hotmail.com> wrote:
> >I'm using svn for window dos client and I don't see any commands to restore
> >a deleted file. Help!
> >
> >_________________________________________________________________
> >The average US Credit Score is 675. The cost to see yours: $0 by Experian.
> >http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> >For additional commands, e-mail: users-help@subversion.tigris.org
> >
> >
>
>
> --
> Josh Gilkerson
> Software Engineer
> Google, Inc · MV-1600 Plymouth (HQ)
> +1 (650) 253-1667 direct
> +1 (859) 608-7827 cell
> jwg@google.com
>
> _________________________________________________________________
> Interest Rates Fall Again! $430,000 Mortgage for $1,399/mo - Calculate new
> payment
> http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18679&moid=7581
>
>


-- 
Josh Gilkerson
Software Engineer
Google, Inc · MV-1600 Plymouth (HQ)
+1 (650) 253-1667 direct
+1 (859) 608-7827 cell
jwg@google.com

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


Re: What's the command to restore a deleted file

Posted by Josh Gilkerson <jw...@google.com>.
svn revert <filename>

Will give you back the version repository as of your last update.

On 4/16/07, Res Pons <po...@hotmail.com> wrote:
> I'm using svn for window dos client and I don't see any commands to restore
> a deleted file. Help!
>
> _________________________________________________________________
> The average US Credit Score is 675. The cost to see yours: $0 by Experian.
> http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>


-- 
Josh Gilkerson
Software Engineer
Google, Inc · MV-1600 Plymouth (HQ)
+1 (650) 253-1667 direct
+1 (859) 608-7827 cell
jwg@google.com

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


Re: What's the command to restore a deleted file

Posted by Gaurav Kothiyal <ko...@gmail.com>.
http://svn.haxx.se/users/archive-2005-02/0896.shtml

On 4/16/07, Res Pons <po...@hotmail.com> wrote:
> I'm using svn for window dos client and I don't see any commands to restore
> a deleted file. Help!
>
> _________________________________________________________________
> The average US Credit Score is 675. The cost to see yours: $0 by Experian.
> http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>


-- 
Gaurav Kothiyal

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