##// END OF EJS Templates
summary: move mergemod before parents to give access to ms
timeless -
r28641:4acd5651 default
parent child Browse files
Show More
@@ -6583,6 +6583,17 b' def summary(ui, repo, **opts):'
6583 pnode = parents[0].node()
6583 pnode = parents[0].node()
6584 marks = []
6584 marks = []
6585
6585
6586 ms = None
6587 try:
6588 ms = mergemod.mergestate.read(repo)
6589 except error.UnsupportedMergeRecords as e:
6590 s = ' '.join(e.recordtypes)
6591 ui.warn(
6592 _('warning: merge state has unsupported record types: %s\n') % s)
6593 unresolved = 0
6594 else:
6595 unresolved = [f for f in ms if ms[f] == 'u']
6596
6586 for p in parents:
6597 for p in parents:
6587 # label with log.changeset (instead of log.parent) since this
6598 # label with log.changeset (instead of log.parent) since this
6588 # shows a working directory parent *changeset*:
6599 # shows a working directory parent *changeset*:
@@ -6638,16 +6649,6 b' def summary(ui, repo, **opts):'
6638 if d in status.added:
6649 if d in status.added:
6639 status.added.remove(d)
6650 status.added.remove(d)
6640
6651
6641 try:
6642 ms = mergemod.mergestate.read(repo)
6643 except error.UnsupportedMergeRecords as e:
6644 s = ' '.join(e.recordtypes)
6645 ui.warn(
6646 _('warning: merge state has unsupported record types: %s\n') % s)
6647 unresolved = 0
6648 else:
6649 unresolved = [f for f in ms if ms[f] == 'u']
6650
6651 subs = [s for s in ctx.substate if ctx.sub(s).dirty()]
6652 subs = [s for s in ctx.substate if ctx.sub(s).dirty()]
6652
6653
6653 labels = [(ui.label(_('%d modified'), 'status.modified'), status.modified),
6654 labels = [(ui.label(_('%d modified'), 'status.modified'), status.modified),
@@ -332,12 +332,12 b' insert unsupported mandatory merge recor'
332 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
332 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information)
333 [255]
333 [255]
334 $ hg summary
334 $ hg summary
335 warning: merge state has unsupported record types: X
335 parent: 2:57653b9f834a
336 parent: 2:57653b9f834a
336 append baz to files
337 append baz to files
337 parent: 1:dc77451844e3
338 parent: 1:dc77451844e3
338 append bar to files
339 append bar to files
339 branch: default
340 branch: default
340 warning: merge state has unsupported record types: X
341 commit: 2 modified, 2 unknown (merge)
341 commit: 2 modified, 2 unknown (merge)
342 update: 2 new changesets (update)
342 update: 2 new changesets (update)
343 phases: 5 draft
343 phases: 5 draft
General Comments 0
You need to be logged in to leave comments. Login now