Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revset.py @ 21199:e9c2f76be74b stable
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).
author | Greg Hurrell <glh@fb.com> |
---|---|
date | Mon, 28 Apr 2014 15:09:23 -0700 |
parents | d4daebb21cf6 |
children | c8b9c6147108 |
comparison
equal
deleted
inserted
replaced
21198:56a04085c23c | 21199:e9c2f76be74b |
---|---|
583 getargs(x, 0, 0, _("closed takes no arguments")) | 583 getargs(x, 0, 0, _("closed takes no arguments")) |
584 return subset.filter(lambda r: repo[r].closesbranch()) | 584 return subset.filter(lambda r: repo[r].closesbranch()) |
585 | 585 |
586 def contains(repo, subset, x): | 586 def contains(repo, subset, x): |
587 """``contains(pattern)`` | 587 """``contains(pattern)`` |
588 Revision contains a file matching pattern. See :hg:`help patterns` | 588 The revision's manifest contains a file matching pattern (but might not |
589 for information about file patterns. | 589 modify it). See :hg:`help patterns` for information about file patterns. |
590 | 590 |
591 The pattern without explicit kind like ``glob:`` is expected to be | 591 The pattern without explicit kind like ``glob:`` is expected to be |
592 relative to the current directory and match against a file exactly | 592 relative to the current directory and match against a file exactly |
593 for efficiency. | 593 for efficiency. |
594 """ | 594 """ |
782 | 782 |
783 def filelog(repo, subset, x): | 783 def filelog(repo, subset, x): |
784 """``filelog(pattern)`` | 784 """``filelog(pattern)`` |
785 Changesets connected to the specified filelog. | 785 Changesets connected to the specified filelog. |
786 | 786 |
787 For performance reasons, ``filelog()`` does not show every changeset | 787 For performance reasons, visits only revisions mentioned in the file-level |
788 that affects the requested file(s). See :hg:`help log` for details. For | 788 filelog, rather than filtering through all changesets (much faster, but |
789 a slower, more accurate result, use ``file()``. | 789 doesn't include deletes or duplicate changes). For a slower, more accurate |
790 result, use ``file()``. | |
790 | 791 |
791 The pattern without explicit kind like ``glob:`` is expected to be | 792 The pattern without explicit kind like ``glob:`` is expected to be |
792 relative to the current directory and match against a file exactly | 793 relative to the current directory and match against a file exactly |
793 for efficiency. | 794 for efficiency. |
794 """ | 795 """ |