1412 dirs.update(d) |
1412 dirs.update(d) |
1413 files.update(dirs) |
1413 files.update(dirs) |
1414 ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files))) |
1414 ui.write('\n'.join(repo.pathto(p, cwd) for p in sorted(files))) |
1415 ui.write('\n') |
1415 ui.write('\n') |
1416 |
1416 |
|
1417 @command('debugpushkey', [], _('REPO NAMESPACE [KEY OLD NEW]'), norepo=True) |
|
1418 def debugpushkey(ui, repopath, namespace, *keyinfo, **opts): |
|
1419 '''access the pushkey key/value protocol |
|
1420 |
|
1421 With two args, list the keys in the given namespace. |
|
1422 |
|
1423 With five args, set a key to new if it currently is set to old. |
|
1424 Reports success or failure. |
|
1425 ''' |
|
1426 |
|
1427 target = hg.peer(ui, {}, repopath) |
|
1428 if keyinfo: |
|
1429 key, old, new = keyinfo |
|
1430 r = target.pushkey(namespace, key, old, new) |
|
1431 ui.status(str(r) + '\n') |
|
1432 return not r |
|
1433 else: |
|
1434 for k, v in sorted(target.listkeys(namespace).iteritems()): |
|
1435 ui.write("%s\t%s\n" % (k.encode('string-escape'), |
|
1436 v.encode('string-escape'))) |
|
1437 |
1417 @command('debugupgraderepo', [ |
1438 @command('debugupgraderepo', [ |
1418 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), |
1439 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), |
1419 ('', 'run', False, _('performs an upgrade')), |
1440 ('', 'run', False, _('performs an upgrade')), |
1420 ]) |
1441 ]) |
1421 def debugupgraderepo(ui, repo, run=False, optimize=None): |
1442 def debugupgraderepo(ui, repo, run=False, optimize=None): |