[PATCH 3 of 6 STABLE] doc: add about difference between 'filelog()' and 'file()' revset predicates

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Apr 26 07:38:27 CDT 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1335443568 -32400
# Branch stable
# Node ID b296d31cafb37c00b99039849a16f936092ab7b4
# Parent  d2a517b2eac27ee880038080babb8eea47f3ee1b
doc: add about difference between 'filelog()' and 'file()' revset predicates

diff -r d2a517b2eac2 -r b296d31cafb3 mercurial/revset.py
--- a/mercurial/revset.py	Thu Apr 26 21:32:48 2012 +0900
+++ b/mercurial/revset.py	Thu Apr 26 21:32:48 2012 +0900
@@ -464,6 +464,10 @@
 def filelog(repo, subset, x):
     """``filelog(pattern)``
     Changesets connected to the specified filelog.
+
+    If you want to get all changesets affecting matched files exactly,
+    use ``file()`` predicate, because ``filelog()`` may omit some changesets
+    for performance reasons: see :hg:`help log` for detail.
     """
 
     pat = getstring(x, _("filelog requires a pattern"))
@@ -612,6 +616,9 @@
 def hasfile(repo, subset, x):
     """``file(pattern)``
     Changesets affecting files matched by pattern.
+
+    If you want to pick changesets up fast, consider to
+    use ``filelog()`` predicate, too.
     """
     # i18n: "file" is a keyword
     pat = getstring(x, _("file requires a pattern"))


More information about the Mercurial-devel mailing list