hgext/fastannotate/formatter.py
changeset 41398 2ff8994ac71d
parent 41263 c2f62720e37d
child 43076 2372284d9457
equal deleted inserted replaced
41397:0bd56c291359 41398:2ff8994ac71d
    36 
    36 
    37         # special handling working copy "changeset" and "rev" functions
    37         # special handling working copy "changeset" and "rev" functions
    38         if self.opts.get('rev') == 'wdir()':
    38         if self.opts.get('rev') == 'wdir()':
    39             orig = hexfunc
    39             orig = hexfunc
    40             hexfunc = lambda x: None if x is None else orig(x)
    40             hexfunc = lambda x: None if x is None else orig(x)
    41             wnode = hexfunc(repo[None].p1().node()) + '+'
    41             wnode = hexfunc(repo['.'].node()) + '+'
    42             wrev = '%d' % repo[None].p1().rev()
    42             wrev = '%d' % repo['.'].rev()
    43             wrevpad = ''
    43             wrevpad = ''
    44             if not opts.get('changeset'): # only show + if changeset is hidden
    44             if not opts.get('changeset'): # only show + if changeset is hidden
    45                 wrev += '+'
    45                 wrev += '+'
    46                 wrevpad = ' '
    46                 wrevpad = ' '
    47             revenc = lambda x: wrev if x is None else ('%d' % x) + wrevpad
    47             revenc = lambda x: wrev if x is None else ('%d' % x) + wrevpad