fastannotate has its own file-level flock implementation and does not need
to use the repo lock.
Differential Revision: https://phab.mercurial-scm.org/D91
Summary:
Upstream has added a warning around writing files with locks. Since this file is
written as part of an update, let's just take the wlock.
Test Plan: Ran the tests
Reviewers: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D90
Summary:
Upstream has introduced a new warning when writing to a repo outside of the
lock. gitlookup triggers this during getgitmeta. Let's take the wlock.
Test Plan: Ran the tests. They now pass
Reviewers: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D88
Summary:
Upstream has added devel warnings when writing store files outside of a lock.
Certain files allow this though and there's a whitelist of which files are
allowed. Since backups happen behind the scenes and use their own lock, it's
safe to add our files to that list.
Test Plan: Ran the tests against latest upstream hg. They now pass.
Reviewers: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D87
Summary: adding hg amend --to option so it can amends to a specific commit
Test Plan: will add a test for this
Reviewers: juehui, durham
Reviewed By: durham
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5396805
Signature: t1:5396805:1499986779:d555d75c636e37adbe484b5b77c1844fcacfdc86
Summary:
We want to reuse the treeonly logic in both the server and the client, so we
need to move the treeonly version of the manifest log to it's own class that
doesn't depend on revlogs. This is actually a lot cleaner too.
Test Plan: Ran the tests
Reviewers: #fbhgext, simpkins
Reviewed By: #fbhgext, simpkins
Subscribers: simpkins
Differential Revision: https://phab.mercurial-scm.org/D12
Summary:
Hooks should run with awareness of the tree pack data, so we need to pass the
temporary pack location as part of the hook environment.
Test Plan: Added a test
Reviewers: #fbhgext, simpkins
Reviewed By: #fbhgext, simpkins
Subscribers: simpkins
Differential Revision: https://phab.mercurial-scm.org/D8
Summary:
Adds a config option that forces all manifest accesses to use treemanifests.
This will be useful in enforcing the final stage of the treemanifest migration
where we use tree manifests for everything.
Test Plan:
A subsequent patch adds a test that runs hooks that touch the manifest while
treeonly is set.
Reviewers: #fbhgext, simpkins
Reviewed By: #fbhgext, simpkins
Differential Revision: https://phab.mercurial-scm.org/D7
Summary:
Adds functionality and a test for when clients pushes a tree pack to the server
without any flat manifest data, and the server writes the correct flat and tree
manifests during pushrebase.
Test Plan: Added tests
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Subscribers: phillco, quark, dsp
Differential Revision: https://phab.mercurial-scm.org/D5
Summary:
Treemanifest relies on the matcher visitdir function, which was not implemented
in our special sparse matchers. Long term we should migrate to using the core
sparse extension. For now let's just implement visitdir().
Test Plan: Added a test. Previously the test would throw a big exception.
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D84
Summary:
When requesting trees from the server, the client sends a list of manifest nodes
it wants and base nodes it has, then the server sends back any parts of the tree
that are in the desired manifests but not in the base nodes. If no base nodes
are sent, then the server tries to pick appropriate base nodes from the list of
manifests being requested.
Previously, when requesting manifest X, it would only try to pick X^ as the base
node (assuming X^ was in the request set). This meant that if you requested X
and X^^, it wouldn't realize they were very similar and instead it would send
the entire X and entire X^^ trees (with lots of duplication).
With this patch, it will always use the previously requested manifest as the
base node for the next manifest, if no base nodes are specified. So requests X
and X^^ will return the minimal set of nodes.
Test Plan: Added a test. It fails before and passes afterwards
Reviewers: #fbhgext, simpkins
Reviewed By: #fbhgext, simpkins
Differential Revision: https://phab.mercurial-scm.org/D75
Summary: This broke hg bundle on non-generaldelta repositories.
Test Plan: Ran the tests
Reviewers: #fbhgext, stash, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D74
Summary:
We've seen certain machines end up with just datapack files and no dataidx
files. While we can't repro this, the only time this could possibly happen is
between the rename of the two temp files. So let's add error handling around
that logic.
Test Plan: Ran the tests. Manually inserted an exception between the renames, ran the tests with --keep-tmpdir, and verified there were no packs left over when the exception fired.
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D61
We want these behaviors:
- Checking out an obsoleted revision makes it visible even if another
revision was checked out later
- Putting a bookmark on an obsoleted revision makes it visible even if the
bookmark was removed later
- Strip/prune could make them hidden again
This is basically a lightweight version of independent hidden.
Differential Revision: https://phab.mercurial-scm.org/D70
Summary: Check if the client exists, and if not, exit the import. Added a test for non-regression.
Test Plan: running test-p4fastimport-import-badclient.t
Reviewers: davidsp
Reviewed By: davidsp
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5405340
Signature: t1:5405340:1499965824:394077f0d148be2e5fef15902c69703eaf360bbb
Summary:
The check-code test in the upstream mercurial repository was recently updated
to start complaining about "if False" statements. Two locations in fb-hgext
had this issue.
These both look to be copy-and-pastes of the same function, unfortunately.
That should probably be cleaned up too, but I'll leave that for a separate diff
for now.
Test Plan: Confirmed the test-check-code test passes now.
Reviewers: #fbhgext, durham, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D71
Summary:
Update the phabricator/conduit.py module to cache connections to Phabricator
and re-use them, rather than creating a brand new connection each time
call_conduit() is invoked.
This makes the `{phabstatus}` template reasonable to use outside of the
smartlog extension. There was already custom logic for smartlog so that it
only makes a single conduit call to look up data on all revisions at once.
However, generic `log` commands would still end up creating a separate
connection to phabricator for each revision. With this change `log` still ends
up making one call per revision, but at least it does not set up and tear down
a separate connection for each one any more.
Test Plan:
Tested using the `{phabstatus}` template with `hg log` and confirmed it no
longer made a separate connection to phabrictor for each revision. It is still
pretty slow, but no longer quite as bad.
Reviewers: #mercurial, simonfar, tomaszo
Reviewed By: simonfar
Subscribers: simonfar, medson, mjpieters, net-systems-diffs@fb.com
Differential Revision: https://phabricator.intern.facebook.com/D5383425
Signature: t1:5383425:1499680847:428185ba762fefbe12a411a1afa0a090aafda2f2
Summary:
Make sure that infinitepush work fine with lfs. To achieve it we try to use
changegroup3 if it's available and also run prepush hook before infinitepush.
Test Plan: Run `arc unit`
Reviewers: #fbhgext, quark, dsp
Reviewed By: #fbhgext, dsp
Differential Revision: https://phab.mercurial-scm.org/D17
The compatibility shim for the old protocol was just plain broken. This fixes
it. It's hard to write a test for this since the code that produced the old
format is no longer around. But I tested it internally against our servers with
the old format.
The old smartlog revset is no longer used.
Test Plan:
Confirmed no user uses `smartlog('all')` or `smartlog('recent')` by searching
`smartlog(` globally.
Differential Revision: https://phab.mercurial-scm.org/D48
Summary:
Previously the code required that sizes be of type int. Since python plays loose
with integer types, we also need to support long.
Test Plan:
The existing test-remotefilelog-repack-fast.t test was completely
broken. It only enabled fast datapacks for the server repo, not the clients.
Enabling it for the clients as well catches this issue and verifies the fix.
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D54
Sometimes `test-check-*` were skipped. Upon investigation, it's because
`lz4revlog` was imported and `hg` printed warnings with `modcheck`. So let's
make `lz4revlog` whitelisted.
Differential Revision: https://phab.mercurial-scm.org/D49
Summary:
Upstream rolled back the single transaction rebase by default behavior.
We still want it, so let's enabled it for all our tests.
Test Plan: Ran the tests
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D47
Summary: Upstream made these changes. Let's follow along.
Test Plan: Ran the tests
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D46
Summary: Will be tehre until remotenames are fixed
Reviewers: quark
Reviewed By: quark
Subscribers: quark
Differential Revision: https://phab.mercurial-scm.org/D45
Summary: Looks like the upstream has changed it on us.
Reviewers: quark
Reviewed By: quark
Subscribers: quark
Differential Revision: https://phab.mercurial-scm.org/D40
Summary: They no longer conflict, in fact we no longer use this config in this repo.
Reviewers: quark
Reviewed By: quark
Differential Revision: https://phab.mercurial-scm.org/D39
Summary:
As part of refactoring the main pushrebase function, let's add some more
comments and move some declarations closer to where they are used (or delete
them entirely if the initial declaration is not used).
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5340604
Signature: t1:5340604:1498751551:714faa78b8a3a01e165d7f5335484b89b7205995
Summary:
The pushrebase main function is too huge. Let's refactor it into smaller
functions so we can add treemanifest support safely later.
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5340597
Signature: t1:5340597:1498751423:8b7ddce604ff7c9bfeea897afecaa7e7cfa8beb4
Summary:
The pushrebase main function is too huge. Let's refactor it into smaller
functions so we can add treemanifest support safely later.
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5340592
Signature: t1:5340592:1498751349:cf7172ac9c603db0d18a189dc02394f2f0a547f3
Summary:
The pushrebase main function is too huge. Let's refactor it into smaller
functions so we can add treemanifest support safely later.
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5340586
Signature: t1:5340586:1498751296:f931fb170e0092222a125dc34e2f6ffac74dcfb7
Summary:
The pushrebase main function is too huge. Let's refactor it into smaller
functions so we can add treemanifest support safely later.
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5340576
Signature: t1:5340576:1498751222:7ba075ef49ea9d0ad368e6402fb9e61f0d1d0c94
Summary:
The pushrebase main function is too huge. Let's refactor it into smaller
functions so we can add treemanifest support safely later.
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5340571
Signature: t1:5340571:1498751172:4d926642c68611989ee439fbb0327d6e403cb555
Summary:
The pushrebase main function is too huge. Let's refactor it into smaller
functions so we can add treemanifest support safely later.
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5340565
Signature: t1:5340565:1498751154:81c70d75131977defdaa7f92ef0a3b2214b86381
Summary:
The pushrebase main function is too huge. Let's refactor it into smaller
functions so we can add treemanifest support safely later.
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5340559
Signature: t1:5340559:1498751124:9c4542e0bbd041fcc584a8eb1122269135fe92c8
Summary:
Eventually we will want to only send trees instead of flat manifests. Let's add
a config to disable sending them. For now it will still loop over the flat
manifests, since that's needed to discover which files to send, but it won't
actually send the flat manifests.
This makes it easier to test the pushrebase pack handling code in a future
patch.
Test Plan:
A future diff adds testing for pushing only tree packs and ensuring
they are received correctly.
Reviewers: #mercurial, mjpieters
Reviewed By: mjpieters
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5330005
Signature: t1:5330005:1499713117:7e52dd79ab6759717dbac8431d01ce2e55d1f683
Summary:
Now that packs are being sent across the wire during push, pushrebase needs to
handle those packs. It does so by adding them to the store list and replacing
the bundlerepo's data and history store with new ones that include the temporary
packs.
Test Plan: Future patch adds test around receiving trees in pushrebase.
Reviewers: #mercurial, mjpieters
Reviewed By: mjpieters
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5329893
Signature: t1:5329893:1499706143:44afeacf594a4f87cdc0d96c3f2700dbd4aadd75
Summary:
We want to enable pushing tree packs during pushrebase, and eventually we can
stop including flat manifest information entirely. The first step is to generate
the tree packs during push. A future patch will handle the incoming parts.
Test Plan: Ran the tests. A future patch adds pack file handling to test this
Reviewers: #mercurial, mjpieters
Reviewed By: mjpieters
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5329775
Signature: t1:5329775:1499705168:43ea77c9a5c85c09b40910e102535d89a0504a4d
Summary:
When using a bundle repo, the actual opener object is a readonly vfs instance
that wraps the real vfs. Since we store the manifest stores on the real vfs, we
need to look at it when necessary. This will be useful later when dealing with
bundle repos.
Test Plan:
Ran the tests. In a future diff I use the tree store with bundle
repos which verifies that this code path works.
Reviewers: #mercurial, ikostia
Reviewed By: ikostia
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5326250
Signature: t1:5326250:1499349167:8830999032090e8754f433f60ae9bb8ccc45b6cd
Summary:
A future patch will use this same logic to create pack parts, so let's make it
reusable.
Test Plan: Ran the tests
Reviewers: #mercurial, mitrandir
Reviewed By: mitrandir
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5326175
Signature: t1:5326175:1498751898:bf71081ab6309aa48c5ccadfd7e46d7d67588367
Summary:
In a future patch we will reuse pack part generation for another part type.
Let's refactor our existing tree group part type to be more generic. We can now
specify what category the pack belongs to (manifests, files, etc) and treecache
has become cache.
Since argument changes in bundle2 are breaking changes, we need to deploy this
as a new bundle2 part type first, then once all old clients are gone, we can
remove the old part type and rename it.
Test Plan: Ran the tests
Reviewers: #mercurial, mjpieters
Reviewed By: mjpieters
Subscribers: mitrandir, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5326081
Signature: t1:5326081:1499704314:59e53a6fb573d9b4594c5ac64e6c4b6f8301df6e
Summary:
This allows us to quickly switch back to the old behavior somehow by using
Chef overrides.
Test Plan: The file was copied from the old revision. Therefore not tested.
Reviewers: #mercurial, kulshrax
Reviewed By: kulshrax
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5392986
Signature: t1:5392986:1499722593:a895f94b3281ccba709fc219f927e8f6c770054a
Summary:
debuginhibit was removed since we no longer have a separate inhibit state.
smartlog hack about changing "o" to "x" was removed since "obsolete()"
revset is correct and the hack is unnecessary now.
directaccess was removed from tests since inhibit does not depend on it.
`- obsolete()` was added to some revsets to avoid divergence and other
surprises.
Use `inhibit.revive` API in infinitepush and reset to revive changesets
properly.
Remove various hacky code that mangle inhibit state in corner cases.
Most test changes are `o` changed to `x` in output since we draw
`obsolete()` state correctly now. `test-infinitepush-backup-remotefilelog.t`
change was because output could be `bytes/sec` instead of `KB/sec`.
Test Plan: arc unit
Reviewers: #mercurial, kulshrax
Reviewed By: kulshrax
Subscribers: kulshrax, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5391361
Signature: t1:5391361:1499722618:d3c1cf629f0c59ecdf1dfd5e653c1eb6176646b8
Summary:
The main feature we want is to be able to unobsolete an already obsoleted
changeset. The old inhibit code is causing all kinds of unsolvable weird
cases and is hard to deubg or maintain.
This patch rewrites it completely. Basically, we now require people to use
obsmarkers to "unobsolete" changesets. We treat cycles in obsstore as a
normal case and break the cycle using date information.
It should be a neat and correct solution until we want marker exchange.
A "revive" API was provided for other extensions to use.
Tests and other code changes will be fixed in a follow up.
Test Plan:
`test-inhibit.t` was rewritten to test the new features.
Other tests are broken and skipped for now. The next diff will fix them.
Reviewers: #mercurial, kulshrax
Reviewed By: kulshrax
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5391320
Signature: t1:5391320:1499716172:a946381421cc242411f5175ee3b7a3a0bc5a4f07