You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Di Hu <dh...@purdue.edu> on 2010/07/29 21:04:12 UTC

Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Hi everyone:

I have some problems in using svn commands. I think this is because I have
some file which have same names but in different cases(such as align.c and
Align.c). 

I tried to delete one of the files, and got:
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn delete
/Users/dhu/reconstruction3D/Align.c 
svn: Working copy '/Users/dhu/reconstruction3D' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

I typed "svn cleanup" and tried again.  Then I got:
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn delete
/Users/dhu/reconstruction3D/Align.c 
svn: Use --force to override this restriction
svn: '/Users/dhu/reconstruction3D/Align.c' is not under version control

I also tried "mv" and "rm" , but both of them responded me "svn: 'Align.c'
is not under version control".

Can someone help me fix this problem? Thanks a lot!!

Di

-- 
View this message in context: http://old.nabble.com/Help%3A-svn%3A-Working-copy-%27XXXX-XXXX-XXX%27-locked-tp29300593p29300593.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Di Hu <dh...@purdue.edu>.
Hi Ryan:

The problem has been sloved. I am profoundly grateful.

Di




Ryan Schmidt-75 wrote:
> 
> 
> On Jul 29, 2010, at 21:11, Di Hu wrote:
> 
>> I tired to rename one of the files via direct repository URLs. But still
>> failed. The checkout command is "svn checkout
>> svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D".
>> So I think the URLs is
>> "svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/Align.c".
>> Am I right?
> 
> Sounds right to me.
> 
>> Then I got this:
>> 
>> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn mv
>> svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/Align.c
>> svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/align_new.c
>> svn: Could not use external editor to fetch log message; consider setting
>> the $SVN_EDITOR environment variable or using the --message (-m) or
>> --file
>> (-F) options
>> svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are
>> set,
>> and no 'editor-cmd' run-time configuration option was found
> 
> Read the error message. You did not supply a commit message via the -m
> argument, and you do not have the environment variables set up for
> Subversion to call an editor for you to enter the message there. Try:
> 
> svn mv
> svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/Align.c
> svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/align_new.c
> -m "Rename Align.c to align_new.c"
> 
> (Should all be on one line; pardon my email client if it wraps this)
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Help%3A-svn%3A-Working-copy-%27XXXX-XXXX-XXX%27-locked-tp29300593p29302436.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 29, 2010, at 21:11, Di Hu wrote:

> I tired to rename one of the files via direct repository URLs. But still
> failed. The checkout command is "svn checkout
> svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D".
> So I think the URLs is
> "svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/Align.c".
> Am I right?

Sounds right to me.

> Then I got this:
> 
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn mv
> svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/Align.c
> svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/align_new.c
> svn: Could not use external editor to fetch log message; consider setting
> the $SVN_EDITOR environment variable or using the --message (-m) or --file
> (-F) options
> svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set,
> and no 'editor-cmd' run-time configuration option was found

Read the error message. You did not supply a commit message via the -m argument, and you do not have the environment variables set up for Subversion to call an editor for you to enter the message there. Try:

svn mv svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/Align.c svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/align_new.c -m "Rename Align.c to align_new.c"

(Should all be on one line; pardon my email client if it wraps this)

Re: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Di Hu <dh...@purdue.edu>.
Hi Ryan:

I tired to rename one of the files via direct repository URLs. But still
failed. The checkout command is "svn checkout
svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D".
So I think the URLs is
"svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/Align.c".
Am I right? Then I got this:

Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn mv
svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/Align.c
svn://prometheus.ecn.purdue.edu/RAID2/Users/garciagroup/svnrepos/reconstruction3D/align_new.c
svn: Could not use external editor to fetch log message; consider setting
the $SVN_EDITOR environment variable or using the --message (-m) or --file
(-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set,
and no 'editor-cmd' run-time configuration option was found

Is just deleting both file easier? If it is, would you please tell me how to
do that? I can add the files again after deleting them. Thank you.

Di


Ryan Schmidt-75 wrote:
> 
> 
> Ah, ok, that is a problem then. As you probably know, the Mac's default
> filesystem is case-insensitive, while Subversion repositories are
> case-sensitive. And your repository seems to think there are two files in
> it whose names differ only in case, which is of course a situation that
> then cannot be correctly represented on your Mac's filesystem.
> 
> Is it your intention to delete just one of these files (either Align.c or
> align.c), or both of them? I recommend you do whatever it is via direct
> repository URLs, not in a working copy.
> 
> See this FAQ entry for more:
> 
> http://subversion.apache.org/faq.html#case-change
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Help%3A-svn%3A-Working-copy-%27XXXX-XXXX-XXX%27-locked-tp29300593p29302286.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 29, 2010, at 20:34, Di Hu wrote:

> And I could see both Align.c and align.c
> after using "svn ls".

Ah, ok, that is a problem then. As you probably know, the Mac's default filesystem is case-insensitive, while Subversion repositories are case-sensitive. And your repository seems to think there are two files in it whose names differ only in case, which is of course a situation that then cannot be correctly represented on your Mac's filesystem.

Is it your intention to delete just one of these files (either Align.c or align.c), or both of them? I recommend you do whatever it is via direct repository URLs, not in a working copy.

See this FAQ entry for more:

http://subversion.apache.org/faq.html#case-change


RE: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Di Hu <dh...@purdue.edu>.
Hi Bert,

I think I tried 'svn status' before. It didn't help me because I couldn't
understand what it showed. But I have sloved this problem by renaming one of
the files through urls. Thank you for your suggestion.

Di




Bert Huijben-5 wrote:
> 
> 
> 
> All 'svn' operations normalize the casing of passed filenames to their
> on-disk casing on case insensitive systems. (I'm not 100% sure if this
> works
> this way on Mac/OS, but it does on Windows
> 
> So if there is some 'aLIGN.c' on disk and you pass 'svn rm align.c', 'svn'
> translates that to 'svn rm aLIGN.c' before it passes it into the library.
> So
> the real handler of the delete never sees that you passed different paths.
> (This is done in svn_client_args_to_target_array() ->
> svn_opt__arg_canonicalize_path())
> 
> 
> The workaround is to temporarily remove the on-disk file to something
> completely different and then use the command. 
> 
> But just calling 'svn status' should tell you if you have this issue. That
> should show you two files: one unversioned and one missing/obstructed.
> 
> 	Bert
> 
> 

-- 
View this message in context: http://old.nabble.com/Help%3A-svn%3A-Working-copy-%27XXXX-XXXX-XXX%27-locked-tp29300593p29304098.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 30, 2010, at 03:30, Bert Huijben wrote:

> All 'svn' operations normalize the casing of passed filenames to their
> on-disk casing on case insensitive systems. (I'm not 100% sure if this works
> this way on Mac/OS, but it does on Windows
> 
> So if there is some 'aLIGN.c' on disk and you pass 'svn rm align.c', 'svn'
> translates that to 'svn rm aLIGN.c' before it passes it into the library. So
> the real handler of the delete never sees that you passed different paths.
> (This is done in svn_client_args_to_target_array() ->
> svn_opt__arg_canonicalize_path())

No, none of that appears to happen, at least not on my Mac. Take a look at this transcript of Subversion 1.6.12 on Mac OS X 10.6.4 x86_64 on a case-insensitive journaled Mac OS X Extended (HFS+) filesystem:


$ svnadmin create repo
$ svn co file://$(pwd)/repo wc
Checked out revision 0.
$ touch wc/file
$ svn add wc/FiLe
A         wc/FiLe
$ svn ci -m "" wc
Adding         wc/FiLe
Transmitting file data .
Committed revision 1.
$ svn co file://$(pwd)/repo wc2
A    wc2/FiLe
Checked out revision 1.
$ ls wc/ wc2/
wc/:
file

wc2/:
FiLe
$ svn rm wc2/file
$ svn st wc2/
!       wc2/FiLe
$ 




RE: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Di Hu [mailto:dhu@purdue.edu]
> Sent: vrijdag 30 juli 2010 3:34
> To: users@subversion.apache.org
> Subject: Re: Help: svn: Working copy 'XXXX/XXXX/XXX' locked
> 
> 
> Hi Ryan:
> 
> Thanks for your suggestion. I did use "svn add align.c" sometime
> before. But
> I don't know if subversion  thinks Align.c is called align.c. I tried
> "svn
> rm align.c", but nothing happend. And I could see both Align.c and
> align.c
> after using "svn ls". I also tried to commit after "removing" them. But
> the

All 'svn' operations normalize the casing of passed filenames to their
on-disk casing on case insensitive systems. (I'm not 100% sure if this works
this way on Mac/OS, but it does on Windows

So if there is some 'aLIGN.c' on disk and you pass 'svn rm align.c', 'svn'
translates that to 'svn rm aLIGN.c' before it passes it into the library. So
the real handler of the delete never sees that you passed different paths.
(This is done in svn_client_args_to_target_array() ->
svn_opt__arg_canonicalize_path())


The workaround is to temporarily remove the on-disk file to something
completely different and then use the command. 

But just calling 'svn status' should tell you if you have this issue. That
should show you two files: one unversioned and one missing/obstructed.

	Bert

> commit didn't work as well. No warning, just didn't work... Would you
> please
> give me some more advice? Thanks again!
> 
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn update
> svn: Working copy '.' locked
> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for
> details)
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn cleanup
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn rm align.c
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn ls
> Align.c
> BNT_ang_files/
> Clean_Microstructure.c
> Reconstruction.c
> align.c
> clean_microstructure.c
> common.c
> common.h
> makefile
> quat.symm.cubic
> reconstruct.c
> revise_records.rtf
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn rm
> clean_microstructure.c
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn ls
> Align.c
> BNT_ang_files/
> Clean_Microstructure.c
> Reconstruction.c
> align.c
> clean_microstructure.c
> common.c
> common.h
> makefile
> quat.symm.cubic
> reconstruct.c
> revise_records.rtf
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn commit --
> message="modified
> codes.please see revise records for details."
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$
> 
> 
> Di
> 
> 
> 
> 
> Ryan Schmidt-75 wrote:
> >
> >
> >
> > At the risk of repeating what you already know, it seems that Align.c
> is
> > not under version control. Does Subversion perhaps think it's called
> > align.c instead? It would if, for example, when you originally added
> it,
> > you used "svn add align.c" instead of "svn add Align.c". If that's
> the
> > case, then use "svn rm align.c" to remove it, if that's what you want
> to
> > do.
> >
> >
> >
> >
> >
> 
> --
> View this message in context: http://old.nabble.com/Help%3A-svn%3A-
> Working-copy-%27XXXX-XXXX-XXX%27-locked-tp29300593p29302141.html
> Sent from the Subversion Users mailing list archive at Nabble.com.


Re: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Di Hu <dh...@purdue.edu>.
Hi Ryan:

Thanks for your suggestion. I did use "svn add align.c" sometime before. But
I don't know if subversion  thinks Align.c is called align.c. I tried "svn
rm align.c", but nothing happend. And I could see both Align.c and align.c
after using "svn ls". I also tried to commit after "removing" them. But the
commit didn't work as well. No warning, just didn't work... Would you please
give me some more advice? Thanks again!

Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn update
svn: Working copy '.' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn cleanup
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn rm align.c
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn ls
Align.c
BNT_ang_files/
Clean_Microstructure.c
Reconstruction.c
align.c
clean_microstructure.c
common.c
common.h
makefile
quat.symm.cubic
reconstruct.c
revise_records.rtf
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn rm clean_microstructure.c
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn ls
Align.c
BNT_ang_files/
Clean_Microstructure.c
Reconstruction.c
align.c
clean_microstructure.c
common.c
common.h
makefile
quat.symm.cubic
reconstruct.c
revise_records.rtf
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn commit --message="modified
codes.please see revise records for details."
Hu-DimatoMacBook-Pro:reconstruction3d dhu$ 


Di




Ryan Schmidt-75 wrote:
> 
> 
> 
> At the risk of repeating what you already know, it seems that Align.c is
> not under version control. Does Subversion perhaps think it's called
> align.c instead? It would if, for example, when you originally added it,
> you used "svn add align.c" instead of "svn add Align.c". If that's the
> case, then use "svn rm align.c" to remove it, if that's what you want to
> do.
> 
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Help%3A-svn%3A-Working-copy-%27XXXX-XXXX-XXX%27-locked-tp29300593p29302141.html
Sent from the Subversion Users mailing list archive at Nabble.com.

Re: Help: svn: Working copy 'XXXX/XXXX/XXX' locked

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 29, 2010, at 16:04, Di Hu wrote:

> I have some problems in using svn commands. I think this is because I have
> some file which have same names but in different cases(such as align.c and
> Align.c). 
> 
> I tried to delete one of the files, and got:
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn delete
> /Users/dhu/reconstruction3D/Align.c 
> svn: Working copy '/Users/dhu/reconstruction3D' locked
> svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
> 
> I typed "svn cleanup" and tried again.  Then I got:
> Hu-DimatoMacBook-Pro:reconstruction3d dhu$ svn delete
> /Users/dhu/reconstruction3D/Align.c 
> svn: Use --force to override this restriction
> svn: '/Users/dhu/reconstruction3D/Align.c' is not under version control
> 
> I also tried "mv" and "rm" , but both of them responded me "svn: 'Align.c'
> is not under version control".
> 
> Can someone help me fix this problem? Thanks a lot!!

At the risk of repeating what you already know, it seems that Align.c is not under version control. Does Subversion perhaps think it's called align.c instead? It would if, for example, when you originally added it, you used "svn add align.c" instead of "svn add Align.c". If that's the case, then use "svn rm align.c" to remove it, if that's what you want to do.