Patchwork [4,of,9,sethelp] fileset: use NotAFunction where appropriate

login
register
mail settings
Submitter Augie Fackler
Date Feb. 4, 2015, 6:15 p.m.
Message ID <e4a95908b4efb5c23d17.1423073709@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/7662/
State Changes Requested
Headers show

Comments

Augie Fackler - Feb. 4, 2015, 6:15 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1422300708 18000
#      Mon Jan 26 14:31:48 2015 -0500
# Node ID e4a95908b4efb5c23d17ec4ac449399708fd120d
# Parent  04c92caf02b761ce3e2f46618b6b93e09e2b1bd3
fileset: use NotAFunction where appropriate

Patch

diff --git a/mercurial/fileset.py b/mercurial/fileset.py
--- a/mercurial/fileset.py
+++ b/mercurial/fileset.py
@@ -186,7 +186,7 @@  def clean(mctx, x):
 def func(mctx, a, b):
     if a[0] == 'symbol' and a[1] in symbols:
         return symbols[a[1]](mctx, b)
-    raise error.ParseError(_("not a function: %s") % a[1])
+    raise error.NotAFunction(a[1], symbols.keys())
 
 def getlist(x):
     if not x: