On Jun 3, 2006, at 22:00, Ingo Weiss wrote:
>>> my commit fails with the following message:
>>> svn: Commit failed (details follow):
>>> svn: File '/app/myfile.rhtml' already exists
>>> I am not completely sure what I did to myfile.rhtml, but I think
>>> I used
>>> "svn copy" to create it based on an exesting file, but misspelled
>>> name and renamed it in the finder (which probably was a bad
>>> idea). Now I
>>> don't know what I can try to fix the problem.
>> Yes, you should not have renamed the file using any tool other than
>> Subversion. Now we'll have to figure out what you did, undo it, and
>> do it the right way.
>> Presumably you used something like "svn copy somefile.rhtml
>> oopsfile.rhtml", realized that "oopsfile.rhtml" was the wrong name
>> and used the Mac OS X Finder to rename it to "myfile.rhtml", then
>> used "svn add myfile.rhtml" to add it. If so, you should undo each
>> step in reverse chronological order. Revert the addition: "svn revert
>> myfile.rhtml". Use the Finder to rename the file back to
>> oopsfile.rhtml. Undo the copy: "svn revert oopsfile.rhtml". Now copy
>> the file properly: "svn cp somefile.rhtml myfile.rhtml". Then you
>> should be able to commit the change.
>> If you had copied the file, and then made changes to it, and were now
>> wanting to commit both the creation of the file and the changes, then
>> you would, after doing the correct copy above, have to re-do your
>> changes. If the changes are extensive, take your current myfile.rhtml
>> and copy it somewhere else first (using the Finder or other non-
>> Subversion means), do the above steps, then finally replace
>> myfile.rhtml in your working copy with the version you saved.
>> If this doesn't work, show us the error you get. If possible, show us
>> all the commands and other steps you performed to get into this
>> situation so we can show you where you went wrong. (I realize you may
>> not remember exactly what you did and probably didn't write it down
>> at the time.)
> Thanks, Ryan, for your reply!
> I followed your steps but unfortunately now I am getting errors for
> another file. Also I am seeing strange status markers for a couple
> files and directories. I feel that by now I tried so many differnt
> things that it is impossible to retrace the steps, so I think I would
> like to start over, set my working directory asside, write down what
> files changed, check out a fresh working directory from the
> and massage in the changes. And then commit!
> Do you see anything that would speak against this approach?
Yes, that sounds good. Get a fresh working copy, and make the changes
you intend to make.
If you want to rename a file A to B, use "svn rename A B", then later
commit the change. If you later decide before you commit that you
meant to rename it to C, first undo the rename to B, then rename A to
C, then (without Subversion) move your changed B file over the new C
file (svn revert B; svn revert A; svn rename A C; mv B C)
If you want to add a new file D, use "svn add D", and later commit
the addition. If you later decide before you commit that this file
should have a different name, revert the addition of D (svn revert
D), rename it normally (mv D E) and add it again under its new name
(svn add E).
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sat Jun 3 22:25:51 2006