hgkw/keyword.py
branch0.9.2compat
changeset 672 0d7642e39cfe
parent 664 c339bd5b183b
child 673 b94f7991f06b
equal deleted inserted replaced
664:c339bd5b183b 672:0d7642e39cfe
   101                 ' log outgoing push rename rollback tip verify'
   101                 ' log outgoing push rename rollback tip verify'
   102                 ' convert email glog')
   102                 ' convert email glog')
   103 
   103 
   104 # hg commands that trigger expansion only when writing to working dir,
   104 # hg commands that trigger expansion only when writing to working dir,
   105 # not when reading filelog, and unexpand when reading from working dir
   105 # not when reading filelog, and unexpand when reading from working dir
   106 restricted = 'merge record resolve qfold qimport qnew qpush qrefresh qrecord'
   106 restricted = ('merge record resolve qfold qimport qnew qpush qrefresh qrecord'
       
   107               ' transplant')
   107 
   108 
   108 # provide cvs-like UTC date filter
   109 # provide cvs-like UTC date filter
   109 def utcdate(date):
   110 def utcdate(date):
   110     try:
   111     try:
   111         return util.datestr(date, '%Y/%m/%d %H:%M:%S', False)
   112         return util.datestr(date, '%Y/%m/%d %H:%M:%S', False)
   753         except TypeError:
   754         except TypeError:
   754             patch_diff(repo, node1=node1, node2=node2, match=match, fp=fp,
   755             patch_diff(repo, node1=node1, node2=node2, match=match, fp=fp,
   755                        changes=changes, opts=opts)
   756                        changes=changes, opts=opts)
   756 
   757 
   757     patch_diff = patch.diff
   758     patch_diff = patch.diff
   758     patch.diff = kw_diff
   759     if not kwt.restrict:
       
   760         patch.diff = kw_diff
   759 
   761 
   760     try:
   762     try:
   761         from mercurial.hgweb import webcommands
   763         from mercurial.hgweb import webcommands
   762         def kwweb_annotate(web, req, tmpl):
   764         def kwweb_annotate(web, req, tmpl):
   763             '''Wraps webcommands.annotate turning off keyword expansion.'''
   765             '''Wraps webcommands.annotate turning off keyword expansion.'''