tests/test-glog.t
changeset 35548 b14c8bcfbad9
parent 35543 a7f7eff4ec08
child 35554 99a25bde65a3
equal deleted inserted replaced
35547:b6dbc860570d 35548:b14c8bcfbad9
    88   >   commands,
    88   >   commands,
    89   >   extensions,
    89   >   extensions,
    90   >   revsetlang,
    90   >   revsetlang,
    91   > )
    91   > )
    92   > 
    92   > 
       
    93   > def logrevset(repo, pats, opts):
       
    94   >     revs = cmdutil._logrevs(repo, opts)
       
    95   >     if not revs:
       
    96   >         return None
       
    97   >     return cmdutil._makelogrevset(repo, pats, opts, revs)[0]
       
    98   > 
    93   > def uisetup(ui):
    99   > def uisetup(ui):
    94   >     def printrevset(orig, ui, repo, *pats, **opts):
   100   >     def printrevset(orig, ui, repo, *pats, **opts):
    95   >         if opts.get('print_revset'):
   101   >         if opts.get('print_revset'):
    96   >             expr = cmdutil.getlogrevs(repo, pats, opts)[1]
   102   >             expr = logrevset(repo, pats, opts)
    97   >             if expr:
   103   >             if expr:
    98   >                 tree = revsetlang.parse(expr)
   104   >                 tree = revsetlang.parse(expr)
    99   >             else:
   105   >             else:
   100   >                 tree = []
   106   >                 tree = []
   101   >             ui.write('%r\n' % (opts.get('rev', []),))
   107   >             ui.write('%r\n' % (opts.get('rev', []),))