##// END OF EJS Templates
give better error message on non-existent mapfile (issue813)
Dirkjan Ochtman -
r6337:d2713d90 default
parent child Browse files
Show More
@@ -7,6 +7,7 b''
7
7
8 from i18n import _
8 from i18n import _
9 import re, sys, os
9 import re, sys, os
10 from mercurial import util
10
11
11 def parsestring(s, quoted=True):
12 def parsestring(s, quoted=True):
12 '''parse a string using simple c-like syntax.
13 '''parse a string using simple c-like syntax.
@@ -55,6 +56,9 b' class templater(object):'
55
56
56 if not mapfile:
57 if not mapfile:
57 return
58 return
59 if not os.path.exists(mapfile):
60 raise util.Abort(_('style not found: %s') % mapfile)
61
58 i = 0
62 i = 0
59 for l in file(mapfile):
63 for l in file(mapfile):
60 l = l.strip()
64 l = l.strip()
@@ -83,7 +83,7 b' 0:-1,-1 1e4e1b8f71e0 1970-01-12 13:4'
83 # error if style not readable
83 # error if style not readable
84 abort: Permission denied: ./q
84 abort: Permission denied: ./q
85 # error if no style
85 # error if no style
86 abort: No such file or directory: notexist
86 abort: style not found: notexist
87 # error if style missing key
87 # error if style missing key
88 abort: ./t: no key named 'changeset'
88 abort: ./t: no key named 'changeset'
89 # error if include fails
89 # error if include fails
General Comments 0
You need to be logged in to leave comments. Login now