Commit Graph

2994 Commits

Author SHA1 Message Date
Stanislau Hlebik
9384ed14b8 fix tests
check-code was updated and it started to fail. This diff fixes it.
2017-06-22 00:33:08 -07:00
Durham Goode
d31e2ec441 treemanifest: fix pack transaction closing
Summary:
When adding manifests, we keep the mutable packs open for the duration of the
transaction. The old code had a bug where it didn't realize the pack files were
already open and it would open new ones. This meant only the last pack file was
finalized and the rest were left open as unfinished temp files.

This patch fixes it and adds a test.

Test Plan: Added a test

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: medson, mjpieters

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

Signature: t1:5297004:1498086398:5cbe6e6c78d02f09d341417ec3a745853dac9849
2017-06-21 16:59:44 -07:00
Durham Goode
d4f324c561 treemanifest: fix sub-tree prefetches
Summary:
Previously the wireprotocol allowed for fetching a specific sub-tree,
but the server's implementation didn't handle it. This caused issues when the
user made a local commit whose trees had references to public trees, then the
user deleted the cache trees and refilling the cache failed.

The current solution is to just serve the entire tree, since the current native
code treemanifest implementation can't serve sub-parts of the tree at the
moment. This is expensive, but should be pretty rare though since the client
usually the entirety of a tree if it's going to keep the root.

Test Plan: Added a test

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: medson, mjpieters

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

Signature: t1:5296211:1498086921:3e7be99b8581c1fdf507a2fe560b4c796835cdf3
2017-06-21 16:59:44 -07:00
Durham Goode
cbc8579872 remotefilelog: increase incremental repack to pack 3 at once
Summary:
Previously we tried to keep incremental repacks small by only allowing 2 packs
to be repacked at once. This causes problems with treemanifest since hg pull
could create a pack file, which then gets repacked with a single other pack
file. This meant the total number of packs did not decrease. Let's increases the
number of files we pack at once to 3 so we can guarantee that a repack after
adding a pack still decreases the total number.

Test Plan:
Ran a local tree repack that was previously only causing two files to
be repacked. Now it repacked three files.

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: medson, mjpieters

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

Signature: t1:5287238:1497995177:54e229b564137ddc35ea28fd3d649a1085de0c72
2017-06-21 16:59:44 -07:00
Andras Belokosztolszki
fb10004ee8 infinitepush: use milliseconds to measure elapsed time in logging
Summary: Currently seconds are sent to logging for elapsed time. Given the that most values are 0, 1, 2, or 3 seconds, this change adds some better signal. Not reusing the elapsed field, instead introduced elapsed ms.

Test Plan:
arc unit
modified test-infinitepush-backup-logging.t to include the new elapsedms field

Reviewers: stash

Reviewed By: stash

Subscribers: medson, mjpieters

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

Tasks: 19557691

Signature: t1:5292576:1498059638:8461a71398a41bf741384ddcda15d5c016633d66
2017-06-21 11:13:38 -07:00
Mateusz Kwapich
afebcb5512 phabdiff: add singlepublicbase revset
Summary:
This revset will be used by jellyfish to set the proper base in sandcastle. Anyway: a public ancestor is
a valuable commit information so there should be a template for it.

Test Plan: see test

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: durham, quark, medson, mjpieters

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

Tasks: 19186426

Signature: t1:5275811:1497979632:9589491be723daf0b127703a7bc4571f7539bd84
2017-06-21 17:03:50 +01:00
Jun Wu
ce21516db2 smartlog: use dagop.reachableroots
97fbbbc2ac35 moved reachableroots from revset to dagop.
2017-06-20 13:58:40 -07:00
Jun Wu
2df622a724 cleanup: remove fbmetaedit and inhibitwarn
Summary: We no longer use those extensions. Remove them.

Test Plan: arc unit

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D5286709
2017-06-20 13:58:40 -07:00
Jun Wu
83c88e7a24 modcheck: check if external modules are imported
Summary:
When testing code in this repo, it's an easy mistake to import a module of a
same name installed in the system or specified by `PYTHONPATH`. This diff
adds a test module to detect that. It's included in `unit.py` so `arc unit`
will be able to find such issues

It will be more effective if all our extensions are moved to hgext3rd.

Test Plan:
Append a blank line to every `.t` files, and run `unit.py` with `hg-dev`
environment, and make sure nothing got reported.

Reviewers: durham, #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mitrandir, medson, mjpieters

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

Signature: t1:5274454:1497976474:1b25881f022e148b89829ed3f4d6a79437f2533f
2017-06-20 13:40:53 -07:00
Durham Goode
55f677869b remotefilelog: use a connection pool instead of a long running connection
Summary:
Previously remotefilelog would open a connection and leave the getfiles command
running on that connection, so it didn't have to reopen the ssh connection each
time. We want to reuse this ssh connection for treemanifest and fastannotate, so
let's switch it to a pool model where the connection is kept open but the
getfiles command is not left open.

If an exception happens while the connection is out of the pool, it is discarded
instead of being added back to the pool.

Test Plan:
Ran the tests. The fastannotate tests changed to reflect the new way
the connectionpool allows use.

Reviewers: quark, #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mitrandir, medson, mjpieters

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

Signature: t1:5280323:1497975420:e3ae1ee854a1afc90816502543a19ff36f59b497
2017-06-20 11:08:15 -07:00
Durham Goode
23ca29ef80 treemanifest: find bases up and down from the treerev
Summary:
Previously, if we were fetching a treemanifest we would only search downwards
for commits for possible base trees (so we could download only the new parts of
the tree).  With this patch we will also search upwards in the changelog. This
means that running 'hg log -r master --stat' will efficiently download the tree
for `.^` since it will be based against `.`.

Also fixes an issue with on demand downloads looking for base revs by starting
at the wrong changelog rev (they used the manifest rev number instead of the
changelog linkrev number). The same test covers this.

Test Plan: Added a test

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mitrandir, medson, mjpieters

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

Signature: t1:5279552:1497980967:a2d6003b126858cc05eb0095cd68c12db9670e29
2017-06-20 11:08:15 -07:00
Durham Goode
2959c77757 treemanifest: set upper rev bound on revlog repack
Summary:
If the repo being repacked has commits being pushed, it's possible that the
repack will encounter file revisions who's linkrevs don't exist in the inmemory
changelog. Let's set an upper bound on what linkrevs to repack so we can only
process revisions who's commits we can see.

Test Plan: Added test

Reviewers: #mercurial, mjpieters

Reviewed By: mjpieters

Subscribers: medson, mjpieters

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

Signature: t1:5279171:1497911997:a48c56abebd14a1c066c9fc1ee4098f813d062df
2017-06-20 11:08:15 -07:00
Durham Goode
f952dad372 treemanifest: add debug output for number of trees downloaded
Summary:
Adds output that tells how many trees were downloaded, and how long it took.
Only appears if remotefilelog.debug=True is set.

Test Plan: Updated the tests

Reviewers: #mercurial, phillco

Reviewed By: phillco

Subscribers: medson, mjpieters

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

Signature: t1:5278596:1497926493:82a01b3b49e9ff87e51ac3c5cd0e4be952020ba0
2017-06-20 11:08:15 -07:00
Stanislau Hlebik
cad3f2d0a3 infinitepush: run debugfillinfinitepushmetadata in the background
Summary:
Final part: launching debugfillinfinitepushmetadata in the background. We
intentionally don't wait for it's completion in order not to slow down pushes.

Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mitrandir, quark, mjpieters, medson, #sourcecontrol

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

Tasks: 19103180

Signature: t1:5265325:1497886939:6c306c08b240373ea43a7fc868b17ef776258cf9
2017-06-20 05:40:01 -07:00
Jun Wu
e9147da58e remotefilelog: fix changelog.add when node exists
Summary:
When committing a node which already exists, the linkrev provided to filelog
is actually wrong (len(changelog)). The upstream Mercurial will not update
existing file revisions but remotefilelog will.

The fact that linkrev being wrong triggers the ProgrammingError added by
D5061330. This diff detects that case and avoid writing bad linkrevs or
raise ProgrammingError.

Test Plan: Added a test.

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: medson, mjpieters

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

Signature: t1:5278060:1497910883:b8c3b6281ad9c0a516b942ba8ca41c51801b2d6b
2017-06-19 15:35:23 -07:00
Jun Wu
32dd7f7841 fbamend: fix tests
Fix test issues caused by importing 0e0ff0ef4ad6.
2017-06-19 13:24:41 -07:00
Adam Simpkins
13bd099e74 pushrebase: improve blocknonpushrebase error message
Summary:
Improve the error message from the blocknonpushrebase hook to inform the user
that they need the pushrebase extension enabled.

Previously the message indicated that you mush push using
`hg push --to <bookmark>`, but this is not sufficient.  Enabling the pushrebase
hook is the most important step here.  (The `--to` flag is not part of vanilla
mercurial, and is added by pushrebase, but other extensions like remotenames
also add a `--to` flag.)

Test Plan:
Added a unit tests for `hg push --to <bookmark>` with remotenames enabled but
pushrebase disabled.

Reviewers: #mercurial, davidsp, zhihuih

Reviewed By: zhihuih

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

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

Signature: t1:5276550:1497899421:3656bcc3e7358f97fc852e14307b34d8aa4d9951
2017-06-19 12:48:46 -07:00
Zhihui Huang
5e0994a87f p4fastimport: handle keyword extension
Summary:
Perforce has a feature called [[ http://answers.perforce.com/articles/KB/3482 | keyword expansion ]].

When a file is marked +k or +ko and you have a string like $Id$, it get's expanded to $Id: SOMETHING$ on Perforce. When importing a file like this from Perforce into Mercurial we need to do the reverse, renaming $Id: SOMETHING$ to $Id$ (and equivalent for all other expansion types).


Test Plan:
$ cd ~/facebook-hg-rpms/fb-hgext/tests/
$ python ../../hg-crew/tests/run-tests.py test-p4fastimport-import.t
$ python ../../hg-crew/tests/run-tests.py test-p4*

Reviewers: #idi, davidsp

Reviewed By: davidsp

Subscribers: davidsp

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

Tasks: 19211063

Signature: t1:5266323:1497890444:a1cced5faa5e48c708c2721510952ca4d27d1bd4
2017-06-19 11:54:10 -07:00
Tony Tung
6c4e900989 add date=implicitupdate option to automagically update the commit date 2017-06-19 09:50:32 -07:00
Tony Tung
c4d7df0a0f add the --date and --user parameters that commit supports 2017-06-19 09:50:32 -07:00
Mateusz Kwapich
250c2c7c4a metaedit: fix editing multiple commits
Summary: The recent refactoring brought back the original condition from metaedit that was preventing multi-commit metaedits.

Test Plan: see test

Reviewers: #mercurial, quark, stash

Reviewed By: stash

Subscribers: medson, mjpieters

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

Signature: t1:5274562:1497884504:f46988cd1926f52227a907e4e081e65de24080ad
2017-06-19 16:03:17 +01:00
Jun Wu
3d461ae600 check-ext: make checks stricter
Summary:
Enhance check-ext script to be more strict:

 - Only one foreign extension is allowed: `remotenames`
 - Require explicit path for in-repo extensions to avoid wrong extensions
   being tested

This would make the test more predicatable since system extensions
will be less likely to be imported. Explicit path is better than
setting `PYTHONPATH` since `hgext/name.py` could override
`hgext3rd/name.py` regardless of `PYTHONPATH`.

Test Plan: arc unit

Reviewers: phillco, durham, ikostia, #mercurial, stash

Reviewed By: stash

Subscribers: medson, mjpieters

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

Signature: t1:5271430:1497861776:7dd35ec7c522cd9b26aa0871cb4306b4f1b8993a
2017-06-19 08:02:38 -07:00
Jun Wu
c96096dc7f treemanifest: make importing side-effect free
Summary:
`@bundle2.parthandler` and `@exchange.b2partsgenerator` are not side-effect
free like other things used by the registrar framework. Registering a same
type twice will cause assertion errors. We have `import treemanifest` in
`fastmanifest` which should be side-effect free.

Therefore move bundle2 part registering to uisetup so importing the module
multiple times from different places won't cause assertion errors.

Test Plan: arc unit

Reviewers: durham, #mercurial, stash

Reviewed By: stash

Subscribers: medson, mjpieters

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

Signature: t1:5271419:1497861881:9b97dcf80ca893d7c08780cd5eed789e445dc52c
2017-06-19 08:02:17 -07:00
Stanislau Hlebik
7b8cb0004c debugcommitmessage: fix tests
Upstream 608e426d0577d44f4d5030dc6d71e57d691ca3da changed the API. Now template
ref should be passed instead of template itself. This diff fixes it.
2017-06-19 03:01:18 -07:00
Stanislau Hlebik
d48ee2554c check-code: fix test
aa578bb62ed35bcd0e433a8b4a65539e8bfb0548 upstream commit introduced new default
for profiling.showmin option and changed test-check-config.t file. We need to
do the same.
2017-06-19 01:59:39 -07:00
Stanislau Hlebik
da308cc725 infinitepush: add metadatafilelimit option
Summary:
Add an option to limit the number of file entries in the metadata field. This
is to avoid huge codemods to eat up all the space.

Depends on D5255883

Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters, medson, #sourcecontrol

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

Tasks: 19103180

Signature: t1:5264202:1497630109:05d684db34578e309e0bbad314165e66d1f23ce9
2017-06-19 01:27:31 -07:00
Stanislau Hlebik
55ece1e4b0 infinitepush: support many nodes in debugfillinfinitepushmetadata
Summary:
We may want to fill infinitepush metadata for many commits at once.
Let's make it possible to pass many nodes to debugfillinfinitepushmetadata

Depends on D5255670

Test Plan: arc unit

Reviewers: #mercurial, mitrandir, quark

Reviewed By: quark

Subscribers: mitrandir, mjpieters, medson, #sourcecontrol

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

Tasks: 19103180

Signature: t1:5255883:1497629860:26332e3cc115881bca158664014ce48087d99215
2017-06-19 01:27:31 -07:00
Stanislau Hlebik
3b8d29f56b infinitepush: implement saveoptionaljsonmetadata for sqlindexapi
Summary:
Also need to use `with index` to make sure that transaction closes.

Depends on D5255664

Test Plan: arc unit

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mitrandir, mjpieters, medson, #sourcecontrol

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

Tasks: 19103180

Signature: t1:5255670:1497557000:906a39810931d92f30c6d6b8e5bfc28e0c888594
2017-06-19 01:27:31 -07:00
Stanislau Hlebik
c7d835d417 infinitepush: record copies and changed status to metadata
Summary:
I've forgot to add it in the previous diff. We also want to know copies
information and status (added, modified, removed).

Test Plan: arc unit

Reviewers: #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters, medson, azich, #sourcecontrol

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

Tasks: 19103180

Signature: t1:5255664:1497542963:b552c07d261067f426d7af7a29d2f02c1917394c
2017-06-19 01:27:31 -07:00
Jun Wu
c9b3defd56 test-check-commit: do not unset HGRCPATH 2017-06-17 09:48:32 -07:00
Jun Wu
6596b6f010 allowunstable: remove from tests
The extension was removed so the test needs update. It wasn't discovered
because the system `allowunstable` was used. `check-code` logic will be
updated to make it harder to use system extensions.
2017-06-16 21:33:17 -07:00
Jun Wu
4a936cee21 codemod: remove extpath in tests
Summary:
Previously, the following pattern is common in our tests:

```
   $ extpath=`dirname $TESTDIR`
   $ cp $extpath/hgext3rd/name.py $TESTTMP # use $TESTTMP substitution in message
   $ cat >> $HGRCPATH<<EOF
   > [extensions]
   > name=$TESTTMP/name.py
   > EOF
```

Now, it gets simplified to:

```
   $ cat >> $HGRCPATH<<EOF
   > [extensions]
   > name=$TESTDIR/../hgext3rd/name.py
   > EOF
```

This removes unnecessary `dirname` and `cp`.

Also fixed a regex that does not match `bytes`:

```
-  transferred 268 bytes in [\d.]+ seconds \([\d.]+ KB/sec\) (re)
+  transferred 268 bytes in 0.3 seconds (939 bytes/sec)
```

Test Plan: arc unit

Reviewers: #mercurial, phillco

Reviewed By: phillco

Subscribers: medson, mjpieters

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

Signature: t1:5270897:1497663052:bf860a0b480c751b1e4b53cebf6526193f0f6652
2017-06-16 18:31:25 -07:00
Jun Wu
a6c7fc128f allowunstable: remove the extension
Summary: allowunstable is no longer used. So remove it.

Test Plan: arc unit

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: mjpieters, medson

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

Signature: t1:5258845:1497602890:4b9c7cffc2132df0a7059fe2fdbeddf3e21c1875
2017-06-16 15:54:15 -07:00
Jun Wu
be7ac42b50 codemod: replace evolve by fbamend
Summary:
Now that fbamend has most of the features we want. Replace evolve
used by tests.

Minor changes are made to some extensions to make test pass:
- reset: drop commit reviving support (was provided by "hg touch")
- smartlog: do not assume who provides "allsuccessors" revset
- fbamend: return 1 on "nothing changed"
- fbamend: write operation data for split and fold
- fbamend: do not print incompatibility notice
- fbamend: do not disable itself when rebase is not enabled
- inhibit: remove `bookmark -D` option - use `prune -B` instead

Test Plan: arc unit

Reviewers: #mercurial, stash

Reviewed By: stash

Subscribers: stash, mjpieters, medson

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

Signature: t1:5258813:1497604051:0c7334f9a6554cf31aaaaa2a4995b17d4e445847
2017-06-16 15:50:01 -07:00
Jun Wu
2dc367dac3 inhibitwarn: nuke the extension
Summary:
We are going to remove evolve and inhibit. So the warning is no longer
useful.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mjpieters, medson

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

Signature: t1:5254984:1497518474:80649544fef3aee90bf9a407d45ddeb9f6d85dba
2017-06-16 14:40:31 -07:00
Jun Wu
d06133e837 fbamend: backport prune
Summary:
Backport the prune command and its strip wrapper from mutable-history changeset
cb0d62ed5e2a using GPL2 license.

There are some adjustments to make the ported code work well with existing
code better, namely:

  - Add a `safestrip` option to control whether `strip` is replaced to `prune`
    or not.


Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254961:1497518704:91b200bf791297ff797cc0ff28ab31d7eb294963
2017-06-16 14:39:04 -07:00
Jun Wu
2852dabbc8 fbamend: merge fbmetaedit
Summary:
Merge fbmetaedit which uses a fast path to change commit messages.

Make fbmetaedit a no-op.

Test Plan: arc unit

Reviewers: #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters, medson

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

Signature: t1:5254867:1497524975:c7cc3ad9d1162332fbdd665eb5a2f6d7ce87a585
2017-06-16 14:12:32 -07:00
Jun Wu
87b248dd27 fbamend: backport metaedit command
Summary:
Backport the metaedit command and its test from mutable-history changeset
cb0d62ed5e2a using GPL2 license.

There are some adjustments to make the ported code work well with existing
code better, namely:

  - Removed allowunstable check to simplify the code.
  - Make "nothing changed" return 1.
  - Minor i18n and check code fixes.

Note: this backport does not include fbmetaedit changes.

Test Plan: arc unit

Reviewers: #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters, medson

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

Signature: t1:5254807:1497524996:abf856dc9bb8225316ca6c17f41ffa2c9d8d9964
2017-06-16 14:11:43 -07:00
Jun Wu
04579ab177 fbmetaedit: do not assume evolve provides metaedit
Summary: This is temporary as fbmetaedit will be merged into fbamend.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254803:1497520047:2c6eb22ce8cb80e4c785fd0b82311706487f6c7e
2017-06-16 14:07:02 -07:00
Jun Wu
c7c3280b44 fbamend: backport fold command
Summary:
Backport the fold command and its dependencies (`rewrite`) from mutable-history
changeset cb0d62ed5e2a using GPL2 license.

There are some adjustments to make the ported code work well with existing
code better, namely:

 - The `--norebase` flag was renamed as `--no-rebase` and moved to the
   backported command so we no longer wrap the split command.
 - Rebase now runs inside a same transaction.
 - `bookmarksupdater` now accepts multiple revs so bookmarks on all changesets
   being folded will be updated correctly. It is a bugfix to the ported code.

Test Plan:
`arc unit`.
Some tests are changed. It seems the new behavior looks better.

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mjpieters, medson

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

Signature: t1:5254681:1497520003:f7ec3622286804fead059ab9a8021bb8f3067e64
2017-06-16 14:06:24 -07:00
Jun Wu
020ff84b79 fbamend: backport split command
Summary:
Backport the split command and its dependencies (namely, `bookmarksupdater`)
from mutable-history changeset cb0d62ed5e2a using GPL2 license.

There are some adjustments to make the ported code work well with existing
code, namely:

 - The `--norebase` flag was renamed as `--no-rebase` and moved to the
   backported command so we no longer wrap the split command.
 - Rebase now runs inside a same transaction.

The glob change in tests is because `(tip)` shows up.


Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mjpieters, medson

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

Signature: t1:5254544:1497519470:fe8a7308b35b578fd4f1257cebba15062e752c2f
2017-06-16 13:59:12 -07:00
Jun Wu
08e9bc0bbf fbamend: make restack take inhibithack
Summary:
This hack is needed to make split + rebase work well inside a same transaction.

inhibit does special things at the end of a transaction which may override deinhibit.
Sometimes we want deinhibit to override the transaction close handler.

The hack will be removed once inhibit gets removed.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: ikostia, mjpieters, medson

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

Signature: t1:5254517:1497519294:89b6de077514252c42fb128760cf9f9241180242
2017-06-16 13:55:29 -07:00
Jun Wu
30b417ea27 allowunstable: do not assume evolve provides split and fold
Summary:
split and fold will be backported and removed from evolve. So do not assume
evolve provides them.

Test Plan: Not breaking existing tests

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254455:1497519005:aca0373cc61ca5438cee1c9d85f2df77f33d8455
2017-06-16 13:54:03 -07:00
Jun Wu
edf220db3a inhibit: allow _deinhibitmarkers inside a transaction
Summary:
inhibit hacks transactioncallback so _deinhibitmarkers might be ineffective
inside a transaction. This diff adds a flag to allow _deinhibitmarkers
effective inside a transaction. It will be used by the split backport.

Test Plan: No new test being added since inhibit is a hack and is going to be removed.

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254416:1497519161:b01f3fa59004ded5beaf5dcfc7d18eb2b5227130
2017-06-16 13:52:29 -07:00
Jun Wu
200a9b16fb fbamend: implement successors and precursors revsets
Summary:
We are depending on `allprecursors` and `allsuccessors` revsets in multiple
places. Re-implement them in fbamend.

Also reimplement `successors` and `precursors` since they are used by some
other code.

Test Plan: arc unit

Reviewers: #mercurial, ikostia

Reviewed By: ikostia

Subscribers: mjpieters, medson

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

Signature: t1:5254403:1497519041:8c6f001a6acf8056b5f795575b42922a476ac34b
2017-06-16 13:48:14 -07:00
Jun Wu
fef5e81c64 test-check: do not trust system hg
Summary:
This diff removes "unset HGRCPATH" to try to run tests in a more
controlled environment. And skip the test if system HG looks broken.

Test Plan: arc unit

Reviewers: simpkins, #mercurial, stash

Reviewed By: stash

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

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

Signature: t1:5263484:1497604378:28ec94c33ba77680c8d2325a8fa36457e0eb8c91
2017-06-16 10:57:52 -07:00
Jun Wu
7e8b62aef6 lfs: add retry logic for transferring a single object
Summary:
We got TCP RESETs frequently. It's hard to pinpoint the root cause so let's
just add retry for now.

Test Plan: eyes

Reviewers: #mercurial, #ovrsource_warroom, steaphan

Reviewed By: steaphan

Subscribers: steaphan, mjpieters, medson

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

Tasks: 19419154

Signature: t1:5265928:1497635499:17cf5d5cb69b406330326d693a9eceb1d22861f8
2017-06-16 10:54:07 -07:00
Jun Wu
e271251a2b setup: fix linelog build on Windows
A wrong change was mistakenly committed.
2017-06-16 10:25:28 -07:00
Jun Wu
9e364a3220 cython: check-in generated c/cpp code from cython
Summary:
This removes Cython as a build dependency as requested by our users.

Added a test to prevent check-in files with `/home/`.

Modified check-code to skip checking Cython generated files.

Test Plan:
Run `make clean local` with Cython installed and uninstalled.

Also run `make clean local` with `USECYTHON=1` and `0`.

Reviewers: #mercurial, mitrandir

Reviewed By: mitrandir

Subscribers: mjpieters, medson

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

Signature: t1:5252935:1497525190:402798077d44e39e24fcb037535ec7ffd1af9c4b
2017-06-15 12:55:17 -07:00
Jun Wu
3556ad01c5 fbamend: rename conflicted evolve commands instead of removing them
Summary: This unbreaks `experimental.evolutioncommands`.

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters, medson

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

Signature: t1:5256903:1497547902:9af6930776fc272db0c7d1bbfca2f4e76342255a
2017-06-15 10:35:28 -07:00