hgkw/keyword.py
branchstable
changeset 502 6fccffd4059a
parent 500 bc63f54d577a
child 504 2e610bc63d9e
equal deleted inserted replaced
500:bc63f54d577a 502:6fccffd4059a
   501         rejects or conflicts due to expanded keywords in working dir.'''
   501         rejects or conflicts due to expanded keywords in working dir.'''
   502         orig(self, ui, fname, missing)
   502         orig(self, ui, fname, missing)
   503         # shrink keywords read from working dir
   503         # shrink keywords read from working dir
   504         self.lines = kwt.shrinklines(self.fname, self.lines)
   504         self.lines = kwt.shrinklines(self.fname, self.lines)
   505 
   505 
   506     def kw_diff(orig, repo, node1=None, node2=None, match=None,
   506     def kw_diff(orig, repo, node1=None, node2=None, match=None, changes=None,
   507                 fp=None, changes=None, opts=None):
   507                 opts=None):
   508         '''Monkeypatch patch.diff to avoid expansion except when
   508         '''Monkeypatch patch.diff to avoid expansion except when
   509         comparing against working dir.'''
   509         comparing against working dir.'''
   510         if node2 is not None:
   510         if node2 is not None:
   511             kwt.matcher = util.never
   511             kwt.matcher = util.never
   512         elif node1 is not None and node1 != repo['.'].node():
   512         elif node1 is not None and node1 != repo['.'].node():
   513             kwt.restrict = True
   513             kwt.restrict = True
   514         orig(repo, node1, node2, match, fp, changes, opts)
   514         return orig(repo, node1, node2, match, changes, opts)
   515 
   515 
   516     def kwweb_skip(orig, web, req, tmpl):
   516     def kwweb_skip(orig, web, req, tmpl):
   517         '''Wraps webcommands.x turning off keyword expansion.'''
   517         '''Wraps webcommands.x turning off keyword expansion.'''
   518         kwt.matcher = util.never
   518         kwt.matcher = util.never
   519         return orig(web, req, tmpl)
   519         return orig(web, req, tmpl)