[PATCH] hgweb: short hash for tip archive name

Christian Ebert blacktrash at gmx.net
Tue Mar 13 07:17:56 CDT 2007


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1173788246 -3600
# Node ID cb19ec1787ca76d14ea2fc100a02f1e26423f820
# Parent  7ca05d29c1f06d53b347c468bb113027f4d8dc41
hgweb: short hash for tip archive name

diff -r 7ca05d29c1f0 -r cb19ec1787ca mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Sun Mar 11 14:21:09 2007 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Tue Mar 13 13:17:26 2007 +0100
@@ -610,7 +610,7 @@ class hgweb(object):
         reponame = re.sub(r"\W+", "-", os.path.basename(self.reponame))
         cnode = self.repo.lookup(id)
         arch_version = id
-        if cnode == id:
+        if cnode == id or id == 'tip':
             arch_version = short(cnode)
         name = "%s-%s" % (reponame, arch_version)
         mimetype, artype, extension, encoding = self.archive_specs[type_]


More information about the Mercurial-devel mailing list