##// END OF EJS Templates
debugcommands: move 'debugknown' in the new module
Pierre-Yves David -
r30919:e1fa5fe9 default
parent child Browse files
Show More
@@ -1863,19 +1863,6 def copy(ui, repo, *pats, **opts):
1863 1863 with repo.wlock(False):
1864 1864 return cmdutil.copy(ui, repo, pats, opts)
1865 1865
1866 @command('debugknown', [], _('REPO ID...'), norepo=True)
1867 def debugknown(ui, repopath, *ids, **opts):
1868 """test whether node ids are known to a repo
1869
1870 Every ID must be a full-length hex node id string. Returns a list of 0s
1871 and 1s indicating unknown/known.
1872 """
1873 repo = hg.peer(ui, opts, repopath)
1874 if not repo.capable('known'):
1875 raise error.Abort("known() not supported by target repository")
1876 flags = repo.known([bin(s) for s in ids])
1877 ui.write("%s\n" % ("".join([f and "1" or "0" for f in flags])))
1878
1879 1866 @command('debuglabelcomplete', [], _('LABEL...'))
1880 1867 def debuglabelcomplete(ui, repo, *args):
1881 1868 '''backwards compatibility with old bash completion scripts (DEPRECATED)'''
@@ -1023,6 +1023,19 def debuginstall(ui, **opts):
1023 1023
1024 1024 return problems
1025 1025
1026 @command('debugknown', [], _('REPO ID...'), norepo=True)
1027 def debugknown(ui, repopath, *ids, **opts):
1028 """test whether node ids are known to a repo
1029
1030 Every ID must be a full-length hex node id string. Returns a list of 0s
1031 and 1s indicating unknown/known.
1032 """
1033 repo = hg.peer(ui, opts, repopath)
1034 if not repo.capable('known'):
1035 raise error.Abort("known() not supported by target repository")
1036 flags = repo.known([bin(s) for s in ids])
1037 ui.write("%s\n" % ("".join([f and "1" or "0" for f in flags])))
1038
1026 1039 @command('debugupgraderepo', [
1027 1040 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')),
1028 1041 ('', 'run', False, _('performs an upgrade')),
General Comments 0
You need to be logged in to leave comments. Login now