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

Re: [TSVN] Newbie Question: Rename doesn't remove/rename original file

From: SteveKing <steveking_at_gmx.ch>
Date: 2004-07-01 18:03:33 CEST

Steve Seremeth wrote:

> I searched through the archives with little success on this issue.
> Here's my issue/question:

Patience, my friend! There's no need to send the message twice in less
than one hour. We all have jobs and don't have always the time to answer
right away.

> When I use the Tortoise's "rename" from the right-click menu in windows
> explorer, I get the rename dialog as expected, change the name and I see
> the file (with new name) is marked for addition. If I do a commit, it
> tells me it is going to add the file - and I can do that.

So you just select the added file and execute the commit. That's wrong.
You must select the parent folder for commit - then the commit dialog
will show you the file with the new name as "added", and the file with
the old name as "removed". You have then to commit both the added and
the removed entry.

> If someone then checks out a fresh working copy, they get two files -
> both the old file and the new file. Huh?

Sure. You haven't committed the "delete" of the old file.

> I understand the repository needs to know about the old file, but
> wouldn't a Tortoise "rename" do a copy and delete or something to that
> effect? I read in the FAQ that Tortoise would do this, but I'm not
> seeing the delete option in the commit window - only add. Is this
> because I'm interacting with the repository via DAV (and therefore, some
> limitation of DAV?)?

Subversion handles renames/moves as a delete and an add, but preserving
the history. In fact it's a little bit more than a remove and an add,
because the added file get's an additional entry telling Subversion from
where it was added (an add of a new file doesn't have this).

> Is it necessary to do a manual delete of the original file after a
> "rename"? That would mean I'd have to check out a fresh working copy of
> the repository since the rename removes the local copy anyway!

No. The file with the old name doesn't exist anymore because it got
renamed. So you can't delete it with TSVN anyway. It actually _is_
deleted, you just have to commit that delete. And since the deleted file
is gone, you can't select and commit it directly: you have to select the
parent folder for commit.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jul 1 19:12:12 2004

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.