Closed Bug 1569734 Opened 5 years ago Closed 5 years ago

Fix and cleanup mozext

Categories

(Developer Services :: Mercurial: mozext, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

Details

Attachments

(14 files, 1 obsolete file)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

mozext hasn't been getting enough love and has bitrotted quite a lot. Let's do some cleanups to get things working again, and improve the testing situation.

mappedgenerator is used when you want to create a generator
from a list of items, which is our use case.

If you want to cloneunified these days, you clone
mozilla-unified.

Use the firefoxtree extension and the fxheads command,
and this problem goes away. The solution is much simpler,
too.

"Aurora" is no longer one of the trains, so we don't need this
template keyword.

All these changes get tests passing under Mercurial 5.0.

Previous we did a manual override of this object, which was
causing tracebacks on my machine. Using the extension function
wrapping utility gets rid of the issue.

Rather than initialize many of the template utilities
in a conditional block, have the conditional perform
an early return and keep everything at the top level.

Also avoid the double lookup on disable_local_database.

The test coverage for mozext was quite lacking, and contributed
to a lot of the bit rot in the last few months. In this commit I
create a single unified test that covers most of the added template
keywords, revset predicates and commands.

Since we rely on the pushlog extension to enable several features,
we pin the Mercurial used in hg serve to a known-compatible version.

Changing this test and pinning the version of hg used to serve the
pushlog allow us to remove the test from the flaky test list.

Running hg pull will sync the correct pushlog. Similar to
hg cloneunified, this command was created in a time before
we had a unified repo and unified pushlog on hg.mo.

Usually the bookmarks in a repo are either the users own, or
references to the various tree heads (central, inbound, etc).
If the user is using firefoxtree, they won't see the fxheads
bookmarks in hg bookmarks or hg show bookmarks output. So
this solution is older and can be removed.

At this point it prints out so much information about so
many dead trees that it can't possbly be useful. Using
the firefoxtree extension is highly preferred, where
there is a fxheads command to see the state of various
trees.

Use util.safehasattr and switch off a dynamic default
(this was throwing a devel-warn in testing).

Attachment #9081762 - Attachment is obsolete: true

This is obviously not needed, and slightly dangerous.

Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/68c646986378
mozext: remove the hg cloneunified command r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ed5808efbfc7
mozext: remove hg prunerelbranches command r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ae1aa880be83
mozext: remove template keywords related to aurora repository r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/39ec9297f750
mozext: mark as compatible with Mercurial 5.0 r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/a8e3d70807b0
mozext: use extension wrapper mechanism for hg._peerorrepo r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/790b45463fd4
mozext: remove bz_available global variable r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/c3b65e6e8bfb
mozext: flatten extsetup r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/4851a84dfe4d
mozext: unify into a single test and improve coverage r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/28b74bc3450b
mozext: remove hg pushlogsync r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/3e1c648aeb62
mozext: remove hg mybookmarks r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/e8bf67866f28
mozext: remove hg moztrees r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/0e60a3fd0541
mozext: clarify some changes in the docstring r=smacleod
https://hg.mozilla.org/hgcustom/version-control-tools/rev/5e857d4f3091
mozext: miscellaneous fixes r=smacleod

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/1d53e657414f
mozext: remove extension-loaded `reviewboard` path r=smacleod
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: