Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 26994:676c3838d217
commands.summary: switch to mergestate.read()
See previous patch for why we're doing this.
We do this with a bit of care -- it would be bad form for 'hg summary' to abort
completely if we encounter an unsupported merge record. Instead just warn about
that and continue with the rest of the summary.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 17 Nov 2015 14:20:55 -0800 |
parents | d240ae897ba6 |
children | 487cca1bf61f |
comparison
equal
deleted
inserted
replaced
26993:d240ae897ba6 | 26994:676c3838d217 |
---|---|
6206 else: | 6206 else: |
6207 copied.append(d) | 6207 copied.append(d) |
6208 if d in status.added: | 6208 if d in status.added: |
6209 status.added.remove(d) | 6209 status.added.remove(d) |
6210 | 6210 |
6211 ms = mergemod.mergestate(repo) | 6211 try: |
6212 unresolved = [f for f in ms if ms[f] == 'u'] | 6212 ms = mergemod.mergestate.read(repo) |
6213 except error.UnsupportedMergeRecords as e: | |
6214 s = ' '.join(e.recordtypes) | |
6215 ui.warn( | |
6216 _('warning: merge state has unsupported record types: %s\n') % s) | |
6217 unresolved = 0 | |
6218 else: | |
6219 unresolved = [f for f in ms if ms[f] == 'u'] | |
6213 | 6220 |
6214 subs = [s for s in ctx.substate if ctx.sub(s).dirty()] | 6221 subs = [s for s in ctx.substate if ctx.sub(s).dirty()] |
6215 | 6222 |
6216 labels = [(ui.label(_('%d modified'), 'status.modified'), status.modified), | 6223 labels = [(ui.label(_('%d modified'), 'status.modified'), status.modified), |
6217 (ui.label(_('%d added'), 'status.added'), status.added), | 6224 (ui.label(_('%d added'), 'status.added'), status.added), |