dumb question about deleting files

0 views
Skip to first unread message

lunaclaire

unread,
Jun 2, 2008, 3:27:31 PM6/2/08
to Subversion SVN
As a project moves forward, I find myself no longer needing certain
files and I delete them locally (or sometimes move them or rename
them). Then when I do a commit, they show up as 'missing' and clutter
up the list of files when I go to do commits (I use TortoiseSVN).

I guess they're still in the repo... I accidentally did an update
(TortoiseSVN's Update cmd is on the menu next to the Commit cmd), so
this restored the deleted files back on my local drive. This caused a
small mess that I had to cleanup, so now I think I should delete them
from the repo to avoid this in the future, right?

But, here's my question... If I delete them from the repo and if I
ever want to roll back to a previous version that used the deleted
files, are they still there as part of the image of older checkins? Or
will deleting them screw up going back?

This seems like it should be straightforward, but it's confusing to me
and I don't want to screw things up by trying to actually do the
delete and see what happens... so, please excuse the question prior to
taking the "try it and find out" approach.

Larry Martell

unread,
Jun 2, 2008, 3:43:48 PM6/2/08
to Subvers...@googlegroups.com
On Mon, Jun 2, 2008 at 1:27 PM, lunaclaire <szag...@gmail.com> wrote:
>
> As a project moves forward, I find myself no longer needing certain
> files and I delete them locally (or sometimes move them or rename
> them). Then when I do a commit, they show up as 'missing' and clutter
> up the list of files when I go to do commits (I use TortoiseSVN).

That's because you only removed them locally, and didn't inform svn
about it. You should have done a 'svn rm' on them.

> I guess they're still in the repo...

Yes, they will always be in the repo (although they may not be in the
HEAD or some other revision).

> I accidentally did an update
> (TortoiseSVN's Update cmd is on the menu next to the Commit cmd), so
> this restored the deleted files back on my local drive.

That is the proper and expected behavior in the scenario you described.

> This caused a
> small mess that I had to cleanup, so now I think I should delete them
> from the repo to avoid this in the future, right?

Yes.

> But, here's my question... If I delete them from the repo and if I
> ever want to roll back to a previous version that used the deleted
> files, are they still there as part of the image of older checkins?

Yes.

> Or
> will deleting them screw up going back?

No.

> This seems like it should be straightforward,

It is.

> but it's confusing to me
> and I don't want to screw things up by trying to actually do the
> delete and see what happens... so, please excuse the question prior to
> taking the "try it and find out" approach.

I think it's confusing to you only because you have not read and
understood how svn works. I strongly recommend doing that before
proceeding.

-larry

lunaclaire

unread,
Jun 2, 2008, 4:41:42 PM6/2/08
to Subversion SVN
Thanks for the quick reply, Larry.

A few responses below...

On Jun 2, 12:43 pm, "Larry Martell" <larry.mart...@gmail.com> wrote:
> On Mon, Jun 2, 2008 at 1:27 PM, lunaclaire <szager...@gmail.com> wrote:
>
> > As a project moves forward, I find myself no longer needing certain
> > files and I delete them locally (or sometimes move them or rename
> > them). Then when I do a commit, they show up as 'missing' and clutter
> > up the list of files when I go to do commits (I use TortoiseSVN).
>
> That's because you only removed them locally, and didn't inform svn
> about it. You should have done a 'svn rm' on them.

Hmm... makes sense that that's why I keep seeing this. But, I
wonder... in the course of a project, it's kinda natural to just go
ahead and rename, move, or delete a file, often en masses as part of a
refactoring... so, it's easy to get into this situation. Guess, in the
future, I'll have to pause first to svn remove the file(s) first.


>
> > but it's confusing to me
> > and I don't want to screw things up by trying to actually do the
> > delete and see what happens... so, please excuse the question prior to
> > taking the "try it and find out" approach.
>
> I think it's confusing to you only because you have not read and
> understood how svn works. I strongly recommend doing that before
> proceeding.

I did, and googled too, but kept coming up with stuff that just talked
about one's ability to remove files from the repo... I didnt see
anything that told me that prior revs would still be OK.

Again, thanks for your clarification. Hope it helps others, too.
Reply all
Reply to author
Forward
0 new messages