Summary:
Now that all our repos are treemanifest, let's enable the extension by
default in tests. Once we're certain no one needs it in production we'll also
make it the default in core Mercurial.
This diff includes a minor fix in treemanifest to be aware of always-enabled
extensions. It won't matter until we actually add treemanifest to the list of
default enabled extensions, but I caught this while testing things.
Reviewed By: ikostia
Differential Revision: D15030253
fbshipit-source-id: d8361f915928b6ad90665e6ed330c1df5c8d8d86
Summary:
It makes this method 25-30% faster (shaves off 250-300 ms).
Also it counts number of fetched rows correctly - fetchall method was
overriden, but looks like __iter__ method wasn't
Reviewed By: ikostia
Differential Revision: D14915472
fbshipit-source-id: 313695c1a83d05dac2fc801792226b6b64539cb5
Summary:
If the commits being pushrebased don't actually need to be rebased, pushrebase
will accept them like a normal push. In this case we shouldn't prevent them
from be changed to public commits on the client.
Track this by detecting whether we receive a changegroup part from the server.
If we do, only the commits that are marked as replaced with obsmarkers (if
enabled) can be marked as public.
Reviewed By: quark-zju
Differential Revision: D12944851
fbshipit-source-id: 44f8fc17b36397d949cba5d3e787fad813bab4ea
Summary:
This gives us more information about how large the hgsql operation is.
As we're here, move `sqlwriteunlock` to an earlier place so the logging is outside
the sql lock. Also document `unbundle` a bit so it's clear `repo.transaction()` only
takes sql lock in `unbundle` context.
Reviewed By: phillco
Differential Revision: D10056307
fbshipit-source-id: 5d3361b4044e6fcf01e60409ef1ecb34da34ccac
Summary:
Our hypothesis is that if the prepushrebase hooks take a significant amount of time, the repo state will get out date, causing hgsql to degrade under load.
This uses the previous test to simulate new commits coming in to the database while a single server is busy running prepushrebase hooks. The new code causes a second sync to occur just after running the hooks.
Reviewed By: quark-zju
Differential Revision: D9999683
fbshipit-source-id: 43d2390b476d090a66353555247c9a623386e75a
Summary:
This test case is a bit simpler given the problem -- there's no need for the holding push hook.
Instead, you just need a server that's missing a public commit. (Simulate an `hg strip` on one of the servers. `hg strip` isn't allowed, so create another repo with the extra public commit instead.)
Reviewed By: quark-zju
Differential Revision: D10043378
fbshipit-source-id: 532d8a2791abe5aaa6b6932747c7e0145202e8fe
Summary:
The fast path avoids recreating the bundlerepo in the critical section, which
is like a reliable 0.8s win.
See the docstring in stackpush.py for details. It does not replace all use cases
that the old code path supports. So the old path is preserved.
Since it's a drop-in replacement, make it the default.
Reviewed By: phillco
Differential Revision: D10023543
fbshipit-source-id: eaceb9ae5067ab9040aa10cc65170ae54abd3331
Summary: We want to add a test for this case before fixing it.
Reviewed By: quark-zju
Differential Revision: D10034448
fbshipit-source-id: 9244c57311d71a0bf1d75643caa31960a2f3519f