You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Hendrik Maryns <he...@despammed.com> on 2005/11/28 10:38:25 UTC

[Fwd: Re: How to remove a versioned file from version control without deleting it.]

Hi,

I thought I´d follow Mark´s advice below and throw the question in here: 
  Why oh why is it impossible to remove a file from version control 
without deleting it in the working copy?

I know one can always regenerate it from a previous revision, it would 
just be a nice feature.

H.

-------- Origineel bericht --------
Onderwerp: Re: How to remove a versioned file from version control 
without deleting it.

news <ne...@sea.gmane.org> wrote on 11/25/2005 12:03:35 PM:

> Mark Phippard schreef:
> > news <ne...@sea.gmane.org> wrote on 11/25/2005 08:52:38 AM:
> > 
> > 
> >>I accidentally added a properties file to version control, but don´t 
> >>want that.  I don´t see any way to add it to svn:ignore, except by 
> >>deleting it and recreating it, which is obviously not the best solution.
> > 
> >>  Otherwise, I can make a backup from the filesystem, then remove it 
> >>etc.  but this is all rather annoying.  Are there better solutions?
> > 
> > 
> > The only method I am aware of is to delete it, commit it, put it back and
> > add it to svn:ignore.
> 
> A clumsy method indeed.  Maybe I should file a feature request about 
> this?  I mean, it has happened to me a few times already, so I don´t 
> think this is a very uncommon thing to do.

Don't file it with us, you need to take it up on the Subversion users@
list.  I have seen it come across the list several times and is usually
rejected.  But I agree it would be nice if Subversion had a way to do
this.

Mark
-- 
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org


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

RE: [Fwd: Re: How to remove a versioned file from version control without deleting it.]

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Hendrik Maryns:
> Seems a nice solution to me.  Actually, what I was thinking
> about, was to be able to add a file which is currently under 
> version control to svn:ignore, so that in the next commit, it 
> would get deleted from the rep, but not from the working copy.

So long as adding to svn:ignore is a side effect and not the cause of
the deletion, I agree.  (svn:ignore cannot be the trigger for the
deletion -- I've got several instances where a versioned file that I
want to stay versioned happens to match one of the ignore patterns.)

I'm actually not too bothered about deletion on the local end, because
that's something that can be worked around easily (though it'd be nice
if you didn't have to).  What I *really* want is some way to delete a
file from version control *without* deleting it from other peoples'
working copies when they do an update.  eg. when someone has
accidentally committed a per-machine config file, I want to be able to
de-version it without deleting it from anyone's WCs.


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

Re: [Fwd: Re: How to remove a versioned file from version control without deleting it.]

Posted by Hendrik Maryns <he...@despammed.com>.
Fabian Cenedese schreef:
>>>I thought I´d follow Mark´s advice below and throw the question in  
>>>here:  Why oh why is it impossible to remove a file from version  
>>>control without deleting it in the working copy?
>>>
>>>I know one can always regenerate it from a previous revision, it  
>>>would just be a nice feature.
>>
>>No need to regenerate from a previous revision:
>>
>>$ cp -p foo foo.keep
>>$ svn rm foo
>>$ svn propset svn:ignore foo .
>>$ mv foo.keep foo
>>
>>$ svn ci -m "Removing foo from version control"
>>
>>You could certainly wrap the first four steps into a shell script if  
>>it's something you expect to want to do often.
>>
>>If it were added to the Subversion client, what would the command be  
>>called?
> 
> 
> cvs is the other way round, default is to keep the file and only rm it from
> the filesystem with the parameter --force. To not break existing svn
> behaviour we could add a parameter to keep the file upon rm, so like
> 
> $ svn --keeplocal (or -k or something more general) delete foo
> $ svn commit ...
> 
> ...and foo is still available.

Seems a nice solution to me.  Actually, what I was thinking about, was 
to be able to add a file which is currently under version control to 
svn:ignore, so that in the next commit, it would get deleted from the 
rep, but not from the working copy.

H.

-- 
Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org


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

Re: [Fwd: Re: How to remove a versioned file from version control without deleting it.]

Posted by Fabian Cenedese <Ce...@indel.ch>.
>>I thought I´d follow Mark´s advice below and throw the question in  
>>here:  Why oh why is it impossible to remove a file from version  
>>control without deleting it in the working copy?
>>
>>I know one can always regenerate it from a previous revision, it  
>>would just be a nice feature.
>
>No need to regenerate from a previous revision:
>
>$ cp -p foo foo.keep
>$ svn rm foo
>$ svn propset svn:ignore foo .
>$ mv foo.keep foo
>
>$ svn ci -m "Removing foo from version control"
>
>You could certainly wrap the first four steps into a shell script if  
>it's something you expect to want to do often.
>
>If it were added to the Subversion client, what would the command be  
>called?

cvs is the other way round, default is to keep the file and only rm it from
the filesystem with the parameter --force. To not break existing svn
behaviour we could add a parameter to keep the file upon rm, so like

$ svn --keeplocal (or -k or something more general) delete foo
$ svn commit ...

...and foo is still available.

bye  Fabi



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


Re: [Fwd: Re: How to remove a versioned file from version control without deleting it.]

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 28, 2005, at 11:38, Hendrik Maryns wrote:

> I thought I´d follow Mark´s advice below and throw the question in  
> here:  Why oh why is it impossible to remove a file from version  
> control without deleting it in the working copy?
>
> I know one can always regenerate it from a previous revision, it  
> would just be a nice feature.

No need to regenerate from a previous revision:

$ cp -p foo foo.keep
$ svn rm foo
$ svn propset svn:ignore foo .
$ mv foo.keep foo

$ svn ci -m "Removing foo from version control"

You could certainly wrap the first four steps into a shell script if  
it's something you expect to want to do often.

If it were added to the Subversion client, what would the command be  
called?



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