483 return n |
483 return n |
484 finally: |
484 finally: |
485 del wlock, lock |
485 del wlock, lock |
486 |
486 |
487 # monkeypatches |
487 # monkeypatches |
488 def kwpatchfile_init(orig, self, ui, fname, missing=False): |
488 def kwpatchfile_init(orig, self, ui, fname, opener, missing=False): |
489 '''Monkeypatch/wrap patch.patchfile.__init__ to avoid |
489 '''Monkeypatch/wrap patch.patchfile.__init__ to avoid |
490 rejects or conflicts due to expanded keywords in working dir.''' |
490 rejects or conflicts due to expanded keywords in working dir.''' |
491 orig(self, ui, fname, missing) |
491 orig(self, ui, fname, opener, missing) |
492 # shrink keywords read from working dir |
492 # shrink keywords read from working dir |
493 self.lines = kwt.shrinklines(self.fname, self.lines) |
493 self.lines = kwt.shrinklines(self.fname, self.lines) |
494 |
494 |
495 def kw_diff(orig, repo, node1=None, node2=None, match=None, changes=None, |
495 def kw_diff(orig, repo, node1=None, node2=None, match=None, changes=None, |
496 opts=None): |
496 opts=None): |