changeset 19163:f6109ee404d5

merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 09 May 2013 10:51:03 -0500
parents c9431c711ddb (current diff) 27013ace80eb (diff)
children c57e99386d88
files
diffstat 5 files changed, 34 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/blackbox.py	Thu May 09 09:51:42 2013 -0400
+++ b/hgext/blackbox.py	Thu May 09 10:51:03 2013 -0500
@@ -10,7 +10,7 @@
 
 Logs event information to .hg/blackbox.log to help debug and diagnose problems.
 The events that get logged can be configured via the blackbox.track config key.
-Examples:
+Examples::
 
   [blackbox]
   track = *
--- a/hgext/largefiles/lfcommands.py	Thu May 09 09:51:42 2013 -0400
+++ b/hgext/largefiles/lfcommands.py	Thu May 09 10:51:03 2013 -0500
@@ -502,7 +502,8 @@
         # lfile is added to the repository again. This happens when a
         # largefile is converted back to a normal file: the standin
         # disappears, but a new (normal) file appears as the lfile.
-        if os.path.exists(abslfile) and lfile not in repo[None]:
+        if (os.path.exists(abslfile) and
+            repo.dirstate.normalize(lfile) not in repo[None]):
             util.unlinkpath(abslfile)
             ret = -1
     state = repo.dirstate[lfutil.standin(lfile)]
--- a/hgext/largefiles/overrides.py	Thu May 09 09:51:42 2013 -0400
+++ b/hgext/largefiles/overrides.py	Thu May 09 10:51:03 2013 -0500
@@ -333,7 +333,7 @@
 # largefiles. This makes the merge proceed and we can then handle this
 # case further in the overridden manifestmerge function below.
 def overridecheckunknownfile(origfn, repo, wctx, mctx, f):
-    if lfutil.standin(f) in wctx:
+    if lfutil.standin(repo.dirstate.normalize(f)) in wctx:
         return False
     return origfn(repo, wctx, mctx, f)
 
--- a/mercurial/win32.py	Thu May 09 09:51:42 2013 -0400
+++ b/mercurial/win32.py	Thu May 09 10:51:03 2013 -0500
@@ -344,6 +344,12 @@
 def unlink(f):
     '''try to implement POSIX' unlink semantics on Windows'''
 
+    if os.path.isdir(f):
+        # use EPERM because it is POSIX prescribed value, even though
+        # unlink(2) on directories returns EISDIR on Linux
+        raise IOError(errno.EPERM,
+                      "Unlinking directory not permitted: '%s'" % f)
+
     # POSIX allows to unlink and rename open files. Windows has serious
     # problems with doing that:
     # - Calling os.unlink (or os.rename) on a file f fails if f or any
--- a/tests/test-casefolding.t	Thu May 09 09:51:42 2013 -0400
+++ b/tests/test-casefolding.t	Thu May 09 10:51:03 2013 -0500
@@ -106,6 +106,30 @@
   [255]
   $ cat a
   gold
+  $ rm a
+
+test that normal file in different case on target context is not
+unlinked by largefiles extension.
+
+  $ cat >> .hg/hgrc <<EOF
+  > [extensions]
+  > largefiles=
+  > EOF
+  $ hg update -q -C 1
+  $ hg status -A
+  $ echo 'A as largefiles' > A
+  $ hg add --large A
+  $ hg commit -m '#3'
+  created new head
+  $ hg manifest -r 3
+  .hglf/A
+  $ hg manifest -r 0
+  a
+  $ hg update -q -C 0
+  $ hg status -A
+  C a
+  $ hg update -q -C 3
+  $ hg update -q 0
 
   $ cd ..