hgext/hgk.py
changeset 33839 7d5bc0e5b88f
parent 32337 46ba2cdda476
child 34499 b8f74c4d188f
equal deleted inserted replaced
33838:48f3e87ce650 33839:7d5bc0e5b88f
    48     commands,
    48     commands,
    49     obsolete,
    49     obsolete,
    50     patch,
    50     patch,
    51     registrar,
    51     registrar,
    52     scmutil,
    52     scmutil,
       
    53     util,
    53 )
    54 )
    54 
    55 
    55 cmdtable = {}
    56 cmdtable = {}
    56 command = registrar.command(cmdtable)
    57 command = registrar.command(cmdtable)
    57 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    58 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    94     ##
    95     ##
    95 
    96 
    96     while True:
    97     while True:
    97         if opts['stdin']:
    98         if opts['stdin']:
    98             try:
    99             try:
    99                 line = raw_input().split(' ')
   100                 line = util.bytesinput(ui.fin, ui.fout).split(' ')
   100                 node1 = line[0]
   101                 node1 = line[0]
   101                 if len(line) > 1:
   102                 if len(line) > 1:
   102                     node2 = line[1]
   103                     node2 = line[1]
   103                 else:
   104                 else:
   104                     node2 = None
   105                     node2 = None
   175     # strings
   176     # strings
   176     #
   177     #
   177     prefix = ""
   178     prefix = ""
   178     if opts['stdin']:
   179     if opts['stdin']:
   179         try:
   180         try:
   180             (type, r) = raw_input().split(' ')
   181             (type, r) = util.bytesinput(ui.fin, ui.fout).split(' ')
   181             prefix = "    "
   182             prefix = "    "
   182         except EOFError:
   183         except EOFError:
   183             return
   184             return
   184 
   185 
   185     else:
   186     else:
   193             return 1
   194             return 1
   194         n = repo.lookup(r)
   195         n = repo.lookup(r)
   195         catcommit(ui, repo, n, prefix)
   196         catcommit(ui, repo, n, prefix)
   196         if opts['stdin']:
   197         if opts['stdin']:
   197             try:
   198             try:
   198                 (type, r) = raw_input().split(' ')
   199                 (type, r) = util.bytesinput(ui.fin, ui.fout).split(' ')
   199             except EOFError:
   200             except EOFError:
   200                 break
   201                 break
   201         else:
   202         else:
   202             break
   203             break
   203 
   204