diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -722,7 +722,7 @@ def copyfile(src, dest, hardlink=False): unlink(dest) # hardlinks are problematic on CIFS, quietly ignore this flag # until we find a way to work around it cleanly (issue4546) - if False or hardlink: + if False and hardlink: try: oslink(src, dest) return diff --git a/tests/test-hardlinks.t b/tests/test-hardlinks.t --- a/tests/test-hardlinks.t +++ b/tests/test-hardlinks.t @@ -159,7 +159,7 @@ Push to repo r1 should break up most har 1 r2/.hg/store/00manifest.i 1 r2/.hg/store/data/d1/f2.i 2 r2/.hg/store/data/f1.i - 2 r2/.hg/store/fncache + 1 r2/.hg/store/fncache $ hg -R r2 verify checking changesets @@ -184,7 +184,7 @@ Committing a change to f1 in r1 must bre 1 r2/.hg/store/00manifest.i 1 r2/.hg/store/data/d1/f2.i 1 r2/.hg/store/data/f1.i - 2 r2/.hg/store/fncache + 1 r2/.hg/store/fncache $ cd r3