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

Re: Deleting files in a revision

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-11-25 19:52:46 CET

On Nov 25, 2005, at 15:53, Datatal AB - Jonas Gauffin wrote:
> I want to delete files from a specific revision, is that possible?
>
> They have been used in earlier versions but not in the current one.

There may be a terminology misconception and I'm not sure exactly
what you're asking, so I'll just explain what Subversion can do, and
you can see if that answers your question.

A Subversion repository as a whole has a revision number. It is
exactly the number of changes that have been made to the repository.
Talking about revision 45 of a repository means "What did the
repository look like after 45 changes had been made in it?"

You can add files:

$ myfilecreator > file.txt
$ svn add file.txt
A file.txt
$ svn ci -m "Adding file.txt"
Adding file.txt
Transmitting file data .
Committed revision 1.

Now the repository is at revision 1, because 1 change has been made.
You can modify files:

$ myfilemunger file.txt
$ svn ci -m "Modifying file.txt"
Sending file.txt
Transmitting file data .
Committed revision 2.

Now the repository is at revision 2. You can delete files:

$ svn rm file.txt
D file.txt
$ svn ci -m "Removing file.txt"
Deleting file.txt
Committed revision 3.

Now the repository is at revision 3. If somebody now checks out the
HEAD of the repository they won't get file.txt. It's still in the
repository in revisions 1 and 2, so it can always still be retrieved
if necessary.

A repository's job is to never lose data. If you're asking if
file.txt can be removed from the repository in such a way that it
doesn't even appear in revisions 1 and 2, then that's contrary to the
purpose of a repository, and is therefore rather difficult to do. You
would have to take the repository offline, dump its contents to a
text file with svnadmin dump, process the text file to remove
file.txt by using svndumpfilter, then load the modified text file
back into a new repository with svnadmin load. Requests have been
made in the past to add a command tentatively called svnadmin
obliterate to simplify this task, but no such command exists at this
time.

Have you read the Subversion book? It does a great job of explaining
what all Subversion can do and how you can use it.

http://svnbook.red-bean.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Nov 25 19:55:02 2005

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.