Show More
@@ -676,25 +676,31 b' def reposetup(ui, repo):' | |||
|
676 | 676 | # shrink keywords read from working dir |
|
677 | 677 | self.lines = kwt.shrinklines(self.fname, self.lines) |
|
678 | 678 | |
|
679 | def kwdiff(orig, *args, **kwargs): | |
|
679 | def kwdiff(orig, repo, *args, **kwargs): | |
|
680 | 680 | '''Monkeypatch patch.diff to avoid expansion.''' |
|
681 | restrict = kwt.restrict | |
|
682 | kwt.restrict = True | |
|
681 | kwt = getattr(repo, '_keywordkwt', None) | |
|
682 | if kwt: | |
|
683 | restrict = kwt.restrict | |
|
684 | kwt.restrict = True | |
|
683 | 685 | try: |
|
684 | for chunk in orig(*args, **kwargs): | |
|
686 | for chunk in orig(repo, *args, **kwargs): | |
|
685 | 687 | yield chunk |
|
686 | 688 | finally: |
|
687 | kwt.restrict = restrict | |
|
689 | if kwt: | |
|
690 | kwt.restrict = restrict | |
|
688 | 691 | |
|
689 | 692 | def kwweb_skip(orig, web, req, tmpl): |
|
690 | 693 | '''Wraps webcommands.x turning off keyword expansion.''' |
|
691 | origmatch = kwt.match | |
|
692 | kwt.match = util.never | |
|
694 | kwt = getattr(web.repo, '_keywordkwt', None) | |
|
695 | if kwt: | |
|
696 | origmatch = kwt.match | |
|
697 | kwt.match = util.never | |
|
693 | 698 | try: |
|
694 | 699 | for chunk in orig(web, req, tmpl): |
|
695 | 700 | yield chunk |
|
696 | 701 | finally: |
|
697 | kwt.match = origmatch | |
|
702 | if kwt: | |
|
703 | kwt.match = origmatch | |
|
698 | 704 | |
|
699 | 705 | def kw_amend(orig, ui, repo, commitfunc, old, extra, pats, opts): |
|
700 | 706 | '''Wraps cmdutil.amend expanding keywords after amend.''' |
General Comments 0
You need to be logged in to leave comments.
Login now