[PATCH] hgweb: Use "(empty log message)" in case changeset has none

Rocco Rutte pdmef at gmx.net
Sat Apr 4 10:21:03 CDT 2009


# HG changeset patch
# User Rocco Rutte <pdmef at gmx.net>
# Date 1238858369 -7200
# Node ID 676d47e86d09053a960fae1954dfc36e5f0f5343
# Parent  62154415821f5dc9edb89a85cbd62e278212e9ee
hgweb: Use "(empty log message)" in case changeset has none

This happend to me for a svn->hg conversion and yields to entries
in the shortlog which are not selectable as the log message links
to the changeset. For completeness, add it to changeset view, too.

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -184,7 +184,7 @@ def changelog(web, req, tmpl, shortlog =
                          "parent": webutil.parents(ctx, i - 1),
                          "child": webutil.children(ctx, i + 1),
                          "changelogtag": showtags,
-                         "desc": ctx.description(),
+                         "desc": ctx.description() or "(empty log message)",
                          "date": ctx.date(),
                          "files": files,
                          "rev": i,
@@ -246,7 +246,7 @@ def changeset(web, req, tmpl):
                 changesettag=showtags,
                 changesetbranch=showbranch,
                 author=ctx.user(),
-                desc=ctx.description(),
+                desc=ctx.description() or "(empty log message)",
                 date=ctx.date(),
                 files=files,
                 archives=web.archivelist(ctx.hex()),


More information about the Mercurial-devel mailing list