From 3ca72458ecd7d557ef732b06da4000be0a0ce520 Mon Sep 17 00:00:00 2001 From: Paolo Giarrusso Date: Wed, 9 Jun 2010 21:37:11 -0700 Subject: [PATCH] codereview: avoid exception in match R=rsc CC=golang-dev https://golang.org/cl/1585041 --- lib/codereview/codereview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 4b1797a7f01..1ece1fa3aed 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -659,6 +659,7 @@ original_match = None def ReplacementForCmdutilMatch(repo, pats=[], opts={}, globbed=False, default='relpath'): taken = [] files = [] + pats = pats or [] for p in pats: if p.startswith('@'): taken.append(p) @@ -671,7 +672,7 @@ def ReplacementForCmdutilMatch(repo, pats=[], opts={}, globbed=False, default='r if cl.files == None: raise util.Abort("no files in CL " + clname) files = Add(files, cl.files) - pats = Sub(pats, taken) + ['path:'+f for f in files] + pats = Sub(pats, taken) + ['path:'+f for f in files] return original_match(repo, pats=pats, opts=opts, globbed=globbed, default=default) def RelativePath(path, cwd):