##// END OF EJS Templates
util.checkcase: don't abort on broken symlinks...
Siddharth Agarwal -
r24902:986a5c23 stable
parent child Browse files
Show More
@@ -877,7 +877,7 b' def checkcase(path):'
877 Requires a path (like /foo/.hg) ending with a foldable final
877 Requires a path (like /foo/.hg) ending with a foldable final
878 directory component.
878 directory component.
879 """
879 """
880 s1 = os.stat(path)
880 s1 = os.lstat(path)
881 d, b = os.path.split(path)
881 d, b = os.path.split(path)
882 b2 = b.upper()
882 b2 = b.upper()
883 if b == b2:
883 if b == b2:
@@ -886,7 +886,7 b' def checkcase(path):'
886 return True # no evidence against case sensitivity
886 return True # no evidence against case sensitivity
887 p2 = os.path.join(d, b2)
887 p2 = os.path.join(d, b2)
888 try:
888 try:
889 s2 = os.stat(p2)
889 s2 = os.lstat(p2)
890 if s2 == s1:
890 if s2 == s1:
891 return False
891 return False
892 return True
892 return True
@@ -381,6 +381,20 b" Don't crash if the subrepo is missing"
381 $ hg commit --subrepos -qm missing
381 $ hg commit --subrepos -qm missing
382 abort: subrepo s is missing (in subrepo s)
382 abort: subrepo s is missing (in subrepo s)
383 [255]
383 [255]
384
385 #if symlink
386 Don't crash if subrepo is a broken symlink
387 $ ln -s broken s
388 $ hg status -S
389 $ hg push -q
390 abort: subrepo s is missing (in subrepo s)
391 [255]
392 $ hg commit --subrepos -qm missing
393 abort: subrepo s is missing (in subrepo s)
394 [255]
395 $ rm s
396 #endif
397
384 $ hg update -C 2> /dev/null
398 $ hg update -C 2> /dev/null
385 cloning subrepo s from $TESTTMP/gitroot
399 cloning subrepo s from $TESTTMP/gitroot
386 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
400 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now