You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <ch...@gmail.com> on 2006/12/27 12:06:14 UTC

[RFC] svn rm --keep-in-wc option

Hi,
Some time ago there were several requests about ability remove
file/directory from Subversion, while keep it in working copy:
http://svn.haxx.se/dev/archive-2005-09/0786.shtml
http://svn.haxx.se/users/archive-2004-08/0628.shtml

I'm ready to implement this. There were proposal from Max Bowsher to
implement this using --keep-in-wc option to svn rm and I like this way.
For me it's much better than reinventing new command such svn unversion.

Here is some use cases how this option will work:
1. Deleting committed file
$ touch foo; svn add foo
$ svn ci
$ svn rm --keep-in-wc foo
$ ls foo
foo
$ svn st
D foo
$ svn ci
Deleted foo
$ svn st
? foo

2. Deleting committed directory
$ mkdir dir; svn add dir
A dir
$ svn ci
$ svn rm --kepp-in-wc dir
D dir
$ svn st
D dir
$ ls dir
dir
$ svn ci
Deleted dir
$ svn st
? dir

Deleting of uncommitted item is the same as svn revert:
3. Deleting uncommitted file
$ touch foo; svn add foo
A foo
$ sv rm --keep-in-wc foo
$ ls foo
foo
$ svn st
? foo

4. Deleting uncommited directory
$ mkdir dir; svn add dir
A dir
$ svn rm --keep-in-wc dir
D dir
$ svn st
? dir

Technical issues
================
Implementing this option for directories will require working copy format
bump again :)

Comments? Objections?

-- 
Ivan Zhakov

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

Re: [RFC] svn rm --keep-in-wc option

Posted by Ivan Zhakov <ch...@gmail.com>.
On 12/27/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On 12/27/06, Ivan Zhakov <ch...@gmail.com> wrote:
> > On 12/27/06, David Glasser <gl...@mit.edu> wrote:
> > > On 12/27/06, Ivan Zhakov <ch...@gmail.com> wrote:
> > > > Hi,
> > > > Some time ago there were several requests about ability remove
> > > > file/directory from Subversion, while keep it in working copy:
> > > > http://svn.haxx.se/dev/archive-2005-09/0786.shtml
> > > > http://svn.haxx.se/users/archive-2004-08/0628.shtml
> > >
> > > It's a useful feature.  For what it's worth, svk implements it and
> > > calls it "svk rm -K" and "svk rm --keep-local".
> > >
> > It seems you forgot CC this mail to dev@.
> > Btw, I think it's good to call this option in SVK way if nobody objects.
>
> Agreed.  For what it's worth, I implemented a chunk of this at the
> summit, but never followed through on the hard bits.  My current
> patch, if I recall correctly, handled files just fine, but fell down
> completely on directories.  It's currently sitting on my increasingly
> flaky laptop, so it'll take me a bit of effort to retrieve it, but if
> you're interested I can try and dig up the work in progress later
> today, as I don't believe I ever posted a version to the list.
>
I've already implemented this option for files -- it's really easy.
But directories much more complex.
Anyway I'm interested in your patch if it take not more than 15
minutes. I'll use it just to check my obvious mistakes.

-- 
Ivan Zhakov

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

Re: [RFC] svn rm --keep-in-wc option

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 12/27/06, Ivan Zhakov <ch...@gmail.com> wrote:
> On 12/27/06, David Glasser <gl...@mit.edu> wrote:
> > On 12/27/06, Ivan Zhakov <ch...@gmail.com> wrote:
> > > Hi,
> > > Some time ago there were several requests about ability remove
> > > file/directory from Subversion, while keep it in working copy:
> > > http://svn.haxx.se/dev/archive-2005-09/0786.shtml
> > > http://svn.haxx.se/users/archive-2004-08/0628.shtml
> >
> > It's a useful feature.  For what it's worth, svk implements it and
> > calls it "svk rm -K" and "svk rm --keep-local".
> >
> It seems you forgot CC this mail to dev@.
> Btw, I think it's good to call this option in SVK way if nobody objects.

Agreed.  For what it's worth, I implemented a chunk of this at the
summit, but never followed through on the hard bits.  My current
patch, if I recall correctly, handled files just fine, but fell down
completely on directories.  It's currently sitting on my increasingly
flaky laptop, so it'll take me a bit of effort to retrieve it, but if
you're interested I can try and dig up the work in progress later
today, as I don't believe I ever posted a version to the list.

-garrett

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

Re: [RFC] svn rm --keep-in-wc option

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 12/27/06, Ivan Zhakov <ch...@gmail.com> wrote:
> > It's a useful feature.  For what it's worth, svk implements it and
> > calls it "svk rm -K" and "svk rm --keep-local".
> >
> It seems you forgot CC this mail to dev@.
> Btw, I think it's good to call this option in SVK way if nobody objects.

--keep-local seems better, but I wouldn't waste a short opt (-K) on
this though.  -- justin

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

Re: [RFC] svn rm --keep-in-wc option

Posted by Ivan Zhakov <ch...@gmail.com>.
On 12/27/06, David Glasser <gl...@mit.edu> wrote:
> On 12/27/06, Ivan Zhakov <ch...@gmail.com> wrote:
> > Hi,
> > Some time ago there were several requests about ability remove
> > file/directory from Subversion, while keep it in working copy:
> > http://svn.haxx.se/dev/archive-2005-09/0786.shtml
> > http://svn.haxx.se/users/archive-2004-08/0628.shtml
>
> It's a useful feature.  For what it's worth, svk implements it and
> calls it "svk rm -K" and "svk rm --keep-local".
>
It seems you forgot CC this mail to dev@.
Btw, I think it's good to call this option in SVK way if nobody objects.


-- 
Ivan Zhakov

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