Show More
@@ -970,19 +970,22 b' def matching(repo, subset, x):' | |||
|
970 | 970 | raise error.ParseError( |
|
971 | 971 | _("unexpected field name passed to matching: %s") % info) |
|
972 | 972 | getfieldfuncs.append(getfield) |
|
973 | ||
|
974 | 973 | # convert the getfield array of functions into a "getinfo" function |
|
975 | 974 | # which returns an array of field values (or a single value if there |
|
976 | 975 | # is only one field to match) |
|
977 | if len(getfieldfuncs) == 1: | |
|
978 | getinfo = getfieldfuncs[0] | |
|
979 | else: | |
|
980 | 976 |
|
|
981 | 977 | |
|
982 | 978 | matches = [] |
|
983 | 979 | for rev in revs: |
|
984 | 980 | target = getinfo(rev) |
|
985 | matches += [r for r in subset if getinfo(r) == target] | |
|
981 | for r in subset: | |
|
982 | match = True | |
|
983 | for n, f in enumerate(getfieldfuncs): | |
|
984 | if target[n] != f(r): | |
|
985 | match = False | |
|
986 | break | |
|
987 | if match: | |
|
988 | matches.append(r) | |
|
986 | 989 | if len(revs) > 1: |
|
987 | 990 | matches = sorted(set(matches)) |
|
988 | 991 | return matches |
General Comments 0
You need to be logged in to leave comments.
Login now