358 gen = exchange.readbundle(ui, f, bundlepath) |
358 gen = exchange.readbundle(ui, f, bundlepath) |
359 if isinstance(gen, bundle2.unbundle20): |
359 if isinstance(gen, bundle2.unbundle20): |
360 return _debugbundle2(ui, gen, all=all, **opts) |
360 return _debugbundle2(ui, gen, all=all, **opts) |
361 _debugchangegroup(ui, gen, all=all, **opts) |
361 _debugchangegroup(ui, gen, all=all, **opts) |
362 |
362 |
|
363 @command('debugcapabilities', |
|
364 [], _('PATH'), |
|
365 norepo=True) |
|
366 def debugcapabilities(ui, path, **opts): |
|
367 """lists the capabilities of a remote peer""" |
|
368 peer = hg.peer(ui, opts, path) |
|
369 caps = peer.capabilities() |
|
370 ui.write(('Main capabilities:\n')) |
|
371 for c in sorted(caps): |
|
372 ui.write((' %s\n') % c) |
363 @command('debugcheckstate', [], '') |
373 @command('debugcheckstate', [], '') |
364 def debugcheckstate(ui, repo): |
374 def debugcheckstate(ui, repo): |
365 """validate the correctness of the current dirstate""" |
375 """validate the correctness of the current dirstate""" |
366 parent1, parent2 = repo.dirstate.parents() |
376 parent1, parent2 = repo.dirstate.parents() |
367 m1 = repo[parent1].manifest() |
377 m1 = repo[parent1].manifest() |