# HG changeset patch # User Greg Hurrell # Date 2014-04-28 22:09:23 # Node ID e9c2f76be74b3b174c7c75936f5503915b65f97e # Parent 56a04085c23c1184d65d9d2d10927379c6211939 help: clarify distinction among `contains`/`file`/`filelog` For a Mercurial new-comer, the distinction between `contains(x)`, `file(x)`, and `filelog(x)` in the "revsets" help page may not be obvious. This commit tries to make things more obvious (text based on an explanation from Matt in an FB group thread). diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -585,8 +585,8 @@ def closed(repo, subset, x): def contains(repo, subset, x): """``contains(pattern)`` - Revision contains a file matching pattern. See :hg:`help patterns` - for information about file patterns. + The revision's manifest contains a file matching pattern (but might not + modify it). See :hg:`help patterns` for information about file patterns. The pattern without explicit kind like ``glob:`` is expected to be relative to the current directory and match against a file exactly @@ -784,9 +784,10 @@ def filelog(repo, subset, x): """``filelog(pattern)`` Changesets connected to the specified filelog. - For performance reasons, ``filelog()`` does not show every changeset - that affects the requested file(s). See :hg:`help log` for details. For - a slower, more accurate result, use ``file()``. + For performance reasons, visits only revisions mentioned in the file-level + filelog, rather than filtering through all changesets (much faster, but + doesn't include deletes or duplicate changes). For a slower, more accurate + result, use ``file()``. The pattern without explicit kind like ``glob:`` is expected to be relative to the current directory and match against a file exactly