Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 12166:441a74b8def1
status: recurse into subrepositories with --subrepos/-S flag
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Fri, 03 Sep 2010 12:58:51 +0200 |
parents | af8c4929931c |
children | 7bccd04292a2 |
comparison
equal
deleted
inserted
replaced
12165:b7fbf24c8a93 | 12166:441a74b8def1 |
---|---|
1050 function | 1050 function |
1051 ''' | 1051 ''' |
1052 return self[node].walk(match) | 1052 return self[node].walk(match) |
1053 | 1053 |
1054 def status(self, node1='.', node2=None, match=None, | 1054 def status(self, node1='.', node2=None, match=None, |
1055 ignored=False, clean=False, unknown=False): | 1055 ignored=False, clean=False, unknown=False, |
1056 listsubrepos=False): | |
1056 """return status of files between two nodes or node and working directory | 1057 """return status of files between two nodes or node and working directory |
1057 | 1058 |
1058 If node1 is None, use the first dirstate parent instead. | 1059 If node1 is None, use the first dirstate parent instead. |
1059 If node2 is None, compare node1 with working directory. | 1060 If node2 is None, compare node1 with working directory. |
1060 """ | 1061 """ |
1156 else: | 1157 else: |
1157 added.append(fn) | 1158 added.append(fn) |
1158 removed = mf1.keys() | 1159 removed = mf1.keys() |
1159 | 1160 |
1160 r = modified, added, removed, deleted, unknown, ignored, clean | 1161 r = modified, added, removed, deleted, unknown, ignored, clean |
1162 | |
1163 if listsubrepos: | |
1164 for subpath in ctx1.substate: | |
1165 sub = ctx1.sub(subpath) | |
1166 if working: | |
1167 rev2 = None | |
1168 else: | |
1169 rev2 = ctx2.substate[subpath][1] | |
1170 try: | |
1171 submatch = matchmod.narrowmatcher(subpath, match) | |
1172 s = sub.status(rev2, match=submatch, ignored=listignored, | |
1173 clean=listclean, unknown=listunknown, | |
1174 listsubrepos=True) | |
1175 for rfiles, sfiles in zip(r, s): | |
1176 rfiles.extend("%s/%s" % (subpath, f) for f in sfiles) | |
1177 except error.LookupError: | |
1178 self.ui.status(_("skipping missing subrepository: %s\n") | |
1179 % subpath) | |
1180 | |
1161 [l.sort() for l in r] | 1181 [l.sort() for l in r] |
1162 return r | 1182 return r |
1163 | 1183 |
1164 def heads(self, start=None): | 1184 def heads(self, start=None): |
1165 heads = self.changelog.heads(start) | 1185 heads = self.changelog.heads(start) |