[issue2579] Problem with hg and junctions under Windows
scott araujo
bugs at mercurial.selenic.com
Thu Jan 6 18:46:12 UTC 2011
New submission from scott araujo <saraujo at webmd.net>:
I'm having a problem with how Mercurial deals with junctions under
Windows.
I create a junction to a dir/files tracked in hg, the original files are
tracked in hg, the junctions to them are not. Hg commands work fine, the
junctions show up as untracked files. If I delete the original file in
hg, hg commands (st, update, etc.) don't work because they get hung up
looking at the dead junction that points to a non-existent file.
I can appreciate the confusion that hg faces trying to get information on
a file that doesn't exist but I think this should be a non-issue. Whether
the file the junction points to exists or not, hg should know that it's
not tracking that file and skip past it without trying to get more
information. Here's an example:
C:\build\basedir>dir /b/s realdir
C:\build\basedir\realdir\test1
C:\build\basedir\realdir\test2
C:\build\basedir\realdir\test1\junk.html
C:\build\basedir\realdir\test2\junk.html
C:\build\basedir>mkdir junctions
C:\build\basedir>cd junctions
C:\build\basedir\junctions>mklink /j j-test1 c:\build\basedir\realdir\test1
Junction created for j-test1 <<===>> c:\build\basedir\realdir\test1
C:\build\basedir\junctions>mklink /j j-test2 c:\build\basedir\realdir\test2
Junction created for j-test2 <<===>> c:\build\basedir\realdir\test2
C:\build\basedir>dir /s junctions
Volume in drive C has no label.
Volume Serial Number is 2A5E-AFA8
Directory of C:\build\basedir\junctions
01/06/2011 10:28 AM <DIR> .
01/06/2011 10:28 AM <DIR> ..
01/06/2011 10:28 AM <JUNCTION> j-test1
[c:\build\basedir\realdir\test1]
01/06/2011 10:28 AM <JUNCTION> j-test2
[c:\build\basedir\realdir\test2]
0 File(s) 0 bytes
Directory of C:\build\basedir\junctions\j-test1
01/06/2011 10:17 AM <DIR> .
01/06/2011 10:17 AM <DIR> ..
01/06/2011 10:17 AM 379 junk.html
1 File(s) 379 bytes
Directory of C:\build\basedir\junctions\j-test2
01/05/2011 05:04 PM <DIR> .
01/05/2011 05:04 PM <DIR> ..
01/05/2011 05:04 PM 332 junk.html
1 File(s) 332 bytes
Total Files Listed:
2 File(s) 711 bytes
8 Dir(s) 171,037,564,928 bytes free
C:\build\basedir>hg st
? junctions\j-test1\junk.html
? junctions\j-test2\junk.html
C:\build\basedir>hg rm realdir\test1\junk.html
C:\build\basedir>hg commit -m"removing one file from hg"
C:\build\basedir>hg st
abort: The system cannot find the path specified:
C:\build\basedir\junctions/j-test1
C:\build\basedir>
Thanks for your help,
Scott
----------
messages: 14826
nosy: scott_araujo
priority: bug
status: unread
title: Problem with hg and junctions under Windows
topic: hg
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2579>
____________________________________________________
More information about the Mercurial-devel
mailing list