Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 3996:c190df14338c
exec: add execfunc to simplify exec flag support on non-exec filesystems
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 29 Dec 2006 20:04:30 -0600 |
parents | b4eaa68dea1b |
children | d7b9ec589546 |
line wrap: on
line diff
--- a/mercurial/context.py Fri Dec 29 20:04:30 2006 -0600 +++ b/mercurial/context.py Fri Dec 29 20:04:30 2006 -0600 @@ -378,13 +378,14 @@ """generate a manifest corresponding to the working directory""" man = self._parents[0].manifest().copy() + is_exec = util.execfunc(self._repo.root, man.execf) copied = self._repo.dirstate.copies() modified, added, removed, deleted, unknown = self._status[:5] for i, l in (("a", added), ("m", modified), ("u", unknown)): for f in l: man[f] = man.get(copied.get(f, f), nullid) + i try: - man.set(f, util.is_exec(self._repo.wjoin(f), man.execf(f))) + man.set(f, is_exec(f)) except OSError: pass