hgkw/keyword.py
branchkwmap-templates
changeset 162 017dbf710056
parent 161 aac10ec0a8cd
child 163 c18c0c80b6c2
equal deleted inserted replaced
161:aac10ec0a8cd 162:017dbf710056
   111         args = fancyopts.fancyopts(sys.argv[1:], commands.globalopts, {})
   111         args = fancyopts.fancyopts(sys.argv[1:], commands.globalopts, {})
   112     except fancyopts.getopt.GetoptError, inst:
   112     except fancyopts.getopt.GetoptError, inst:
   113         raise commands.ParseError(None, inst)
   113         raise commands.ParseError(None, inst)
   114     if args:
   114     if args:
   115         cmd = args[0]
   115         cmd = args[0]
   116         aliases, i = commands.findcmd(ui, cmd)
   116         if hasattr(cmdutil, "findcmd"):
       
   117             aliases, i = cmdutil.findcmd(ui, cmd)
       
   118         else:
       
   119             aliases, i = commands.findcmd(ui, cmd)
   117         return aliases[0]
   120         return aliases[0]
   118 
   121 
   119 class kwtemplater(object):
   122 class kwtemplater(object):
   120     '''
   123     '''
   121     Sets up keyword templates, corresponding keyword regex, and
   124     Sets up keyword templates, corresponding keyword regex, and