##// END OF EJS Templates
cmdutil: changeset_printer: use methods of filectx/changectx....
Greg Ward -
r9547:f57640bf default
parent child Browse files
Show More
@@ -652,9 +652,8 class changeset_printer(object):
652 return
652 return
653
653
654 log = self.repo.changelog
654 log = self.repo.changelog
655 changes = log.read(changenode)
655 date = util.datestr(ctx.date())
656 date = util.datestr(changes[2])
656 extra = ctx.extra()
657 extra = changes[5]
658 branch = extra.get("branch")
657 branch = extra.get("branch")
659
658
660 hexfunc = self.ui.debugflag and hex or short
659 hexfunc = self.ui.debugflag and hex or short
@@ -674,9 +673,10 class changeset_printer(object):
674 self.ui.write(_("parent: %d:%s\n") % parent)
673 self.ui.write(_("parent: %d:%s\n") % parent)
675
674
676 if self.ui.debugflag:
675 if self.ui.debugflag:
676 mnode = ctx.manifestnode()
677 self.ui.write(_("manifest: %d:%s\n") %
677 self.ui.write(_("manifest: %d:%s\n") %
678 (self.repo.manifest.rev(changes[0]), hex(changes[0])))
678 (self.repo.manifest.rev(mnode), hex(mnode)))
679 self.ui.write(_("user: %s\n") % changes[1])
679 self.ui.write(_("user: %s\n") % ctx.user())
680 self.ui.write(_("date: %s\n") % date)
680 self.ui.write(_("date: %s\n") % date)
681
681
682 if self.ui.debugflag:
682 if self.ui.debugflag:
@@ -685,8 +685,8 class changeset_printer(object):
685 files):
685 files):
686 if value:
686 if value:
687 self.ui.write("%-12s %s\n" % (key, " ".join(value)))
687 self.ui.write("%-12s %s\n" % (key, " ".join(value)))
688 elif changes[3] and self.ui.verbose:
688 elif ctx.files() and self.ui.verbose:
689 self.ui.write(_("files: %s\n") % " ".join(changes[3]))
689 self.ui.write(_("files: %s\n") % " ".join(ctx.files()))
690 if copies and self.ui.verbose:
690 if copies and self.ui.verbose:
691 copies = ['%s (%s)' % c for c in copies]
691 copies = ['%s (%s)' % c for c in copies]
692 self.ui.write(_("copies: %s\n") % ' '.join(copies))
692 self.ui.write(_("copies: %s\n") % ' '.join(copies))
@@ -696,7 +696,7 class changeset_printer(object):
696 self.ui.write(_("extra: %s=%s\n")
696 self.ui.write(_("extra: %s=%s\n")
697 % (key, value.encode('string_escape')))
697 % (key, value.encode('string_escape')))
698
698
699 description = changes[4].strip()
699 description = ctx.description().strip()
700 if description:
700 if description:
701 if self.ui.verbose:
701 if self.ui.verbose:
702 self.ui.write(_("description:\n"))
702 self.ui.write(_("description:\n"))
@@ -299,6 +299,7 class filectx(object):
299 def files(self): return self._changectx.files()
299 def files(self): return self._changectx.files()
300 def description(self): return self._changectx.description()
300 def description(self): return self._changectx.description()
301 def branch(self): return self._changectx.branch()
301 def branch(self): return self._changectx.branch()
302 def extra(self): return self._changectx.extra()
302 def manifest(self): return self._changectx.manifest()
303 def manifest(self): return self._changectx.manifest()
303 def changectx(self): return self._changectx
304 def changectx(self): return self._changectx
304
305
General Comments 0
You need to be logged in to leave comments. Login now