Commit Graph

29 Commits

Author SHA1 Message Date
Durham Goode
0ae182a740 hg: default to using bundle2 for pushrebase parts
Summary:
Pushrebase previously defaulted to bundlev1. Now that the server can
support v2, let's default to v2.

Reviewed By: quark-zju

Differential Revision: D7591174

fbshipit-source-id: bc5448490ff319543baedf3f5a1aab160a73ed27
2018-04-13 21:51:53 -07:00
Jun Wu
238cda6c14 amend: use hint framework for restack
Summary: This allows people to silence the hint.

Reviewed By: markbt

Differential Revision: D7392127

fbshipit-source-id: ac16f952a178d567ce13e22946127456972ebe85
2018-04-13 21:51:49 -07:00
Aida Getoeva
93252b7fd2 Enable batch mode for SSH during background pushbackup
Summary:
Added passing BatchMode option to SSH call only when puchbackup runs in background.
Also fixed dummyssh in skipping options before hostname, added unittest.

Reviewed By: quark-zju

Differential Revision: D7119123

fbshipit-source-id: 2c8e66fee44cca5b23389cba8e21e3a0b237268e
2018-04-13 21:51:21 -07:00
Durham Goode
8038c6ea27 hg: support cg2 in pushrebase
Summary:
Previously pushrebase would only send changegroups using the cg1
format. remotefilelog will soon require cg2 (and it results in better deltas
anyway), so let's change pushrebase to allow using cg2.

Initially it is off by default. We will change it to be on by default once the
server has been upgrade to to handle the received part.

Reviewed By: mjpieters

Differential Revision: D7108732

fbshipit-source-id: ff4ad3a3fc2801aec4876db30c8130ce743b2e6a
2018-04-13 21:51:19 -07:00
Thomas Jacob
0e6b93a0e0 Add support for RocksDB
Summary:
- Add support for RocksDB engine (developed as a drop in replacement for innodb) to hgsql to allow new xdb.hgsql.1-10 shards to host hg repos
- Prefer MySQL test DBs in same region
- Run all hgsql unit tests also for RocksDB engine
- Allow for nested ifs to make that possible (downside if you switch off rockdb tests, innodb tests are run twice)

Reviewed By: quark-zju

Differential Revision: D7014064

fbshipit-source-id: 073c36176aa7eaf74252ef33c3f47da594920b28
2018-04-13 21:51:13 -07:00
Mainak Sen
20bcf91c66 fbamend: a config flag for skipping autorebase for hg amend
Reviewed By: quark-zju

Differential Revision: D6947242

fbshipit-source-id: cf22cf5f514825d7e09aade90f1c9efdc7f73fa1
2018-04-13 21:51:11 -07:00
Phil Cohen
7bcdda8bfc simplecache: allow debug output to be switched off
Summary:
This extension can be a bit noisy when defaulted-on. Let's disable its debug output in
tests (except fot its own tests).

Differential Revision: D6777765

fbshipit-source-id: e2a6c6b7527336a1fac24078d2b49eb1e75ecabf
2018-04-13 21:50:55 -07:00
Durham Goode
a99b9eb0c2 sparse: add back sparse.py
Summary:
Some consumers still rely on enabling 'sparse=' so let's add a module
that just redirects to the real fbsparse.py.

Also updates configerator to use the newer name.

Reviewed By: markbt, quark-zju

Differential Revision: D6755971

fbshipit-source-id: 3a67f029045dacf927742a616a714fe632b97fea
2018-04-13 21:50:53 -07:00
Jun Wu
97dfe79221 perftweaks: fold isgooddelta tweak into core
Summary:
The isgooddelta tweak was introduced in D2693043 (perftweaks: change revlog
delta heuristic, 2015-11-24).  Comparing with the existing version, the only
change is that we removed `dist > maxdist` check.

Note that the upstream commit 895ecec31 (revlog: add an experimental option
to mitigated delta issues (issue5480), 2017-06-23) also introduces a config
option to override `maxdist` to make the condition fail, which basically does
a same thing.

Instead of introducing new config options or adding more "if"s to the
codebase to make it more obscure, let's just simplify it by disabling the
check entirely, and removing the `dist` concept, removing two config
options: `experimental.maxdeltachainspan` and `perftweaks.preferdeltas`.

The `chainlen > self._maxchainlen` check should be enough for keeping
delta chain length bounded.

Reviewed By: DurhamG

Differential Revision: D6752529

fbshipit-source-id: e8fd8ec39240191db5fb274190fc661e97087a78
2018-04-13 21:50:53 -07:00
Kostia Balytskyi
262eba6775 tests_: accept some more recently-introduced test-check failures
Summary: To be fixed later, now I need to test the hgbuild.

Differential Revision: D6748921

fbshipit-source-id: 519555286a43ef7852e37b699e30197c1ad85424
2018-04-13 21:50:52 -07:00
Kostia Balytskyi
4ba9c92043 fb-hgext: remove the directory
Summary: We've moved everything over!

Test Plan: - I like to live dangerously

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6693267
2018-01-10 08:48:02 -08:00
Ryan McElroy
7ccc849e01 hgsubversion: allow undocumented configs for now 2018-01-03 11:51:20 -08:00
Richard Langston
9803957e8a hg-git: accept config test failures 2018-01-03 10:06:35 -08:00
Kostia Balytskyi
3f6704f1ce fb-hgext: accept test-check-config failures 2018-01-03 09:46:16 -08:00
Mark Thomas
355f57bd1a hgsql: accept new test failures 2018-01-03 07:03:21 -08:00
Stanislau Hlebik
23dd2cf1eb remotenames: accept test failures 2018-01-03 06:28:53 -08:00
Matt Harbison
7d8bebd9c1 tests: remove (glob) annotations that were only for '\' matches
# skip-blame because this was mechanically rewritten the following script.  I
ran it on both *.t and *.py, but none of the *.py changes were proper.  All *.t
ones appear to be, and they run without addition failures on both Windows and
Linux.

  import argparse
  import os
  import re

  ap = argparse.ArgumentParser()
  ap.add_argument('path', nargs='+')
  opts = ap.parse_args()

  globre = re.compile(r'^(.*) \(glob\)(.*)$')

  for p in opts.path:
      tmp = p + '.tmp'
      with open(p, 'rb') as src, open(tmp, 'wb') as dst:
          for line in src:
              m = globre.match(line)
              if not m or '$LOCALIP' in line or '*' in line:
                  dst.write(line)
                  continue
              if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'):
                  dst.write(line)
                  continue
              dst.write(m.group(1) + m.group(2) + '\n')
      os.unlink(p)
      os.rename(tmp, p)
2017-12-10 22:50:57 -05:00
Ryan McElroy
5a6e1ad8d5 check-config: mention the file and line of the error
I used this to more quickly track down a failing test-check-config.t issue
in another repo. I thought it might be useful more generally, so I'm sending
it out in case others think it's a worthwhile change.
2017-07-18 06:27:36 -07:00
Yuya Nishihara
8f3fa790c1 tests: alias syshg and syshgenv so they can be switched conditionally 2017-07-02 13:14:20 +09:00
Gregory Szorc
e4b6d44784 check-config: syntax to allow inconsistent config values
The ignore regular expression has been updated to detect
"inconsistent config." If present, we track which configs have
that set and we suppress the conflicting defaults error for those
options.

I also added named groups to the regexp to aid readability.

A comment was added to profiling.py to make a desired inconsistent
value error go away.
2017-07-01 20:34:27 -07:00
Adam Simpkins
55a457de69 tests: use the system hg for examining the local repository
Most test scripts use "hg" to interact with a temporary test repository.
However a few tests also want to run hg commands to interact with the local
repository containing the mercurial source code.  Notably, many of the
test-check-* tests want to check local files and commit messages.

These tests were previously using the version of hg being tested to query the
source repository.  However, this will fail if the source repository requires
extensions or other settings not supported by the version of mercurial being
tested.  The source repository was typically initially cloned using the system
hg installation, so we should use the system hg installation to query it.

There was already a helpers-testrepo.sh script designed to help cope with
different requirements for the source repository versus the test repositories.
However, it only handled the evolve extension.  This new behavior works with
any extensions that are different between the system installation and the test
installation.
2017-06-27 17:24:31 -07:00
Augie Fackler
e5d7bd82c5 cleanup: use $PYTHON to run python in many more tests
Spotted one of these, then wrote a check-code rule that caught them
all. It will be the next change.
2017-06-20 09:45:02 -04:00
Gregory Szorc
768455e422 profiling: allow configuring minimum display threshold for hotpath
statprof.display_hotpath() accepts a "limit" function to choose the
minimum threshold for samples to display. The default is 0.05, which
means you don't need individual items contributing less than 5%.

I had a need to adjust this threshold. We already have a config
option for it. So let's reuse it.

check-config.py doesn't like having multiple defaults for the
ui.configwith() calls. The behavior is obviously correct. I'm
not sure if it is worth teaching check-config.py how to ignore
this. So I've just accepted the new output.
2017-06-15 11:10:51 -07:00
Gregory Szorc
a71e4d026c config: document profiling.show{min,max} 2017-06-15 11:04:46 -07:00
Gregory Szorc
31b468ec11 check-config: look for ui.configwith
We previously weren't looking for this config helper. And, surprise,
profiling.py references config options without docs.

If I tried hard enough, I could have combined the regexps using a
positive lookbehind assertion or something. But I didn't want to make
my brain explode.

At some point, we should probably do this linting at the tokenizer or
ast layer. I'm not willing to open that can of worms right now.
2017-06-15 10:58:36 -07:00
Gregory Szorc
6a1e29bbcc tests: add test coverage for check-config
We didn't have explicit test coverage before. I broke check-config.py
as part of writing patches and was lucky I realized it.
2017-06-15 10:46:39 -07:00
timeless
0c82fc02cd tests: silence test-repo obsolete warning
refactoring test-check-commit.t HGRCPATH bits as helpers-testrepo.sh
2016-05-11 04:49:27 +00:00
FUJIWARA Katsunori
c217cd84b3 tests: execute check-config.py without xargs
Before this patch, test-check-config.t fails on Solaris, because
"xargs" doesn't invoke check-config.py with all filenames at once.

"xargs" may invoke specified command multiple times with part of
arguments given from stdin: according to "xargs(1)" man page, this
dividing arguments is system-dependent.

For portability of test-check-config.t, this patch adds "xargs" like
mode to check-config.py and executes it in test-check-config.t without
"xargs".
2016-02-05 22:32:05 +09:00
Pierre-Yves David
7cae660c88 tests: move the '-hg' postfix for all style tests
We had them on 'test-check-code-hg.t' to avoid collision with the test checking
'check-code' itself. Now that this one have been rename, we can safely remove
this suffix for all of them. This get them in line with 'check-pyflakes.t'.
2015-12-05 22:49:39 -08:00