6 # of the GNU General Public License, incorporated herein by reference. |
6 # of the GNU General Public License, incorporated herein by reference. |
7 |
7 |
8 from node import * |
8 from node import * |
9 from i18n import _ |
9 from i18n import _ |
10 import os, sys, bisect, stat |
10 import os, sys, bisect, stat |
11 import mdiff, bdiff, util, templater, patch, errno |
11 import mdiff, bdiff, util, templater, templatefilters, patch, errno |
12 |
12 |
13 revrangesep = ':' |
13 revrangesep = ':' |
14 |
14 |
15 class UnknownCommand(Exception): |
15 class UnknownCommand(Exception): |
16 """Exception raised if command is not in the command table.""" |
16 """Exception raised if command is not in the command table.""" |
671 class changeset_templater(changeset_printer): |
671 class changeset_templater(changeset_printer): |
672 '''format changeset information.''' |
672 '''format changeset information.''' |
673 |
673 |
674 def __init__(self, ui, repo, patch, mapfile, buffered): |
674 def __init__(self, ui, repo, patch, mapfile, buffered): |
675 changeset_printer.__init__(self, ui, repo, patch, buffered) |
675 changeset_printer.__init__(self, ui, repo, patch, buffered) |
676 filters = templater.common_filters.copy() |
676 filters = templatefilters.filters.copy() |
677 filters['formatnode'] = (ui.debugflag and (lambda x: x) |
677 filters['formatnode'] = (ui.debugflag and (lambda x: x) |
678 or (lambda x: x[:12])) |
678 or (lambda x: x[:12])) |
679 self.t = templater.templater(mapfile, filters, |
679 self.t = templater.templater(mapfile, filters, |
680 cache={ |
680 cache={ |
681 'parent': '{rev}:{node|formatnode} ', |
681 'parent': '{rev}:{node|formatnode} ', |