You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Yount, Steffen" <s....@xpedite.com> on 2004/02/26 23:19:30 UTC

stuck state, loosing data because I can't commit, help....

Hi, 

 

How do I get around this problem?

 

1) I checkout the following directory tree:

 

one\

one\subone.txt

one\two\

one\two\subtwo.txt

 

2) I edit: one\subone.txt

 

3) I delete the dir: one\two\

 

4) Now I cannot commit the changes made inside of "one\subone.txt", Instead
I get an error message:

svn: Commit failed (details follow):

svn: Working copy 'C:/test/one/two' not locked

 

5) So I think, hmm maybe svn cleanup will help? But then I get this error
message:

svn: 'two' is not a working copy directory

 

6) In frustration I try to commit again, but now I get this different error
message:

svn: Working copy 'C:\test\one' locked

svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

 

7) svn cleanup still doesn't help

 

8) Here's what my svn status looks like:

  L    C:\test\one

~      C:\test\one\two

 

 

So, what do I have to do to be able to commit the changes made to the file
"one\subone.txt" under these conditions?

 

Thanks,

 

-Steffen

 

 


Re: "swapping" files or folders by renaming gives strange errors

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2004-02-27 at 12:22, C.A.T.Magic wrote:

>  svn rename file-A to file-Ax
>  commit
>  svn rename file-B to file-A
>  commit
>  svn rename file-Ax to file-B
>  commit

You never said you were committing between each step.  That will work
fine.  The bug involves 'svn mv A B;  svn mv C A' with no commit
between.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "swapping" files or folders by renaming gives strange errors

Posted by "C.A.T.Magic" <c....@gmx.at>.
i wonder why it worked for me?
-- ok i was too inexact here,
of course i used something like

 svn rename file-A to file-Ax
 commit
 svn rename file-B to file-A
 commit
 svn rename file-Ax to file-B
 commit

and then continued to fool around with these files randomly
using update to previous revisions and merging back and forth.

but probably the reasons for any problems occouring after
that 'swapping' are based on the same "issues".

after doing 1 whole day of testing svn i have the strange feeling
that everything cvs didn't do at all doesn't work very well in svn yet ;-)
( folder renames, named tags, branches, server reboots... )


thanks anyway :-)
====
c.a.t.


----- Original Message ----- 
From: "Ben Collins-Sussman" <su...@collab.net>
To: <c....@gmx.at>
Cc: <us...@subversion.tigris.org>
Sent: Friday, February 27, 2004 18:22
Subject: Re: "swapping" files or folders by renaming gives strange errors


> On Fri, 2004-02-27 at 10:48, c.a.t.magic@gmx.at wrote:
> 
> > svn rename file-A to file-Ax
> > svn rename file-B to file-A
> > svn rename file-Ax to file-B
> 
> The problem here is that 'svn rename A B' isn't a true rename.  It's
> exactly the same as running 'svn cp A B; svn rm A'.
> 
> At the moment, you can't even do the second step, because of a bug
> (issue #845.)
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "swapping" files or folders by renaming gives strange errors

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2004-02-27 at 10:48, c.a.t.magic@gmx.at wrote:

> svn rename file-A to file-Ax
> svn rename file-B to file-A
> svn rename file-Ax to file-B

The problem here is that 'svn rename A B' isn't a true rename.  It's
exactly the same as running 'svn cp A B; svn rm A'.

At the moment, you can't even do the second step, because of a bug
(issue #845.)




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

"swapping" files or folders by renaming gives strange errors

Posted by c....@gmx.at.
Hi

try out something like the following:

create work/file-A.txt
create work/file-B.txt
put some lines of content into the files that describe if they are A or B

svn rename file-A to file-Ax
svn rename file-B to file-A
svn rename file-Ax to file-B

commit

fool around a bit with these files, modify A or B or both,
then try to merge or commit them with previous versions.
or swap them back and forth and so on.
or update to a previous version, modify it and try to
merge it back in... (is this allowed at all?)
i got some weird kinds of error situations where i was
unable to commit update or merge my working dir at all
and had to delete and checkout a folder again to continue.
it might be even funnier to swap a folder and a file...

this may rarely happen in real working environments,
but consider you accidentally renamed a .cpp file .h
and vice versa. then you -might- be forced to drop history
and delete and re-add your files. using svn rename to
swap them may introduce collisions.

maybe sort of svn "swap file" or "cvs rename multiple-files"
to exchange files would be fun, too.


Re: stuck state, loosing data because I can't commit, help....

Posted by Mike Mason <mg...@thoughtworks.net>.
Yount, Steffen wrote:

> Hi,
>
>  
>
> How do I get around this problem?
>
>  
>
> 1) I checkout the following directory tree:
>
>  
>
> one\
>
> one\subone.txt
>
> one\two\
>
> one\two\subtwo.txt
>
>  
>
> 2) I edit: one\subone.txt
>
>  
>
> 3) I delete the dir: one\two\
>
You're deleting something that's under Subversion control, and this will 
also delete the Subversion admin directories causing Subversion to get 
confused. Instead, do "svn delete one\two" to ask Subversion to schedule 
that directory for delete. Then your commit should work.

Alternatively if you just want to commit a single file, do "svn commit 
one\subone.txt" to get the file checked in.

Best regards,
Mike.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org