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

login
register
mail settings
Submitter Yuya Nishihara
Date April 9, 2015, 12:57 p.m.
Message ID <d39ef2e2e7227fcd3913.1428584233@mimosa>
Download mbox | patch
Permalink /patch/8570/
State Accepted
Commit 9df7ffd706d19686995e0ef71ed64c4eb7a1d6ef
Headers show

Comments

Yuya Nishihara - April 9, 2015, 12:57 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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

Patch

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')