archive: use ctx object consistently to build meta data
authorYuya Nishihara <yuya@tcha.org>
Wed, 08 Apr 2015 22:31:04 +0900
changeset 24677 9df7ffd706d1
parent 24676 13c42a883e8b
child 24678 fbcace19534f
archive: use ctx object consistently to build meta data
mercurial/archival.py
--- a/mercurial/archival.py	Wed Apr 08 21:04:06 2015 +0900
+++ b/mercurial/archival.py	Wed Apr 08 22:31:04 2015 +0900
@@ -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 @@
     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')