1

I have by mistake committed a file twice - the only difference is an upper case letter in the name of one of the files:

  • Myfile.txt
  • MyFile.txt

Using Tortoise I can see the two files at a previous revision, I can select them and when I press delete it asks me for a comment and on commit it tells me that the URL does not exists. I don't need the two files anymore.

We use Trac for project management, but it haven't been able to synchronize with our code since I committed the two files.

What can I do to remove the troublesome files?

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Chau
  • 5,540
  • 9
  • 65
  • 95

3 Answers3

2

On path errors like this, I highly recommend using the command-line SVN client instead of a graphical client like Tortoise. You can use the 'svn list' command to get exact file/folder names as the repository sees them and then copy/paste them into a 'svn delete' command. That way, you'll minimize the chances of running into case-related problems.

Based on your comment to msorens' answer, it looks like the file in question does not exist in the current head of the repository. If so, there's not much you can do. Subversion treats the repository history as a single, linear series of commits. All modifications are done to the head of the repository; you generally can't go "back in time" and alter a past repository state. It's possible (but not easy) to remove a commit, but it throws off everything that comes after it. Therefore, it's only recommended that it be done to the most recent commit to the repository (to minimize the side-effects). Some other version control systems (git, for instance) have additional capabilities with regards to altering repository history. Subversion, unfortunately, does not.

bta
  • 43,959
  • 6
  • 69
  • 99
1

As I understand your question, the point is not so much about making Subversion forget about your files (as discussed in Dennis' answer) as it is correcting a situation wherein you have two unusable files because their names differ only in case. The solution is quite straightforward -- open the repository browser and delete or rename one of the offending files. This can be done even on a system that is inherently case-insensitive (i.e. Windows) because the repository itself is still case-sensitive. (The manual reference for this, though not saying much more than this, is Dealing with filename case conflicts.)

Michael Sorens
  • 35,361
  • 26
  • 116
  • 172
  • Yeah that seems simple enough. The problem is when I try to either delete or rename one of the duplicates, Tortoise gives me a *path* error. When I rename one of them at revision 767, Tortoise actually complains about the path at revision 977 (the latest). At 977 the file doesn't even exists anymore. – Chau Dec 22 '11 at 07:35
  • When renaming, Tortoise actually reports *file not found: revision 977, path*. – Chau Dec 22 '11 at 07:42
0

There isn't an easy way, because svn is designed to never forget anything. There is a workaround you can try.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Dennis
  • 2,132
  • 3
  • 21
  • 28