Commit Graph

2853 Commits

Author SHA1 Message Date
Durham Goode
dcaee39e39 obsmarkers: update obsmarker operation wrapping to work with upstream
Summary:
Upstream has added an optional operation argument to createmarkers, which we
need to also accept. This argument is currently only processed if a config
option is set, so for now we will still put the operation in the metadata dict
manually.

Test Plan: Ran the tests

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:5106511:1495485044:23d45d9ba389cf0d49b31705ae36902310c5056c
2017-05-22 13:38:37 -07:00
Durham Goode
0766a3469c dirstate: switch to new parentchange context
Summary: Upstream has deprecated begin/endparentchange in favor of a context object.

Test Plan: Ran the tests

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:5106500:1495485058:8377335a0f678de7bb50cb93fff29bcfeb53fe1d
2017-05-22 13:38:37 -07:00
Durham Goode
e34660b057 commands: update to use registrar instead of cmdutil
Summary: Upstream has deprecated cmdutil.commands() in favor of registrar.commands()

Test Plan: Ran the tests

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:5106486:1495485074:0e20f00622cc651e8c9dda837f84dd84cc51099e
2017-05-22 13:38:37 -07:00
Jun Wu
f532dddaa4 lfs: implement byte-level progress bar
Summary:
Previously, the progress bar is file-level - it moves when a file is transferred.

When uploading or downloading a single giant file, progress bar matters. And
this diff adds it to make people more patient.

Test Plan:
Manually upload and download several big files.
Make sure the progress bar appears in both cases.

Also make sure the output is sane with `-v`.

Reviewers: #mercurial, davidsp, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5100014:1495316719:c500ccd63d3a495e41575cadd72419a41f5fb259
2017-05-22 11:03:14 -07:00
Jun Wu
693b0fa76a remotefilelog: remove filectx.cmp override
Summary:
The `cmp` logic does not look special from the original `basefilectx.cmp` so it
could be removed. This means we will benefit from LFS's override of
`basefilectx.cmp` and have a fast path for LFS binary diff.

Test Plan: Added a test. Make sure the old code fails that test.

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters

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

Signature: t1:5100529:1495468055:ff7fa30f3277b942bf49ba1e9b8764effacd972a
2017-05-22 10:59:53 -07:00
Durham Goode
f02e3e0686 revlog: rename revlog constants
Upstream has renamed some revlog constants, so we need to update our code
accordingly.
2017-05-21 17:09:08 -07:00
Durham Goode
e205d14095 treemanifest: only use two compare trees
Limit basetrees to only 2 trees, since the current walksubtrees calculation can
only handle 2 trees at the moment.
2017-05-21 17:09:08 -07:00
Durham Goode
0af34bfb0c treemanifest: make base tree calculation cleaner
Make the base tree calculation cleaner. Only parents for which we already have
the tree are considered base nodes.
2017-05-21 17:09:08 -07:00
Durham Goode
5822632ea6 treemanifest: add test for pullprefetch with draft commits
Adds a test for pullprefetch when draft commits are present. This was fixed in a
prior patch without a test.
2017-05-21 17:09:08 -07:00
Durham Goode
c8c72f8201 packs: add progress bar to receiving pack files
Summary:
This adds a simple progress bar while the client receives a pack.  We don't know
ahead of time how large it will be, so we can only provide the bouncy bar kind.
But we can show an increasing number of things downloaded, so they know
something is actually happening.

Test Plan:
Ran hg pull with the extension enabled, verified there was a progress
bar during the tree prefetch.

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:5098564:1495235358:0020b28da890813f11dba70b157e526e7be418f8
2017-05-21 17:09:08 -07:00
Durham Goode
1b18d802ad packs: add packs.maxchainlen config
Summary:
Previously our data packs would have incredibly long delta chains, where to read
the last entry in the file you had to read every previous delta all the way to
the beginning. This was very expensive for chains of 2+ million deltas. Let's
add a config option to limit how long the deltas get, and for now we'll default
it to 1000.

Test Plan: Added a test

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5095603:1495213707:737d63129cf459ad6927a1f4deb0dda5a8ce0a7f
2017-05-21 17:09:08 -07:00
Jun Wu
65b1cff91e dirsync: use _fileset
Upstream has renamed _fileroots to _fileset.
2017-05-19 21:39:47 -07:00
Jun Wu
0fd94f75db fixcorrupt: use REVLOGV1
Upstream has renamed REVLOGNG to REVLOGV1.
2017-05-19 21:32:02 -07:00
Jun Wu
a9d4c07ef8 p4fastimport: use verify.skipflags in lfs test
Summary:
The newly added config option could skip LFS revision checks. Let's use it
so `hg verify` passes.

Test Plan: arc unit

Reviewers: #mercurial, davidsp

Reviewed By: davidsp

Subscribers: mjpieters

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

Signature: t1:5091709:1495163508:3f36dfa221ab0896e1dc49d30c762d7957ac9826
2017-05-18 22:21:34 -07:00
Jun Wu
3e43e09a97 lfs: add a lfs_files template
Summary:
This allows automation to know which modified or added files are LFS for
specific changesets.

Test Plan: Added a test

Reviewers: #mercurial, davidsp

Reviewed By: davidsp

Subscribers: mjpieters

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

Signature: t1:5091591:1495163606:138638d8ccc57b8ed6c1e324750ec5dc15c198a0
2017-05-18 22:18:20 -07:00
Jun Wu
e0896400f5 linelog: make linelog build on Windows
Summary:
This diff disables or rewrites problematic parts in linelog code on Windows -
`mmap`, `ftruncate`, `sysconf`, `htonl` so the linelog module could be built
without on-disk linelog support. That means `absorb` can work. `fastannotate`
needs extra effort.

Test Plan:
`python setup.py install` and check in Python shell:

```
>>> import linelog
>>> linelog.linelog()
<open linelog (in-memory) at 0x3ab07bb5c8>
```

Also check the test pass:

```
fb-hgext\linelog\pyext>%PYTHONHOME%\python test-random-edits.py
```

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters

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

Signature: t1:5093192:1495161776:06e05544cff808b03546f753a553ecc66fafc79f
2017-05-18 21:12:26 -07:00
Jun Wu
c44498aaa8 p4fastimport: update test to reflect upstream changes
Summary: Upstream has changed the debug output. Let's update our tests.

Test Plan: arc unit

Reviewers: #mercurial, davidsp

Reviewed By: davidsp

Subscribers: mjpieters

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

Signature: t1:5090773:1495144947:2b82d897577277cdbc454418a40353c685b742dd
2017-05-18 15:19:14 -07:00
Jun Wu
546cff40f8 lfs: skip uploading when remotestore is a null store
Summary:
When remotestore is a null store, uploading is a no-op and can be skipped.
This diff makes it so.

Test Plan: arc unit

Reviewers: #mercurial, davidsp

Reviewed By: davidsp

Subscribers: mjpieters

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

Signature: t1:5090686:1495144964:956549307912f4a44201aa305959bf8de26ac028
2017-05-18 15:10:39 -07:00
Durham Goode
62b95b0cc9 treemanifest: fix flakey test
This test had non-deterministic ordering, which caused it to fail sometimes.
Let's make the test check more explicitly, by checking that the bad commit hash
is not present.
2017-05-18 15:08:24 -07:00
Durham Goode
188b5b584e fixtests: fix tests to match upstream changes 2017-05-18 09:27:06 -07:00
Misha Shneerson
cbdaa23f88 conduit: added correct Content-Type header for conduit queries
Summary:
conduit HTTP POST request did not have correct content-type header set.
Now they do. Ideally we should use python-request package to do HTTP
but I do not know enough how to import these dependencies so I just went
with the minimal changes.

Test Plan:
ran hg log from dev environment and eventually got it all working.
{P57411895}

Reviewers: simpkins

Reviewed By: simpkins

Subscribers: net-systems-diffs@fb.com, mjpieters

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

Tasks: 18294945

Signature: t1:5080725:1495052201:1bbd6edad4c1c4b3482a7479259460a815947630
2017-05-17 13:50:37 -07:00
Stanislau Hlebik
036f4a7f7b infinitepush: use unfiltered() repo in isbackedup command
Summary:
One of the heads may point to filtered commit and isbackedup command fails in
this case. Let's use repo.unfiltered()

Test Plan: arc unit

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters, #sourcecontrol

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

Signature: t1:5001977:1493907725:f6a138bd4e2cae48b64152fceaf73660ea91f43b
2017-05-17 07:27:52 -07:00
Rainer Alves
37fdd68496 morestatus: make conflict paths relative
Summary: morestatus: make conflict paths relative

Test Plan: Output: https://phabricator.intern.facebook.com/P57402806

Reviewers: rmcelroy, mgorven

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

Tasks: 10366065
2017-05-17 07:13:41 -07:00
Stanislau Hlebik
5bb6893d41 infinitepush: cleanup temp files
Summary: Infinitepush didn't clean up temp files during pulls.

Test Plan:
Choose any hg server that's not in vip (for example, hg014.lla2).
Run `hg pull ssh://hg014.lla2.facebook.com//data/scm/fbsource -r INFINITEPUSH_COMMIT_HASH`
Check that new /tmp/tmp* file has appeared.
Install fixed infinitepush extension on the server.
Run the same command again, make sure it works fine.

Note: no new unittests, because temp filenames are random and that's difficult to test.

Reviewers: #mercurial, dschatzberg, tja

Reviewed By: tja

Subscribers: mjpieters

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

Tasks: 17599765

Signature: t1:5077767:1495025042:d209d1e5342442ac8b05a4c80748780bbf36846c
2017-05-17 06:42:04 -07:00
Jun Wu
24d8640017 absorb: do not strip innocent children
Summary:
`repair.strip` removes required revisions and their children unconditionally.
That means innocent children may be removed. This patch fixes it.

We may want to have an in-core function for this feature to not strip innocent
children.

Thanks Zibi Braniecki from Mozilla for reporting [1]!

[1]: https://bitbucket.org/facebook/hg-experimental/issues/6/hg-absorb-merges-diverged-commits

Test Plan: Added a test

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters

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

Signature: t1:5073342:1494972231:ca2a9881415119047771c8f35e059f4bfb1749e5
2017-05-16 16:25:00 -07:00
Jun Wu
b1a694579e remotefilelog: wrap flog.addrawrevision instead of flog.add
Summary:
remotefilelog needs to wait for changelog creation to get the commit hash so
all filelog appending operations are pending if linkrev is an integer.

That is better done in the `addrawrevision` layer since it will catch more code
paths. Besides, that means remotefilelog won't need to hash a same revision
twice.

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters

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

Signature: t1:5061330:1494871717:a7224ebdc0f221fbaabbd2a58de975caec0e4b05
2017-05-16 16:23:37 -07:00
Jun Wu
a9a7b9784f remotefilelog: implement addrawrevision
Summary: This is required (but not complete) to allow LFS fast path.

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: durham

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

Signature: t1:5061283:1494959731:2d7ed7465c1724cd1f231a206f949da16f90649c
2017-05-16 16:01:13 -07:00
Jun Wu
8bf7723507 remotefilelog: move _createfileblob to a separate method
Summary: This makes the next patch cleaner to read.

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters

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

Signature: t1:5061271:1494869273:967b647281847fa39e88558805bcf3b9a9e2b57b
2017-05-16 15:57:12 -07:00
Jun Wu
c10d3a3dff remotefilelog: implement nodemap
Summary:
Core HG code uses revlog.nodemap to test node existence. We will hit some
code path about LFS in the future. So let's add a nodemap to remotefilelog.

Currently, the code path won't be hit. In the future, it should only be hit by
`repo._filecommit` when a `remotefilectx` is used (which is an LFS fast path).
That means, `nodemap` test won't connect remote server for missing nodes.

In the future, we could add some "hints" to get/getmeta API to let it not look
for the remote store.

Test Plan:
Real test will be added when we do can hit that code path. But the new code is
short and looks fine.

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: durham, mjpieters

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

Signature: t1:5061254:1494869146:88a0e1d04d292e2a64f29fdf52660f48b906665c
2017-05-16 15:56:15 -07:00
Jun Wu
a82574317b lfs: upload blobs during 'hg bundle'
Summary:
When a bundle is created, the bundle could be exchanged via copy and possibly
eventually reach to a publishing repo. If we don't upload LFS blobs, hg server
could have revisions that can never be checked out or verified.

So let's just assume bundles generated by `hg bundle` will be public, and
upload LFS blobs automatically, without depending on other code review tooling.

Note: there is a `preoutgoing` hook which will be triggered in this case,
however it's not useful since it does not have the `outgoing` information.

Test Plan: Will add a new test

Reviewers: davidsp, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5050945:1494958648:0c46ab1d85755838ba189bbb1e0673882922bb58
2017-05-16 15:49:32 -07:00
Jun Wu
7098094e7e lfs: cleanup file headers
Summary:
This diff removes `# coding=UTF-8` and adds standard GPL2 headers to lfs
files.

Test Plan: arc unit

Reviewers: davidsp, #mercurial, simonfar, rmcelroy

Reviewed By: simonfar, rmcelroy

Subscribers: simonfar, mjpieters

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

Signature: t1:5067881:1494947941:e669d4d9485c390138f76031608a7f727c57bf55
2017-05-16 15:44:06 -07:00
Jun Wu
f0c7a3cef9 lfs: remove util.py
Summary:
`util.py` only contains 2 small things: `lfsvfs` and `sha256`. Both of them
only have one user (in terms of files). Therefore just move the code to
related files to make it simpler.

Test Plan: arc unit

Reviewers: davidsp, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5067862:1494955824:b99021f1bb44568dc0c738b0e472eb732f2bc91a
2017-05-16 15:43:36 -07:00
Jun Wu
ae8a1ccb8f lfs: update old PointerDeserializationError error handling
Summary:
The error was renamed to `InvalidPointer`. This diff updates error handling
to catch that instead.

Test Plan: arc unit

Reviewers: davidsp, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5067496:1494955510:5f0162a8cc6f1d0d83e3ab6319ec3202028684d8
2017-05-16 15:42:30 -07:00
Jun Wu
acfcc44094 lfs: add a fctx.islfs method
Summary:
This simplifies code a bit, and could be useful for 3rd party code. We already
have `isbinary`, `islink`, `isexec`, `isabsent`. So another `is` method looks
fine.

Test Plan: Run existing tests

Reviewers: davidsp, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5067369:1494955466:ae17e310e743c704cc0d9bb73e0d2e82adcffff8
2017-05-16 15:41:39 -07:00
Jun Wu
2eef188bc0 lfs: add a filectx.cmp fast path
Summary:
The `filectx.cmp` fast path allows us to show "binary file changed" diff output
when two binaries have the same size but different content.

Test Plan: Added a test case

Reviewers: davidsp, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

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

Signature: t1:5067266:1494954783:a41e8213782afe24618ef2930c9576f21610fd3e
2017-05-16 15:38:51 -07:00
Durham Goode
12f99274cb treemanifest: add incremental server repack
Summary:
When the server performs a repack, it would read all the data from all the
revlogs. This was very slow and expensive. Let's add a --incremental option that
makes it only read the revlog entries that have a linkrev newer than the latest
linkrev data that's already in a pack file.

Test Plan: Adds a test

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:4997260:1493904216:c4f5b6c9652bbf8f66c1bc2b2547c898324d22cd
2017-05-16 15:28:13 -07:00
Jun Wu
9eedb98b61 lfs: downgrade "computing set of blobs to upload" to debug message
Summary:
Calculating what blobs to upload should be fast since we use changelog `files`
information. Users will see `lfs: uploading ...` very soon. So let's downgrade
`lfs: computing set of blobs to upload` to a debug message to make `-v`
cleaner.

Test Plan: Updated existing test.

Reviewers: davidsp, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5066600:1494954115:c00925a1930f9b53e914078d32b6c4e4161099ee
2017-05-16 15:27:25 -07:00
Jun Wu
ae541c9f80 lfs: show status per object when ui.verbose is set
Summary:
Downloading or uploading a single LFS object could take long. Instead of
showing a summary of what objects are downloaded or uploaded, print a message
per object if --verbose is provided.

Test Plan: Added a test

Reviewers: davidsp, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

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

Signature: t1:5066327:1494953894:3593436ff53eaff117a2932476dfc4b867fb9f17
2017-05-16 15:24:04 -07:00
Jun Wu
28de141267 lfs: handle "wrong action" error earlier
Summary:
Previously, when an object is not found server-side, we error out during the
basic transfer API. This diffs move the check to the batch metadata API so the
check is preformed earlier.

That also means, when batch fetching many LFS objects, we could report multiple
objects being missing instead of just one.

Test Plan: Modified an existing test

Reviewers: davidsp, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5065623:1494952131:cb1df73e1cea21e07bfd0ec630bacec60e5b385c
2017-05-16 15:19:40 -07:00
David Soria Parra
aca5b8465c p4fastimport: filelog transaction wtih support for concurrent access
Summary:
We are adding a simple transaction that works only with filelogs but
allows for concurrent access from multiple workers. This allows for a proper
rollback in case of a failure in a worker process, which previously would result
in bad data in the repositoriy.

Test Plan: rt test-p4* test-check*

Reviewers: #mercurial, durham, quark

Reviewed By: quark

Subscribers: mjpieters

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

Signature: t1:5070340:1494958313:b10b1eac5b42b36d1a587c4ae1c95fc2f8b5ad35
2017-05-16 12:36:23 -07:00
Jun Wu
b78dbc3dad lfs: check object errors from batch API early
Summary:
The batch API allows server to return errors per object, handling them early
seems to be a good idea.

This is an attempt to distinguish "cannot upload - no permission" from
"no need to upload - already exist".

Unfortunately, `lfs-test-server` reference implementation does not provide
the error message so it's not reflected in tests.

Reviewers: #mercurial, davidsp, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5057816:1494951879:07f2b67408e9d77255104b932baae2e50af9890b
2017-05-16 12:30:23 -07:00
Jun Wu
adb61e1976 lfs: split basic transfer API out from _batch
Summary:
The basic transfer API [1] worths a separate method.

[1]: https://github.com/git-lfs/git-lfs/blob/master/docs/api/basic-transfers.md

Reviewers: #mercurial, davidsp, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

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

Signature: t1:5057683:1494951784:de3d3a28a69366fbbc4546f9e68b4d664ba00dfa
2017-05-16 12:26:30 -07:00
Jun Wu
d5a9c91ff9 lfs: move batch API to a separate method
Summary:
The LFS uploading or downloading process consists of 2 parts: a batch API to
get metadata about objects, followed by `len(objects)` requests.

This diff moves the first metadata API out from a giant `_batch` method to
make the code structure easier to maintain. Later diffs will further split
`_batch` method.

A side effect is `lfs: mapping blobs to #{action} URLs` message is removed.
More user-friendly message will be added back in a later patch.

Reviewers: #mercurial, davidsp, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5057541:1494949989:d510c3d9369744e7ee776c0d0a26d263dfaf8352
2017-05-16 12:24:20 -07:00
Durham Goode
12891668ee treemanifest: don't prefetch trees for draft commits
The prefetch logic is only meant to prefetch public commits, which have trees
available on the server. So let's exclude non-public from the prefetch.
2017-05-16 11:40:02 -07:00
Jun Wu
31882a9791 lfs: remove total parameters from remote store APIs
Summary:
Displaying total bytes to upload is currently inaccurate - the server could
already have some objects so only a subset of selected objects will be
uploaded.

Besides, we pass `pointers` to related upload and download APIs so `total`
could be calculated from them.

This diff removes the inaccurate "need to upload" message and unnecessary
parameters. An accurate message will be added in a later patch.

Reviewers: #mercurial, davidsp, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

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

Signature: t1:5057470:1494949554:07e637a8b58c894598b3f0c2dd53f80a5ade25a8
2017-05-16 11:19:39 -07:00
Kostia Balytskyi
8a9c4bf950 tests_: fix test-sqldirstate-shelve.t to comply with upstream
Summary:
Upstream shelve now writes simplekeyvaluefile for shelvedstate. This means
that tests which relied on ordered state files need to be adjusted.

Test Plan: - rt

Reviewers: durham, mitrandir, #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D5069982
2017-05-16 09:52:30 -07:00
Durham Goode
da7796c0fe fixtests: fix tests to work with upstream changes
Upstream has made some minor changes that affect the tests. Let's just update
the tests appropriately.
2017-05-16 09:40:27 -07:00
Don Stewart
bc85e8a4cf hgext: accept a --unified param for lines of diff context
Summary: Added -U/--unified NUM to fbshow.py, and used that to set diff.unified=NUM.

Test Plan: hg show --help; hg show -U 1; hg show -U 2; hg show -U by induction.

Reviewers: mburman, simonfar, ikostia

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

Tasks: 10006036

Tags: python
2017-05-15 05:59:55 -07:00
Jun Wu
f484dba4a0 lfs: narrow down try block
Summary:
A try block is only effective for the HTTP error. Let's narrow it down to
just the HTTP request.

Test Plan: arc unit

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5057107:1494634308:584877babc6a4705fa0740788dcf58affdf51bec
2017-05-12 17:28:45 -07:00
Jun Wu
853b228a8a lfs: handle batch API's HTTP and JSON error
Summary:
There are `1+n` HTTP requests. `n` of them is handled. But the first one
about JSON metadata is not. Let's handle it.

Test Plan: arc unit

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:5057053:1494634184:fa0e562dc7879379106bf37915a2e5ea3cc01a4d
2017-05-12 17:26:06 -07:00