Mercurial > hg
comparison hgext/keyword.py @ 7391:27d304c8cc03
patch: pass an opener to patchfile
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 19 Nov 2008 13:27:57 +0100 |
parents | 8dde275680d8 |
children | d3f1d316b72b |
comparison
equal
deleted
inserted
replaced
7390:0d1c770c6be1 | 7391:27d304c8cc03 |
---|---|
485 return n | 485 return n |
486 finally: | 486 finally: |
487 del wlock, lock | 487 del wlock, lock |
488 | 488 |
489 # monkeypatches | 489 # monkeypatches |
490 def kwpatchfile_init(orig, self, ui, fname, missing=False): | 490 def kwpatchfile_init(orig, self, ui, fname, opener, missing=False): |
491 '''Monkeypatch/wrap patch.patchfile.__init__ to avoid | 491 '''Monkeypatch/wrap patch.patchfile.__init__ to avoid |
492 rejects or conflicts due to expanded keywords in working dir.''' | 492 rejects or conflicts due to expanded keywords in working dir.''' |
493 orig(self, ui, fname, missing) | 493 orig(self, ui, fname, opener, missing) |
494 # shrink keywords read from working dir | 494 # shrink keywords read from working dir |
495 self.lines = kwt.shrinklines(self.fname, self.lines) | 495 self.lines = kwt.shrinklines(self.fname, self.lines) |
496 | 496 |
497 def kw_diff(orig, repo, node1=None, node2=None, match=None, changes=None, | 497 def kw_diff(orig, repo, node1=None, node2=None, match=None, changes=None, |
498 opts=None): | 498 opts=None): |