Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 47544:5363610f61ef
dirstate-item: use the `state` property in debugpathcomplete
Ideally we would use narrower property, but this is a good start.
Differential Revision: https://phab.mercurial-scm.org/D10989
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 05 Jul 2021 06:45:32 +0200 |
parents | 1be9bf3669cb |
children | 85ce6ed51b9c |
comparison
equal
deleted
inserted
replaced
47543:20b65f34d704 | 47544:5363610f61ef |
---|---|
2606 speclen = len(spec) | 2606 speclen = len(spec) |
2607 fullpaths = opts['full'] | 2607 fullpaths = opts['full'] |
2608 files, dirs = set(), set() | 2608 files, dirs = set(), set() |
2609 adddir, addfile = dirs.add, files.add | 2609 adddir, addfile = dirs.add, files.add |
2610 for f, st in pycompat.iteritems(dirstate): | 2610 for f, st in pycompat.iteritems(dirstate): |
2611 if f.startswith(spec) and st[0] in acceptable: | 2611 if f.startswith(spec) and st.state in acceptable: |
2612 if fixpaths: | 2612 if fixpaths: |
2613 f = f.replace(b'/', pycompat.ossep) | 2613 f = f.replace(b'/', pycompat.ossep) |
2614 if fullpaths: | 2614 if fullpaths: |
2615 addfile(f) | 2615 addfile(f) |
2616 continue | 2616 continue |