[PATCH] log: fix broken multiple user search [2]

Henrik Stuart hg at hstuart.dk
Tue Apr 7 12:55:02 CDT 2009


# HG changeset patch
# User Henrik Stuart <hg at hstuart.dk>
# Date 1239126829 -7200
# Node ID 601761c464f3a854a549b758ab45a6c71568eef9
# Parent  8985e1daa7f58ecbae00b601bd3b9e9d6cc2051e
log: fix broken multiple user search

This fix also allows partial user matches so the full name and email does not have to be written out in verbatim.

diff -r 8985e1daa7f5 -r 601761c464f3 mercurial/commands.py
--- a/mercurial/commands.py	Tue Apr 07 17:32:40 2009 +0200
+++ b/mercurial/commands.py	Tue Apr 07 19:53:49 2009 +0200
@@ -1963,12 +1963,7 @@
 
             if opts['user']:
                 changes = get(rev)
-                miss = 0
-                for k in opts['user']:
-                    if k != changes[1]:
-                        miss = 1
-                        break
-                if miss:
+                if not any([True for k in opts['user'] if k in changes[1]]):
                     continue
 
             copies = []


More information about the Mercurial-devel mailing list