Mercurial > hg
changeset 8020:777a9efdae2d
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.
author | Henrik Stuart <hg@hstuart.dk> |
---|---|
date | Tue, 07 Apr 2009 20:57:25 +0200 |
parents | af49e2d15e51 |
children | 1c2cf2e5dc9b |
files | mercurial/commands.py tests/test-log tests/test-log.out |
diffstat | 3 files changed, 33 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Apr 07 17:42:55 2009 +0200 +++ b/mercurial/commands.py Tue Apr 07 20:57:25 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 [k for k in opts['user'] if k in changes[1]]: continue copies = []
--- a/tests/test-log Tue Apr 07 17:42:55 2009 +0200 +++ b/tests/test-log Tue Apr 07 20:57:25 2009 +0200 @@ -104,4 +104,18 @@ echo '% log -r <some unknown node id>' hg log -r 1000000000000000000000000000000000000000 +cd .. + +hg init usertest +cd usertest + +echo a > a +hg ci -A -m "a" -u "User One <user1@example.org>" +echo b > b +hg ci -A -m "b" -u "User Two <user2@example.org>" + +hg log -u "User One <user1@example.org>" +hg log -u "user1" -u "user2" +hg log -u "user3" + exit 0
--- a/tests/test-log.out Tue Apr 07 17:42:55 2009 +0200 +++ b/tests/test-log.out Tue Apr 07 20:57:25 2009 +0200 @@ -239,3 +239,21 @@ abort: 00changelog.i@: ambiguous identifier! % log -r <some unknown node id> abort: unknown revision '1000000000000000000000000000000000000000'! +adding a +adding b +changeset: 0:29a4c94f1924 +user: User One <user1@example.org> +date: Thu Jan 01 00:00:00 1970 +0000 +summary: a + +changeset: 1:e834b5e69c0e +tag: tip +user: User Two <user2@example.org> +date: Thu Jan 01 00:00:00 1970 +0000 +summary: b + +changeset: 0:29a4c94f1924 +user: User One <user1@example.org> +date: Thu Jan 01 00:00:00 1970 +0000 +summary: a +