4273 ms = mergemod.mergestate.read(repo) |
4273 ms = mergemod.mergestate.read(repo) |
4274 m = scmutil.match(repo[None], pats, opts) |
4274 m = scmutil.match(repo[None], pats, opts) |
4275 for f in ms: |
4275 for f in ms: |
4276 if not m(f): |
4276 if not m(f): |
4277 continue |
4277 continue |
|
4278 |
|
4279 # Set label based on merge state. |
4278 l = 'resolve.' + {'u': 'unresolved', 'r': 'resolved', |
4280 l = 'resolve.' + {'u': 'unresolved', 'r': 'resolved', |
|
4281 'pu': 'unresolved', 'pr': 'resolved', |
4279 'd': 'driverresolved'}[ms[f]] |
4282 'd': 'driverresolved'}[ms[f]] |
|
4283 |
|
4284 # Set key based on merge state. Unresolved path conflicts show |
|
4285 # as 'P'. Resolved path conflicts show as 'R', the same as normal |
|
4286 # resolved conflicts. |
|
4287 key = {'pu': 'P', 'pr': 'R'}.get(ms[f], ms[f].upper()) |
|
4288 |
4280 fm.startitem() |
4289 fm.startitem() |
4281 fm.condwrite(not nostatus, 'status', '%s ', ms[f].upper(), label=l) |
4290 fm.condwrite(not nostatus, 'status', '%s ', key, label=l) |
4282 fm.write('path', '%s\n', f, label=l) |
4291 fm.write('path', '%s\n', f, label=l) |
4283 fm.end() |
4292 fm.end() |
4284 return 0 |
4293 return 0 |
4285 |
4294 |
4286 with repo.wlock(): |
4295 with repo.wlock(): |