diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py index 28642f7fc2cfa40aad78ec6447d780e5b1283060_aGdleHQvY29udmVydC9nbnVhcmNoLnB5..b6173aee4a4739665616b7fd251c19b69694021a_aGdleHQvY29udmVydC9nbnVhcmNoLnB5 100644 --- a/hgext/convert/gnuarch.py +++ b/hgext/convert/gnuarch.py @@ -138,7 +138,7 @@ raise util.Abort(_('internal calling inconsistency')) # Raise IOError if necessary (i.e. deleted files). - if not os.path.exists(os.path.join(self.tmppath, name)): + if not os.path.lexists(os.path.join(self.tmppath, name)): raise IOError return self._getfile(name, rev) diff --git a/hgext/mq.py b/hgext/mq.py index 28642f7fc2cfa40aad78ec6447d780e5b1283060_aGdleHQvbXEucHk=..b6173aee4a4739665616b7fd251c19b69694021a_aGdleHQvbXEucHk= 100644 --- a/hgext/mq.py +++ b/hgext/mq.py @@ -674,7 +674,7 @@ removed = [] merged = [] for f in files: - if os.path.exists(repo.wjoin(f)): + if os.path.lexists(repo.wjoin(f)): merged.append(f) else: removed.append(f) diff --git a/mercurial/context.py b/mercurial/context.py index 28642f7fc2cfa40aad78ec6447d780e5b1283060_bWVyY3VyaWFsL2NvbnRleHQucHk=..b6173aee4a4739665616b7fd251c19b69694021a_bWVyY3VyaWFsL2NvbnRleHQucHk= 100644 --- a/mercurial/context.py +++ b/mercurial/context.py @@ -824,7 +824,7 @@ wlock = self._repo.wlock() try: for f in list: - if unlink and os.path.exists(self._repo.wjoin(f)): + if unlink and os.path.lexists(self._repo.wjoin(f)): self._repo.ui.warn(_("%s still exists!\n") % f) elif self._repo.dirstate[f] == 'a': self._repo.dirstate.forget(f) @@ -852,7 +852,7 @@ def copy(self, source, dest): p = self._repo.wjoin(dest) - if not (os.path.exists(p) or os.path.islink(p)): + if not os.path.lexists(p): self._repo.ui.warn(_("%s does not exist!\n") % dest) elif not (os.path.isfile(p) or os.path.islink(p)): self._repo.ui.warn(_("copy failed: %s is not a file or a " diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py index 28642f7fc2cfa40aad78ec6447d780e5b1283060_bWVyY3VyaWFsL2RpcnN0YXRlLnB5..b6173aee4a4739665616b7fd251c19b69694021a_bWVyY3VyaWFsL2RpcnN0YXRlLnB5 100644 --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -362,7 +362,7 @@ norm_path = os.path.normcase(path) fold_path = self._foldmap.get(norm_path, None) if fold_path is None: - if knownpath or not os.path.exists(os.path.join(self._root, path)): + if knownpath or not os.path.lexists(os.path.join(self._root, path)): fold_path = path else: fold_path = self._foldmap.setdefault(norm_path, diff --git a/mercurial/patch.py b/mercurial/patch.py index 28642f7fc2cfa40aad78ec6447d780e5b1283060_bWVyY3VyaWFsL3BhdGNoLnB5..b6173aee4a4739665616b7fd251c19b69694021a_bWVyY3VyaWFsL3BhdGNoLnB5 100644 --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1230,7 +1230,7 @@ islink, isexec = gp.mode dst = repo.wjoin(gp.path) # patch won't create empty files - if gp.op == 'ADD' and not os.path.exists(dst): + if gp.op == 'ADD' and not os.path.lexists(dst): flags = (isexec and 'x' or '') + (islink and 'l' or '') repo.wwrite(gp.path, '', flags) util.set_flags(dst, islink, isexec) diff --git a/mercurial/util.py b/mercurial/util.py index 28642f7fc2cfa40aad78ec6447d780e5b1283060_bWVyY3VyaWFsL3V0aWwucHk=..b6173aee4a4739665616b7fd251c19b69694021a_bWVyY3VyaWFsL3V0aWwucHk= 100644 --- a/mercurial/util.py +++ b/mercurial/util.py @@ -642,7 +642,7 @@ l = l + 1 name = name[l:] - if not os.path.exists(os.path.join(root, name)): + if not os.path.lexists(os.path.join(root, name)): return None seps = os.sep