Commit Graph

7 Commits

Author SHA1 Message Date
Jun Wu
cf609702c4 smartlog: expose interestingbookmarks revset
Summary:
The `smartlog()` revset does a lot of things.
Add a new revset `interestingbookmarks()` to expose part of the smartlog features.

Reviewed By: DurhamG, sfilipco

Differential Revision: D14436006

fbshipit-source-id: 15b8d203b6547e63f8d062660ad27bdbc25b2c1c
2019-03-14 20:14:36 -07:00
Jun Wu
fa37745dd0 smartlog: change unmaned head query to heads(draft())
Summary:
The code falls back to head() if there are no remotenames. We don't need that
behavior. Therefore just simplify it by always using `heads(draft())`.

Reviewed By: DurhamG

Differential Revision: D14436009

fbshipit-source-id: 25c2d245ed64a29e3e1677ededb4c2ba7b4a3ceb
2019-03-14 20:14:36 -07:00
Jun Wu
28b4dfbb38 smartlog: show more commits
Summary:
To make "draft()" bounded and train users to hide unused commits manually,
change smartlog to "hide commits before <a static date>", instead of
"hide commits that are older than <a static time span>". Then we can
incrementally decrease the static date, and eventually show everything, and
force the user to think about what commits to keep or hide.

Reviewed By: singhsrb

Differential Revision: D13993584

fbshipit-source-id: 1a2b56f50d7f014a589f798cd2feaa6931e64fe3
2019-03-11 11:11:59 -07:00
Mark Thomas
d7375d7397 visibility: update visibility when commits are modified
Summary:
When commits are added or modified, update the set of visible heads if
visibility tracking is enabled.

Reviewed By: DurhamG

Differential Revision: D12980779

fbshipit-source-id: 8f44045159c86a374ae530fa4327ee0807b4320d
2019-03-08 03:05:58 -08:00
Mark Thomas
edbb3112bd templatekw: disable obsolescence fate templates when mutation enabled
Summary:
Disable the various templates that attempt to determine the fate of a
particular commit based on obsmakers when mutation is enabled.  The old
templates were either insufficiently generic (e.g. `amendsuccessors`), or
leaked internal implementation (e.g. `succsandmarkers`).

With mutation enabled, callers should use the `mutations` template to get a
list of a commit's mutations.

Reviewed By: DurhamG

Differential Revision: D12980772

fbshipit-source-id: 920d47f7c61ad52f562cd90f1cb405250c14bc25
2019-03-08 03:05:57 -08:00
Jun Wu
9dc21f8d0b codemod: import from the edenscm package
Summary:
D13853115 adds `edenscm/` to `sys.path` and code still uses `import mercurial`.
That has nasty problems if both `import mercurial` and
`import edenscm.mercurial` are used, because Python would think `mercurial.foo`
and `edenscm.mercurial.foo` are different modules so code like
`try: ... except mercurial.error.Foo: ...`, or `isinstance(x, mercurial.foo.Bar)`
would fail to handle the `edenscm.mercurial` version. There are also some
module-level states (ex. `extensions._extensions`) that would cause trouble if
they have multiple versions in a single process.

Change imports to use the `edenscm` so ideally the `mercurial` is no longer
imported at all. Add checks in extensions.py to catch unexpected extensions
importing modules from the old (wrong) locations when running tests.

Reviewed By: phillco

Differential Revision: D13868981

fbshipit-source-id: f4e2513766957fd81d85407994f7521a08e4de48
2019-01-29 17:25:32 -08:00
Jun Wu
c12e300bb8 codemod: move Python packages to edenscm
Summary:
Move top-level Python packages `mercurial`, `hgext` and `hgdemandimport` to
a new top-level package `edenscm`. This allows the Python packages provided by
the upstream Mercurial to be installed side-by-side.

To maintain compatibility, `edenscm/` gets added to `sys.path` in
`mercurial/__init__.py`.

Reviewed By: phillco, ikostia

Differential Revision: D13853115

fbshipit-source-id: b296b0673dc54c61ef6a591ebc687057ff53b22e
2019-01-28 18:35:41 -08:00