Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 24008:873eb5db89c8 stable
revset: get revision number of each node from target namespaces
Before this patch, revset predicate "named()" uses each nodes gotten
from target namespaces directly.
This causes problems below:
- combination of other predicates doesn't work correctly, because
they assume that revisions are listed up in number
- "hg log" doesn't show any revisions for "named()" result, because:
- "changeset_printer" stores formatted output for each revisions
into dict with revision number (= ctx.rev()) as a key of them
- "changeset_printer.flush(rev)" writes stored output for
the specified revision, but
- "commands.log" invokes it with the node, gotten from "named()"
- "hg debugrevspec" shows nodes (= may be binary) directly
Difference between revset predicate "tag()" and "named('tags')" in
tests is fixed in subsequent patch.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 03 Feb 2015 21:56:29 +0900 |
parents | eeb5d5ab14a6 |
children | bc75f8750cde 38824c53c2f1 |
comparison
equal
deleted
inserted
replaced
23989:3667bc21b877 | 24008:873eb5db89c8 |
---|---|
1275 " that match '%s'") % pattern) | 1275 " that match '%s'") % pattern) |
1276 | 1276 |
1277 names = set() | 1277 names = set() |
1278 for ns in namespaces: | 1278 for ns in namespaces: |
1279 for name in ns.listnames(repo): | 1279 for name in ns.listnames(repo): |
1280 names.update(ns.nodes(repo, name)) | 1280 names.update(repo[n].rev() for n in ns.nodes(repo, name)) |
1281 | 1281 |
1282 names -= set([node.nullrev]) | 1282 names -= set([node.nullrev]) |
1283 return subset & names | 1283 return subset & names |
1284 | 1284 |
1285 def node_(repo, subset, x): | 1285 def node_(repo, subset, x): |