Commit Graph

761 Commits

Author SHA1 Message Date
Laurent Charignon
71bef9dc56 remove flaky test + fix check code 2016-04-08 12:43:10 -07:00
Laurent Charignon
edd4f20070 fastmanifest:fix test failure 2016-04-08 11:51:28 -07:00
Laurent Charignon
1dde5e0f97 fastmanifest: better debugging output
Summary:
Before this patch the test output wasn't great looking, with this patch
one can easily see if our caching strategy worked

Test Plan: This is only a test change

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3129319

Tasks: 10604335
2016-04-08 11:49:42 -07:00
Laurent Charignon
59bcb8e5c0 fastmanifest: add python to C layer
Summary: This adds the CPythong interface layer for fastmanifest

Test Plan: Compiles

Reviewers: ttung, durham

Differential Revision: https://phabricator.fb.com/D3157095
2016-04-08 11:48:31 -07:00
Laurent Charignon
f630e13113 fastmanifest: add wrapper to instantiate flatmanifest or treemanifest
Summary:
This patch adds a wrapper that allows us to instantiate either flat
or fast manifest when a manifest is read.
This needs a change in core to work. In manifest.manifest in core we are
currently using two abstractions to create manifests: calling manifestdict()
or _newmanifest(). This was a hack added for the developement of treemanifest
and needs to be changed to make things saner.

Test Plan:
I added a new test. I also ran the whole test suite in core with
the extension, all the tests passed except test-treemanifest.t, failing on the
assert in _flatmanifest as expected.
python run-tests.py -j32 -l
   --extra-config-opt=extensions.fastmanifest=/Users/lcharignon/facebook-hg-rpms/fb-hgext/fastmanifest.py

Reviewers: rmcelroy, ttung, durham

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3115446

Tasks: 10589064
2016-04-08 11:46:18 -07:00
Martijn Pieters
ec719be728 logtoprocess: make certain the fork exits
Summary:
Even if there is an exception in the subprocess call, make sure the fork
doesn't propagate that exception back up to mercurial.

Test Plan: Run $HG/tests/run-tests.py test-logtoprocess.t -i

Reviewers: quark, #sourcecontrol, ttung, durham

Reviewed By: ttung, durham

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3139242

Signature: t1:3139242:1459880540:02ca2d80425d8d948059513990f8f2966ff74c6a
2016-04-08 12:40:32 +01:00
Jun Wu
ba96318bbe test-share-reflog-remotebookmark: check dependencies
Summary:
The test requires remotenames and hg-new-workdir. Check them before running
the test.

Test Plan:
Run the test and make sure it is skipped if either of the dependencies is
missing

Reviewers: #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3153904

Tasks: 10749152

Signature: t1:3153904:1460072643:b79eb2d161330ef7a6270711590f24b57b1e768f
2016-04-07 16:53:54 -07:00
Jun Wu
c73f628483 test-perftweaks: fix file permission test case
Summary:
test-perftweaks fails on both legocastle and my laptop:

```
-  total 12
-  drwxrwsr-x. 2 * . (glob)
-  drwxrwsr-x. 3 * .. (glob)
-  -rw-rw-r--. 1 * branchheads-served (glob)
+  total 4
+  drwxrwsr-x 2 quark quark  60 Apr  7 23:15 .
+  drwxrwsr-x 3 quark quark 120 Apr  7 23:15 ..
+  -rw-rw-r-- 1 quark quark   1 Apr  7 23:15 branchheads-served
```

Fix it by making `.` optional. It seems we only care about the `s` bit.

Test Plan: Run `test-perftweaks.t`

Reviewers: #sourcecontrol, rmcelroy, ttung

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.fb.com/D3153798

Tasks: 10749152

Signature: t1:3153798:1460073004:505d3dfee3dfd9475ccf700a1a28cf1baf1d8777
2016-04-07 16:53:18 -07:00
Jun Wu
b87a93aaef smartlog: use ":" for fake node
Summary:
After the graphmod change happened in core, `:` is used in edges. Change `.`
to `:` to make smartlog look consistent with the graphmod change.

Test Plan:
Make sure these look consistent with the latest hg:

  hg sl
  hg sl --config experimental.graphstyle.grandparent=X

Also run unittest:

  ~/hg/tests/run-tests.py -l test-smartlog.t --extra-config-opt=experimental.graphstyle.grandparent="|" --extra-config-opt=experimental.graphstyle.missing="|"

Reviewers: #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.fb.com/D3153133

Tasks: 10749152

Signature: t1:3153133:1460072873:ea28eb909b8cb069a031b8a27c844869b02b22b5
2016-04-07 16:51:00 -07:00
Jun Wu
b603929009 mergedriver: fix test caused by upstream change
Summary:
Upstream change 3ceac0 removes the `labels` parameter from
`mergestate.*resolve` methods. Let's update our tests.

Test Plan: Run `test-mergedriver.t` with the latest hg

Reviewers: simonfar, #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3153698

Tasks: 10749152

Signature: t1:3153698:1460071369:bca8f52c2cf730513385afbdd809747386a57027
2016-04-07 16:23:49 -07:00
Jun Wu
af343f89df fix code that didn't pass test-check-code-hg.t
Summary:
Fix errors reported by test-check-code-hg.t

```
+  logtoprocess.py:45:
+   >         # https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx
+   line too long
   Skipping statprof.py it has no-che?k-code (glob)
+  tests/test-logtoprocess.t:38:
+   > Use head to ensure we wait for all lines to be produced, and sort to avoid
+   trailing whitespace on non-output
+  tests/test-tweakdefaults-blame.t:41:
+   >   $ hg blame -p a
+   trailing whitespace on non-output
+  [1]
```

Test Plan: Run `test-check-code-hg.t` and make sure it pass

Reviewers: #sourcecontrol, rmcelroy, ttung

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.fb.com/D3153195

Tasks: 10749152

Signature: t1:3153195:1460068592:eae6aa682c1f935f7812b72534dd761d898b62a7
2016-04-07 15:52:47 -07:00
Adam Simpkins
6c3719ed46 phabstatus: clean up error handling
Summary:
Don't blindly swallow all exceptions in getdiffstatus().  Previously this was
masking bugs in the code.  Instead, only catch exceptions thrown by the initial
Popen() call.  Also check the the process return code, and report an error if
it exits unsuccessfully.  Fix a return statement that was incorrectly returning
an erorr message instead of replacement strings.

Also fix the code to use subprocess.communicate() instead of only reading from
proc.stdout.  The old behavior could result in a hang if arc tried to print
data on stderr but we weren't reading it.

Test Plan:
Manually tested the error code paths by forcing arc to fail locally on my dev
server.

Reviewers: #sourcecontrol, ttung, lcharignon

Reviewed By: lcharignon

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

Differential Revision: https://phabricator.fb.com/D3146077

Signature: t1:3146077:1459971594:ebab6a0ccb7bea66da1e23dcb88633c48b3e952b
2016-04-06 12:49:43 -07:00
Tony Tung
fceff111a7 [fastmanifest] search children should return an illegal value when it fails
Summary: 0 is actually a legit index, so if someone checks that instead of the node pointer, then we might find the wrong thing.

Test Plan: pass unit tests.

Reviewers: #sourcecontrol, mitrandir

Reviewed By: mitrandir

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D3130262

Signature: t1:3130262:1459557188:661eae1363bf603a77e1d17960db0a5f8f33834b
2016-04-06 12:40:32 -07:00
Tony Tung
b7a8a6c9cf eliminate the double enum names
Summary: They're not used anywhere.

Test Plan: pass unit tests

Reviewers: #sourcecontrol, quark

Reviewed By: quark

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D3129166

Signature: t1:3129166:1459549501:424a52d4b28484016201e250111bc0b1dab6a317
2016-04-06 12:40:08 -07:00
Tony Tung
4c9a529497 [fastmanifest] improve errorhandling of alloc_tree()
Summary: Move the real work to `alloc_tree_helper()`.  This allows us to have the jump to cleanup without the goto.

Test Plan: pass unit tests.

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: lcharignon, mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D3128539

Tasks: 10670537

Signature: t1:3128539:1459962010:d58e7ea89802416128dd312e76d619de6d29dc42
2016-04-06 12:39:45 -07:00
Adam Simpkins
eb7787dd48 unbreak the phabstatus extension
Summary:
D3022145 caused phabstatus to always fail, since it ended up passing the
timeout as to subprocess.Popen() as an integer instead of a string.

Test Plan:
Ran "hg log -r. -T'{phabstatus}\n'" and confirmed it displayed diff status
correctly, and no longer complained about not being able to run arc.

It looks like there currently aren't any existing unit tests for this
extension.

Reviewers: #sourcecontrol, andersonmat, lcharignon, ttung

Reviewed By: ttung

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

Differential Revision: https://phabricator.fb.com/D3145902

Signature: t1:3145902:1459968939:b0348cd20f216f7e7a2929812b24eae18e5d17c3
2016-04-06 12:14:09 -07:00
Ryan McElroy
8fab426a57 copytrace: delete extension and tests
Summary:
This was bitrotting. We have it in source control if we want to revive
the project.

Test Plan: run-tests.py

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3126182
2016-04-06 03:55:27 -07:00
Tony Tung
24ff723f4f [fastmanifest] make a ROOT node type
Summary: On remove_path, we need to remove the implicit nodes that are empty after we remove the leaf node.  Actually typing the nodes differently makes this easier.

Test Plan: pass unit tests.

Reviewers: #sourcecontrol, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D3128497

Signature: t1:3128497:1459811588:d3132edc7044061263457c7d0b5ee072b67204c9
2016-04-04 16:24:22 -07:00
timeless@gmail.com
cd35432d91 spelling: fix numerous spelling errors 2016-04-04 12:48:01 -07:00
Martijn Pieters
affec78d17 logtoprocess: execute processes asynchronously
Summary:
Create a Popen() object, and each time ui.log() is called poll these to clear
out any that are done. When dispatch ends, kill any that remain.

Test Plan: Run $HG/tests/run-tests.py test-logtoprocess.t

Reviewers: durham, #sourcecontrol, ttung, quark

Reviewed By: quark

Subscribers: ikostia, simonfar, mjpieters

Differential Revision: https://phabricator.fb.com/D3091363

Signature: t1:3091363:1459781710:4f04e37db3fb1f81abadfe168c5dbc00c376cda7
2016-04-04 15:56:15 +01:00
Ryan McElroy
5525a51fb6 perftweaks: use proper repo.vfs for noderevs cache
Summary:
Previously, we were calling open directly. Let's go via the vfs to
avoid nasty surprises in the future.

Test Plan:
Exisitng tests.
Also added a test, but that just verifies that the repo.vfs stuff doesn't
mess up the permissions when the umask is correct.

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Subscribers: durham, mjpieters

Differential Revision: https://phabricator.fb.com/D3126492

Tasks: 10661429

Signature: t1:3126492:1459531801:0931f9b02c544f98651c7630e74283feef426175
2016-04-01 11:49:05 -07:00
Tony Tung
91a9f27549 [fastmanifest] suppress check-code on fastmanifest
Summary: It's not going to pass.

Test Plan: run check-code

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mitrandir, mjpieters

Differential Revision: https://phabricator.fb.com/D3126493

Tasks: 10662043

Signature: t1:3126493:1459523935:54449c39abfef97b596e9c34743583afa8b983d5
2016-04-01 11:19:53 -07:00
Kostia Balytskyi
3137e3c69e tweakdefaults: make blame be able to show Phabricator diffs
Differential Revision: https://phabricator.fb.com/D3076727
2016-04-01 07:41:29 -07:00
Tony Tung
14a8f27f55 [fastmanifest] initial checkin
Summary:
Still missing:

== Code and tests: ==
* remove path
* contains path (but this is essentially the same as get path)
* read/write from file

== Tests: ==
* checksumming directories

Test Plan: well, it kind of builds.

Reviewers: durham, simpkins, lcharignon

Reviewed By: lcharignon

Subscribers: net-systems-diffs@, mitrandir, mjpieters, akushner, rmcelroy

Differential Revision: https://phabricator.fb.com/D3120166

Signature: t1:3120166:1459464981:60f19dd1e36d62776a69fa88c018122a4be27d87
2016-04-01 00:46:28 -07:00
Laurent Charignon
c640cac22d test: remove test-copytrace-bundle2.t, low signal, frequent breakage
Summary:
We remove this test because it frequently failed in the past and
we never really fixed it. Since we don't want to ship the feature in the near
future we might as well remove it.

Test Plan: Since we don't ship it it is okay

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Subscribers: quark, rmcelroy, mjpieters

Differential Revision: https://phabricator.fb.com/D3082539

Signature: t1:3082539:1458670710:1b5be4f47d5a38e8dc08f72206523afa121d31a4
2016-03-31 16:00:24 -07:00
Laurent Charignon
82f0ca5a93 fastmanifest: introduce revset of what revision to cache
Summary:
For the moment the revset is just the draft revisions, it will evolve
to include likely rebase destination, branching points etc ...

Test Plan:
We add the result of querying the revset to the test to evaluate how
well the prediction match what is actually being accessed

Reviewers: durham, rmcelroy, ttung

Reviewed By: ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3115578

Tasks: 10604335

Signature: t1:3115578:1459374926:f9df976aae07db05a44f1fb69a4c83c2a11969dc
2016-03-31 16:00:06 -07:00
Laurent Charignon
8533edcb44 fastmanifest: add test for rebase access pattern
Summary: Add test for rebase to see how it accesses manifests

Test Plan: This just adds a test

Reviewers: durham, ttung, rmcelroy

Differential Revision: https://phabricator.fb.com/D3109912
2016-03-31 14:23:08 -07:00
Mateusz Kwapich
cdc87102de logtoprocess: use glob in test 2016-03-31 13:37:26 -07:00
Mateusz Kwapich
b4ec1447c3 fbconduit: the deamon-postexec is a list now
Summary: upstream change broke tests

Test Plan: tests are fixed now

Reviewers: #sourcecontrol, quark, ttung, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3122221

Signature: t1:3122221:1459455094:a52eef1692b0bbf1acf8070760c3bfdc68d9c697
2016-03-31 13:34:21 -07:00
Mateusz Kwapich
3abf88d7d2 fbhistedit: use inhibit in histedit stop test
Summary:
It's no longer possible to amend during histedit without evolve,
also we need to make sure amending works with inhibit

Test Plan: tests

Reviewers: #sourcecontrol, lcharignon, ttung, durham

Reviewed By: durham

Subscribers: durham, lcharignon, rmcelroy, mjpieters

Differential Revision: https://phabricator.fb.com/D3120059

Signature: t1:3120059:1459455056:d178733b1b98cd269eae9f68b3b2ec6d8a140cb4
2016-03-31 13:32:49 -07:00
Mateusz Kwapich
7bcc261954 fix check-code 2016-03-31 12:43:16 -07:00
Mateusz Kwapich
d0fb9884af fbhistedit: pass extra parameter to gethisteditcomment
Summary: api has changed upstream

Test Plan: tests

Reviewers: #sourcecontrol, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3120055

Signature: t1:3120055:1459407683:a9f6be4df89aac9978d14cc876fb99383223ee86
2016-03-31 11:29:40 -07:00
Mateusz Kwapich
c9cdbc1a15 fbamend: pass the "interface = curses" in tests
Test Plan: tests

Reviewers: lcharignon, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters, #sourcecontrol

Differential Revision: https://phabricator.fb.com/D3119950

Signature: t1:3119950:1459407710:7ac150111e0f955f6b17cdec9a13950a59eb4bc4
2016-03-31 11:29:05 -07:00
Mateusz Kwapich
6f8286e7c1 smartlog: first citizen support the multiple roots in the repo
Summary:
This replaces the dirty hack preventing the smartlog from crashing on repo with
multiple roots with proper logic finding common ancestors one per group of
commits with the same root.

Test Plan: unit tests

Reviewers: #sourcecontrol, mjpieters, durham, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3119913
2016-03-31 11:26:15 -07:00
Mateusz Kwapich
2accf9cd1d smartlog: parent is now a tuple
Summary:
graphmod API has changed and now we need to provide the parents together with
the type of the parent relationship (parent, grandparent etc).

Test Plan: unit tests are passing

Reviewers: mjpieters

Differential Revision: https://phabricator.fb.com/D3119910
2016-03-31 11:26:15 -07:00
Laurent Charignon
de4ed36f0b test: make the tests pass check code
Summary: Someone checked in this code that does not pass check code

Test Plan: fix check code

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3108018
2016-03-29 09:06:21 -07:00
Laurent Charignon
ae6dfcd369 fastmanifest: add extension
Summary:
This extension will contain the logic for the fastmanifest. For the moment it
contains very simple logic to log manifest access and see if our assumptions are
correct about what manifest are accessed during typical workflow. This will
help build the code to figure out what manifests are worth caching.

Test Plan: add a new test

Reviewers: durham, rmcelroy, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3107990

Tasks: 10604335
2016-03-28 18:44:56 -07:00
Jing Qian
fa40278190 copy remote_bookmark reflog when sharing 2016-03-23 22:47:54 -07:00
Martijn Pieters
f0aac1fe38 New extension: Suppress the output generated by a broken commmand.
Summary:
When a command fails, the commandfailure signal is logged. Use the information
provided by this log call to suppress the warning and all traceback
information.

In combination with the logtoprocessui extension, this should replace the less
generic errorredirect extension.

Depends on D3082490

Test Plan: run $HG/tests/runtest.py test-suppresscommandfailure.t

Reviewers: #sourcecontrol, quark, ttung, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

Differential Revision: https://phabricator.fb.com/D3084144

Signature: t1:3084144:1458755837:39fea58ed89d03a611bfcfffa88af68a2d55fddc
2016-03-23 14:36:01 -07:00
Martijn Pieters
ba36592fba New extension: handle any ui.log event in an external process.
Summary: This would allow us to trace various events in Mercurial via external commands.

Test Plan: run $HG/tests/runtest.py test-logtoprocess.t

Reviewers: #sourcecontrol, ttung, durham

Reviewed By: durham

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.fb.com/D3082490

Signature: t1:3082490:1458686100:c727b033d97d0b15b294f8b2826cf20614caf269
2016-03-22 17:27:08 -07:00
Adam Simpkins
58070812c7 perftweaks: fix error handling code
Summary:
_preloadrevs() and _savepreloadrevs() weren't properly catching OSErrors.
Previously the code caught IOError, but these functions are more likely to
trigger OSError if they didn't have permission to create files.

Also eliminate some unnecessary os.path.exists() checks.  These checks just
perform extra system calls hitting the file system, and don't guarantee the
paths in questions actually exist by the time we get around to using them.

Test Plan: Ran the unit tests.

Reviewers: #sourcecontrol, ttung, lcharignon, durham

Reviewed By: lcharignon, durham

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

Differential Revision: https://phabricator.fb.com/D3080441

Signature: t1:3080441:1458667355:c3e81a19425b949a4c67fe620c37ea2e091d7eea
2016-03-22 11:44:39 -07:00
Adam Simpkins
81d088d2a8 phabstatus: fix extraneous semicolon
Summary: The test-check-code-hg.t test was failing due to this trailing semicolon.

Test Plan: Ran the test-check-code-hg.t, confirmed it no longer complains about the code.

Reviewers: #sourcecontrol, lcharignon, ttung, andersonmat

Reviewed By: andersonmat

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

Differential Revision: https://phabricator.fb.com/D3080440

Signature: t1:3080440:1458622832:f327c89378d3c8aadee9e69e391ed6a5b08af915
2016-03-22 11:44:36 -07:00
Durham Goode
1069b76390 pushrebase: support pushing to non-pushrebase repos
Summary:
If pushrebase was enabled on the client, it became impossible to push
to a non-pushrebase repo using --to, like remotenames allows. The fix is to
detect if remotenames is enabled and allow the default --to behavior.

Test Plan: Added a test

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3057066

Tasks: 9455435
2016-03-22 10:57:29 -07:00
Matt Anderson
b152e08b24 [diff] support --since-last-arc-diff option
Summary:
This adds `arcdiff.py` to wrap the mercurial diff command.

Once this is landed, the extension will need to be added to `facebook.rc`.

Test Plan: tested locally on www and fb-hgext

Reviewers: rmcelroy, durham, lcharignon

Reviewed By: lcharignon

Subscribers: jpasqualini, pyd, mjpieters, rmcelroy, lcharignon

Differential Revision: https://phabricator.fb.com/D3048888

Tasks: 10380812

Signature: t1:3048888:1458666821:78b5fde9f5523e40ffa6ae95fed1b773091e1be8
2016-03-22 10:45:57 -07:00
Adam Simpkins
db56b7802d [pullcreatemarkers] also obsolete parents of commits landed in this pull
Summary:
When a pull causes commits on the tip of a branch to be obsoleted due to
landing, make sure that parent commits that were landed in previous pulls also
get hidden.  The parent commits would already have obsolete markers, but they
would have been inhibited because there were non-obsolete children.  Once their
children are landed their obsolete markers can now be deinhibited.

Test Plan: Added a new test case.

Reviewers: #sourcecontrol, durham, lcharignon, ikostia, pyd, ttung

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

Differential Revision: https://phabricator.fb.com/D3028597
2016-03-21 18:08:04 -07:00
Matt Anderson
5a3f2bd489 [ssl] add phabricator timeout option
Test Plan: tested timeout on local repo to ensure it aborted the request correctly

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: ssl-diffs@, mjpieters, jpasqualini

Differential Revision: https://phabricator.fb.com/D3022145

Tasks: 10112339

Signature: t1:3022145:1458227284:8aa17f8e4f64e4b8cb2b04a55c3939f7bf2e011f
2016-03-17 08:09:36 -07:00
Archit Karandikar
eb1146e254 Addition to fix "hg git am"
Summary: Changes made to the githelp.py file so that the command 'hg git am' produces the correct output. Citation for corresponding git command: https://www.wikivs.com/wiki/Git_vs_Mercurial

Test Plan: Tested on my dev server using the command "hg git --config 'extensions.githelp=githelp.py' am" which produces the correct output: "hg mimport -m (Requires the MboxExtension and the MqExtension. Imports patches to mq.)". Screenshots are attached.

Reviewers: menglu, cdelahousse, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3034942

Signature: t1:3034942:1457641019:5307d255ee581fd05716222c087626d880ecc931
2016-03-10 14:03:22 -08:00
Durham Goode
6112a4e50c fbamend: fix fbamend not passing a rebase destination
Summary:
fbamend was not passing a rebase destination if you did not have an active
bookmark (it would just rebase onto the named branch tip). This broke when
upstream Mercurial started requiring you specify a rebase destination when it
was ambiguous.

The fix is to rebase onto the current commit (which is always the correct
behavior, since amend --rebase will have left you on that commit after the
amend, and amend --fixup discovers what needs rebasing by looking at your
current commit).

Test Plan: Added a test

Reviewers: #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3033728

Tasks: 10366715
2016-03-09 17:53:11 -08:00
Adam Simpkins
79eba28a06 [smartlog] fix the docs for the singlepublicsuccessor template keyword
Summary:
The singlepublicsuccessor docstring was missing the option name, causing it its
help text to show up by itself in the "hg help templates" output, without
mentioning what option it corresponded to.

Also add a "String." note at the beginning, to match the formatting of all the
other template help docs.

Test Plan: Ran "hg help templates" and confirmed the help formatting was fixed.

Reviewers: #sourcecontrol, durham, ikostia, ttung, rmcelroy

Reviewed By: rmcelroy

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

Differential Revision: https://phabricator.fb.com/D3027413

Signature: t1:3027413:1457483486:8a44af970ddb3ebbc7f3fe8ff61b15a6a5339030
2016-03-09 17:08:24 -08:00
Durham Goode
7c71d3f65d perftweaks: preload node-rev mappings
Summary:
I found that there's a 100ms delay in every Mercurial command from the
branchmap checking if every branch head is actually in the repository. This is
because checking an old head requires scanning and caching all the node-rev
mappings for hundreds of thousands of commits.

The fix is to keep a set of files that contain rev numbers of interest, then at
the beginning of the command we load look up the nodes for those revs (cheap
because rev's have a fixed offset in the changelog.i file), and store the
node-rev mapping in the cache. This takes about 6ms, vs the 100ms before.

Test Plan: Ran the mercurial test suite with this option enabled

Reviewers: mateusz, #sourcecontrol, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.fb.com/D3009456
2016-03-07 17:29:26 -08:00