A Scalable, User-Friendly Source Control System.
Go to file
Simon Farnsworth 196af0f28e rebase: turn rebase revs into set before filtering obsolete
When the inhibit extension from mutable-history is enabled, it attempts to
iterate over the rebaseset to prevent the nodes being rebased from being
marked obsolete. This happens at the same time as rebase's
_filterobsoleterevs function trying to iterate over the rebaseset to figure
out which ones are obsolete. The two of these iterating over the same
revset generatorset cause a 'generator already executing' exception. This is
probably a flaw in the revset implementation, since iterating over the same
set twice should be supported.

This regression was introduced in 5d16ebe7b14, since it changed
_filterobsoleterevs to be called before the rebaseset was turned into a
set(). For now let’s just make the rebaseset an actual set again before
calling that function. This was caught by the inhibit tests.

The relevant call stack from test-inhibit.t:

   File "/tmp/hgtests.jgjrN5/install/lib/python/hgext/rebase.py", line 285, in _preparenewrebase
     obsrevs = _filterobsoleterevs(self.repo, rebaseset)
   File "/data/hgbuild/facebook-hg-rpms/mutable-history/hgext/inhibit.py", line 197, in _filterobsoleterevswrap
     r = orig(repo, rebasesetrevs, *args, **kwargs)
   File "/tmp/hgtests.jgjrN5/install/lib/python/hgext/rebase.py", line 1380, in _filterobsoleterevs
     return set(r for r in revs if repo[r].obsolete())
   File "/tmp/hgtests.jgjrN5/install/lib/python/hgext/rebase.py", line 1380, in <genexpr>
     return set(r for r in revs if repo[r].obsolete())
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/revset.py", line 3079, in _iterordered
     val2 = next(iter2)
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/revset.py", line 3417, in gen
     yield nextrev()
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/revset.py", line 3424, in _consumegen
     for item in self._gen:
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/revset.py", line 71, in iterate
     cl = repo.changelog
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/repoview.py", line 319, in changelog
     revs = filterrevs(unfi, self.filtername)
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/repoview.py", line 261, in filterrevs
     repo.filteredrevcache[filtername] = func(repo.unfiltered())
   File "/data/hgbuild/facebook-hg-rpms/mutable-history/hgext/directaccess.py", line 65, in _computehidden
     hidden = repoview.filterrevs(repo, 'visible')
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/repoview.py", line 261, in filterrevs
     repo.filteredrevcache[filtername] = func(repo.unfiltered())
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/repoview.py", line 175, in computehidden
     hideable = hideablerevs(repo)
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/repoview.py", line 33, in hideablerevs
     return obsolete.getrevs(repo, 'obsolete')
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/obsolete.py", line 1097, in getrevs
     repo.obsstore.caches[name] = cachefuncs[name](repo)
   File "/data/hgbuild/facebook-hg-rpms/mutable-history/hgext/inhibit.py", line 255, in _computeobsoleteset
     if getrev(n) not in blacklist:
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/revset.py", line 3264, in __contains__
     return x in self._r1 or x in self._r2
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/revset.py", line 3348, in __contains__
     for l in self._consumegen():
   File "/tmp/hgtests.jgjrN5/install/lib/python/mercurial/revset.py", line 3424, in _consumegen
     for item in self._gen:
 ValueError: generator already executing
2016-07-19 03:29:53 -07:00
contrib chg: handle EOF reading data block 2016-07-18 18:55:06 +01:00
doc check-code: detect "missing _() in ui message" more exactly 2016-06-21 00:50:39 +09:00
hgext rebase: turn rebase revs into set before filtering obsolete 2016-07-19 03:29:53 -07:00
hgext3rd extensions: also search for extension in the 'hgext3rd' package 2016-03-11 10:30:08 +00:00
i18n py3: make files use absolute_import and print_function 2016-07-03 22:28:24 +05:30
mercurial commandserver: update comment about setpgid 2016-07-18 15:59:08 +01:00
tests rbc: fix invalid rbc-revs entries caused by missing cache growth 2016-07-18 22:22:38 +02:00
.editorconfig mercurial: add editorconfig 2016-04-05 18:10:33 +01:00
.hgignore make: turn ubuntu docker into template 2016-04-26 23:33:17 -07:00
.hgsigs Added signature for changeset ec63fb038fbc 2016-07-18 23:31:51 -05:00
CONTRIBUTORS Add note to CONTRIBUTORS file 2007-11-07 21:10:30 -06:00
COPYING COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
hg hg: disable demandimport for py3 2016-05-11 23:24:41 +00:00
hgeditor spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
hgweb.cgi urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
Makefile osx: explicitly build hg with /usr/bin/python2.7 2016-07-13 10:39:33 -04:00
README urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
setup_osutil_cffi.py osutil: add darwin-only version of os.listdir using cffi 2016-07-11 11:05:08 +02:00
setup.py osutil: add darwin-only version of os.listdir using cffi 2016-07-11 11:05:08 +02:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install:

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing:

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.