changeset 5407:d7e7902bb190

Fix workingctx exec/link bit of copies on non-supporting systems
author Patrick Mezard <pmezard@gmail.com>
date Sun, 07 Oct 2007 15:07:35 +0200
parents f11554a097c8
children 36794dbe66a3
files mercurial/context.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Sat Oct 06 22:30:24 2007 +0200
+++ b/mercurial/context.py	Sun Oct 07 15:07:35 2007 +0200
@@ -426,9 +426,11 @@
         """generate a manifest corresponding to the working directory"""
 
         man = self._parents[0].manifest().copy()
-        is_exec = util.execfunc(self._repo.root, man.execf)
-        is_link = util.linkfunc(self._repo.root, man.linkf)
         copied = self._repo.dirstate.copies()
+        is_exec = util.execfunc(self._repo.root,
+                                lambda p: man.execf(copied.get(p,p)))
+        is_link = util.linkfunc(self._repo.root,
+                                lambda p: man.linkf(copied.get(p,p)))
         modified, added, removed, deleted, unknown = self._status[:5]
         for i, l in (("a", added), ("m", modified), ("u", unknown)):
             for f in l:
@@ -482,7 +484,8 @@
                 return ''
         
         pnode = self._parents[0].changeset()[0]
-        node, flag = self._repo.manifest.find(pnode, path)
+        orig = self._repo.dirstate.copies().get(path, path)
+        node, flag = self._repo.manifest.find(pnode, orig)
         is_link = util.linkfunc(self._repo.root, lambda p: 'l' in flag)
         is_exec = util.execfunc(self._repo.root, lambda p: 'x' in flag)
         try: