mercurial/commands.py
changeset 18790 1e28a7f58f33
parent 18783 b99e62a9b7a2
child 18792 10669e24eb6c
equal deleted inserted replaced
18789:fff3a8114510 18790:1e28a7f58f33
  2069     repo = hg.peer(ui, opts, repopath)
  2069     repo = hg.peer(ui, opts, repopath)
  2070     if not repo.capable('known'):
  2070     if not repo.capable('known'):
  2071         raise util.Abort("known() not supported by target repository")
  2071         raise util.Abort("known() not supported by target repository")
  2072     flags = repo.known([bin(s) for s in ids])
  2072     flags = repo.known([bin(s) for s in ids])
  2073     ui.write("%s\n" % ("".join([f and "1" or "0" for f in flags])))
  2073     ui.write("%s\n" % ("".join([f and "1" or "0" for f in flags])))
       
  2074 
       
  2075 @command('debuglabelcomplete', [], _('LABEL...'))
       
  2076 def debuglabelcomplete(ui, repo, *args):
       
  2077     '''complete "labels" - tags, open branch names, bookmark names'''
       
  2078 
       
  2079     labels = set()
       
  2080     labels.update(t[0] for t in repo.tagslist())
       
  2081     labels.update(repo[n].branch() for n in repo.heads())
       
  2082     labels.update(repo._bookmarks.keys())
       
  2083     completions = set()
       
  2084     if not args:
       
  2085         args = ['']
       
  2086     for a in args:
       
  2087         completions.update(l for l in labels if l.startswith(a))
       
  2088     ui.write('\n'.join(sorted(completions)))
       
  2089     ui.write('\n')
  2074 
  2090 
  2075 @command('debugobsolete',
  2091 @command('debugobsolete',
  2076         [('', 'flags', 0, _('markers flag')),
  2092         [('', 'flags', 0, _('markers flag')),
  2077         ] + commitopts2,
  2093         ] + commitopts2,
  2078          _('[OBSOLETED [REPLACEMENT] [REPL... ]'))
  2094          _('[OBSOLETED [REPLACEMENT] [REPL... ]'))