give better error message on non-existent mapfile (issue813)

This commit is contained in:
Dirkjan Ochtman 2008-03-21 12:05:01 +01:00
parent 3e3b0d62eb
commit c9f3b5991c
2 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,7 @@
from i18n import _
import re, sys, os
from mercurial import util
def parsestring(s, quoted=True):
'''parse a string using simple c-like syntax.
@ -55,6 +56,9 @@ class templater(object):
if not mapfile:
return
if not os.path.exists(mapfile):
raise util.Abort(_('style not found: %s') % mapfile)
i = 0
for l in file(mapfile):
l = l.strip()

View File

@ -83,7 +83,7 @@ created new head
# error if style not readable
abort: Permission denied: ./q
# error if no style
abort: No such file or directory: notexist
abort: style not found: notexist
# error if style missing key
abort: ./t: no key named 'changeset'
# error if include fails