Commit Graph

1063 Commits

Author SHA1 Message Date
Jun Wu
5d5fedd10c tweakdefaults: fix check config test
Summary:
This fixes test-check-config-hg.t for tweakdefaults. And did some clean-up
for other minor issues.

I was trying to implement another feature (along with the clean-up) in
tweakdefaults and finally realized it's infeasible and drop the feature. But
the clean-up seems useful thus sent here.

Also change `cp -r` to `cp -R` to pass the usptream check-code test.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4253852

Signature: t1:4253852:1480613350:398e9b234fcc2360dcb8a3e3ad4e5bc5c4377857
2016-11-30 20:58:08 +00:00
Jun Wu
22742a1054 fastannotate: conditionally disable remotefilelog annotate prefetching
Summary:
If the annotate cache is up-to-date on the main branch, there is likely no need
to prefetch file contents, unless the user is annotating a side branch, which
requires a deeper integration between fastannotate and remotefilelog to just
prefetch the missing part correctly - I'll think about it later while this diff seems
good enough for common cases.

Test Plan: Added a new test

Reviewers: durham, #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4256370

Signature: t1:4256370:1480612767:c2e2a9225fb63ff36ffb579f9641851eb8cd8b39
2016-12-01 02:12:53 +00:00
Jun Wu
5a5a7662cd tests.t: clean up the shell code a bit
Summary:
Simplifies some shell code, namely `$extpath` is duplicated with `$TESTDIR/..`
so remove one of them.

Change `library.sh` (used by remotefilelog tests) to reuse `$HGRCPATH` instead
of overriding the environment variable, because it never gets restored and the
current code would assume `$HGRCPATH` to have `.hgrc` as its basename, which is
not always true.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4256506

Signature: t1:4256506:1480612191:73832c427b6562b9000a6df006226653157a7156
2016-12-01 02:06:57 +00:00
Jun Wu
786439a1c0 fastannotate: skip downloading linelog if the file history is short
Summary:
If the history of a file is short, it would be easier to just build the
linelog locally, instead of downloading it from the server.

This diff adds a "threshold" config option to make it possible for the client
to skip downloading linelogs.

A special case is, the file only has a single revision, where we can just avoid
all SSH connections - no fileservice peer, and no annotate peer.

Test Plan:
Add a test case for testing filelog repo.
Note: remotefilelog repo is not tested for this feature yet because there is
other planned changes related to remotefilelog.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4255483

Signature: t1:4255483:1480611801:4eb79c66eaf1fb5436d550f13c7a78d09b9a1ee2
2016-12-01 00:23:24 +00:00
Jun Wu
bdf8638228 fastannotate: allow the client to build up annotate cache on its own
Summary:
Previously fastannotate client will always fetch linelog from the server,
regardless of how long the history of a file is.

It actually makes sense for fastannotate client to build up the annotate
cache on its own, if, for example, the file only has one single revision,
where we don't even need any kind of SSH connection.

Test Plan: Run existing tests

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4254602

Signature: t1:4254602:1480611745:a44e70495771cb4f5c508ebb05fcfe8b0bb4d53f
2016-12-01 00:15:51 +00:00
Stanislau Hlebik
7dc24c7c82 infinitepush: backup local heads and bookmarks
Summary:
Backuping changesets is not enougn for restore. We also want to backup heads
and bookmarks to completely capture the state of the repo.

This diff is the first step in implementing this functionality. It adds new
bundle2 part which contains encoded dict (simple json encoding is used).
If value in the dict is empty then key is the bookmark pattern to delete.
If value is not empty then key is the bookmark name to save and value is a
node hash. The reason to put them in the same part is to make it possible to
delete and insert into indexapi in one transaction. It's also possible to pass
patterns to delete in part parameters but there is a bug in upstream hg that
limits parameters' size to 256 and we can potentially have longer bookmarks.

Local bookmarks are saved in infinitepush in the following form:
  infinitepush/backups/USERNAME/HOSTNAME/REPOROOT/bookmarks/LOCAL_BOOKMARK_NAME

Local heads are saved in infintiepush in the following form:
  infinitepush/backups/USERNAME/HOSTNAME/REPOROOTheads/HEAD_HASH

Hostname, username and repo root is necessary to distinguish different backups.

Test Plan: Run `test-infinitepush-*`

Reviewers: durham, rmcelroy, mitrandir, quark

Reviewed By: quark

Subscribers: quark, mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4245080

Tasks: 12479677

Signature: t1:4245080:1480518959:aa199d67fac4e2cd2f543651ff56fdd649dac729
2016-12-01 08:44:57 -08:00
Stanislau Hlebik
35b49c7546 infinitepush: set push defaults in debugbackup
Summary:
Not setting all default options may result in KeyValue errors.
For example pushvars extensions does
  repo._shellvars = opts['pushvars']

It results in failure if 'pushvars' is not set.
Let's fix it by explicitly setting default values.

Also we need to set `allow_anon` to remotenames because otherwise
debugbackup will fail.

Test Plan:
Run `test-infinitepush-*`

Run `hg debugbackup` inside fbsource make sure there were no failures

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4237230

Tasks: 12479677

Signature: t1:4237230:1480446802:36e0630ce3e60c947be47d83bbc6deff8624048e
2016-11-30 02:11:28 -08:00
Durham Goode
fe6f541ed8 remotefilelog: reuse deltabase when history is not available
Summary:
Previously, if there was no history available for a given revision, we would
just store the full text in the pack file. This patch makes it attempt to reuse
the existing delta base instead. This will be useful for repacking
treemanifests, since we currently don't have histpacks for them (we just delta
them efficiently when they are first added to the repo).

Test Plan: Ran tests

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D4240705
2016-11-29 15:37:58 -08:00
Durham Goode
a0dc16174d treemanifest: write deltas for trees
Summary:
Previously, when we wrote each tree entry into a pack file, it wasn't delta'd in
any way. This patch makes it store the delta against p1 in the pack file.

Testing in a large repo shows this reduces tree pack size by about 22x.

Test Plan:
Ran the tests. Did a pull in a large repo and saw the pack file was
22x smaller than before (and still usable).

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D4202088
2016-11-29 15:37:58 -08:00
Durham Goode
b179a3593c treemanifest: sort parent nodes for hash computation
Summary:
Core mercurial sorts p1 and p2 before computing the hash, so it's deterministic.
We need to do the same.

Test Plan: Ran the tests, saw a hash changed

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D4202063
2016-11-29 15:37:58 -08:00
Jun Wu
1c63f171b5 fastannotate: prefetch cache from server in fctx mode
Summary:
Previously, all prefetching work is done by the "fastannotate" command and
we may replace the "annotate" command with "fastannotate" and we run into
issues dealing with command line option differences.

Now that we have the "fctx" mode, do not redirect "annotate" to
"fastannotate" but wrap "annotate" in a lightweight way so it's responsible
for downloading the annotate cache.

Test Plan: Added a new test case

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4239607

Signature: t1:4239607:1480447754:a84268a9e64c678c1f275bc04c44a6f4138eafe6
2016-11-29 11:51:08 +00:00
Jun Wu
a3dc8b960d fastannotate: support replacing fctx.annotate directly
Summary:
Previously, I have performance concern about the signature of
`fctx.annotate`: it returns fctxs, not ideal for performance since my
initial goal is to get rid of reading revlogs in the best case. And letting
the low-level `fctx.annotate` have some side effects writing to the disk is
not that pretty.

Because of that, fastannotate had re-invent part of the formatter (also
optimized for performance somehow), and still cannot support all the
features the original annotate supports, namely, templates.

Now it makes sense to just replace `fctx.annotate` with a sub-optimal
implementation, just for the flexibility of the template support of the
original annotate command. We can use a "fake" or "lazy" fctx object to
minimal the performance impact when people only need to print changeset
nodes and line numbers - in which case we don't read revlog.

Actually, the hgweb support already did a similar thing - converting
fastannotate output to annotate output. So we can reuse some code.

The next planned steps are:

  - Make the original "annotate" command aware of fastannotate protocol, do
    the pre-download stuff (downloading cache files at `fctx.annotate` is
    possible but inefficient because of not being batched).
  - "fastannotate" command remains a separated command optimized for perf
    and provides extra features like "--deleted".

Because of the plan, the "commands" option does not make much sense -
"fastannotate" command will not replace "annotate" directly thus dropped
from the config interface. A new "modes" config option is added to control
how fastannotate works.

Test Plan: Modified existing tests

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4238998

Signature: t1:4238998:1480447679:c48e0e565663c086293265e104d9cf414d913aa7
2016-11-29 11:51:08 +00:00
Adam Simpkins
d3a77bd1f3 [infinitepush tests] don't hang forever if getdb.sh does not exist
Summary:
Fix the test to abort if getdb.sh does not exist (or otherwise fails), rather
than ignoring the failure and continuing to try and run the remainder of the
test anyway.  Otherwise mysql will hang forever.

The run-tests.py code unfortunately can't even kill the test properly in this
situation, so even with a --timeout argument it still hangs forever.

Test Plan:
Ran the tests without getdb.sh, and confirmed it failed quickly instead of
hanging.

Reviewers: durham, rmcelroy, stash

Reviewed By: stash

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4242014

Signature: t1:4242014:1480408476:8e8765ca4567a0436fba0778938f935f87287747
2016-11-29 10:26:27 -08:00
Jun Wu
f08e17d3ed testedwith: change testedwith to "ships-with-fb-hgext"
Summary:
Using `testedwith = 'internal'` is not a good habit [1]. Having it
auto-updated in batch would also introduce a lot of churn. This diff makes
them "ships-with-fb-hgext". If we do want to fill the ideal "testedwith"
information, we could put it in a centric place, like a "fbtestedwith"
extension rewriting those "ships-with-fb-hgext" on the fly.

Maybe having in-repo tags for tested Mercurial releases is also a good idea.

[1]: www.mercurial-scm.org/repo/hg/rev/2af1014c2534

Test Plan: `arc lint`

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4244689

Signature: t1:4244689:1480440027:3dc18d017b48beba1176fbfd120351889259eb4b
2016-11-29 13:24:07 +00:00
Martijn Pieters
69898cdd44 testing: insert missing space
Summary: Attack of the trivial missing space.

Test Plan: Run run-tests.py -l test-sqldirstate-shelve.t to see it pass

Reviewers: rmcelroy, simonfar, quark, jeroenv

Reviewed By: quark, jeroenv

Subscribers: mjpieters, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D4244663

Signature: t1:4244663:1480439601:3ab7e306e618f7e6e2372046f00e85cf1eb3826d
2016-11-29 09:15:29 -08:00
Jun Wu
c030cc61cb tweakdefaults: do not use template for annotate if unnecessary (BC)
Summary:
Template lacks of the "padding" feature. There is a hard-coded 13-char wide
username, 5-char wide line number, which does not look well if the usernames
are too long or too short.

This patch restores the original annotate format which is different from
the current behavior. For example, given "-uc", it shows "user node" instead
of "node:user". It also tries to make the template version as close as the
non-template one, by adjusting the order, changing separators, and making
"-c" optional (could be hidden from the output).

Test Plan: Modified existing tests

Reviewers: #sourcecontrol, ikostia

Reviewed By: ikostia

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4243830

Signature: t1:4243830:1480437984:1c679c9db516bab905d027061326a7a1524922c6
2016-11-29 11:18:00 +00:00
Martijn Pieters
14dc38a7ba testing: adjust for new home for cmdutil.service
Summary: See rd9d8d78e in the hg repository; cmdutil.service moved to server.runservice

Test Plan: Run test-fbconduit.t and observe it passing once more.

Reviewers: simonfar, rmcelroy, quark

Reviewed By: quark

Subscribers: mjpieters, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D4244268

Signature: t1:4244268:1480432981:8e06beadba912294e6d1a01d93b13848cb16a096
2016-11-29 07:51:16 -08:00
Martijn Pieters
b302fcecbc testing: fix spacing for merge conflict markers
Summary: Yay for arbitrary single space changes.

Test Plan: Run the two affected tests to show they now pass again.

Reviewers: simonfar, rmcelroy, quark, stash

Reviewed By: stash

Subscribers: mjpieters, #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D4244213

Signature: t1:4244213:1480431919:ba4837619652023005faeb00a93a351c7ca0411a
2016-11-29 07:23:32 -08:00
Jun Wu
c7946d4233 fastannotate: auto rebuild broken cache server-side via wireprotocol
Summary:
D4233433 changed commands to rebuild the broken cache but missed
wireprotocol. Let's do it for wireprotocol as well.

Test Plan: Added a new test

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4237855

Signature: t1:4237855:1480421375:d5715d61a3c66ec8be5a6a80041ee6204e5e4378
2016-11-29 12:14:30 +00:00
Arun Kulshreshtha
73155a224e allowunstable: add allowunstable extension
Summary: Currently, the reason we can't perform operations such as histedit, split, and fold in the middle of a stack is that we do not have the experimental.evolution=allowunstable option enabled. It turns out all of these commands will do the "right thing" if this option is enabled. However, since we are uncertain of the ramifications of enabling this option globally, this new extension turns the option on for the duration of split, fold, and histedit, allowing those commands to be used in the middle of a stack without config changes.

Test Plan: See unit tests. Basically, create a stack and then attempt to use split, fold, or histedit somewhere in the middle.

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4209315

Tasks: 14598405

Signature: t1:4209315:1479744780:811e8bef02149a055376c0f105ac2d389dd60970
2016-11-28 10:43:34 -08:00
Jun Wu
db7dd53ae9 fastannotate: skip downloading cache if client's master is behind
Summary:
It's common that the client's "master" ("main branch") falls behind the
server's, in which case the "is-up-to-date" check will fail and trigger a
re-download while it's unnecessary. Add some checks to avoid downloading
the cache for the client in this case.

Test Plan: Added a test

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4233534

Signature: t1:4233534:1480330716:db995d0fa5c6a2371894fc2a7871277da23608a9
2016-11-25 22:06:18 +00:00
Jun Wu
b4efcc56cf fastannotate: deal with corrupted files gracefully
Summary:
Previously, fastannotate's annotatecontext would delete individual cache
files (linelog and revmap) if it meets Exception. While the "fastannotate"
command has some retry logic, "debugbuildannotatecache" doesn't, which means
users have to run "debugbuildannotatecache" O(number-of-corrupted-files)
times to unblock. And "fastannotate" does not handle AssertionError which
could be seen as "linelog is corrupted" nicely - it crashes without retry.

Addressing all the above issues by replacing the "assert" to
"CorruptedFileError", catching them and retry properly.

Test Plan: Added a new test.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4233433

Signature: t1:4233433:1480330548:618e80762af2209784ad72ad0658f649b050a080
2016-11-25 19:49:13 +00:00
Jun Wu
d203784d68 pyflakes: fix all pyflakes issues
Summary: As the title.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash, rmcelroy

Reviewed By: stash, rmcelroy

Subscribers: rmcelroy, stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4232321

Signature: t1:4232321:1480067588:54e91ece8fa6b5ff13b3ebc9279217c76bf96a24
2016-11-25 00:23:21 +00:00
Jun Wu
311a3fc653 test-fastannotate-hg: fix compatibility with upstream
Summary:
The recent bdiff behavior change affects us. Document why and update the test
so it works with both the old and new (less optimal imo) bdiff behavior.

Test Plan: Updated the test

Reviewers: #sourcecontrol, simonfar, rmcelroy

Reviewed By: simonfar, rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4231966

Signature: t1:4231966:1480011763:d116799ded3514d644e4b80296ffc71a8d712a43
2016-11-24 18:07:32 +00:00
Stanislau Hlebik
024d254256 infinitepush: increase test timeout and add logging
Summary:
Tests failed on mac. My guess is that timeout is too low.
Let's increase it to 10 seconds (it's fine because we want wait for 10 sec
if debugbackup finishes faster).

Also let's add logging

Test Plan: Run `test-infinitepush-*`

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4213330

Tasks: 12479677
2016-11-21 08:25:10 -08:00
Stanislau Hlebik
24dc1a5878 infinitepush: fix tests
Summary:
`backup` was renamed to `debugbackup` a few commits ago.

Rename it there too

Test Plan: Run `test-infinitepush-*`

Reviewers: #sourcecontrol, andrasbelo

Reviewed By: andrasbelo

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4212539

Tasks: 12479677

Signature: t1:4212539:1479721307:1ac25c7dc8951d655910e2b0c41b2c9555353f74
2016-11-21 01:44:54 -08:00
Stanislau Hlebik
0a536f70fd infinitepush: add background backup
Summary:
`hg backup --background` will be used as a `txnclose` hook to backup all of the
local commits to infinitepush.

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4175953

Tasks: 12479677

Signature: t1:4175953:1479145307:e698903b519361b376f6e182db7c49869c992617
2016-11-21 00:53:37 -08:00
Stanislau Hlebik
565b70f23e infinitepush: support bundle with many heads
Summary:
During `hg backup` bundle with many heads may be pushed. Let's support it too.
Many heads bundle is not allowed only when we are pushing it with `--to`
because in this case we don't know the node for the bookmark.

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4175280

Tasks: 12479677

Signature: t1:4175280:1479231056:fb0c47a7752319d77a6cfc83a29c57e9e2dced16
2016-11-21 00:48:09 -08:00
Durham Goode
06d00be6b9 remotefilelog: make remotefilelog sparse test more robust
Summary:
We were seeing some flakiness with remotefilelog prefetching in the sparse
integration test. Let's make the test more explicit by having it explicitly
prefetch exactly the files it cares about, so we shouldn't see any more
flakiness.

Also have the test refer to the in-repo sparse extension instead of the system
one, now that remotefilelog is in the same repo as sparse.

Test Plan: Ran it

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4192463

Signature: t1:4192463:1479334442:f91a99a4a026a0f71f9519155185fb484d8d68ec
2016-11-16 14:15:35 -08:00
Durham Goode
dcc5006448 check: update check code override
For some reason the .cpp files now show up. They should probably be ignored,
same as the .hg files already are.
2016-11-16 13:51:48 -08:00
Durham Goode
3ad41b8578 treemanifest: limit autocreatetrees to commits on master
Summary:
Creating a tree for a commit whose parent is not already a tree is expensive.
Let's optimize the autocreatetrees option (which converts manifests to trees
during pull) to only create trees if A) the parent is already a tree, or B) the
parent is master. This way we only pay the expensive part once. It also means
that as new branches fork off master, they will be trees too, since all commits
in the new branch will meet criteria (A).

Test Plan:
Ran hg pull in a large repo over a large pull with 40 different
branches and verified it only paused for the initial master commit.

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4129010

Signature: t1:4129010:1478260239:1698ada4e3c6a38ab77a94317e75daee4812276f
2016-11-16 13:51:48 -08:00
Stanislau Hlebik
fd8f0625ef infinitepush: add hg backup command
Summary:
Backups all new non-extinct [1] commits to bundlestore.

When it is called for the first time `hg backup` will backup all draft
visible commits. Next backups will save only new commits since the last
backup (it is recorded in `.hg/store/infinitepushbackuptip`[2]).

It's an initial implementation. Later the following features will be added:
1) It will be called automatically whenever user creates or strips commits
or even creates or deletes bookmarks
2) It will also save all local bookmarks and all local heads
(probably only visible).

Note: calling `pushcmd` directly does not set default values for opts. That means that `--to` will be None and `_scratchbranchmatcher` will throw exception. Let's add a check to ensure that `--to` is never None.

[1] I also want to backup extinct commits (i.e. obsolete invisible commits).
But it will require bigger changes in discovery algorithm, so I'd leave it
for later.
[2] The name is a bit verbose. But I want to keep `infinitepush` part to make
it easier to debug problems.

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4147651

Tasks: 12479677

Signature: t1:4147651:1479229440:3eb38880c14f18e9a2fb4eaba44bedf079bca506
2016-11-16 02:13:17 -08:00
Arun Kulshreshtha
97ed6a8afa fbamend: add new implementations of hg previous and hg next
Summary:
This diff replaces the `hg previous` and `hg next` commands from the evolve extension with new implementations. The new commands have several features not found in evolve:

  - Users can now move by multiple commits at a time. Example: `hg next 3`
  - Users can move all the way to the top or bottom of the current stack with the following new flags: `hg next --top` and `hg prev --bottom`
  - Users can rebase child commits on demand with `hg next --rebase`. This flag can be combined with the others to specify exactly how many commits to rebase. Example: `hg next --rebase 4` (move 4 commits up the stack, rebasing as needed) `hg next --rebase --top` (rebase all the way to the top of the stack)
  - When a user lands on a particular commit, if there is a bookmark it will be automatically activated. The user can also move to the previous or next commit with a bookmark with the `--bookmark` flag.
  - The user can pass the `--newest` flag to resolve ambiguity in situations where history is nonlinear. With the flag the command will always choose the commit with the higher rev number at each step.
  - The commands now show commit hashes instead of rev numbers when showing the user what commit they landed on.

Apologies in advance for the large diff. I've tried splitting it up as best as I could, but the unit tests introduced here significantly increase the size. I figured the unit tests should be part of this diff instead of being added in a separate one. This diff is almost entirely new code, so I hope that helps a little bit. Let me know if there's a better way to split this up.

Test Plan: See the new unit tests for an extensive look at the new commands in action. Essentially, all of the features mentioned above should work as expected.

Reviewers: quark, #sourcecontrol, durham

Reviewed By: durham

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4121778

Tasks: 14119420

Signature: t1:4121778:1478774243:a7131593222bc329f541e77e1d3ebd8222e47e79
2016-11-15 18:46:56 -08:00
Jun Wu
127bd207b5 linkrevcache: wrap _adjustlinkrev to take advantage of the linkrev database
Summary:
Wrap `_adjustlinkrev` so it first tries the possibly faster path (linkrev
database). Then fallback to the original linkrev algorithm.

Also fixes an issue that `{k : v ...}` syntax does not work in Python 2.6.

Test Plan: Added a very simple test

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: durham, stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4143315

Signature: t1:4143315:1479234110:07e87c7584e0cfd627b3f9e2fae1a2a34beb390f
2016-11-14 18:04:29 +00:00
Wez Furlong
9b5499d572 phabdiff: don't require a space when parsing the Tasks field
Summary: Allow for any number of spaces after the colon

Test Plan: arc unit

Reviewers: #sourcecontrol

Subscribers: markisaa

Differential Revision: https://phabricator.intern.facebook.com/D4179619

Tasks: 14532985
2016-11-15 12:28:21 -08:00
Jun Wu
6860161db4 linkrevcache: add a command to verify the linkrev database
Summary:
Adds a `debugverifylinkrevcache` to verify the linkrevs in the database,
against the vanilla adjustlinkrev algorithm.

Test Plan: A simple test is added. The code is also manually tested on my hg repo.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4143240

Signature: t1:4143240:1479217639:bb9b5814b405b9e60a0722b01fc2c918c5a24b35
2016-11-14 18:04:29 +00:00
Jun Wu
dd91b969e6 linkrevcache: implement the database
Summary:
This diff implements some simple linkrev database classes which uses dbm to
store linkrev candidates.

Why not sqlite? sqlite's insertion seems to be much slower with index being
present, so we have to do manual buffering and do insertion in batch, not to
say parsing SQL itself can introduce overhead. If we really want sqlite for
some reason (i.e. its support for concurrent writer and reader seems to be
better), we can still implement it as a dbm engine.

Test Plan: A test will be added when there is something usable.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: jsgf, stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4143119

Signature: t1:4143119:1479131795:5f6e368ebd1798b874cec28ac05b137eb3bea86e
2016-11-14 18:03:15 +00:00
Arun Kulshreshtha
1c6b719130 fbamend: make restack start from bottom of the stack
Summary:
Previously, `hg rebase --restack` would find the closest stable base commit with unstable descendants on its precursors, and begin the restack operation from this commit. What this meant is that it would not resolve all instability in the current stack -- only instability above the first instance of instability detected by searching downward from the current changeset.

Given that we will soon be able to perform local fixup operations with something like `hg next --rebase --top`, it no longer makes sense to keep `hg rebase --restack` as a local operation. Instead, it should resolve all instability in the current stack. This diff changes the behavior to always begin restacking from the bottom of the stack.

One thing to note about this diff is that it completely removes divergence detection from restack. This is because in the process of making this change, I discovered a bug in the original version of restack whereby divergence would only be detected if it involved a precursor of the base changeset. This is because the check was only happening in _latest(), which after several rounds of changes to this code, was only being used in _findstablebase(). In all other cases, the implicit behavior was that unstable children are rebased onto the newest visible successor of their parent, as determined by rev number.

It turns out that altering this behavior to skip rebasing unstable descendants of divergent changesets is nontrivial, and furthermore, one could argue that the current behavior is actually desirable. (Furthermore, this change removes the O(n^2) behavior from _latest().) Regardless of whether it is desirable or not, this diff makes that implicit behavior explicit, and modifies the tests to explicitly check for the new behavior. If we do decide to skip divergent changesets, this will need to happen in another diff as it will require some restructuring of the restack target finding logic.

Test Plan:
See unit tests.

1. Create a stack of commits.
2. Pick several commits in the stack, and amend them without the `--rebase` flag, thereby leaving their respective descendants unrebased.
3. Update to the top of the stack.
4. Run `hg rebase --restack`. All instability will be resolved.

Reviewers: quark, #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4144899

Tasks: 14041544

Signature: t1:4144899:1478781779:1a94dbc1c6b69d7116f1d40593a83684ed44942a
2016-11-10 11:25:19 -08:00
Stanislau Hlebik
1b8b5987b2 infinitepush: overwrite bundle for old revs
Summary:
Previously if bundle has contained nodes that are already saved in bundlestore
then we wouldn't update bundleid value for these nodes.
That means that we can never delete a bundle because there will always be a
node that points to it.

I suggest to always update bundleid value for all nodes in the bundle.

Test Plan: Run `test-infinitepush-*`

Reviewers: durham, mitrandir, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4130662

Tasks: 12479677

Signature: t1:4130662:1478565392:682fe39c5832d5edc84c84541f0ba6c1f2e1daf8
2016-11-08 02:27:25 -08:00
Jun Wu
77d215b481 remotefilelog: check file existence in _revertprefetch
Summary: This is to address a crash report: P56804194.

Test Plan: `arc unit`

Reviewers: durham, #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4141002

Signature: t1:4141002:1478547571:2a06a48c3687ce91f6a52b59ddc01a17466782a8
2016-11-07 18:30:10 +00:00
Jun Wu
855af710bb fastannotate: support remotefilelog
Summary:
In order to support remotefilelog, do not construct
`mercurial.context.context` object directly. This reverts a previous attempt
to use the fastest manifest look up - `ctx[path]` actually seems good
enough.

A minor change is made in `protocol.py` to ignore failed requests.

Test Plan: Run existing tests

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4127025

Signature: t1:4127025:1478541481:c15477332582e2c9b22e2732e9e76bf37b5fba74
2016-11-03 20:55:16 +00:00
Stanislau Hlebik
e61c86753e infinitepush: add tests for sqlindexapi
Test Plan: Run `test-infinitepush-*`

Reviewers: durham, mitrandir, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4124846

Tasks: 12479677

Signature: t1:4124846:1478537233:afb783ba195fd8f0d6e55d0fb8666220705575cd
2016-11-07 12:35:34 -08:00
Arun Kulshreshtha
cdfe81c7d3 fbamend: change test for restack to use globs for rev numbers
Summary: One of the new features I'm adding to `hg previous` and `hg next` is replacing the rev numbers with commit hashes, since these are more familiar and intuitive to users. As a first step, update this test to glob out the rev numbers.

Test Plan: Test still passes.

Reviewers: durham, quark, #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4121748

Tasks: 14119420

Signature: t1:4121748:1478162085:c7bc64f133dcfd7af67f349a10c0e0a587a8aa19
2016-11-03 11:11:37 -07:00
Jun Wu
5f83e80668 fastannotate: add a debug command to update cache
Summary:
The `debugbuildannotatecache` is to pre-populate the annotate cache
server-side, or pre-fetch the annotate cache client-side.

To avoid import cycle, `cmdtable` is moved from `__init__.py` to
`commands.py`.

Test Plan: Modified existing tests.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4103932

Signature: t1:4103932:1478094621:e82192a12fe4b0b3ac732dbe4c127a2e93fc6b4c
2016-11-01 15:10:21 +00:00
Jun Wu
93c918c92e absorb: fix an issue where changesets do not get deleted correctly
Summary:
The old code didn't test if the new commit will become empty correctly, if its
"memworkingcopy" contains changes inherited from its parent. This diff fixes
the problem.

Thanks @stash for discovering the issue!

Test Plan: Added a test case for this issue. Make sure the old code cannot pass.

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: mjpieters, stash

Differential Revision: https://phabricator.intern.facebook.com/D4113438

Signature: t1:4113438:1478077373:194104b902bdfe6827858c2916a7f3f0cd83ee6c
2016-11-01 21:16:13 +00:00
Jun Wu
21bbbebffe fastannotate: implement downloading logic for clients
Summary:
This diff makes the client `fastannotate.client=1`  download
linelogs and revmaps from the server on demand.

Test Plan: Added a new test

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4103929

Signature: t1:4103929:1477997846:608cf58c090806dafa21ae01feab90a6552100fc
2016-10-29 23:44:34 +01:00
Jun Wu
57890ff99f fastannotate: add a method to quickly get the last node of the revmap
Summary:
Previously, to get changeset hashes in the revmap, we have to construct
the `revmap` object, which reads all content of a revmap.

In the following patches, we want to quickly get the last hash of the
revmap to test if the linelog / revmap is up-to-date or not. This patch
adds a method to do so.

Test Plan: Modified existing tests.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4103898

Signature: t1:4103898:1477988583:15869dfe9028068563b03d1f06d2337562049751
2016-10-29 19:19:18 +01:00
Stanislau Hlebik
f4f6b2411a infinitepush: inhibit pulled revs
Summary:
Pulling scratch commits that were stripped before results in
abort: 00changelog.i@c153241c1ea22cbce8a229dccdf7f46de827d962: filtered node!

The reason is that upstream pull does
checkout = str(repo.changelog.rev(checkout))

and it fails if revision is filtered.
I suggest to inhibit filtered revisions that are present in the local repo.
It makes sense because if user tries to pull scratch branch he or she
probably expects to see them in the repo even though these revisions were
stripped before.

Also we can avoid doing any pull if all revisions are present in the repo.
I decided not to do this because it complicates code (for example,
we need to ensure that bookmarks are updated correctly) and it doesn't give
any significant benefits.

Test Plan: arc unit

Reviewers: durham, rmcelroy, mitrandir

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4103869

Tasks: 12479677
2016-11-01 03:42:26 -07:00
Stanislau Hlebik
cf1214923e infinitepush: disable pushes to svn repo
Summary:
During infinitepush test we noticed that `hg push -r . --to SCRATCHBRANCH`
fails with stack trace in www. This is expected because infinitepush doesn't work
with svn servers. But it's better to print a nice error message instead of stack trace.

Test Plan:
Try to push to scratch bookmark from www without specifying path:
stash@dev1918 ~/www (344c6bf) $ hg push -r . --to hack/durhamstash
abort: infinite push does not work with svn repo
(Did you forget to `hg push default`?)
[Exit: 255]

Got nice error instead of stack trace.

Push to scratch bookmark from www with path specified works fine

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4103745

Tasks: 12479677

Signature: t1:4103745:1477950448:14b5ae8484f3e65cb88c83b2628f73f3a670b1a0
2016-11-01 01:50:34 -07:00
Stanislau Hlebik
563a57128e infinitepush: add mysql waittimeout server-side
Summary:
Saw a few timeout errors during infinitepush test.
Previous timeout was 10 secs, it makes sense to increase it.

There was a unit test failures because of the config options.
So this diff also adds missing config docs and copyrights headers.

Test Plan: Build the package, install it locally and run integrationtests

Reviewers: durham, rmcelroy, mitrandir, andrasbelo

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4103689

Tasks: 12479677
2016-11-01 01:44:38 -07:00
Durham Goode
201d5f2149 remotefilelog: fix getchangegroup signature
Summary:
The upstream getchangegroup function changed back in August and our attempt at
fixing it here did not correclty handle the case where remotefilelog is loaded
but not enabled for this repository.

This patches fixes the signature, and makes our wrapping more resitant to future
signature changes.

Test Plan: Added a test.

Reviewers: #mercurial, jsgf

Reviewed By: jsgf

Subscribers: jsgf, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4099519

Signature: t1:4099519:1477698801:adcb406f1908c4f7e508e5f99e126f383c6f2574
2016-10-31 13:40:33 -07:00
Durham Goode
922c03630a remotefilelog: make test less flaky
Summary:
The stderr and stdout in this test has a flaky ordering issue when run in
parallel with other tests. Let's just eat the stderr since all we care about is
the stdout message from the remote and the error code.

Test Plan: Ran it

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4106366

Signature: t1:4106366:1477946237:2e188a1abde93a06ec97d99c237851955a23f20a
2016-10-31 13:39:17 -07:00
Durham Goode
8aad6cabdd tests: glob away system specific output
ls -l prints a 'total #' line which apparently is system specific. So let's make
it a glob.
2016-10-28 16:50:27 -07:00
Durham Goode
df79de6e69 treemanifest: add test for commit producing trees
Summary: Adds a test for verifying that hg commit adds a tree pack to local storage.

Test Plan: Ran it

Reviewers: #mercurial, zamsden

Reviewed By: zamsden

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4082915

Signature: t1:4082915:1477590191:6637b9ab0fdad27a7d4933934168b57620dee235
2016-10-27 15:25:34 -07:00
Durham Goode
7ae5ac490d treemanifest: add test for autocreatetrees
Summary:
Adds a simple test for checking that trees are created during pull when
autocreatetrees is enabled.

Test Plan: Ran it

Reviewers: #mercurial, zamsden

Reviewed By: zamsden

Subscribers: zamsden, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4082871

Signature: t1:4082871:1477590276:09e594f4b87628bae8654ffdfc0bba18beb7ccad
2016-10-27 15:25:32 -07:00
Durham Goode
7f711f8f84 test: rename ctreemanifest test
Summary:
Since ctreemanifest is no longer in remotefilelog, let's rename the test to drop
the remotefilelog reference.

Test Plan: Ran it and check code

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4082288

Signature: t1:4082288:1477506197:a1f591b98a087ad838fef5cc0a17e8352b6bc6e3
2016-10-27 15:25:29 -07:00
Jun Wu
3339323a30 fastannotate: use fastannotate to run test-annotate.t
Summary:
There are some minor differences between the two annotate algorithm.
Both are reasonable in theory. The differences are explained in the test.

The `badfn` change is needed to make exit code correct.

Test Plan: Run the modified test

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4060263

Signature: t1:4060263:1477401942:64a08d2fa28ea0fa9b54fa0f0ea48ca489c308df
2016-10-21 21:06:20 +01:00
Jun Wu
15a2d8e888 annotate: backport test-annotate.t from upstream
Summary:
Now fastannotate have almost all the features the vanilla annotate has.
Backport the test case from upstream commit 89ed2b82ff93.

Test Plan: Will modify this test to use fastannotate in the next patch

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4060203

Signature: t1:4060203:1477402099:4a866ca7a7fbab086a1f3f86c5f4c7dc16744165
2016-10-21 20:56:32 +01:00
Jun Wu
87a71c3a2f fastannotate: support -r wdir()
Summary:
Although `wdir()` is an undocumented feature, it exists in upstream annotate
tests. Let's support it so it is more similar to the vanilla annotate.

Test Plan: Added a new test

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4060169

Signature: t1:4060169:1477402083:021cae092e695a72fff65cd07640c9f7984b2a60
2016-10-21 20:50:37 +01:00
Jun Wu
a91f5d53ac fastannotate: add a JSON formatter
Summary: The vanilla annotate command supports `-Tjson`. Let's implement it as well.

Test Plan: Added a new test

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4059577

Signature: t1:4059577:1477074802:09b0b3ea0769d480eb3a2e42308636ff2b8d40d2
2016-10-21 19:28:30 +01:00
Stanislau Hlebik
005a9ace91 infinitepush: bookmarks remote-list
Summary:
Add an option to list remote and scratch bookmarks by pattern.
Only very simple pattern is allowed: either the literal string
or a prefix (like 'scratch/stash/*'). It was made intentionally
to make sure that pattern requests are fast in mysql.

Mysql tests will be added to the integration tests

Test Plan: Run `test-infinitepush-*`

Reviewers: mitrandir, andrasbelo, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4074409

Tasks: 12479677

Signature: t1:4074409:1477500968:e91cd2505d61a2f1db30c7f00cdcfc949e433507
2016-10-26 10:03:35 -07:00
Stanislau Hlebik
6086c2f0cb infinitepush fix: pass dest to the orig
Test Plan: Run `test-infinitepush-*`

Reviewers: durham, mitrandir, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4081739

Tasks: 12479677

Signature: t1:4081739:1477498757:7e105e400fd99e0a6dcb80165a2ed9d9c6d1a548
2016-10-26 09:29:23 -07:00
Arun Kulshreshtha
5ae81e0470 smartlog: show inhibited obsolete nodes as x's
Summary: Make nodes with visible successors render as 'x' in hg smartlog output. Previously these nodes were rendered as 'o' because the inhibit extension made them appear to be non-obsolete.

Test Plan:
1. Create a stack of commits.
2. Amend a commit in the middle of the stack.
3. Run `hg sl`, observe that although the precursor of the amended commit renders as an 'x'.
4. Run `hg unamend`, then update to a different commit (so the precursor is not the current commit and thus not rendered as '@').
5. Observe that the precursor now appears as 'o' again because it has no visible successors.

Reviewers: #sourcecontrol, quark, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4071058

Tasks: 13652083

Signature: t1:4071058:1477434742:f57bf5a07b6b9497472deb8445f5fc01a5379f8c
2016-10-25 17:22:22 -07:00
Durham Goode
f758ad8c4c treemanifest: fix bug in NewTreeIterator walk
Summary:
The new tree walk did not check if the compare entry was actually a directory
before traversing it. This caused problems for commits that deleted a file and
replaced it with a directory, since it attempted to recurse down the file, which
had no treemanifest.

Test Plan: Added a test

Reviewers: simpkins, #mercurial, zamsden, rmcelroy

Reviewed By: rmcelroy

Subscribers: net-systems-diffs@, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4055678

Signature: t1:4055678:1477430721:ec679afcb4ff6ea2bbf44927e04f2bfcdee8cc03
2016-10-25 14:39:52 -07:00
Arun Kulshreshtha
0943b06da1 fbamend: add config option to use restack instead of preamend bookmark
Summary: Added a configuration option to make fbamend use the functionality from `hg rebase --restack` instead of the previous bookmark-based approach in `hg amend`.

Test Plan: Enable the `fbamend.userestack` config option and attempt to use `hg amend`, `hg amend --fixup`, and `hg amend --rebase`. These should all work just as before, except that `hg amend` will no longer create .preamend bookmarks.

Reviewers: #sourcecontrol, quark, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4062925

Tasks: 13839177

Signature: t1:4062925:1477359251:0ece10599987d6b8e39384e9530866ffb2e50e58
2016-10-25 11:10:47 -07:00
Simon Farnsworth
0bf66aea6a test-remotefilelog-sparse.t: can't always transfer data in 0.0 seconds
Summary: This test fails because Macs sometimes take 0.1 seconds, not the Linux 0.0 seconds, to do the transfer. Give them some flexibility

Test Plan: Run test on devserver and laptop

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4074654

Signature: t1:4074654:1477411436:b18bde2e35025c5d9801e15ff0fd5c07261a7d40
2016-10-25 09:24:57 -07:00
Simon Farnsworth
00a1b105d4 test-perftweaks.t: make OS X compatible
Summary: Make the test pass on OS X with conditionals on the "only works on case-insensitive FS" block and a wider regex for output

Test Plan: Run on devserver and laptop

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4074471

Signature: t1:4074471:1477410666:f0fb89060fd7c78e246e0772c4509334090c2d83
2016-10-25 09:03:15 -07:00
Simon Farnsworth
44e7d4e8b5 xargs on OS X does not return 123
Summary: On Mac OS X, xargs only ever returns 1 for failure. On Linux, it returns 123 for "xargs succeeded, but the command(s) it invoked did not". Make the grep test pass on OS X.

Test Plan: Run the tests on devserver, see them pass. Try again on laptop, see them continue to pass

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4074442

Signature: t1:4074442:1477407528:809b64f7478ff0df0d2a39b745a2b9602d5f22ee
2016-10-25 08:09:23 -07:00
Simon Farnsworth
2a4f76ea61 Don't run the memcache test on Macs.
Summary: We don't use memcache on Macs, so don't test it

Test Plan:
Run on my devserver and my laptop, confirm that it passes in both places.

Use --debug to ensure that the right commands are run on each host

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4069194

Signature: t1:4069194:1477334983:bc18f8dc9487f2aca3874d22191cb8bc0a44295d
2016-10-24 11:49:54 -07:00
Simon Farnsworth
7e461f256a Fix test-infinitepush-remotenames.t
Summary: Trivially broken, trivially fixed

Test Plan: Run on my devserver

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4069146

Signature: t1:4069146:1477334534:a7973dd14d6de3698d47bbd1de46ca852b6e4683
2016-10-24 11:48:51 -07:00
Stanislau Hlebik
4b57129d05 infinitepush: fix pyflakes
Test Plan: arc unit

Reviewers: quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4067238

Signature: t1:4067238:1477299857:16eff692dc9ad40322b1d735d1de4552f7deee8c
2016-10-24 06:08:56 -07:00
Stanislau Hlebik
0ead2362af infinitepush: fix tests
Summary:
Tests were broken because there were internal API changes in
upstream mercurial:

1) `hg book` outputs nothing instead of `no bookmarks set`
2) `getbundle` function was removed, new `getbundlechunks` function was added

Test Plan: Run `test-infinitepush-*` and run integration tests

Reviewers: durham, rmcelroy, mitrandir, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4067223

Tasks: 14035546

Signature: t1:4067223:1477305056:f705764ff3cdd70fcc61e677ccb184870077ec86
2016-10-24 06:07:35 -07:00
Arun Kulshreshtha
1d80ea88ea fbamend: remove unused variables from unamend
Summary: These variables were unused, causing test-check-pyflakes.t to fail whenever fbamend.py is modified in a way that changes the line numbers of those assignments.

Test Plan: Unit tests still pass (except test-fbamend.t, which fails for reasons unrelated to this change)

Reviewers: durham, #sourcecontrol, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4055599

Signature: t1:4055599:1477049676:84ec9a1036bb6d6873d497caed9feff701a8169b
2016-10-21 12:32:03 -07:00
Durham Goode
4235752853 remotefilelog: rename getpackpath to getcachepackpath
Summary:
In a future diff we will be introducing packs into .hg/store, so we need to
differentiate between cache packs and local packs. This patch renames
getpackpath to getcachepackpath. A future diff will add getlocalpackpath.

This exposed a pyflakes error, so we fix that too.

Test Plan: Ran the tests

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4055815

Signature: t1:4055815:1477059415:e0221557bbeec6701820c826f00390d3a71cd2d3
2016-10-21 11:02:20 -07:00
Durham Goode
148717dbde fastmanifest: fix some check code errors
Summary:
This fixes some (but not all) of the fastmanifest errors. The remaining ones are
from an import * and one that will require slightly more refactoring to fix.

Test Plan: Ran the tests

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4055633

Signature: t1:4055633:1477050763:09e758b1bd72b18799cdabf510eb0b2332077833
2016-10-21 11:02:11 -07:00
Durham Goode
f43ba75915 remotefilelog: fix pyflakes and module import errors
Summary:
This fixes all the pyflaks and module errors for the main remotefilelog
code base.

Test Plan: ./run-tests.py test-check* test-remotefilelog*

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4055537

Signature: t1:4055537:1477049663:ee904d311d17d3659e055e2c109c68c9023cfd1f
2016-10-21 11:02:09 -07:00
Jun Wu
c48ca92f2b test-check: remove the module imports check
Summary:
The test generate different outputs on different platforms (devserver,
laptops), possibly related to system python path. Let's remove it until
we have a better solution.

Besides, fix an issue of the arcanist test engine: for skipped tests,
no "duration" information available.

Test Plan:
The test is not referenced explicitly anywhere.

Check "Skip test-check-module-imports-hg.t" shows up in the review page.

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4058782

Signature: t1:4058782:1477067103:789deda43ddb7f439e7c98d574c8c7524e329e45
2016-10-21 17:26:45 +01:00
Simon Farnsworth
be87628803 Catch up with upstream changes so that our tests pass
Summary: Upstream's done a few changes that we need to catch up with.

Test Plan: Run tests locally on my devserver

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4058640

Signature: t1:4058640:1477065516:e2ab2483d054e47b4fe75c6eba185dfd5179f57a
2016-10-21 08:58:52 -07:00
Stanislau Hlebik
88085025a6 infinitepush: make scratch bookmark remote
Summary:
User should see no difference between scratch and non-scratch remote bookmarks.
So let's make scratch bookmarks remote if remotenames is enabled.
Unfortunately it requires saving scratch remote bookmarks before push/pull and
restoring it afterwards because `remotenames` extension doesn't know about
them.

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4036653

Tasks: 12479677

Signature: t1:4036653:1476985129:b5c1afdab4c7585c8b12c2962a4b95a56751091b
2016-10-21 06:36:14 -07:00
Mateusz Kwapich
d85d95b667 integration tests for sqldirstate/fbhistedit and "hg amend" test for latter
Summary:
This diff was created when I was investigating hgamend exec not working
with histedit which resulted with [1].
This also brings some very small fixes for sqldirstate and fbamend that
I was too lazy to diff separately.

[1] https://patchwork.mercurial-scm.org/patch/16451/

Test Plan: ran tests

Reviewers: #mercurial, ttung, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3777784

Signature: t1:3777784:1472227075:f2f8a9cad22bf0c45d4554709846b8aafb61d9a0
2016-10-21 06:01:59 -07:00
Jun Wu
d445ef4413 test-check: update test outputs 2016-10-20 12:14:24 -07:00
Kostia Balytskyi
4e82eb4fc2 tests_: make sure loading sqldirstate does not break fbhistedit
Differential Revision: https://phabricator.intern.facebook.com/D4052168
2016-10-20 12:03:43 -07:00
Jun Wu
e0860b9bff lint: remove tests/lint.py
Summary: We are using scripts/lint.py instead of this one.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4051121

Signature: t1:4051121:1476985509:f2c362a8efe82387bbedd55b126279a1ca5fd8b4
2016-10-20 16:04:03 +01:00
Jun Wu
e9776efcd7 patchpython: fix test-check tests
Summary: Resolve pyflakes issues caused by patchpython.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4051110

Signature: t1:4051110:1476985498:3582ddf70780537a7902fece3ab847bc9effd744
2016-10-20 16:03:31 +01:00
Jun Wu
781aea8725 arc: do not run lint on unrelated files
Summary:
"arc lint" runs the lint script for each file in parallel:

  >>> [5, pid=27257] <exec> $ scripts/lint.py 'scripts/lint.py'
  >>> [6, pid=27257] <exec> $ scripts/lint.py 'scripts/unit.py'
  >>> [7, pid=27257] <exec> $ scripts/lint.py 'tests/test-check-code-hg.t'
  >>> [8, pid=27257] <exec> $ scripts/lint.py 'tests/test-check-pyflakes-hg.t'

That looks fine but `lint.py` runs `test-check*.t` which will check all
files. This is a typical `N^2` behavior and needs to be fixed.

This diff changes the linter and test code so the test only checks the
single selected file.

Test Plan:
Run `arc lint --trace` and check `lint.py` time usage. It went down from
10 seconds to 2 seconds for this diff.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4051080

Signature: t1:4051080:1476985355:45845c6eb0e66cbfa000e61b7b496f2d00aeb042
2016-10-20 15:44:29 +01:00
Jun Wu
dc57735d63 arc: include test-check-code-hg in unit tests
Summary:
Previously, `arc unit` does not run `test-check-code-hg.t` and if people
have ignored lint errors, they may be ignored forever.

Since test-check-code-hg.t is relatively fast (3 seconds), let's also
run it during `arc unit`.

Test Plan: `arc unit` and confirm test-check-code-hg shows up.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4051073

Signature: t1:4051073:1476985307:5448827437ecee9add534855a0f87ac3c3bd1f84
2016-10-20 15:44:26 +01:00
Jun Wu
4816fb9b86 absorb: fix test-check issues
Summary: This diff fixes test-check issues related to `absorb`.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4050973

Signature: t1:4050973:1476985180:1bcd81297933c1488372b6c4bb7e5ea46f8105b0
2016-10-20 14:59:20 +01:00
Jun Wu
a812dc99fb fastannotate: fix imports and pyflakes check
Summary:
This diff tries to fix `test-check-*` issues for fastannotate.

One issue cannot be fixed:

  fastannotate/context.py:31: imports not lexically sorted: linelog < os

If these two imports are swapped, the checker will report:

  stdlib import "os" follows local import: linelog

instead. So leave it as-is for now until we get the checker fixed upstream.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4044157

Signature: t1:4044157:1476949486:13052173bc694edd99d21affa336d252bc2aae88
2016-10-19 16:05:22 +01:00
Jun Wu
b12748ec62 test-check: ignore "direct symbol import .. from mercurial" errors
Summary:
Errors like "direct symbol import ... from mercurial/hgext" do not make
sense to this repo. And there is no easy way to extend the whitelist
used by the checker to include "mercurial". So filter them out using
`grep` for now.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4044039

Signature: t1:4044039:1476949701:36ad9f611b6844c1794efe09c426ee3a47a33fec
2016-10-19 15:34:02 +01:00
Jun Wu
5e1c83f5b1 test-check: backport test-check-shbang from core hg
Summary:
This is the last one of the test-check series.
`test-check-py3-compat.t` was ignored intentionally as we do not care about
Python 3 support right now.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4039479

Signature: t1:4039479:1476876594:5b95aad9be245a86dc9327770502830896273131
2016-10-18 22:28:50 +01:00
Jun Wu
813a2b3e0c test-check: backport test-check-pyflakes from core hg
Summary: This diff backports the test. Issues will be fixed later.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4039388

Signature: t1:4039388:1476876563:24de2fab0c84d2835abd73c2dffe66ed3c232548
2016-10-18 22:23:18 +01:00
Jun Wu
aa34e6cf9d test-check: backport test-check-module-imports from core hg
Summary: This diff backports the test. Issues will be fixed later.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4039279

Signature: t1:4039279:1476876538:73819d6fa989e3bde8292e6a481aa5f1f62762da
2016-10-18 22:07:58 +01:00
Jun Wu
c11cddecf5 test-check: backport test-check-execute from core hg
Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4037205

Signature: t1:4037205:1476876512:e7659ce8add7fabacb50bb5fb3fe1f1d1744c304
2016-10-18 17:58:45 +01:00
Jun Wu
393ae99254 test-check: backport test-check-config from core hg
Summary:
Hopefully this will prevent new undocumented config options.

Issues about fastannotate are fixed. We still have many other issues, which
are ignored by this diff for now.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4037173

Signature: t1:4037173:1476876491:280e839a8e3d4f4dfbdf6b6953ab860bb7cd3ed4
2016-10-18 17:48:11 +01:00
Jun Wu
b9d8fe4c72 test-check: backport test-check-commit from core hg
Summary:
Hopefully this would rule out things like double blank lines and
inconsistent commit title.

Test Plan: `arc unit`

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4036978

Signature: t1:4036978:1476807264:414cd17672f59675be104c0026a8e50efac8b15d
2016-10-18 17:07:43 +01:00
Andras Belokosztolszki
73eea7f6a4 test-nointerrupt.t: using OSX equivalent of timeout
Summary:
`timeout` is not available in OSX. Use `gtimeout` instead.
`gtimeout` can usually be installed using `brew install coreutils`.

Test Plan: Run `arc unit`.

Reviewers: simonfar, #sourcecontrol, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4029462

Tasks: 13945749

Signature: t1:4029462:1476784209:5a5d87a2b82314da1c1a0d189dd71d36e16d8c49
2016-10-18 11:20:09 +01:00
Stanislau Hlebik
c15797e1dd infinitepush: ignore scranch branch if not set
Summary:
If `branchpattern` is not set then it matches empty bookmark.
It causes regressions like this t13808497. Let's ignore empty `branchpattern`

Test Plan: Run `test-infinitepush-*`

Reviewers: mitrandir, rmcelroy, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4031365

Tasks: 12479677

Signature: t1:4031365:1476755541:3d3781ef92f1701500d74ce7b98b4d82b5a1228e
2016-10-18 01:21:18 -07:00
Stanislau Hlebik
b9fab6bc04 infinitepush: fix remotefilelog interaction
Summary:
Remotefilelog can't find file revisions outside of the repo.
Because of it user can't update to the revisions that was pulled from
bundlestore. This diff downloads all filelogs for revisions
from bundlestore.

There were two options to pass info about changed files to remotefilelog:
through config or through bundlecaps. I decided to use config because
it's not really a bundle capability.

Test Plan: Run `test-infinitepush-*`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4030065

Tasks: 12479677

Signature: t1:4030065:1476755932:4aa02e540f13d3221163d906524fb9ce97f9c7e8
2016-10-18 01:20:12 -07:00
Jun Wu
14e90b7003 test-absorb: fix compatibility with POSIX sed
Summary:
POSIX requires that the `sed` "insert" command to be followed by a backslash
and a new line character. Let's make the test more POSIX compliant.

Test Plan: Run the test on both OS X and Linux.

Reviewers: simonfar, #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4029954

Signature: t1:4029954:1476720499:0a56da77fa89229ed9606eb9ac3748264fdf12fd
2016-10-17 17:01:02 +01:00
stash
b421695c98 infinitepush: do not require mysql for tests
Summary:
Tests doesn't require mysql since it uses fileindexapi.
Let's move sqlindexapi and fileindexapi to different files and include
only necessary file.

Test Plan: Run test-infinitepush-*

Reviewers: durham, simonfar, quark

Reviewed By: quark

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4029460

Tasks: 12479677

Signature: t1:4029460:1476709161:556f80605db9bd3c18dce1e16e996b13bbe96229
2016-10-17 14:23:56 +01:00
Jun Wu
dc07b62633 fastannotate: handle "draft" paths, and renames correctly
Summary:
Previously we can only answer the "path" information when the revision is in
the linelog revmap, and the code would crash if a revision is in a side
branch, and the user requests path information. This diff fixes it.

Besides, this diff improves rename handling. For example, given the following
chart:

```
  o---o  -o   file name: a
        /
  o---o-      file name: b
  ^   ^   ^
  1   2   3   revisions
```

Depending on the position of the `main branch` reference, fastannotate may
or may not use linelog:

- main branch is at rev 2, annotate a -r 3 will not take advantage of linelog
  (fallback to slow annotate)
- main branch is at rev 3, annotate a -r 2 will not take advantage of linelog

This is not ideal, but seems to be the best we can do for now.

Test Plan:
Added a new test, updated existing relevant tests. Some debug messages are
changed to reflect internals more precisely.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4010964

Signature: t1:4010964:1476458201:79875d96399d023d0000d0c4bb8b8d40ea43eef0
2016-10-09 19:47:01 +01:00
Stanislau Hlebik
4b61f94df6 infinitepush: create separate remotenames test
Summary:
Fix infinitepush tests for Mac. Let's split test in two.
Now if remotenames extension is unavailable most of the tests will still run.

Test Plan: Run `python run-tests.py test-infinitepush-*`

Reviewers: simonfar, durham, rmcelroy, mitrandir, quark

Reviewed By: quark

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D4029394

Tasks: 12479677

Signature: t1:4029394:1476706777:95473f493e10d3f7f21f4679976b33d75d8821f2
2016-10-17 05:36:26 -07:00
Durham Goode
8557048507 treemanifest: implement iteritems()
This implements the iteritems api. As part of this change we needed to expand
our existing iterator options to allow separating nodes from flags.
2016-10-14 16:01:12 -07:00
Durham Goode
8eea28cd2e treemanifest: implement treemanifest.keys() 2016-10-14 16:01:12 -07:00
Durham Goode
c3bc594c82 treemanifest: fix and test treemanifest.matches()
It had a bug where it thought the node was hex but it was already binary.
2016-10-14 16:01:12 -07:00
Durham Goode
2b41307ebe treemanifest: fix treemanifest.flags() when the file doesn't exist
manifest.flags() actually returns the default value if the filename doesn't
exist. So we need to replicate that behavior.

As part of this fix, I changed treemanifest.get() to return a boolean indicating
whether the file was found or not.
2016-10-14 16:01:12 -07:00
Durham Goode
f7249fd2e2 treemanifest: implement treemanifest.__nonzero__
This implements the __nonzero__ function, which is necessary for things like
`if mymanifest:`
2016-10-14 16:01:12 -07:00
Durham Goode
ae6de9bbdb treemanifest: implement treemanifest.dirs()
This implements the dirs function, which returns a collection set that can
answer the question of if a directory is in the manifest. Currently we do a
naive solution of using util.dirs(), which iterates over all the files. Given
that we have a tree already, we should be able to return something smarter in
the future.
2016-10-14 16:01:12 -07:00
Durham Goode
c171077ebd treemanifest: add None check for treemanifest.contains()
Mercurial sometimes checks if "None in mf", so we need to make sure we return
False in that situation.
2016-10-14 16:01:12 -07:00
Durham Goode
75c7cb42a1 treemanifest: implement hasdir()
Implements the py-treemanifest.hasdir() function
2016-10-14 16:01:12 -07:00
Durham Goode
445c6b0d4e treemanifest: fix diff on transient trees
The diff algorithm assumed every tree already had a node. If we are iterating
over an uncommitted tree, it may have tree entries with NULL as their node. We
need to always recurse in these cases.
2016-10-14 16:01:12 -07:00
Durham Goode
cd423fd42a treemanifest: implement 'clean' on diff
hg has an optional 'clean' arg on diff, which causes it to also return files
that aren't different between the two diffs. This implements it on our
treemanifest diff algorithm.
2016-10-14 16:01:12 -07:00
Durham Goode
7f2988ce25 treemanifest: implements text()
Implements the py-treemanifest.text() function
2016-10-14 16:01:12 -07:00
Durham Goode
f108eebde4 treemanifest: implements __setitem__
Implements the py-treemanifest.__setitem__ function. This also handles the
__delitem__ case.
2016-10-14 16:01:12 -07:00
Durham Goode
d96c188d00 treemanifest: implement setflag()
Implements the py-treemanifest.setflag() function
2016-10-14 16:01:12 -07:00
Durham Goode
ea9c99a376 treemanifest: implement get()
Implements the py-treemanifest.get() function
2016-10-14 16:01:12 -07:00
Durham Goode
8600c8a313 treemanifest: fix test python path
__file__ is not always an absolute path, so we need to perform a join in some
situations.
2016-10-14 16:01:12 -07:00
Arun Kulshreshtha
37cf7bd354 Make hg rebase --restack smarter
Differential Revision: https://phabricator.intern.facebook.com/D4000348
2016-10-14 11:05:53 -07:00
Stanislau Hlebik
8bdaa46014 infinitepush: set scratch bookmark locally during push
Summary:
Previously `--to` bookmark was not set locally.
This diff fixes it by setting this bookmark to the head after push happened.
This is correct because it's guaranteed that we'll push only one head.

Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: durham, rmcelroy, mitrandir

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4001168

Tasks: 12479677
2016-10-13 00:11:56 -07:00
Jun Wu
82b158ed59 githelp: fix crash in mergebase
Summary: `_` does not take two arguments while `ui.status` does.

Test Plan: Added a test case

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4010079

Signature: t1:4010079:1476298648:81e678fbe433aa8cca8b03c9eba50d9b78bbc9bb

Blame Revision: D2811887
2016-10-12 19:47:42 +01:00
Stanislau Hlebik
a4b6a2a1bb infinitepush: better error message
Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4001218

Tasks: 12479677

Signature: t1:4001218:1476227692:c60b3def4e82911a40fe577bc44cf7d24cba9438
2016-10-12 02:57:53 -07:00
Arun Kulshreshtha
a154bbaeb0 Add hg rebase --restack
Summary:
This change adds a `--restack` option to `hg rebase`. When invoked, the command will rebase all descendants of precursors of the current changeset onto the current changeset. This is similar to the behavior of `hg evolve --all`, except it only handles unstable changesets, and not other issues that can arise from shared mutable history such as divergence or bumping.

I've been playing around with some of the more advanced features (such as allowing the command to be run from anywhere in the old stack or new stack, as well as allowing the user to specify the number of changesets to rebase), but I wanted to upload the most simple iteration of this command for feedback.

Test Plan:
See unit tests for complete commands.

1. Create a stack of commits.
2. Somewhere in the middle of the stack, amend a commit, potentially several times.
3. Run `hg rebase --restack`.
4. The top half of the stack should be rebased onto the amended commit, and the preamend bookmark should be gone.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: rmcelroy, quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3972103

Tasks: 13651947

Signature: t1:3972103:1476230834:8f77eac4e8d8681dd9f8125747c1ff75c8da1ad8
2016-10-11 17:41:07 -07:00
Kostia Balytskyi
6cd744ec1a tests_: adjust test-mergedriver.t tests according to the core changes
Differential Revision: https://phabricator.intern.facebook.com/D4001645
2016-10-11 07:42:20 -07:00
Stanislau Hlebik
f1e2014203 infinitepush: add option to force non-fast-forward push
Summary:
Non-fast-forward pushes were disallowed. But having a
mutable shared history for scratch branches is a very
nice feature. Let's use --force option to force
non-fast forward push.

Test Plan: Run test-infinitepush-bundlestore.t

Reviewers: durham, rmcelroy, mitrandir

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3994813

Tasks: 12479677
2016-10-10 03:48:21 -07:00
Stanislau Hlebik
4731550d0f infinitepush: output bookmark hash in tests
Summary:
Simple test improvement: output scratch bookmark name
together with scratch bookmark hash

Test Plan: Run test-infinitepush-bundlestore.t

Reviewers: durham, rmcelroy, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3994805

Tasks: 12479677

Signature: t1:3994805:1476112139:a02c78dd8a117f99251e71827224bb368532052b
2016-10-10 08:37:04 -07:00
Jun Wu
de2e6fd858 fastannotate: add diffopts
Summary:
The vanilla annotate command takes diffopts, let's add it to fastannotate.
This is also useful to support hgweb correctly.

Test Plan: Added a new test

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3992672

Signature: t1:3992672:1475944204:2fbdf6a90d8c965775e3b7d5bc55fdb37c8909e7
2016-10-08 15:58:21 +01:00
Jun Wu
417bff83a4 fastmanifest: add the missing readfast method
Summary:
Upstream 4718718ed358 requires a `readfast` method for manifestctx.
`hybridmanifestctx` does not have such method so let's add it.

Test Plan: Added a test.

Reviewers: durham, ttung, #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3955478

Signature: t1:3955478:1475582074:f80c9eb97bcd42846625727ef1da4bce3256c88c
2016-10-01 01:34:50 +01:00
Kostia Balytskyi
8bf34fd038 tests_: fix tests in accordance with the core changes
Differential Revision: https://phabricator.intern.facebook.com/D3967244
2016-10-04 05:25:28 -07:00
Stanislau Hlebik
d63ba71acf infinitepush: remove defaults
Summary: I think it's better throw if misconfigured then silently proceed

Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: durham, mitrandir, quark, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3967202

Tasks: 12479677

Signature: t1:3967202:1475581664:9d7b3e21fce48a49eda35bde473915cb64dfdfa0
2016-10-04 04:52:31 -07:00
Stanislau Hlebik
e42fe1fdc5 infinitepush: do not require mysql.connector to be present on client
Summary:
Previously error was thrown if mysql.connector wasn't present on client hosts.
But there is no need for mysql.connector to be installed on clients.
Remove global imports to fix it and create bundlestore() only for server repo.

P. S.
Changes in test is required because bundlestore() is not created if
infinitepush.server=True is not present in config.

Test Plan:
Uninstall mysql.connector: `sudo yum remove mysql-connector-python`
Enable infinitepush extension in any repo and run any hg command (hg st,
for example). Make sure it doesn't throw exceptions.

Install mysql.connector: `sudo yum install mysql-connector-python`.
Run `test-infinitepush-bundlestore.t`

Reviewers: durham, mitrandir, quark, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3967189

Tasks: 12479677

Signature: t1:3967189:1475581802:fbaafceac298242d0a449267ec0d68e290c3f262
2016-10-04 04:52:03 -07:00
Jun Wu
8cf88a152b test-sparse: fix the test
Summary: Seems the output has changed somehow and needs an update.

Test Plan: Run the test

Reviewers: #sourcecontrol, rmcelroy, mjpieters

Reviewed By: rmcelroy

Subscribers: mitrandir, rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3955443

Signature: t1:3955443:1475332010:d2a0e33b509d198312d71458aaf0dfd7f5ce73d7
2016-09-29 18:36:16 -07:00
Ryan McElroy
78f0c73d4b extension to print commit message that would be supplied to editor
Summary:
the nuclide team would like to be able to get the commit template
message without actually invoking a commit. This small extensions allows them
to do this.

Caveats: ignores subrepositories.

Test Plan: new test

Reviewers: #mercurial, most

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3960557

Tasks: 12771006
2016-10-03 04:39:51 -07:00
Kostia Balytskyi
db64f55505 tests_: fixing tests in accoring to cmd option negation added by upstream
Differential Revision: https://phabricator.intern.facebook.com/D3950940
2016-10-03 02:01:18 -07:00
Stanislau Hlebik
ddd4873227 infinitepush: temp remotenames fix
Summary:
Hack to fix interaction with remotenames. Remotenames push '--to' bookmark to the server but we don't want to push scratch bookmark to the server. Let's delete '--to' and '--create' and also set allow_anon to True (because if --to is not set remotenames will think that we are pushing anonymoush head).


Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: durham, mitrandir, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3937202

Tasks: 12479677

Signature: t1:3937202:1475170335:fa4d39e1e17bea67b62b99dfc4cd2ffa4e5d6bea
2016-10-02 05:13:06 -07:00
Stanislau Hlebik
387f18b269 infinitepush: fix push of scratch bookmark on existing commit
Summary:
It's possible to push new scratch bookmark which points to existing scratch
commit. Previously it has failed with a stack trace.

Unfortunately it still doesn't allow to push scratch bookmark that points
to non-scratch commit. It requires more complex changes so
it will be fixed later if necessary.

Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3936728

Tasks: 12479677

Signature: t1:3936728:1475078059:ac4588e086b0344070a90f806b6f518c6e187c3b
2016-10-02 03:05:50 -07:00
Stanislau Hlebik
ba3ebe099e infinitepush: fix interaction with pushrebase
Summary:
infinitepush bundle2 part should be run before pushrebase bundle2 part. This is a bit tricky since both pushrebase and infinitepush change the `extensions._order` and both of them try to load before bundle2 `changeset` part.

I suggest to load before 'changeset' or pushrebase part whichever is earlier. Then we have two situations:
1) pushrebase comes first. It sets it's part before 'changeset' part, then infinitepush sets it's part before pushrebase part.
2) infinitepush comes first. It sets part before 'changeset' and pushrebase part, then pushrebase sets it's part before 'changeset' part. Since infinitepush part comes before 'changeset' part it still be before pushrebase part.

This solution is not robust but it should be fine for now. The proper solution requires changes upstream that will introduce dependencies between bundle2 parts.

Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: rmcelroy, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3930697

Tasks: 12479677

Signature: t1:3930697:1475079064:1b5851df4d2067ec21ec01e7510ddf83ff1684ad
2016-10-02 02:54:03 -07:00
Zach Amsden
2f33513a19 Log interactive time, internal command timing to scuba
Summary:
Use wrappers around ui functions to exclude interactive
and log the results to scuba.

Test Plan:
   USE_DIST_HG= FB_HG_DIAGS= CHGDISABLE= hg --config 'extensions.profiling=~/facebook-hg-rpms/fb-hgext/hgext3rd/profiling.py'  --pager=off --config profiling.enabled=False amend --edit
  chg: disabled by CHGDISABLE
  internal stats file: /tmp/scm-internal-statsx9EXSw
  hg profiling mode: SKIPPED
  stats: {
      "int": {
          "builddate": 1471281577,
          "cachehitratio": 75,
          "consumed": 425,
          "diffcachehitratio": -1,
          "elapsed": 1921,
          "errorcode": 0,
          "filesnotincachehitratio": -1,
          "interactive_time": 1534,
          "internal_time": 1701,
          "time": 1473459054
      },



Tested both with and without chg to make sure both modes work, otherwise
there are some subtle bugs that can come up under hg (timer becomes persistent
if invoked too early in uisetup).

Check out scuba table, new columns are showing up.  I still need to clean up the table as I accidentally added data as string first.

Reviewers: #sourcecontrol, ttung, quark, durham

Reviewed By: durham

Subscribers: giorgioc, mjpieters, akushner

Differential Revision: https://phabricator.intern.facebook.com/D3844697

Tasks: 12879683

Signature: t1:3844697:1475250469:a46aff22781e0e07596e2880d6477a62754f1397
2016-09-30 12:32:21 -07:00
Arun Kulshreshtha
bc3b0cd1c7 Make hg next --rebase intelligently obsolete/inhibit changesets
Summary:
This change updates the behavior hg next --rebase. Specifically:

  - Only one changeset can be rebased at a time. If there are multiple candidate changesets, the command aborts.
  - Each time a changeset is rebased, its precursor is marked as obsolete, inhibition markers are stripped from it and its ancestors, and its preamend bookmark is deleted, if one exists.
  - The result of this is that if no non-obsolete changesets depend on the existence of the pre-rebased changeset, that changeset and its ancestors will be stripped, resulting in a cleaner user experience.
  - This change also adds back the --evolve flag, but makes it show in error instead of working. It turns out that removing the flag outright breaks the evolve extension.

Test Plan:
See updated unit tests for the exact commands to run to test this, as well as an overview of all of the new situations where behavior was changed.

A basic test plan would be:
1. Initialize a new repository, and create a stack of 4 commits.
2. Amend the second commit in the stack.
3. Do `hg next --rebase`. It should work as before.
4. Do `hg next --rebase` again. This time, the entire old stack should "disappear" from hg sl.

Additionally, attempting to run `hg next --rebase` when there are multiple possible child changesets should fail.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3941922

Tasks: 13570554

Signature: t1:3941922:1475205056:58a8d1726cfcccbf14a38727be0220a09532ec97
2016-09-30 10:40:58 -07:00
Jun Wu
1093ee0826 fastmanifest: implement readdelta for hybridmanifestctx
Summary:
This fixes a crash that `hybridmanifestctx` does not have `readdelta`
after upstream's b404425704fa. `readdelta` should be fast for vanilla
manifest so just forward the call there.

Test Plan: Modify a file that `.` touched, run `hg amend` and it won't crash.

Reviewers: ttung, #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3948989

Signature: t1:3948989:1475198696:d8ae194500fc093c03cc115f4613a9b8c8bfbff2
2016-09-30 02:09:43 +01:00
Jun Wu
a3335c81b5 fastannotate: add a test for perfhack
Summary:
The test is just a copy of the existing one but with perfhack enabled. It's
expected to generate the same test result.

Test Plan: Run the newly added tests

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3937109

Signature: t1:3937109:1475166970:4c39d9b15878458cd8b4a26323749224a4c3c746
2016-09-28 13:15:41 +01:00
Jun Wu
38100f3be4 fastannotate: handle empty file correctly
Summary:
`_decorate` backported from upstream does not handle empty file correctly.
It would raise an assertion error when annotating an empty file:

  File "fastannotate/commands.py", line 138, in fastannotate
    not showdeleted))
  File "fastannotate/context.py", line 331, in annotate
    return self._refineannotateresult(result, revfctx, showpath, showlines)
  File "fastannotate/context.py", line 503, in _refineannotateresult
    if len(lines) != len(result):
  AssertionError

This patch fixes it.

Test Plan: Run the modified test.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3944132

Signature: t1:3944132:1475166894:e2610c6364806b77c8533315a1a0a08b6c158fe5
2016-09-29 16:48:40 +01:00
Jun Wu
56075d02ef fastannotate: encode directory names
Summary:
We need to reserve ".l", ".m" and ".lock". So encode directory names to
avoid collision.

Test Plan: Run the modified test

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3944069

Signature: t1:3944069:1475166648:055811239514cb699a0ebe1cfab809b661c6cfd2
2016-09-29 16:33:46 +01:00
Jun Wu
89c9da2b06 fastannotate: add a --deleted option
Summary:
This feature uses the linelog to show all lines ever existed (even deleted) in
a file. Helpful to see the history all the way back to the beginning.

Sadly it has to be inefficient currently as we have chosen to not store line
content (but only numbers) in linelog. Calculating the revisions and line
numbers is very fast because of linelog but resolving the line contents is
painfully slow. We may want a key-value database in the future, answering the
query:

  (path, node, linenum) -> content

How slow is it? With the linelog pre-built, generating the output for
`mercurial/commands.py` needs resolving 400+ revisions and is about 10+
seconds.

Test Plan: Run the changed `test-fastannotate.t`

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3849503

Signature: t1:3849503:1475086235:83077c571746a7515b5ba75c4df37a1a400d9232
2016-09-11 22:52:29 +01:00
Jun Wu
58826b52c2 fastannotate: add a config option to replace the default command
Summary:
This diff adds a config option to replace the default annotate command using
fastannotate.

Test Plan: Run the modified test

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3837499

Signature: t1:3837499:1475076620:65dc656c74e9c8a969f68cc4a2480f5dcbeb6361
2016-09-08 21:52:01 +01:00
Jun Wu
cfb2b51726 fastannotate: add a simple test
Summary: This diff adds a simple test for the `fastannotate` command.

Test Plan: Run the newly added test.

Reviewers: #sourcecontrol, stash

Reviewed By: stash

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3836677

Signature: t1:3836677:1475076179:fa8b8ff3711a8dad9410a15f77e23adaeb676d5e
2016-09-08 20:16:19 +01:00
Jun Wu
efb6a83a3e smartlog: remove unused edge when indentnonpublic is set
Summary:
This patch removes the unused line and space so it looks a bit better:

```
 .
 .
 .
 | o          o
 | |          |
 | |          |
 | o          o
 |/          /
 |          |
 o          o
 .          .
 .          .
(before)   (after)
```

Due to the current implementation of graphlog, it's a bit hacky to achieve the
above effect.

Test Plan: Run `test-smartlog*.t`

Reviewers: #mercurial, ttung, mjpieters, durham

Reviewed By: durham

Differential Revision: https://phabricator.intern.facebook.com/D3881516

Signature: t1:3881516:1475170264:477c66b2372d04c4e5d7c8fbb69de30599706e5d
2016-09-17 02:22:36 +01:00
Jun Wu
4cc05e5d24 absorb: improve rename handling
Summary:
Previously `absorb` does not care too much about copies or renames and
assumesa file path only exists in every changeset of `stack[k:len(stack)]`,
but does not exist in any of `stack[0:k]`. If this assumption is not true,
absorb will likely crash.

This patch implements copy or rename handling correctly. After this patch,
renames happens to a single file is tracked correctly. Copies are ignored
by default. For the "double move" case, like:

  hg cp a a1
  hg cp a a2
  hg rm a

We only follow the first path (sorted alphabetically). In this case, changes
to "a1" could affect the content of "a" in a previous changeset, while changes
to "a2" couldn't.

Test Plan: Added a new test

Reviewers: durham, #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3941438

Signature: t1:3941438:1475166850:97461174619d469750146e25f6bff16dae19bd3d
2016-09-28 23:56:43 +01:00
Stanislau Hlebik
24be1a2da5 infinitepush: add bundle-store option to push
Summary:
--bundle-store option makes push go to bundle store
even if bookmark is not specified or bookmark doesn't match scratch branch pattern.
The main reason for the `--bundle-store` is to be able to push not a scratch bookmark, but a scratch commit, for example, `hg push -r . --bundle-store`.
It will be useful when we will save all the local commits in the bundlestore.

To do this:
1) Wrap `discovery.checkheads()` to allow push to scratch branch even if new head is created.
2) Make scratchbranchpat params advisory because now bookmark may not be specified.

Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: mitrandir, rmcelroy, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3862665

Tasks: 12479677

Signature: t1:3862665:1475077612:7e02a5bdc1da28161e45029b1e3a38fe8223a305
2016-09-28 13:17:25 -07:00
Adam Simpkins
731fa392e6 unbreak the remotefilelog tests
Summary:
bc720745268b added a ui argument to the mutabledatapack() and
mutablehistorypack() constructors, but did not update the tests to pass in a ui
object, causing the tests to fail.

Test Plan: Ran the tests.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3934065

Signature: t1:3934065:1475077643:4c0c32f5efdb25d482128cc58f4ba903611cc959
2016-09-28 11:53:29 -07:00
Jun Wu
7b2453666a test-pushrebase-remotenames: add necessary spaces to fix the test 2016-09-26 19:55:06 +01:00
Jun Wu
ab6fe31fd1 test-remotefilelog-clone: fix the order of find output
Summary:
The order of `find` output is not guaranteed, so sort them and make the
output determined.

Test Plan: Run the test.

Reviewers: #sourcecontrol

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3925502
2016-09-26 19:52:32 +01:00
Jun Wu
fb6df93955 test-infinitepush: check mysql module before running tests
Summary:
`mysql` is required for the test. Otherwise it would error out:

```
   $ hg init repo
+  abort: No module named mysql!
+  [255]
   $ cd repo
```

Test Plan: Remove mysql python package and run the test, make sure it's skipped.

Reviewers: stash, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D3925440
2016-09-26 19:40:29 +01:00
Stanislau Hlebik
bbb7f15c99 pushrebase: cleanup
Summary: Remove unused imports + fix missing variable error in `_checkheads()`.

Test Plan: Added a new test.

Reviewers: quark, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3862724

Signature: t1:3862724:1474283118:deceacc683bb079eb7afb2ea34fb1e196f9bb18b
2016-09-26 01:48:13 -07:00
Arun Kulshreshtha
ce03ceb66c Add hg next --rebase
Summary:
This diff adds the --rebase option to the `hg next` command by extending
the evolve extension in the fbamend extension.

The --rebase option finds any child commits of the obsolete precursor to the
current commit, and rebases them onto the current commit before performing
`hg next`. This way, one can be in the middle of a stack of commits, amend one
in the middle, and do `hg next` without running `hg amend --fixup`. The next
commit will be correctly found, rebased, and updated to.

This is equivalent to:



  hg rebase -d . -r "children(OLD_HASH)" -k && hg next

Test Plan:
I tested this command by hand and created some unit tests. The basic way to test it is:

1. `hg init` a new repository.
2. Create a chain of 3 commits.
3. Amend the 2nd commit.
4. Run `hg next --rebase` and confirm that the 3rd commit was rebased and switched to.

The exact commands to do this are in tests/test-fbamend-nextrebase.t. This file also
contains test cases in which there are multiple child commits on the precursor, and cases
where there is a rebase conflict.

Reviewers: #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters, nain

Differential Revision: https://phabricator.intern.facebook.com/D3910568

Tasks: 13347995

Signature: t1:3910568:1474650102:8c7dd712afb9d36f29e1e73bb781e1d8e0870371
2016-09-23 10:39:36 -07:00
Kostia Balytskyi
ded4c889ca tests_: fix failures related to recent renames
Summary: We need to start fixing test failures to test hgbuild e2e :)

Test Plan: run-tests.py against changed files shows that these ones were fixed

Reviewers: quark, mjpieters, rmcelroy, simonfar

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D3907217
2016-09-22 07:44:34 -07:00
Durham Goode
d62504e76d treemanifest: fix test picking up local ctreemanifest
Previously, the test would attempt to import the system ctreemanifest, which is
not what we should be testing. This fix adjusts the PYTHONPATH so that we load
the extensions from our repo, instead of the system.
2016-09-21 13:51:39 -07:00
Durham Goode
50d6b599f4 Move ctreemanifest and cdatapack out of remotefilelog
These don't really have any dependencies on remotefilelog, so let's move them
out.
2016-09-21 13:55:12 -07:00
Jun Wu
aaafeda370 smartlog: use graphstyle.grandparent to draw ellipsis
Summary:
Now that the graph module can draw "..." for grand parents, it's no longer
to have fake nodes for that purpose. Remove most fake node related logic.

This will make the output more compact.

Note that the fake node is still used for "indentnonpublic" and its output
is slightly changed to display an "o" node, which will be fixed in the next
diff.

Since we now rely on a recent version of mercurial, remove some "inspect"
check for ancient mercurial support.

Test Plan: Run the modified `test-smartlog.t` and other `test-smartlog*.t`.

Reviewers: #mercurial, ttung, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3880771

Signature: t1:3880771:1474306496:3400c70efbb569c5096e724720ead1992b87f160
2016-09-17 00:51:26 +01:00
Jun Wu
dfa3d19fc2 smartlog: add an option to indent the non-public stack at the top
Summary:
One thing that may confuse new users is that when draft changesets are on top
of public changesets:

```
o draft
|
o remote/master
```

It's unclear whether the draft changeset is already in the master branch, or not.

This diff adds an option to move the drafts to the second column to indicate they
are not part of master.

Test Plan: Run `test-smartlog.t`

Reviewers: ttung, durham, #mercurial, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3876951

Signature: t1:3876951:1474043568:c97b26b49917f36a5197af93ea386658b91d56a4
2016-09-16 16:36:10 +01:00
Jun Wu
9fea0c3f0c doc: replace "commit" where it is used as a noun with "changeset"
Summary:
"changeset" is a more official term and let's use it. Note that this patch
only changes documentation / i18n messages visible to the users and header
comment blocks to developers. Other places like comments in the code are
untouched.

With the "dialect" extension enabled, users will still see the more friendly
term - "commit".

Test Plan:
`arc unit`. Note the remotefilelog failure is probably unrelated - seems
related to ongoing / upcoming manifest refactoring upstream.

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3900394

Signature: t1:3900394:1474470348:6a1b5691e2599cc47df18b227d56d1f9d3c7c906
2016-09-21 15:45:25 +01:00
Jun Wu
9151f4abfb dialect: new extension to "translate" messages to a dialect
Summary:
As discussed before, we think terms like "changeset" is more official to hg,
while less known as "commit" is used more widely.

This extension replaces "changeset" with "commit" so users will get a
consistent view about the term being used, and we can use "changeset" in our
code to be more official while don't need to worry about user friendliness.

Test Plan: Run the newly added test

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3900240

Signature: t1:3900240:1474470482:44ac6e09d58e624c539bb1336842ce8911c9dcee
2016-09-21 15:04:42 +01:00
Jun Wu
73eac46994 grpcheck: new extension to check if the user is in given groups
Summary:
We have seen issues that users have outdated groups when running hg commands,
which will probably always cause issues:

- Authentication issue, unable to ssh
- Filesystem permission issue, unable to write hgcache
- Even worse with chg server since the long-running server process will keep
  the wrong groups information

This extension is to address the above issues. It allows us to print a message
to let the user know they have group issues. Besides, it allows us to override
configs like `chgserver.idletimeout` so chg servers with wrong groups can have
a much smaller TTL and won't be long-running and causing issues.

Test Plan: Run the newly added test

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3896628

Signature: t1:3896628:1474454162:22785ff23e3ada75013ce5f1eead3407068ba172
2016-09-20 23:15:09 +01:00
Durham Goode
42f6693330 ctreemanifest: add test for treemanifest.write()
Summary:
This adds a test for checking if the write function correctly writes to the
store, and can be read back exactly.

Test Plan: Ran it

Reviewers: #fastmanifest

Differential Revision: https://phabricator.intern.facebook.com/D3890469
2016-09-19 16:28:50 -07:00
Jun Wu
4637f4c7f2 absorb: fix insertion to an empty file
Summary:
When diffing a with b, if a is empty, we don't insert a "dummyendline" (see
line 214) because we do not have the last line to copy. In this case, if an
insertion happens, we have no "nearbylinenums" (see line 274) to visit.

The current code assumes "nearbylinenums" have at least one element, which
is wrong in the above case and will crash the program.

The fix is to add a check about whether "annotated" (aka. "a") is empty or
not.

Test Plan: Run `test-absorb-filefixupstate.py`

Reviewers: #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: durham, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3867686

Tasks: 13371265

Signature: t1:3867686:1474289020:a183e6837e6e0afb8a5d56641689e240e8cd78c9
2016-09-15 00:59:29 +01:00
Jun Wu
316cae170e absorb: add an interface to edit lines for all involved revisions
Summary:
This feature allows the user to choose what lines exist in what changesets
precisely, for example:

    HG: editing a
    HG: "y" means the line to the right exists in the changeset to the top
    HG:
    HG: /---- 991104c93ef1 commit 1
    HG: |/--- aa7e21df9b0b commit 2
    HG: ||/-- 05b39f5d9141 commit 3
    HG: |||
        yyy : 1
         yy : 2
          y : 3

The feature can be used to "move" lines among changesets, or generally
editing the contents in a new way. So it's not limited in the "absorb"
use-case. We may want to give it another name in the future.

Test Plan: Added a new test case

Reviewers: #mercurial, rmcelroy, ttung

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3841494

Signature: t1:3841494:1473769708:1bb2a46c010222438ceaae69ea0dca39e37581d2
2016-09-09 14:06:16 +01:00
Jun Wu
27ee62f683 fastannotate: add a test for the revmap
Summary: The test covers all features implemented prior to this diff.

Test Plan: Run the newly added test

Reviewers: #sourcecontrol, zamsden

Reviewed By: zamsden

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3849347

Signature: t1:3849347:1473722759:6d5e62733a841ef7b55bfc2254187bdee0eaf005
2016-09-09 17:33:30 +01:00
Tony Tung
2bbc0657b8 [ctree] use unsigned characters to do the mercurial sorting
Summary:
This is required to get the proper sorting with characters with the MSb set.

Wrote unit test to cover it.

Test Plan:
1. passed that unit test.
2. `PYTHONPATH=~/work/mercurial/facebook-hg-rpms/fb-hgext/:~/work/mercurial/facebook-hg-rpms/remotenames/:~/work/mercurial/facebook-hg-rpms/lz4revlog/ /opt/local/bin/python2.7 ~/work/mercurial/facebook-hg-rpms/hg-crew/hg --config extensions.treemanifest_correctness=~/work/mercurial/facebook-hg-rpms/fb-hgext/tests/treemanifest_correctness.py --config remotefilelog.fastdatapack=True testtree  --build "master~50000::master" --revs 'master + master~5000'` is clean now!

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3869292

Signature: t1:3869292:1473922557:4c691f696ea991a578a151b8091ae44beff528df
2016-09-18 13:46:47 -07:00
Tony Tung
111d46f0eb [ctree] script to verify correctness
Summary: This is a mod of perftest.py, where we remove the unneeded components and distill it into a simple correctness test.  This is exposing bugs in our code which I will fix in subsequent diffs.

Test Plan: well, it runs.  it doesn't produce clean output yet though. :)

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: durham, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3866674

Signature: t1:3866674:1474225197:d147b18548e9e62c3b54e1ab1506141f3d52a07f
2016-09-18 13:45:33 -07:00
Tony Tung
9ace5a2f03 [ctree] allow a directory and a file of the same name to coexist
Summary:
Mercurial core does this sometimes where it sets the new entries before it removes the old entries.  In that case, you might have:

old manifest:

```
abc
```

operations:
```
+ abc/def
- abc
```

If you add `abc/def` to a manifest already containing `abc`, it will throw a `TypeError` today.  With this change, we accept this weird state.

Test Plan: Update the tests to cover both versions of this scenario (directory was there first vs file was there first).  Pass all tests.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: durham, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3865617

Signature: t1:3865617:1473897481:4cf4f122dfd3a3759fe84ea167b8cb0e78238bc2
2016-09-18 13:44:50 -07:00
Tony Tung
40e41cf202 [ctree] fileiter can return in mercurial-sorted order
Summary:
fileiter/stackframe gain a `sorted` field, which it uses to determine whether to use a ManifestIterator or a SortedManifestIterator.

add a unit test to test this scenario

Test Plan: pass unit tests.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: durham, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3868088

Signature: t1:3868088:1474225427:64d19f3f58376682850e46a3547e7a6ce1de97f4
2016-09-18 13:44:17 -07:00
Tony Tung
31bb3c8b28 [ctree] don't use 't' as an entry flag
Summary: It's reserved for directories.

Test Plan: visual

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3862277

Signature: t1:3862277:1473895896:bcc8f114331a8ec436958eed53008a3a566ed194
2016-09-18 13:41:51 -07:00
Tony Tung
a8c017ef7a [ctree] get rid of the silly contextmanager nonsense
Summary: I wanted scopes, but python's contextmanager doesn't really provide a real scope.  Derp.

Test Plan: run the test.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3862225

Signature: t1:3862225:1473895847:c2e437b6cb8ea2de9a94c6243de1cf731906d995
2016-09-18 13:40:59 -07:00
Tony Tung
8e6c49b333 [ctree] test for removal of empty directories upon removal
Summary:
When we remove a file, we need to remove all the empty directories that lead to that file.  This test ensures that we are accomplishing this.

Note that when we put in the fix for '/' "feature", this test may no longer work.

Test Plan: pass unit tests.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: durham, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3855366

Signature: t1:3855366:1473807483:66bd4650ee014e7da3fa62ef529af0467462aeb9
2016-09-18 13:40:28 -07:00
Tony Tung
ee31c666ba [ctree] use a const char* to represent the flag
Summary: This way, we can have a true nullable (null, a.k.a., not present, and any character).

Test Plan: make local and pass tests

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3855340

Signature: t1:3855340:1473807404:54c1ae17c735665935a52b0140b58094f0b45a26
2016-09-18 13:40:14 -07:00
Stanislau Hlebik
21b475a2f0 infinitepush: lint fixes
Summary:
Remove generic exception.
Remove trailing whitespace.
Remove unused import

#accept2ship

Test Plan: Run `test-check-code-hg.t` and `test-infinitepush-bundlestore.t`

Reviewers: #sourcecontrol, ttung, jeroenv

Reviewed By: jeroenv

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3876225

Signature: t1:3876225:1474015261:adff2496c4e36f19e3315856f1a0102eb7e9dc7e
2016-09-16 01:45:33 -07:00
Stanislau Hlebik
754b5a4518 infinitepush: allow pulling one scratch and many non-scratch boomarks at the same time
Summary:
There is no point in disallowing it.
The next step is to allow to fetch arbitrary many scratch bookmarks with one command.

Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: durham, rmcelroy, mitrandir

Differential Revision: https://phabricator.intern.facebook.com/D3835502

Tasks: 12479677
2016-09-13 02:34:55 -07:00
Stanislau Hlebik
936dff7c8b infinitepush: record scratch bookmark changes after the pull
Summary:
scratchbookmarks are not automatically pulled (because they are not showed in
listkeys). Let's record them after the actual pull. It introduces a race
condition. But this race condition is unlikely and shouldn't be harmful.

Test Plan: Run `test-infinitepush-bundlestore.t`

Reviewers: mjpieters, mitrandir, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3835414

Tasks: 12479677

Signature: t1:3835414:1473703998:554c890be50f732f34b2793160ee1abb26561e39
2016-09-13 02:34:55 -07:00
Tony Tung
23481279ae [ctree] fix unit tests
Summary: I could have sworn I ran this before I committed, but clearly not.  Sadface.

Test Plan: actually ran them.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3853260

Signature: t1:3853260:1473723548:f360c6c4559641deb157e570df08a51a7edf8e21
2016-09-13 00:41:06 -07:00
Pierre-Yves David
f1c24eddea absorb: fix a typo in output
From 'changset' to 'changeset'.
2016-09-12 18:00:54 +02:00
Tony Tung
f8a094bef9 [ctree] python bindings for remove and simple test
Summary:
Removes are treated as set to None.

The API is not exactly correct, as manifestdict needs to implement size/getitem/setitem, but we can refactor in a subsequent diff.

Test Plan: pass unit test

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3836197

Signature: t1:3836197:1473363870:21a447e4bc17148193fde7ed4887927089e54930
2016-09-10 16:27:40 -07:00
Tony Tung
bafcd189d4 [ctree] hit more corner cases
Summary:
1. deeply nested trees.
2. bushy trees.
3. flag changes.

Test Plan: PASS IT ALL

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3833951

Signature: t1:3833951:1473363441:bab705414b48c02ee29b931b8cef4b5dda1fa048
2016-09-09 15:24:17 -07:00
Tony Tung
db1cad6baa [ctree] python bindings to treemanifest.set() and tests!!!!!!!!
Summary:
Python binding is pretty straightforward.  The test exercises a few simple paths: set, update, and conflict detection.

Not yet done: tests to set a deeply nested directory structure.

Test Plan: PASSED THE SIMPLE TESTS.  YES!

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: durham, mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3832682

Signature: t1:3832682:1473363415:60240c6bbbcec82184b4588b83bbda750e8b77f1
2016-09-09 15:24:06 -07:00
Tony Tung
199a37f983 [ctreemanifest] constructor should allow for the construction of an empty manifest
Summary:
The root node is now optional.  If it's not specified, an empty tree is constructed.

Added an unit test to cover this code path.

Test Plan: `PYTHONPATH=~/work/mercurial/facebook-hg-rpms/fb-hgext/:~/work/mercurial/facebook-hg-rpms/remotenames/:~/work/mercurial/facebook-hg-rpms/lz4revlog/ /opt/local/bin/python2.7 ~/work/mercurial/facebook-hg-rpms/hg-crew/hg --config extensions.perftest=~/work/mercurial/facebook-hg-rpms/fb-hgext/tests/perftest.py --config remotefilelog.fastdatapack=True testtree --kind flat,ctree,fast --test fulliter,diff,find --build "master~5::master"` still runs.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3803569

Signature: t1:3803569:1472759620:02c1f723fe3b7f4cdca9da6399fc2296c6d5a022
2016-09-06 12:40:32 -07:00
Mathias De Maré
96605a0ea5 absorb: correctly pass executable mode in getfile
getfile should return the file mode as (islink, isexec),
but it was returned as (islink, isbinary).
As a result, using 'hg absorb' removed executable mode from
the relevant changeset so the mode change showed up in the working directory.

Issue reported with test case by Thomas De Schampheleire.
2016-09-01 13:05:52 -07:00
Stanislau Hlebik
48389f12cc infinitepush: move integration test to the rool level directory
Differential Revision: https://phabricator.intern.facebook.com/D3791446
2016-08-31 01:44:59 -07:00
Tony Tung
6840b5520e [cdatapack] extend existing remotefilelog-datapack test to cover fastdatapack
Summary: Most of this is pretty self-explanatory.  We're creating two different test cases that invokes slightly different APIs to read the datapack (conventional datapack vs fastdatapack).  The quirk is that fastdatapack does not expose the fanout prefix, so we suppress the test involving that for fastdatapack.

Test Plan: `PYTHONPATH=~/work/mercurial/facebook-hg-rpms/fb-hgext/:~/work/mercurial/facebook-hg-rpms/lz4revlog/ /opt/local/bin/python2.7 ~/work/mercurial/facebook-hg-rpms/hg-crew/tests/run-tests.py test-remotefilelog-datapack.py`

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3792849

Tasks: 12932864

Signature: t1:3792849:1472597547:35503ff5ef0c4910f3ae7f49b1268d3305a0b6c9
2016-08-30 16:19:53 -07:00
Tony Tung
e73e3e82b2 [check-code] remove reference to file that has since been removed
Test Plan: pass check code

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3789049

Signature: t1:3789049:1472521405:db4d224b1bbaab74ee5440403f59e7ed23cf65d6
2016-08-29 21:53:51 -07:00
Tony Tung
998c4c7e9d remove remotefilenames check code
Summary: Doesn't seem to make sense to keep two of them.

Test Plan: meh.

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3789029

Signature: t1:3789029:1472521395:db958a5f050319dfa7c608cc448e2d38acbb8c0c
2016-08-29 21:53:34 -07:00
Martin von Zweigbergk
71cbc6ab90 treemanifests: include dirlogs in streaming cloning
We need to include the dirlogs (meta/**/00manifest.{i,d}) in streaming
clones for treemanifests to work. Also add a test for it.
2016-08-29 16:19:52 -07:00
Martin von Zweigbergk
ba3921257f tests: check that local commit data gets transferred 2016-08-29 16:19:52 -07:00
Durham Goode
14a161093f perftest: remove hard coded revs and paths
Summary: This removes the hard coded revs and paths used in the perf test script.

Test Plan: Ran the perf test

Reviewers: #fastmanifest, ttung

Reviewed By: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3755335

Signature: t1:3755335:1471930070:e90a242a8f73d2fc32ea68bc99cae88b00af14c9
2016-08-29 16:19:52 -07:00
Tony Tung
2b3e7ac198 port upgrades of buffer.h into clib
Summary:
buffer.h gained the ability to deal with non-char-sized buffers when I built cdatapack.  We need to update the callers in ctreemanifest to be aware of this.  Most of this is done with macro magic.

Some functionality was dropped from cdatapack's buffer.h (macro definitions to deal with paths).  Those are moved to path_buffer.h

Test Plan:
make local && clion build.
pass cfastmanifest unit tests.

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3780767

Signature: t1:3780767:1472255278:40a19edfd171df5804e9cdfa4444d5c6386f00e8
2016-08-26 17:14:52 -07:00
Tony Tung
2f5e85ccb8 move common code to clib
Test Plan: make local && build in clion

Reviewers: #fastmanifest, durham

Reviewed By: durham

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3780622

Signature: t1:3780622:1472250774:fa702d78dab39eb74c8de58c0d589ae36a2c42b3
2016-08-26 15:45:43 -07:00
Mateusz Kwapich
dd16a02f8e sparse: remove the failed attempt to change watchman config during test
Summary:
I've seen the failures like https://phabricator.intern.facebook.com/P56599278
which were the result of "enforce_root_files" being set in our global watchman
config.

It appears that the global configs are being picked up only on server start.
Killing server during the test won't help because watchman is automagically
restarted in our dev environment.

The way to do it properly is to mimic
https://github.com/facebook/watchman/blob/master/tests/integration/WatchmanInstance.py
until we do that I've just put a .watchmanconfig to fix the test.

Test Plan: tests is passing now

Reviewers: #mercurial, ttung, durham, wez, zamsden

Reviewed By: wez, zamsden

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3772968

Signature: t1:3772968:1472158987:0e08c5e9f862ba3d74d016d051b852512d06e399
2016-08-26 11:59:52 -07:00
Mateusz Kwapich
8bc273e058 fix scm-prompt test
Summary: I ran tests with --noskip and found one more failure

Test Plan: test passing now

Reviewers: #mercurial, ttung

Reviewed By: ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3772978

Signature: t1:3772978:1472155449:1c5d8e16bd51d2b06f15432dd47c6fba48da3abd
2016-08-26 11:59:49 -07:00
Ryan McElroy
f4dd73e113 remotefilelog: pass modern check-code
Test Plan: run-tests.py test-check-code-hg.t

Reviewers: #mercurial, ttung, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3777581

Tasks: 12855049

Signature: t1:3777581:1472224785:a15040cec1c95ca60d1be837d905b3c3d87be362
2016-08-26 08:48:07 -07:00
Ryan McElroy
88f3625c53 remove run-tests.py
Test Plan: run the main run-tests.py

Reviewers: #mercurial, ttung, simonfar

Reviewed By: simonfar

Subscribers: ps, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3777412

Tasks: 12855049

Signature: t1:3777412:1472217150:e9dde1b19e00a19f1e25fb06126c9a9d25c4702f
2016-08-26 06:27:59 -07:00
Ryan McElroy
9e5fa17451 Fix check code test
Test Plan: run the test

Reviewers: #mercurial, ttung, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3777411

Tasks: 12855049

Signature: t1:3777411:1472217139:9fe3be9ded664f3bbcd373b93be2bcfac2be593b
2016-08-26 06:27:59 -07:00
Ryan McElroy
4dcd53a07d merge in remotefilelog repo
Test Plan: run tests!

Reviewers: #sourcecontrol, durham, mitrandir, ttung

Reviewed By: mitrandir

Subscribers: mitrandir, ps, mjpieters, jeroenv

Differential Revision: https://phabricator.intern.facebook.com/D3770470

Tasks: 12855049

Signature: t1:3770470:1472123570:d5c660165a7e21356a92975a66c38972bd2fe11a
2016-08-26 06:27:25 -07:00
Ryan McElroy
99a672e000 remotefilelog: rename tests/test-* to tests/test-remotefilelog-*
Summary:
This makes it possible to run all remotefilelog tests without others
It also avoids some issues with name collisions in the upcoming merge.

Test Plan: next commit is a merge and no conflicts in tests/

Reviewers: #sourcecontrol, ttung, durham, mitrandir, simonfar

Reviewed By: mitrandir, simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3764379

Tasks: 12855049

Signature: t1:3764379:1472217061:67a0cc8f1fc29f991be08fe965679535ff6df27a
2016-08-26 06:11:27 -07:00