Mercurial > hg
comparison mercurial/cmdutil.py @ 4355:10edaed7f909
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 16 Apr 2007 12:37:30 -0500 |
parents | 0d51eb296fb9 051fb8c2567c |
children | e89f9afc462b |
comparison
equal
deleted
inserted
replaced
4349:69109aa0cddd | 4355:10edaed7f909 |
---|---|
223 self.ui.write(self.hunk[rev]) | 223 self.ui.write(self.hunk[rev]) |
224 del self.hunk[rev] | 224 del self.hunk[rev] |
225 return 1 | 225 return 1 |
226 return 0 | 226 return 0 |
227 | 227 |
228 def show(self, rev=0, changenode=None, copies=None, **props): | 228 def show(self, rev=0, changenode=None, copies=(), **props): |
229 if self.buffered: | 229 if self.buffered: |
230 self.ui.pushbuffer() | 230 self.ui.pushbuffer() |
231 self._show(rev, changenode, copies, props) | 231 self._show(rev, changenode, copies, props) |
232 self.hunk[rev] = self.ui.popbuffer() | 232 self.hunk[rev] = self.ui.popbuffer() |
233 else: | 233 else: |
319 class changeset_templater(changeset_printer): | 319 class changeset_templater(changeset_printer): |
320 '''format changeset information.''' | 320 '''format changeset information.''' |
321 | 321 |
322 def __init__(self, ui, repo, patch, mapfile, buffered): | 322 def __init__(self, ui, repo, patch, mapfile, buffered): |
323 changeset_printer.__init__(self, ui, repo, patch, buffered) | 323 changeset_printer.__init__(self, ui, repo, patch, buffered) |
324 self.t = templater.templater(mapfile, templater.common_filters, | 324 filters = templater.common_filters.copy() |
325 cache={'parent': '{rev}:{node|short} ', | 325 filters['formatnode'] = (ui.debugflag and (lambda x: x) |
326 'manifest': '{rev}:{node|short}', | 326 or (lambda x: x[:12])) |
327 'filecopy': '{name} ({source})'}) | 327 self.t = templater.templater(mapfile, filters, |
328 cache={ | |
329 'parent': '{rev}:{node|formatnode} ', | |
330 'manifest': '{rev}:{node|formatnode}', | |
331 'filecopy': '{name} ({source})'}) | |
328 | 332 |
329 def use_template(self, t): | 333 def use_template(self, t): |
330 '''set template string to use''' | 334 '''set template string to use''' |
331 self.t.cache['changeset'] = t | 335 self.t.cache['changeset'] = t |
332 | 336 |