Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Wed Nov 26 15:37:01 2014 -0800 +++ b/mercurial/subrepo.py Fri Nov 28 20:16:15 2014 +0100 @@ -1570,6 +1570,15 @@ removed.append(f) deleted, unknown, ignored, clean = [], [], [], [] + + if not rev2: + command = ['ls-files', '--others', '--exclude-standard'] + out = self._gitcommand(command) + for line in out.split('\n'): + if len(line) == 0: + continue + unknown.append(line) + return scmutil.status(modified, added, removed, deleted, unknown, ignored, clean)