Skip to content
Snippets Groups Projects
Commit a7582980 authored by Patrick Mezard's avatar Patrick Mezard
Browse files

context: handle untracked files in filectx.fileflags()

parent c30849d4
No related branches found
No related tags found
No related merge requests found
......@@ -521,8 +521,10 @@
pnode = self._parents[0].changeset()[0]
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)
is_link = util.linkfunc(self._repo.root,
lambda p: flag and 'l' in flag)
is_exec = util.execfunc(self._repo.root,
lambda p: flag and 'x' in flag)
try:
return (is_link(path) and 'l' or '') + (is_exec(path) and 'e' or '')
except OSError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment