[PATCH] log: fix broken multiple user search

Henrik Stuart hg at hstuart.dk
Tue Apr 7 17:48:26 UTC 2009


# HG changeset patch
# User Henrik Stuart <hg at hstuart.dk>
# Date 1239126336 -7200
# Node ID 9260b0b04718adc87bb2b5aa93bded4a7bdd35c3
# 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 9260b0b04718 mercurial/commands.py
--- a/mercurial/commands.py	Tue Apr 07 17:32:40 2009 +0200
+++ b/mercurial/commands.py	Tue Apr 07 19:45:36 2009 +0200
@@ -1963,13 +1963,8 @@
 
             if opts['user']:
                 changes = get(rev)
-                miss = 0
-                for k in opts['user']:
-                    if k != changes[1]:
-                        miss = 1
-                        break
-                if miss:
-                    continue
+                if not any([True for k in opts['user'] if k in changes[1]]):
+					continue
 
             copies = []
             if opts.get('copies') and rev:



More information about the Mercurial-devel mailing list