mercurial/commands.py
changeset 3186 a6d0cd63068c
parent 3185 f2ed26736dfa
child 3187 182bdd589cbe
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -399,9 +399,9 @@ def show_changeset(ui, repo, opts):
 
     if tmpl or mapfile:
         if mapfile:
-            if not os.path.isfile(mapfile):
-                mapname = templater.templatepath('map-cmdline.' + mapfile)
-                if not mapname: mapname = templater.templatepath(mapfile)
+            if not os.path.split(mapfile)[0]:
+                mapname = (templater.templatepath('map-cmdline.' + mapfile)
+                           or templater.templatepath(mapfile))
                 if mapname: mapfile = mapname
         try:
             t = templater.changeset_templater(ui, repo, mapfile)