Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 23411:2d86f4e38c08
subrepo: add status support for ignored files in git subrepos
Retrieving the status of a git subrepo did not show ignored
files. Using 'git ls-files', we can retrieve these files
and display the correct status.
author | Mathias De Mar? <mathias.demare@gmail.com> |
---|---|
date | Fri, 28 Nov 2014 20:16:15 +0100 |
parents | 99a886418000 |
children | f5de2a82b77e |
comparison
equal
deleted
inserted
replaced
23410:cd9e5e57064d | 23411:2d86f4e38c08 |
---|---|
1568 added.append(f) | 1568 added.append(f) |
1569 elif status == 'D': | 1569 elif status == 'D': |
1570 removed.append(f) | 1570 removed.append(f) |
1571 | 1571 |
1572 deleted, unknown, ignored, clean = [], [], [], [] | 1572 deleted, unknown, ignored, clean = [], [], [], [] |
1573 | |
1574 if not rev2: | |
1575 command = ['ls-files', '--others', '--exclude-standard'] | |
1576 out = self._gitcommand(command) | |
1577 for line in out.split('\n'): | |
1578 if len(line) == 0: | |
1579 continue | |
1580 unknown.append(line) | |
1581 | |
1573 return scmutil.status(modified, added, removed, deleted, | 1582 return scmutil.status(modified, added, removed, deleted, |
1574 unknown, ignored, clean) | 1583 unknown, ignored, clean) |
1575 | 1584 |
1576 def shortid(self, revid): | 1585 def shortid(self, revid): |
1577 return revid[:7] | 1586 return revid[:7] |