This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with symbolic links and Mercurial's "update" command


On 4/9/2013 11:19 AM, Dr. Rainer Woitok wrote:
Greetings,

the problem  I'm having seems to  be either Mercurial or Cygwin related.
I'm currently using Mercurial 2.4.2 and Cygwin 1.7.17, which I'm running
with the "winsymlinks" option in the "CYGWIN" environment variable:

@echo off

set CYGWIN=glob:noignorecase proc_retry:10 nodosfilewarning winsymlinks
set PATH=c:\cygwin\bin

C:
chdir C:\cygwin\bin

sh --login -i

Even though  the problem surfaced in a  rather large repository, I could
reproduce it in an almost empty one, like this:

$ hg --version
Mercurial Distributed SCM (version 2.4.2)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ uname -a
CYGWIN_NT-6.0 tablet 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin
$ mkdir Test
$ cd Test
$ hg init
$ touch a
$ ln -s a la
$ ls -l
total 1
-rw------- 1 Rainer none 0 Apr  9 15:37 a
lrwxrwxrwx 1 Rainer none 1 Apr  9 15:37 la -> a
$ hg add *
$ hg status
A a
A la
$ hg commit -m test.
$ rm *
$ hg status
! a
! la
$ hg update -C
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ ls -l
total 1
-rw------- 1 Rainer none 0 Apr  9 15:40 a
-rw------- 1 Rainer none 1 Apr  9 15:40 la
$ cat la
a$

Mind that while the first "ls" command shows "la" to be a symbolic link,
the second  "ls"  and the "cat" commands show  "la"  to be a  plain file
containing  the single  character file name  (without  trailing  newline
character) the symbolic link was originally pointing to.

Since I cannot  reproduce this link  killing behaviour under OpenSolaris
using Mercurial 1.7.3  (a bit  outdated, yes, but  this is not  under my
control :-),  I  suspect  this could  be Cygwin  rather  than  Mercurial
related.

Any help would be appreciated,  and please also  reply to me personally,
as I am not subscribed to this list.

Does mecurial 2.5.2 help?  Does removing setting "nowinsymlinks" help?

Presumably, mercurial either isn't restoring the read-only attribute or
is munging the LNK suffix.  You might check these possibilities.


--
Larry

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]