Comments
Patch
@@ -391,6 +391,21 @@
engines = {'default': engine}
+def stylelist():
+ path = templatepath()[0]
+ dirlist = os.listdir(path)
+ stylelist = ''
+ notfirst = False
+ for file in dirlist:
+ split = file.split(".")
+ if split[0] == "map-cmdline":
+ if notfirst == True:
+ stylelist = stylelist + ','
+ else:
+ notfirst = True
+ stylelist = stylelist + ' ' + split[1]
+ return stylelist
+
class templater(object):
def __init__(self, mapfile, filters={}, defaults={}, cache={},
@@ -412,7 +427,7 @@
if not mapfile:
return
if not os.path.exists(mapfile):
- raise util.Abort(_('style not found: %s') % mapfile)
+ raise util.Abort(_("style '%s' not found \n(available styles:%s)") % (mapfile,stylelist()))
conf = config.config()
conf.read(mapfile)
@@ -67,7 +67,7 @@
abort: cannot follow file not in parent revision: "dir"
[255]
--f, one
+-f, phases style
$ hg log -f -l1 --style phases
changeset: 4:7e4639b4691b
@@ -78,6 +78,16 @@
summary: e
+-f, a wrong style
+
+ $ hg log -f -l1 --style something
+ abort: style 'something' not found
+ (available styles: changelog, bisect, default, xml, phases, compact)
+ [255]
+
+
+
+
-f, but no args
$ hg log -f