Commit Graph

24 Commits

Author SHA1 Message Date
Xavier Deguillard
1b69ae4751 tests: remove use of remotefilelog.{use,}fastdatapack
Summary: These 2 options simply do not exist anymore.

Reviewed By: kulshrax

Differential Revision: D15993203

fbshipit-source-id: e845c060b5c96a78659556488da620a92f63e121
2019-06-26 11:10:55 -07:00
Mark Thomas
81d738646f commitcloud: incorporate infinitepush backups into commitcloud
Summary:
Merge the functionality of the infinitepushbackup extension (backing up commits
to commit cloud) into the commitcloud extension.

These two extensions are highly coupled, and the commitcloud extension
monkey-patches the infinitepushbackup extension for a lot of its functionality.
There is also a lot of code duplication between the two extensions which we can
remove if they are part of the same extension.

The infinitepushbackup commands (`hg pushbackup`, ...) are moved to subcommands
of the `hg cloud` command, e.g. `hg cloud backup`.

Each feature of the infinitepushbackup extension is moved to a new module
in the commit cloud extension:

The `background` module controls background execution of `hg cloud backup` and
`hg cloud sync`.

The `backupbookmarks` module tracks and updates scratch bookmarks for backups.
This will be deprecated in the future.

The `backupstate` module tracks whether or not a commit has been backed up.
This is now tracked separately from backup bookmarks in a new file:
`.hg/commitcloud/backedupheads.<remote-identifier>`.  This also covers hidden
commits, preventing a re-backup of previously backed up commits when they are
unhidden.

Previously the commitcloud extension customized the smartlog annotations: `Backing up`
became `Syncing`, etc.  This is now removed for consistency.

Previously the infinitepushbackup extension disabled background backup by
injecting an `infinitepushbackup.disableduntil` config entry into the user's
config.  This is now replaced with a state file at `.hg/commitcloud/autobackup`.
Either option can be set to disable auto backup.  Commit cloud will wait until
both have expired before starting to run background backups again.

Reviewed By: DurhamG

Differential Revision: D15276939

fbshipit-source-id: 1d28989a157286e47d3dd97ca9c70b27f692dda1
2019-05-20 06:19:47 -07:00
Mark Thomas
9a19e06fee strip: move extension to core and rename to debugstrip
Summary:
Move the strip extension to core.  Rename the command to `hg debugstrip` as it
is not intended for use by users.  Users should use `hg hide` instead.

Reviewed By: quark-zju

Differential Revision: D14185822

fbshipit-source-id: ef096488cb94b72a7bb79f5bf153c064e0555b34
2019-02-25 03:55:08 -08:00
Jun Wu
fbccd19ed7 patchbomb: remove the extension
Summary:
`test-patchbomb.t` uses named branches and does not look simple to fix.
We don't use email patches internally, and it's not hard to write scripts
around `hg export`. Therefore drop the extension and its tests.

Reviewed By: singhsrb

Differential Revision: D13978577

fbshipit-source-id: 19867ae68c19c996bfce064eb2234705939db9ea
2019-02-12 21:45:10 -08:00
Jun Wu
1ef3e33b69 configwarn: remove the extension
Summary:
The extension was mainly for users `pip install <3rd-party-hg-ext>`, which
usually installs them into `hgext3rd`. Since we no longer search into
`hgext3rd`, this extension can be removed.

Reviewed By: DurhamG

Differential Revision: D13440401

fbshipit-source-id: d67a655ece9a1f6d5feb18d8aeac84852edfdcb9
2018-12-12 18:54:22 -08:00
Aida Getoeva
8940a7c464 uncommit: move to core
Summary: Moving extension `uncommit` to the core.

Reviewed By: quark-zju

Differential Revision: D10447651

fbshipit-source-id: 2ccf7db858b78e0811ffef742c82237259492719
2018-10-30 08:00:05 -07:00
Phil Cohen
626be8c89d perftweaks: rename tests
Summary: Signifying the change of perftweaks from an extension to a config grouping.

Reviewed By: quark-zju

Differential Revision: D10416857

fbshipit-source-id: b233a353c7da1d211ad0a7e53b942244863a83b3
2018-10-18 09:04:34 -07:00
Kostia Balytskyi
86f07601f7 sparse: rename fbsparse into sparse in tests
Reviewed By: phillco

Differential Revision: D10335084

fbshipit-source-id: 91e0a17957561410e397a006f99ebf549d34e1e4
2018-10-16 14:27:29 -07:00
Saurabh Singh
3d88ec0346 record: move extension into core
Summary:
This extension exposes only the `record` command which can be easily
moved to core. This commit achieves the same.

Reviewed By: ikostia

Differential Revision: D10360759

fbshipit-source-id: 25f0c46aa3fa9b19ab8ba03a6b4e8598bc003c7a
2018-10-12 11:16:46 -07:00
Saurabh Singh
cd49463e2c show: move the extension into core
Summary:
The extension only offers one command i.e. `show` which can move into
core.

Reviewed By: ikostia

Differential Revision: D10302192

fbshipit-source-id: 9473ec8c80e52506e1b7de62b2c90a51c29419c1
2018-10-12 07:03:11 -07:00
Saurabh Singh
d0d21c955f show: replace with the fbshow extension
Summary:
The functionality we care about is provided by the `fbshow` extension.
Therefore, lets replace the `show` extension with the `fbshow` extension.

Reviewed By: ikostia

Differential Revision: D10302193

fbshipit-source-id: e6d137f52427d5e6f124714d06b5b55ef0db7c3c
2018-10-12 07:03:11 -07:00
Kostia Balytskyi
40991e7fe6 shelve: fix tests that rely on traditional shelve
Summary: Traditional shelve did not require `obsstore` to be enabled, which means that `saved bundle` messages were printed a lot. This change fixes all tests that expect these messages.

Reviewed By: singhsrb

Differential Revision: D10261258

fbshipit-source-id: 2b4b10ee94ae9b5723cb69fc8f7c29bc65613774
2018-10-12 06:30:04 -07:00
Saurabh Singh
6317ba0ca2 amend: replace with the fbamend extension
Summary:
The functionality we care about is provided by the `fbamend`
extension. Therefore, lets replace the `amend` extension with the `fbamend`
extension.

Reviewed By: farnz

Differential Revision: D10320739

fbshipit-source-id: 5700d39f488777fcc4033f60ce0a51cda15ef2ad
2018-10-11 06:59:23 -07:00
Saurabh Singh
f6e0d2d1ee inhibit: remove the extension
Summary:
The logic we care about has been moved to core so we can delete the
`inhibit` extension.

Reviewed By: markbt

Differential Revision: D10276448

fbshipit-source-id: 44cabe5d561344cf8f196127ce52491e4654b598
2018-10-10 10:01:45 -07:00
Mark Thomas
f353521eb9 revset: move age extension to core
Summary:
The age extension provides a couple of revsets relating to commit ages.  Move
these to core.

Differential Revision: D10239000

fbshipit-source-id: 6ebf3aa263b72e4bbbe25bd516f77b17145e6e7f
2018-10-08 12:01:44 -07:00
Jun Wu
82298d423e fsmonitor: avoid cyclic reference in reposetup
Summary: Break the cycle by using local variable.

Reviewed By: chadaustin

Differential Revision: D8686397

fbshipit-source-id: e1846d33472066466814ab2c0c666f72b8393ff3
2018-06-28 17:35:21 -07:00
Jun Wu
f45557f483 commitcloud: avoid cyclic reference in reposetup
Summary:
A reference of `repo` is kept in the `finalize` closure. That forms a cycle:

 - finalize needs repo
 - repo.transaction needs finalize

Break the cycle by making `finalize` use `self` passed to `repo.transaction`
instead.

Reviewed By: chadaustin

Differential Revision: D8676286

fbshipit-source-id: e27bed996883e2bf22cdeec41fcf1ab3e771b208
2018-06-28 14:20:41 -07:00
Jun Wu
bb9e6e0a18 fbsparse: avoid cyclic reference in reposetup
Summary: When wrapping the repo object, use local variable if possible.

Reviewed By: chadaustin

Differential Revision: D8676284

fbshipit-source-id: d35d9b7b9357a8e16d4eb10032911ecbdc34b907
2018-06-28 14:20:41 -07:00
Jun Wu
d17c133cd7 remotefiellog: avoid cyclic reference in reposetup
Summary: When wrapping the repo object, use local variable if possible.

Reviewed By: chadaustin

Differential Revision: D8676283

fbshipit-source-id: 627e5fa4cc126efff42f29cf463fa90b97d9a0e0
2018-06-28 14:20:41 -07:00
Jun Wu
9aca1a1da1 fastmanifest: drop global uiproxy
Summary:
fastmanifest uses a `uiproxy` semi-global variable to workaround a chg issue
where `uisetup` received an out-of-date `ui` object.

That's no longer necessary D7840237. Removing the `uiproxy` global variable
fixes the memory leak.

Reviewed By: chadaustin

Differential Revision: D8676285

fbshipit-source-id: a5e042e4f61460ce53d43a231f07d70f27a52f19
2018-06-28 14:20:41 -07:00
Jun Wu
e4ff05e792 treemanifest: avoid cyclic reference in reposetup
Summary: Replace references to non-local variables with local variables.

Reviewed By: chadaustin

Differential Revision: D8675979

fbshipit-source-id: 8c35db5f3ea8a7ee79dad163928341607b37bb1c
2018-06-28 14:20:41 -07:00
Jun Wu
29bed9173c blackbox: use weakref to avoid cyclic reference
Summary:
The blackbox extension uses a global variable for `lastui` in case certain ui
objects do not have an associated repo. That `lastui` reference makes the `ui`
(and `repo`) harder to be dropped. It also sets `ui.repo` which could form a
cycle if `repo.ui` is that `ui`.  Fix it by using weakref.

Reviewed By: chadaustin

Differential Revision: D8675908

fbshipit-source-id: 7d0c083cc5c7a3ac134379732de1e0c408a1d5fc
2018-06-28 14:20:40 -07:00
Jun Wu
b22b529f1b hgsubversion: avoid cyclic reference in reposetup
Summary:
Continue with the sampling fix. hgsubversion is the second trouble marker.
It uses similar patterns (reference to non-local variables in closure).
Fix it by using local variables.

Reviewed By: chadaustin

Differential Revision: D8675439

fbshipit-source-id: bff7a827608fbf4a2662e6e9956ddb733c6a3bb5
2018-06-28 14:20:40 -07:00
Jun Wu
d1f0439062 tests: add a memory leak test
Summary:
The latest fbcode dev build environment reports several memory leak issues from
the Rust extensions. It's caused by CPython not calling `tp_dealloc` of the
native object, which is mostly caused by `repo` not released for various
reasons.  Add a test demonstrating the issue to verify the upcoming fix and
prevent future regression.

The most noticable problematic extensions are listed in the test.

Reviewed By: chadaustin

Differential Revision: D8675484

fbshipit-source-id: 152aff1e8ee574151d8a655e73cfa93dec5b91cb
2018-06-28 14:20:40 -07:00