# HG changeset patch
# User mpm@selenic.com
# Date 1118898788 28800
# Node ID b29219389b003780cb30b48d5f70ed8bc8e5899b
# Parent f07d00fcd2810bbafe66e3383208d14483fe1324
Show nice short hashes in hgweb
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Show nice short hashes in hgweb
manifest hash: c73a8e32a823af7ea7440d1db2b0c022a4366bb5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCsQpkywK+sNU5EO8RAmSIAJ40aYEFBi07drKuPLuofXNaUkEFtgCghC9g
mG8mmhucbBe4hcZWL0AdG8I=
=Khp7
-----END PGP SIGNATURE-----
diff -r f07d00fcd281 -r b29219389b00 mercurial/hgweb.py
--- a/mercurial/hgweb.py Wed Jun 15 21:12:28 2005 -0800
+++ b/mercurial/hgweb.py Wed Jun 15 21:13:08 2005 -0800
@@ -129,6 +129,7 @@
"date": (lambda x: time.asctime(time.gmtime(x))),
"addbreaks": nl2br,
"obfuscate": obfuscate,
+ "short": (lambda x: x[:12]),
"firstline": (lambda x: x.splitlines(1)[0]),
"permissions": (lambda x: x and "-rwxr-xr-x" or "-rw-r--r--")
}
diff -r f07d00fcd281 -r b29219389b00 templates/changelogentry.tmpl
--- a/templates/changelogentry.tmpl Wed Jun 15 21:12:28 2005 -0800
+++ b/templates/changelogentry.tmpl Wed Jun 15 21:13:08 2005 -0800
@@ -5,7 +5,7 @@
#desc|firstline|escape# |
changeset #rev#: |
- #node# |
+ #node|short# |
#parent1#
#parent2#
diff -r f07d00fcd281 -r b29219389b00 templates/changeset.tmpl
--- a/templates/changeset.tmpl Wed Jun 15 21:12:28 2005 -0800
+++ b/templates/changeset.tmpl Wed Jun 15 21:13:08 2005 -0800
@@ -1,5 +1,5 @@
#header#
-#repo|escape#: changeset #node#
+#repo|escape#: changeset #node|short#
@@ -15,12 +15,12 @@
changeset #rev#: |
- #node# |
+ #node|short# |
#parent1#
#parent2#
manifest: |
- #manifest# |
+ #manifest|short# |
author: |
#author|obfuscate# |
diff -r f07d00fcd281 -r b29219389b00 templates/fileannotate.tmpl
--- a/templates/fileannotate.tmpl Wed Jun 15 21:12:28 2005 -0800
+++ b/templates/fileannotate.tmpl Wed Jun 15 21:13:08 2005 -0800
@@ -12,17 +12,17 @@
revisions
-Annotate #file# (#filenode#)
+Annotate #file# (#filenode|short#)
changeset #rev#: |
- #node# |
+ #node|short# |
#parent1#
#parent2#
manifest: |
- #manifest# |
+ #manifest|short# |
author: |
#author|obfuscate# |
diff -r f07d00fcd281 -r b29219389b00 templates/filediff.tmpl
--- a/templates/filediff.tmpl Wed Jun 15 21:12:28 2005 -0800
+++ b/templates/filediff.tmpl Wed Jun 15 21:13:08 2005 -0800
@@ -18,10 +18,10 @@
diff -r f07d00fcd281 -r b29219389b00 templates/filelogentry.tmpl
--- a/templates/filelogentry.tmpl Wed Jun 15 21:12:28 2005 -0800
+++ b/templates/filelogentry.tmpl Wed Jun 15 21:13:08 2005 -0800
@@ -4,7 +4,7 @@
#desc|firstline|escape# |
revision #filerev#: |
- #filenode#
+ | #filenode|short#
(diff)
(annotate)
|
diff -r f07d00fcd281 -r b29219389b00 templates/filerevision.tmpl
--- a/templates/filerevision.tmpl Wed Jun 15 21:12:28 2005 -0800
+++ b/templates/filerevision.tmpl Wed Jun 15 21:13:08 2005 -0800
@@ -13,17 +13,17 @@
raw
-#file# (revision #filenode#)
+#file# (revision #filenode|short#)
changeset #rev#: |
- #node# |
+ #node|short# |
#parent1#
#parent2#
manifest: |
- #manifest# |
+ #manifest|short# |
author: |
#author|obfuscate# |
diff -r f07d00fcd281 -r b29219389b00 templates/manifest.tmpl
--- a/templates/manifest.tmpl Wed Jun 15 21:12:28 2005 -0800
+++ b/templates/manifest.tmpl Wed Jun 15 21:13:08 2005 -0800
@@ -1,5 +1,5 @@
#header#
-#repo|escape#: manifest #manifest#
+#repo|escape#: manifest #manifest|short#
@@ -9,7 +9,7 @@
changeset
-manifest: #path#
+manifest #manifest|short#: #path#
diff -r f07d00fcd281 -r b29219389b00 templates/map
--- a/templates/map Wed Jun 15 21:12:28 2005 -0800
+++ b/templates/map Wed Jun 15 21:13:08 2005 -0800
@@ -21,10 +21,10 @@
difflineminus = "#line|escape#"
difflineat = "#line|escape#"
diffline = "#line|escape#"
-changelogparent = "
parent: | #node# |
"
+changelogparent = "parent: | #node|short# |
"
changesetparent = "parent: | #node# |
"
-filerevparent = "parent: | #node# |
"
-fileannotateparent = "parent: | #node# |
"
+filerevparent = "parent: | #node|short# |
"
+fileannotateparent = "parent: | #node|short# |
"
tags = tags.tmpl
tagentry = ""
diffblock = "#lines#
"