hgkw/keyword.py
changeset 413 1b6610abf538
parent 410 64cd77f6f7f1
child 415 d1026365eff6
equal deleted inserted replaced
410:64cd77f6f7f1 413:1b6610abf538
   103     return time.strftime('%Y/%m/%d %H:%M:%S', time.gmtime(date[0]))
   103     return time.strftime('%Y/%m/%d %H:%M:%S', time.gmtime(date[0]))
   104 
   104 
   105 
   105 
   106 # make keyword tools accessible
   106 # make keyword tools accessible
   107 kwx = { 'templater': None, 'hgcmd': None }
   107 kwx = { 'templater': None, 'hgcmd': None }
   108  
   108 
   109 # store originals of monkeypatches
   109 # store originals of monkeypatches
   110 _patchfile_init = patch.patchfile.__init__
   110 _patchfile_init = patch.patchfile.__init__
   111 _patch_diff = patch.diff
   111 _patch_diff = patch.diff
   112 _dispatch_parse = dispatch._parse
   112 _dispatch_parse = dispatch._parse
   113 
   113 
   456     keyword substitutions.
   456     keyword substitutions.
   457     This is done for local repos only, and only if there are
   457     This is done for local repos only, and only if there are
   458     files configured at all for keyword substitution.'''
   458     files configured at all for keyword substitution.'''
   459 
   459 
   460     try:
   460     try:
   461         if (not repo.local() or kwx['hgcmd'] in nokwcommands.split() 
   461         if (not repo.local() or kwx['hgcmd'] in nokwcommands.split()
   462             or '.hg' in util.splitpath(repo.root)
   462             or '.hg' in util.splitpath(repo.root)
   463             or repo._url.startswith('bundle:')):
   463             or repo._url.startswith('bundle:')):
   464             return
   464             return
   465     except AttributeError:
   465     except AttributeError:
   466         pass
   466         pass