[Bug 5778] New: The file revset doesn't re-evaluate fileset patterns on each revision

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue Jan 30 03:51:26 UTC 2018


https://bz.mercurial-scm.org/show_bug.cgi?id=5778

            Bug ID: 5778
           Summary: The file revset doesn't re-evaluate fileset patterns
                    on each revision
           Product: Mercurial
           Version: 4.4.2
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: bug
          Priority: normal
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: matt_harbison at yahoo.com
                CC: mercurial-devel at mercurial-scm.org

Instead, it resolves the fileset against the working directory to a set of
names, and then applies that to each revision that it visits. e.g.

$ hg log -r "file('set:exec()')" -T compact
0   9117c6561b0b   2005-05-03 13:16 -0800   mpm
  Add back links from file revisions to changeset revisions
[...]

But the +x bit wasn't set on the 'hg' script until rev 280 (which 'contains()'
picks up on).  The adds/modifies/removes revsets will likewise evaluate at each
revision, and don't have a confusing result.  I added their code to handle this
to file(), but it looks like this was done intentionally, at least for the
underlying _matchfiles().  (See 1fd352aa08fc)  A couple of tests change with
this (test-glog.t, test-largefiles-misc.t, and test-fileset-generated.t)

Additionally, globs will look like they are re-evaluated per revision to the
end user.  e.g.

$ hg log -r 'file("glob:**/selectors2.py")' -T compact
[...]
40941[4.5-rc]:40592,40940   27b6df1b5adb   2018-01-22 17:53 -0500   augie
  merge with stable to begin 4.5 freeze

even though 4.5-rc removed the file, so it isn't in the working directory.  So
this is totally confusing behavior.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list