mirror of
https://github.com/facebook/sapling.git
synced 2024-10-13 02:07:31 +03:00
4791303cd2
Summary: Reviving commits is an essential feature. So move it to core. Most test changes are caused by the auto-date-bump behavior, which is needed to revive commits automatically. Note the existing code is not fully ready for the change. For example, `precursors.get(node)`, `successors.get(node)` do not filter out markers that are suppressed. For example, some code paths treat node as obsoleted if `precursors.get(node)` is non-empty. That's no longer true. markbt's planned visibility change might clean up this area a bit. Regarding on tests, most changes are because of the "auto bump date" feature. The graphlog change in `test-obsmarker-template.t` is because it creates a cycle, which behaves differently in the new code. Half of obsmarker exchange tests break. Given the fact that we do not use and will probably rewrite the exchange algorithm, related tests are deleted, including `test-obsolete-distributed.t`. Reviewed By: DurhamG Differential Revision: D9236661 fbshipit-source-id: 85b983f8bd46dece908c05f56bea2abbc8ffbaf6
24 lines
694 B
Python
24 lines
694 B
Python
# inhibit.py - redefine bumped(), divergent() revsets
|
|
#
|
|
# Copyright 2017 Facebook, Inc.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
"""redefine obsolete(), bumped(), divergent() revsets"""
|
|
|
|
from __future__ import absolute_import
|
|
|
|
from mercurial import error, extensions, obsolete, util
|
|
|
|
|
|
revive = obsolete.revive
|
|
|
|
|
|
def uisetup(ui):
|
|
revsets = obsolete.cachefuncs
|
|
|
|
# make divergent() and bumped() empty
|
|
# NOTE: we should avoid doing this but just change templates to only show a
|
|
# subset of troubles we care about.
|
|
revsets["divergent"] = revsets["bumped"] = lambda repo: frozenset()
|