Patchwork [2,of,6,sethelp,v2] fileset: use UnknownIdentifier where appropriate

login
register
mail settings
Submitter Augie Fackler
Date March 6, 2015, 11:01 p.m.
Message ID <0c7f94a49b2fd024e545.1425682903@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/7913/
State Accepted
Commit cecaec0e8719ebf62d5b5c33ba2912a580a6b865
Headers show

Comments

Augie Fackler - March 6, 2015, 11:01 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1422300708 18000
#      Mon Jan 26 14:31:48 2015 -0500
# Node ID 0c7f94a49b2fd024e54524f12a02b9b59feb304e
# Parent  4bfb330ca07cdf5eb79c884007b3bfabe69a70bc
fileset: use UnknownIdentifier 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.UnknownIdentifier(a[1], symbols.keys())
 
 def getlist(x):
     if not x: