Show More
@@ -735,7 +735,7 b' class changeset_printer(object):' | |||
|
735 | 735 | if self.buffered: |
|
736 | 736 | self.ui.pushbuffer() |
|
737 | 737 | self._show(ctx, copies, props) |
|
738 | self.hunk[ctx.rev()] = self.ui.popbuffer() | |
|
738 | self.hunk[ctx.rev()] = self.ui.popbuffer(labeled=True) | |
|
739 | 739 | else: |
|
740 | 740 | self._show(ctx, copies, props) |
|
741 | 741 | |
@@ -745,7 +745,8 b' class changeset_printer(object):' | |||
|
745 | 745 | rev = ctx.rev() |
|
746 | 746 | |
|
747 | 747 | if self.ui.quiet: |
|
748 |
self.ui.write("%d:%s\n" % (rev, short(changenode)) |
|
|
748 | self.ui.write("%d:%s\n" % (rev, short(changenode)), | |
|
749 | label='log.node') | |
|
749 | 750 | return |
|
750 | 751 | |
|
751 | 752 | log = self.repo.changelog |
@@ -756,52 +757,66 b' class changeset_printer(object):' | |||
|
756 | 757 | parents = [(p, hexfunc(log.node(p))) |
|
757 | 758 | for p in self._meaningful_parentrevs(log, rev)] |
|
758 | 759 | |
|
759 |
self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode)) |
|
|
760 | self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode)), | |
|
761 | label='log.changeset') | |
|
760 | 762 | |
|
761 | 763 | branch = ctx.branch() |
|
762 | 764 | # don't show the default branch name |
|
763 | 765 | if branch != 'default': |
|
764 | 766 | branch = encoding.tolocal(branch) |
|
765 |
self.ui.write(_("branch: %s\n") % branch |
|
|
767 | self.ui.write(_("branch: %s\n") % branch, | |
|
768 | label='log.branch') | |
|
766 | 769 | for tag in self.repo.nodetags(changenode): |
|
767 |
self.ui.write(_("tag: %s\n") % tag |
|
|
770 | self.ui.write(_("tag: %s\n") % tag, | |
|
771 | label='log.tag') | |
|
768 | 772 | for parent in parents: |
|
769 |
self.ui.write(_("parent: %d:%s\n") % parent |
|
|
773 | self.ui.write(_("parent: %d:%s\n") % parent, | |
|
774 | label='log.parent') | |
|
770 | 775 | |
|
771 | 776 | if self.ui.debugflag: |
|
772 | 777 | mnode = ctx.manifestnode() |
|
773 | 778 | self.ui.write(_("manifest: %d:%s\n") % |
|
774 |
(self.repo.manifest.rev(mnode), hex(mnode)) |
|
|
775 | self.ui.write(_("user: %s\n") % ctx.user()) | |
|
776 |
self.ui.write(_(" |
|
|
779 | (self.repo.manifest.rev(mnode), hex(mnode)), | |
|
780 | label='ui.debug log.manifest') | |
|
781 | self.ui.write(_("user: %s\n") % ctx.user(), | |
|
782 | label='log.user') | |
|
783 | self.ui.write(_("date: %s\n") % date, | |
|
784 | label='log.date') | |
|
777 | 785 | |
|
778 | 786 | if self.ui.debugflag: |
|
779 | 787 | files = self.repo.status(log.parents(changenode)[0], changenode)[:3] |
|
780 | 788 | for key, value in zip([_("files:"), _("files+:"), _("files-:")], |
|
781 | 789 | files): |
|
782 | 790 | if value: |
|
783 |
self.ui.write("%-12s %s\n" % (key, " ".join(value)) |
|
|
791 | self.ui.write("%-12s %s\n" % (key, " ".join(value)), | |
|
792 | label='ui.debug log.files') | |
|
784 | 793 | elif ctx.files() and self.ui.verbose: |
|
785 |
self.ui.write(_("files: %s\n") % " ".join(ctx.files()) |
|
|
794 | self.ui.write(_("files: %s\n") % " ".join(ctx.files()), | |
|
795 | label='ui.note log.files') | |
|
786 | 796 | if copies and self.ui.verbose: |
|
787 | 797 | copies = ['%s (%s)' % c for c in copies] |
|
788 |
self.ui.write(_("copies: %s\n") % ' '.join(copies) |
|
|
798 | self.ui.write(_("copies: %s\n") % ' '.join(copies), | |
|
799 | label='ui.note log.copies') | |
|
789 | 800 | |
|
790 | 801 | extra = ctx.extra() |
|
791 | 802 | if extra and self.ui.debugflag: |
|
792 | 803 | for key, value in sorted(extra.items()): |
|
793 | 804 | self.ui.write(_("extra: %s=%s\n") |
|
794 |
% (key, value.encode('string_escape')) |
|
|
805 | % (key, value.encode('string_escape')), | |
|
806 | label='ui.debug log.extra') | |
|
795 | 807 | |
|
796 | 808 | description = ctx.description().strip() |
|
797 | 809 | if description: |
|
798 | 810 | if self.ui.verbose: |
|
799 |
self.ui.write(_("description:\n") |
|
|
800 |
|
|
|
811 | self.ui.write(_("description:\n"), | |
|
812 | label='ui.note log.description') | |
|
813 | self.ui.write(description, | |
|
814 | label='ui.note log.description') | |
|
801 | 815 | self.ui.write("\n\n") |
|
802 | 816 | else: |
|
803 | 817 | self.ui.write(_("summary: %s\n") % |
|
804 |
description.splitlines()[0] |
|
|
818 | description.splitlines()[0], | |
|
819 | label='log.summary') | |
|
805 | 820 | self.ui.write("\n") |
|
806 | 821 | |
|
807 | 822 | self.showpatch(changenode) |
@@ -809,10 +824,10 b' class changeset_printer(object):' | |||
|
809 | 824 | def showpatch(self, node): |
|
810 | 825 | if self.patch: |
|
811 | 826 | prev = self.repo.changelog.parents(node)[0] |
|
812 | chunks = patch.diff(self.repo, prev, node, match=self.patch, | |
|
813 | opts=patch.diffopts(self.ui, self.diffopts)) | |
|
814 | for chunk in chunks: | |
|
815 | self.ui.write(chunk) | |
|
827 | chunks = patch.diffui(self.repo, prev, node, match=self.patch, | |
|
828 | opts=patch.diffopts(self.ui, self.diffopts)) | |
|
829 | for chunk, label in chunks: | |
|
830 | self.ui.write(chunk, label=label) | |
|
816 | 831 | self.ui.write("\n") |
|
817 | 832 | |
|
818 | 833 | def _meaningful_parentrevs(self, log, rev): |
General Comments 0
You need to be logged in to leave comments.
Login now