Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 6519:a7582980d654
context: handle untracked files in filectx.fileflags()
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 12 Apr 2008 21:08:03 +0200 |
parents | 90a4329a6b4a |
children | 0c611355481b d286ec1bdcff |
comparison
equal
deleted
inserted
replaced
6494:c30849d4c8ba | 6519:a7582980d654 |
---|---|
519 return '' | 519 return '' |
520 | 520 |
521 pnode = self._parents[0].changeset()[0] | 521 pnode = self._parents[0].changeset()[0] |
522 orig = self._repo.dirstate.copies().get(path, path) | 522 orig = self._repo.dirstate.copies().get(path, path) |
523 node, flag = self._repo.manifest.find(pnode, orig) | 523 node, flag = self._repo.manifest.find(pnode, orig) |
524 is_link = util.linkfunc(self._repo.root, lambda p: 'l' in flag) | 524 is_link = util.linkfunc(self._repo.root, |
525 is_exec = util.execfunc(self._repo.root, lambda p: 'x' in flag) | 525 lambda p: flag and 'l' in flag) |
526 is_exec = util.execfunc(self._repo.root, | |
527 lambda p: flag and 'x' in flag) | |
526 try: | 528 try: |
527 return (is_link(path) and 'l' or '') + (is_exec(path) and 'e' or '') | 529 return (is_link(path) and 'l' or '') + (is_exec(path) and 'e' or '') |
528 except OSError: | 530 except OSError: |
529 pass | 531 pass |
530 | 532 |