[PATCH 1 of 5] archive: use ctx object consistently to build meta data

Yuya Nishihara yuya at tcha.org
Thu Apr 9 12:57:13 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1428499864 -32400
#      Wed Apr 08 22:31:04 2015 +0900
# Node ID d39ef2e2e7227fcd391346b4001556e561d42636
# Parent  4d15abaf0a323e059edb1b8753cdaaed26f02af4
archive: use ctx object consistently to build meta data

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -6,7 +6,6 @@
 # GNU General Public License version 2 or any later version.
 
 from i18n import _
-from node import hex
 import match as matchmod
 import cmdutil
 import scmutil, util, encoding
@@ -266,7 +265,7 @@ def archive(repo, dest, node, kind, deco
     if repo.ui.configbool("ui", "archivemeta", True):
         def metadata():
             base = 'repo: %s\nnode: %s\nbranch: %s\n' % (
-                repo[0].hex(), hex(node), encoding.fromlocal(ctx.branch()))
+                repo[0].hex(), ctx.hex(), encoding.fromlocal(ctx.branch()))
 
             tags = ''.join('tag: %s\n' % t for t in ctx.tags()
                            if repo.tagtype(t) == 'global')


More information about the Mercurial-devel mailing list