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

Re: Remove items from source control without deleting them

From: Christopher Clarke <tigris.org_at_fuscata.com>
Date: Wed, 15 Jul 2009 16:31:06 -0400

>> I know that it is possible to do this for *my* working copy: export
>> item, svn delete, commit, rename exported item, ignore, commit.
>
> In Subversion 1.5 and above, 'svn remove' has a --keep-local parameter
> which should make this sequence of operations a bit easier.
> Just do:
> svn rm --keep-local item
> svn pe svn:ignore . # add an entry for item
> svn commit
>

Yes, thank you. The problem however is that my actions are going to
delete files on other user's machines when I don't want to do that.

> My understanding is that you'd like all other clients updating to rX
> to remove the item from version control and add it to the ignore list,
> but to also keep a copy of the item on disk for some reason.
>
> However, I don't understand what you would gain by preventing other
> clients from the deleting the item from disk. Because if they aren't
> allowed to delete the item, what happens if someone checks out a fresh
> working copy as of rX? They will not get the item from version
> control. But will they need the item to get your project to build?
> If so, why isn't the item being generated as part of the build in
> the first place?

I see your point. The problem I am trying to solve is how to deal with
files that have been added to the repository and need to exist in each
working copy but that also need to be different in each working copy.
The files should have been ignored from the start, but they weren't
(because either I'm an idiot for adding them, or the situation changed
since I did -- doesn't matter which).

The way it works now, I have to email everyone detailed instructions for
their particular OS and SVN client and, since I use SVN to manage
development, staging and production servers, I have to carefully
recreate these steps on each. In the case of production, this will
increase downtime when I upgrade the site.

So, yes, I would rather create more work on checkout rather than update
to keep my system running smoothly. I have to give instructions for
getting a local copy of the site working anyway -- SVN is just part of
the picture.

Cheers,
Chris

On 07/15/2009 02:11 PM, Stefan Sperling wrote:
> On Wed, Jul 15, 2009 at 09:45:23AM -0700, Christopher Clarke wrote:
>> Hello,
>>
>> This topic has been discussed before and shot down:
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=864575
>>
>> I would like to bring it up again, because I think it's a feature that
>> is commonly needed and important for any complete versioning system to
>> include.
>>
>> There are occasions when an item (file or directory) must be removed
>> from source control. An example: A Wordpress plugin that formerly
>> needed to be updated manually but now has an automatic update feature
>> that makes changes to files. This plugin needs to be removed from
>> source control because updating the files externally may prevent the
>> upgrade from running, and other upgrade actions (e.g. change database
>> structure) will not happen.
>>
>> I know that it is possible to do this for *my* working copy: export
>> item, svn delete, commit, rename exported item, ignore, commit.
>
> In Subversion 1.5 and above, 'svn remove' has a --keep-local parameter
> which should make this sequence of operations a bit easier.
> Just do:
> svn rm --keep-local item
> svn pe svn:ignore . # add an entry for item
> svn commit
>
>> The
>> problem is that the item to be deleted from everyone else's working
>> copies, unless every peer follows the same procedure before updating.
>> Since peers have different levels of technical ability and are using
>> different svn clients, I can't expect them all to do this properly.
>
> I'm afraid I'm not following.
>
> To recap:
> If you commit revision rX which deletes an item and also adds it to
> the svn:ignore list, other clients will also delete the item and add
> it to the svn:ignore list when updating to rX, without keeping a
> local copy of the item on disk.
> That's what the behaviour is and should be.
>
> My understanding is that you'd like all other clients updating to rX
> to remove the item from version control and add it to the ignore list,
> but to also keep a copy of the item on disk for some reason.
>
> However, I don't understand what you would gain by preventing other
> clients from the deleting the item from disk. Because if they aren't
> allowed to delete the item, what happens if someone checks out a fresh
> working copy as of rX? They will not get the item from version control.
> But will they need the item to get your project to build? If so, why
> isn't the item being generated as part of the build in the first place?
>
> You can't rely on an item's existence, and then delete and ignore
> it at the same time. That just doesn't make sense.
> An item should either be required and versioned, or not versioned
> and easily reproducible by anyone who gets a fresh working copy
> or updates an existing working copy.
>
> Given this, I guess either you are trying to solve the wrong problem,
> or I'm not understanding your request correctly.
>
> Stefan
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2371581

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-15 22:32:03 CEST

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.