You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Javier Alvarado <qu...@yahoo.com> on 2008/03/06 00:22:45 UTC

How to "un-checkout" from svn

Is there a way to really "un-checkout" something from svn? I can't figure out a way to do it from the docs, and my web searches have been fruitless.

* svn delete <path> deletes the files from my working copy, _but also from the repository when I commit_. I don't want to delete them from the repo.

* rm -rf <path> deletes the files from my working copy, _but not their information from .svn/_. Therefore, when I subsequently do an svn status, they are still listed and flagged as missing. I don't want that either.

What I want is a clean way to tell svn "forget I ever checked these out" so that I can clean up my working copy. So, what I'm doing right now is either manually hacking .svn/entries myself or moving the old checkout of the way and re-checking-out just the stuff I still want.

Am I missing something obvious? Or am I really the only person who's ever wanted to do this?

Thanks in advance for any help!

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

Re: How to "un-checkout" from svn

Posted by jfinley <jf...@tech4learning.com>.
Though this is years late.. I believe what you want is to do the command:
svn update --set-depth exclude <path>

It is documented here:
http://svnbook.red-bean.com/en/1.6/svn.advanced.sparsedirs.html





--
View this message in context: http://subversion.1072662.n5.nabble.com/How-to-un-checkout-from-svn-tp132246p186633.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: How to "un-checkout" from svn

Posted by Javier Alvarado <qu...@yahoo.com>.
Yeah, a new svn co -N is exactly what I've been doing. And yes, I've 
been bitten by doing the svn update without the -N flag and had to hit 
Ctrl-C to stop it from checking a lot of stuff I don't need.

Jeff Mitchell wrote:
> Javier--
>
> I don't think you can clean up your working copy once it's all checked
> out, but if you can check out a working copy anew, try using the -N
> flag (no recursion).  It will allow you to selectively check out the
> contents of various folders while still keeping the folders themselves
> versioned (so you can go to a higher-level directory and do a checkin
> on the directories you *did* check out all at once).
>
> As Steve pointed out, you can't only decide to check out certain files
> in a directory, but you can tell it to only check out certain
> directories.
>
> Be warned though -- if you do an svn up in a directory where you've
> previously checked specific things out using the -N flag, it will
> update *everything* unless you also specify the -N flag with updates.
> It becomes more maintainable to (easily) script this scenario than
> doing the various updates with -N by hand.
>
> --Jeff
>
>   



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

Re: How to "un-checkout" from svn

Posted by Jeff Mitchell <je...@gmail.com>.
Javier--

I don't think you can clean up your working copy once it's all checked
out, but if you can check out a working copy anew, try using the -N
flag (no recursion).  It will allow you to selectively check out the
contents of various folders while still keeping the folders themselves
versioned (so you can go to a higher-level directory and do a checkin
on the directories you *did* check out all at once).

As Steve pointed out, you can't only decide to check out certain files
in a directory, but you can tell it to only check out certain
directories.

Be warned though -- if you do an svn up in a directory where you've
previously checked specific things out using the -N flag, it will
update *everything* unless you also specify the -N flag with updates.
It becomes more maintainable to (easily) script this scenario than
doing the various updates with -N by hand.

--Jeff

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

Re: How to "un-checkout" from svn

Posted by Javier Alvarado <qu...@yahoo.com>.
Sorry if my original email was not clear enough. I actually was just 
looking for a simple, clean way to get rid of something from my working 
copy (*only*) of something once I didn't need it anymore. I know it 
doesn't cause any harm to leave it there; I just like to clean up after 
myself.

But it sounds like svn doesn't support what I want to do. Thanks anyway 
for all your help.

Matthew Hannigan wrote:
> On Thu, Mar 06, 2008 at 02:51:16PM +0100, Martin Bischoff wrote:
>   
>> On Thu, Mar 6, 2008 at 1:22 AM, Javier Alvarado <qu...@yahoo.com>
>> wrote:
>>
>>     
>>> What I want is a clean way to tell svn "forget I ever checked these out"
>>>
>>>       
>> If I understand correctly, you are looking for the "revert" command (at
>> least that's what it's called in TortoiseSVN).
>> Revert will simply overwrite you local file with the latest revision from
>> the repository - and thus undo all changes you have made locally.
>>     
>
> Yeah, it's unclear what the OP wants.
> I thought it sounded like he wanted update to a previous version.
>
>     svn up -r<some-oldversion>
>
> But it sounds like it's being used as a deployment tool / 
> distributed filesystem not a version control system.
>
> Which is a surprisingly common use of svn.
>
>
>
> Matt
>
>
>   



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

Re: How to "un-checkout" from svn

Posted by Matthew Hannigan <ml...@zip.com.au>.
On Thu, Mar 06, 2008 at 02:51:16PM +0100, Martin Bischoff wrote:
> On Thu, Mar 6, 2008 at 1:22 AM, Javier Alvarado <qu...@yahoo.com>
> wrote:
> 
> >
> > What I want is a clean way to tell svn "forget I ever checked these out"
> >
> 
> 
> If I understand correctly, you are looking for the "revert" command (at
> least that's what it's called in TortoiseSVN).
> Revert will simply overwrite you local file with the latest revision from
> the repository - and thus undo all changes you have made locally.

Yeah, it's unclear what the OP wants.
I thought it sounded like he wanted update to a previous version.

    svn up -r<some-oldversion>

But it sounds like it's being used as a deployment tool / 
distributed filesystem not a version control system.

Which is a surprisingly common use of svn.



Matt


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

Re: How to "un-checkout" from svn

Posted by Martin Bischoff <ti...@gmail.com>.
On Thu, Mar 6, 2008 at 1:22 AM, Javier Alvarado <qu...@yahoo.com>
wrote:

>
> What I want is a clean way to tell svn "forget I ever checked these out"
>


If I understand correctly, you are looking for the "revert" command (at
least that's what it's called in TortoiseSVN).
Revert will simply overwrite you local file with the latest revision from
the repository - and thus undo all changes you have made locally.

- Martin

Re: How to "un-checkout" from svn

Posted by Steven Bakke <st...@amd.com>.
On Mar 5, 2008, at 9:46 PM, Kevin Grover wrote:

> This is mentioned in the svn-book, the most relevant doc: **
>
> http://svnbook.red-bean.com/en/1.4/ 
> svn.reposadmin.maint.html#svn.reposadmin.maint.filtering
>
> There's a footnote in there about obliterate.
>
> Currently you can do it by dumping the repo, filtering out what you  
> DO NOT want to be in there, and recreating the repo.  However: this  
> will change revision numbers (so comments in ChangeLogs and logs  
> for merges may no longer jive...)
>
> ** Too your credit, it was not obvious where it was from the index,  
> I had to load the single file html and search for obliterate ;-)
>
> - Kevin
>

Unless I'm mistaken, I don't think that is what Javier was asking.

Javier - I'm guessing that you have used something like CVS before?    
Unlike CVS, Subversion doesn't really support the notion of single- 
file checkouts.  In other words, you can't just checkout some of the  
files in a directory and not others.  Subversion 1.5 will support  
something called sparse directories which at least allows you to skip  
checkout all the way down your directory hierarchy.  Anyhow, since  
you can't just checkout individual files, you also can't really  
"clean up" as you are attempting to do.

I think the subversion book covers this, but I wouldn't be able to  
tell you where.

-Steve


> On Wed, Mar 5, 2008 at 4:22 PM, Javier Alvarado  
> <qu...@yahoo.com> wrote:
> Is there a way to really "un-checkout" something from svn? I can't  
> figure out a way to do it from the docs, and my web searches have  
> been fruitless.
>
> * svn delete <path> deletes the files from my working copy, _but  
> also from the repository when I commit_. I don't want to delete  
> them from the repo.
>
> * rm -rf <path> deletes the files from my working copy, _but not  
> their information from .svn/_. Therefore, when I subsequently do an  
> svn status, they are still listed and flagged as missing. I don't  
> want that either.
>
> What I want is a clean way to tell svn "forget I ever checked these  
> out" so that I can clean up my working copy. So, what I'm doing  
> right now is either manually hacking .svn/entries myself or moving  
> the old checkout of the way and re-checking-out just the stuff I  
> still want.
>
> Am I missing something obvious? Or am I really the only person  
> who's ever wanted to do this?
>
> Thanks in advance for any help!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>


Re: How to "un-checkout" from svn

Posted by Kevin Grover <ke...@kevingrover.net>.
This *is* mentioned in the svn-book, the most relevant doc: **

http://svnbook.red-bean.com/en/1.4/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering

There's a footnote in there about obliterate.

Currently you can do it by dumping the repo, filtering out what you DO NOT
want to be in there, and recreating the repo.  However: this will change
revision numbers (so comments in ChangeLogs and logs for merges may no
longer jive...)

** Too your credit, it was not obvious where it was from the index, I had to
load the single file html and search for obliterate ;-)

- Kevin

On Wed, Mar 5, 2008 at 4:22 PM, Javier Alvarado <qu...@yahoo.com>
wrote:

> Is there a way to really "un-checkout" something from svn? I can't figure
> out a way to do it from the docs, and my web searches have been fruitless.
>
> * svn delete <path> deletes the files from my working copy, _but also from
> the repository when I commit_. I don't want to delete them from the repo.
>
> * rm -rf <path> deletes the files from my working copy, _but not their
> information from .svn/_. Therefore, when I subsequently do an svn status,
> they are still listed and flagged as missing. I don't want that either.
>
> What I want is a clean way to tell svn "forget I ever checked these out"
> so that I can clean up my working copy. So, what I'm doing right now is
> either manually hacking .svn/entries myself or moving the old checkout of
> the way and re-checking-out just the stuff I still want.
>
> Am I missing something obvious? Or am I really the only person who's ever
> wanted to do this?
>
> Thanks in advance for any help!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

RE: How to "un-checkout" from svn

Posted by "Srilakshmanan, Lakshman" <la...@police.vic.gov.au>.
Hi Javir,

Correct me if I am wrong, but are you a Visual Source Safe user ?

I have come across "un-checkout" in VSS. This is because VSS locks a
"checkout" pessimistic locking. Where as CVS, Subversion etc follow
optimistic locking. With optimistic locking "checkouts" as similar to
"get latest" in VSS. All changes are detected only at checkin and
aborted if your version is not the latest in Source control.

Therefore, to answer your question, there is no concept of
"un-checkout".

Thanks
Lakshman
-----Original Message-----
From: Javier Alvarado [mailto:quijotista@yahoo.com] 
Sent: Thursday, 6 March 2008 11:23 AM
To: users@subversion.tigris.org
Subject: How to "un-checkout" from svn

Is there a way to really "un-checkout" something from svn? I can't
figure out a way to do it from the docs, and my web searches have been
fruitless.

* svn delete <path> deletes the files from my working copy, _but also
from the repository when I commit_. I don't want to delete them from the
repo.

* rm -rf <path> deletes the files from my working copy, _but not their
information from .svn/_. Therefore, when I subsequently do an svn
status, they are still listed and flagged as missing. I don't want that
either.

What I want is a clean way to tell svn "forget I ever checked these out"
so that I can clean up my working copy. So, what I'm doing right now is
either manually hacking .svn/entries myself or moving the old checkout
of the way and re-checking-out just the stuff I still want.

Am I missing something obvious? Or am I really the only person who's
ever wanted to do this?

Thanks in advance for any help!

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

================================================================================================
EMAIL DISCLAIMER

This email and any attachments are confidential. They may also be subject to copyright.

If you are not an intended recipient of this email please immediately contact us by replying
to this email and then delete this email. 

You must not read, use, copy, retain, forward or disclose this email or any attachment.

We do not accept any liability arising from or in connection with unauthorised use or disclosure 
of the information contained in this email or any attachment.

We make reasonable efforts to protect against computer viruses but we do not accept liability
for any liability, loss or damage caused by any computer virus contained in this email.
================================================================================================

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