Commit Graph

2094 Commits

Author SHA1 Message Date
Jun Wu
26b5601cf3 dirstate: respect gitignore
Summary:
Use the new gitignore matcher powered by Rust.

The hgignore matcher has some laziness, but is not tree-aware - with N
"hgignore" files loaded, it needs O(N) time to match.  The gitignore matcher
is tree-aware and backed by native code with decent time complexity.

We have been maintaining a translation script that collects all gitignores,
generate hgignore files with very long regexp for them. That script has
issues with sparse recently. This diff allows us to remove those generated
hgignore files from the repo.

Note: fsmonitor state does not contain ignored files. And ignore
invalidation is generally broken in fsmonitor (it only checks top-level
.hgignore). That means, once a file is ignored, it cannot be "unignored" by
just removing the matched pattern from ".gitignore". The file has to be
"touched" or so.

Reviewed By: markbt

Differential Revision: D7319608

fbshipit-source-id: 1763544aedb44676413efb6d14ffd3917ed3b1cd
2018-04-13 21:51:40 -07:00
Durham Goode
7c43ca7c6b hg: fix tests on OSX
Summary: sed -i without arguments doesn't work on OSX.

Reviewed By: farnz

Differential Revision: D7195193

fbshipit-source-id: a8eead927c94404a37ce5df956de82d29bc1b6a8
2018-04-13 21:51:24 -07:00
Jun Wu
b7eb2e64e3 mdiff: use xdiff for diff calculation
Summary:
Let's switch to xdiff for its better diff quality and performance!

The test changes demonstrate xdiff's better diff quality.

Reviewed By: ryanmce

Differential Revision: D7135206

fbshipit-source-id: 1775df6fc0f763df074b4f52779835d6ef0f3a4e
2018-04-13 21:51:21 -07:00
Jun Wu
884aac4596 xdiff: add a python wrapper
Summary:
Implement a `mercurial.cext.xdiff` module that exposes the xdiff algorithm.

`xdiff.blocks` should be a drop-in replacement for `bdiff.blocks`.

In theory we can change the pure C version of `bdiff.c` directly. However
that means we lose bdiff entirely. It seems more flexible to have both at
the same time so they can be easily switched via Python code. Hence the
Python module approach.

Reviewed By: ryanmce

Differential Revision: D7135205

fbshipit-source-id: 48cd3b5be7fd5ef41b64eab6c76a5c8a6ce99e05
2018-04-13 21:51:21 -07:00
Jun Wu
3dc0156874 xdiff: add a binary utility that runs xdiff
Summary:
Add a simple binary that runs xdiff in a minimal way. This is mainly for
exposing xdiff logic so it can be used in command line for testing purpose.

It also serves as an example of how to use xdiff.

Reviewed By: ryanmce

Differential Revision: D7133531

fbshipit-source-id: ceb608f5754b61eaa95804730b3c89643ff1837b
2018-04-13 21:51:20 -07:00
Jun Wu
65d9160c6f xdiff: vendor xdiff library from git
Summary:
Vendor git's xdiff library from git commit
d7c6c2369d7c6c2369ac21141b7c6cceaebc6414ec3da14ad using GPL2+ license.

There is another recent user report that hg diff generates suboptimal
result. It seems the fix to issue4074 isn't good enough. I crafted some
other interesting cases, and hg diff barely has any advantage compared with
gnu diffutils or git diff.

| testcase | gnu diffutils |      hg diff |   git diff |
|          |    lines time |   lines time | lines time |
| patience |        6 0.00 |     602 0.08 |     6 0.00 |
|   random |    91772 0.90 |  109462 0.70 | 91772 0.24 |
|     json |        2 0.03 | 1264814 1.81 |     2 0.29 |

"lines" means the size of the output, i.e. the count of "+/-" lines. "time"
means seconds needed to do the calculation. Both are the smaller the better.
"hg diff" counts Python startup overhead.

Git and GNU diffutils generate optimal results. For the "json" case, git can
have an optimization that does a scan for common prefix and suffix first,
and match them if the length is greater than half of the text. See
https://neil.fraser.name/news/2006/03/12/. That would make git the fastest
for all above cases.

About testcases:

patience:
Aiming for the weakness of the greedy "patience diff" algorithm.  Using
git's patience diff option would also get suboptimal result. Generated using
the Python script:

```
open('a', 'w').write('\n'.join(list('a' + 'x' * 300 + 'u' + 'x' * 700 + 'a\n')))
open('b', 'w').write('\n'.join(list('b' + 'x' * 700 + 'u' + 'x' * 300 + 'b\n')))
```

random:
Generated using the script in `test-issue4074.t`. It practically makes the
algorithm suffer. Impressively, git wins in both performance and diff
quality.

json:
The recent user reported case. It's a single line movement near the end of a
very large (800K lines) JSON file.

Reviewed By: ryanmce

Differential Revision: D7124455

fbshipit-source-id: 832651115da770f9d2ed5fdff2e200453c0013f8
2018-04-13 21:51:20 -07:00
Saurabh Singh
cc2a9a760d hg: remove facebook-hg-rpms related code
Summary:
Don't think this is required or used anymore and reveals information
about the structure of our project if we open source our mercurial.

Reviewed By: quark-zju

Differential Revision: D7128203

fbshipit-source-id: 4cdfa008631d08321a4d5a1c8f18cef429c35077
2018-04-13 21:51:20 -07:00
Adam Simpkins
a16342c83e cleanup: remove more copy-and-pasted code
Summary: copypasta

Differential Revision: D7064623

fbshipit-source-id: 09e34e86fa67c009e6f7803aa480d5de1328365c
2018-04-13 21:51:15 -07:00
Adam Simpkins
4ae93819ee delete copy-and-pasted bitmanipulation.h
Summary:
Delete hgext/extlib/cstore/bitmanipulation.h, and just use the existing
mercurial/bitmanipulation.h header file instead.

It looks like there are quite a few other copy-and-pasted files between these
directories too, which should probably still be cleaned up.

Reviewed By: quark-zju

Differential Revision: D7008478

fbshipit-source-id: 1fdc779b470242d3083a3948dace3951922e836c
2018-04-13 21:51:14 -07:00
Kostia Balytskyi
62b0f2b112 hg: add mman-win32 to the list of files, ignored by clang-format
Reviewed By: quark-zju

Differential Revision: D6979096

fbshipit-source-id: 42158cadb65ca20d5d603ab64c2ddc8d3e5d11e7
2018-04-13 21:51:11 -07:00
Jun Wu
9532336199 chg: do not start servers with --traceback
Summary:
In some tests using chg, `--traceback` got accidentally enabled for
commands without `--traceback`. That is a side effect starting
the server using `--traceback`. Let's avoid passing `--traceback`
when starting the server.

Differential Revision: D6942974

fbshipit-source-id: d40697c8a9487ae53ffb5ae43da4f4582ca86545
2018-04-13 21:51:09 -07:00
Jun Wu
f1c575a099 flake8: enable F821 check
Summary:
This check is useful and detects real errors (ex. fbconduit).  Unfortunately
`arc lint` will run it with both py2 and py3 so a lot of py2 builtins will
still be warned.

I didn't find a clean way to disable py3 check. So this diff tries to fix them.
For `xrange`, the change was done by a script:

```
import sys
import redbaron

headertypes = {'comment', 'endl', 'from_import', 'import', 'string',
               'assignment', 'atomtrailers'}

xrangefix = '''try:
    xrange(0)
except NameError:
    xrange = range

'''

def isxrange(x):
    try:
        return x[0].value == 'xrange'
    except Exception:
        return False

def main(argv):
    for i, path in enumerate(argv):
        print('(%d/%d) scanning %s' % (i + 1, len(argv), path))
        content = open(path).read()
        try:
            red = redbaron.RedBaron(content)
        except Exception:
            print('  warning: failed to parse')
            continue
        hasxrange = red.find('atomtrailersnode', value=isxrange)
        hasxrangefix = 'xrange = range' in content
        if hasxrangefix or not hasxrange:
            print('  no need to change')
            continue

        # find a place to insert the compatibility  statement
        changed = False
        for node in red:
            if node.type in headertypes:
                continue
            # node.insert_before is an easier API, but it has bugs changing
            # other "finally" and "except" positions. So do the insert
            # manually.
            # # node.insert_before(xrangefix)
            line = node.absolute_bounding_box.top_left.line - 1
            lines = content.splitlines(1)
            content = ''.join(lines[:line]) + xrangefix + ''.join(lines[line:])
            changed = True
            break

        if changed:
            # "content" is faster than "red.dumps()"
            open(path, 'w').write(content)
            print('  updated')

if __name__ == "__main__":
    sys.exit(main(sys.argv[1:]))
```

For other py2 builtins that do not have a py3 equivalent, some `# noqa`
were added as a workaround for now.

Reviewed By: DurhamG

Differential Revision: D6934535

fbshipit-source-id: 546b62830af144bc8b46788d2e0fd00496838939
2018-04-13 21:51:09 -07:00
Jun Wu
c9f1645a98 check-code: fix foo_bar naming detection and add a whitelist
Summary:
This patch fixes the regex. There are too many methods with underscores.
So a whitelist was added to avoid unnecessary churn of line numbers in
test-check-code.t.

Reviewed By: ryanmce

Differential Revision: D6937917

fbshipit-source-id: 9b7816278fc6f414c21f921b67d1cbb6a735a30f
2018-04-13 21:51:09 -07:00
Mark Thomas
eb36f462bf check-commit: remove test-check-commit
Summary:
`test-check-commit` gives false positives for some commits.  Remove it.

Facebook
The commits that give false positives include commits that are outside of
`fbcode/scm/hg`.

Reviewed By: quark-zju

Differential Revision: D6819543

fbshipit-source-id: ddfaae7350d4ad6503b7a7ec22e899bb7ae743df
2018-04-13 21:51:08 -07:00
Jun Wu
88dccd4a14 test-check: port some check-commit rules to check-code
Summary:
Port the double blank line and "foobar" naming rules to check-code.
check-commit checks "changes" while check-code checks "snapshot".

Checking changes would have a couple of disadvantages:
- No check after code is committed
- Could have difficulity dealing with commits involving other changes
  in a mono repo.

Facebook
Context: https://fb.facebook.com/groups/scm/permalink/1558174000898881

Reviewed By: DurhamG

Differential Revision: D6928820

fbshipit-source-id: 9ea998731778150b60112840bce702d9584ba15b
2018-04-13 21:51:08 -07:00
Jun Wu
4a7b28d08b serve: assign hg serve ports dynamically in tests
Summary:
Previously `hg server` uses `HGPORT` that might be in use. This patch uses
`-p 0 --port-file ...` so `hg server` always gets assigned a free port.

The change was first made by the following Ruby script:

```
re = /^  \$ hg serve(.*) -p \$(HGPORT[12]?) (.*[^\\])$\n  \$/
Dir['*.t'].each do |path|
  old = File.read(path)
  new = old.lines.map do |l|
    next l if l[/\(glob\)/] or not l['$HGPORT'] or l[/^  [$>]/]
    "#{l.chomp} (glob)\n"
  end.join.gsub re, <<-'EOS'.chomp
  $ hg serve\1 -p 0 --port-file $TESTTMP/.port \3
  $ \2=`cat $TESTTMP/.port`
  $
  EOS
  File.write(path, new) if old != new
end
```

Then there are some manual changes:

run-tests.py: It now treats `$HGPORT` in output as glob pattern `*`, since
it does not know the assigned value in tests.

test-bookmarks-pushpull.t, test-https.t: Some `hg pull`s were changed to use
explicit paths instead of relying on `.hgrc` since the test restarts the
server and `.hg/hgrc` having an outdated URL.

test-schemes.t: The test writes `$HGPORT` to `.hgrc` before assigning it.
Changed the order so the correct `$HGPORT` is written.

test-patchbomb-tls.t: Changed `(?) (glob)` to `(glob) (?)`.

Reviewed By: DurhamG

Differential Revision: D6925398

fbshipit-source-id: d5c10476f43ce23f9e99618807580cf8ba92595c
2018-04-13 21:51:07 -07:00
Jun Wu
79e07a5585 chg: prefix (re|m)allocx with chg_
Summary:
This solves issues when the binary is linked with another C library that define
those functions.

Reviewed By: DurhamG

Differential Revision: D6888242

fbshipit-source-id: d714c7eb18bc4c281912df50567e7f176d64a669
2018-04-13 21:51:03 -07:00
Jun Wu
5ae900b05d import-checker: consider lz4 as a system module
Summary:
This fixes `test-check-module-imports.t` running under `buck test`
because `lz4` is not treated as a system module.

Reviewed By: DurhamG

Differential Revision: D6881307

fbshipit-source-id: 26a7e2d36c1ae6815064de15c6bdcb6e762c8ddf
2018-04-13 21:51:01 -07:00
Jun Wu
e2a5493b04 basepack: workaround Python's mmap fd limit
Summary:
This is a resend of https://phab.mercurial-scm.org/D1430, without breaking
Windows.

I encountered "too many opened files" problem due to treemanifest packs on my
laptop. This patch seems to be the easiest solution without side effects. Other
choices are deleting files (seem like an non-ideal workaround), forcing a
repack (could be slow), and rewriting using Rust (could take too long).

The root cause is Python's `mmap` implementation has to keep a fd internally
to support `mmapobj.resize` API. We only need read-only operation on the
mmap object so the fd is unnecessary. Re-implement a minimal mmap interface
for this purpose.

Reviewed By: DurhamG

Differential Revision: D6835890

fbshipit-source-id: 74c429e957cb8677682604eb02fc38b5b8d13ef7
2018-04-13 21:51:00 -07:00
Andrew Regner
537d945c15 Do not probe the home directory because autofs
Summary:
I got tired of my prompt taking a long time to return to me sometimes after a command ended, and started to investigate, and found this:

```
aregner  4069767  0.0  0.0 115052  5076 pts/17   Ss+  12:32   0:00  \_ -bash
aregner   298922  0.0  0.0 115052  3540 pts/17   S+   14:40   0:00  |   \_ -bash
aregner   298923  0.0  0.0 115052  3668 pts/17   S+   14:40   0:00  |       \_ -bash
aregner   273995  0.0  0.0 115052  4824 pts/9    Ss+  14:32   0:00  \_ -bash
aregner   274061  0.0  0.0 115052  3820 pts/9    S+   14:32   0:00      \_ -bash
[devbig308 (77bac96|remote/fbcode/warm):~/2nd-fbcode] strace -p 298923
strace: Process 298923 attached
stat("/home/.hg",
```

Sometimes it will hang ong this for 5+ minutes.  I'm assuming this has something to do with autofs and NFS home dirs or something or another, but it doesn't matter because when it gets to this point it should just stop looking for a source control directory.

Reviewed By: ryanmce

Differential Revision: D6790747

fbshipit-source-id: d32c74476046aa6b62bc26725eea6b60a4eaa9f7
2018-04-13 21:50:59 -07:00
Jun Wu
19cda85a3a debugshell: enable it by default
Summary:
It's pretty handy. The implementation is simple and clean. So move it from
contrib and enable it by default. "import"s are adjusted to make the module
checker happy.

Security and UX wise, since we have `--debugger` already, adding another
REPL seems fine.

Test Plan: Ran all tests

Reviewers: phillco, #mercurial

Reviewed By: phillco

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

Signature: 6741283:1516225662:ddc19a663e7ecef2a1fdaa5041f308dc838a8471
2018-01-17 12:54:24 -08:00
Mateusz Kwapich
ccdc9763be hgsuversion: move docs and tools
Summary: Moves various tools from hgsubversion/ to contrib/hgsubversion

Test Plan: N/A

Reviewers: quark, #mercurial

Reviewed By: quark

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

Signature: 6698604:1515628552:cfae17dcfdbc96d978a6af5c19dfa1032e8aa48c
2018-01-10 16:20:15 -08:00
Durham Goode
1143152a51 contrib: move builddeb to contrib/builddeb_fb/ 2018-01-09 16:44:27 -08:00
Durham Goode
bd2d632274 contrib: move git-sl 2018-01-09 16:30:14 -08:00
Durham Goode
81f30f45fb scripts: move fb-hgext/scripts/ to contrib/ 2018-01-09 16:22:02 -08:00
Jun Wu
f1518f6d73 check-module-imports: fix fastannotate, absorb and traceprof
Summary:
Reorder the imports to make the module checker happy.
The module checker should be aware of Cython module paths. Do it manually.

Test Plan: Run `test-check-module-imports.t`

Reviewers: durham, #mercurial

Reviewed By: durham

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

Signature: 6688384:1515540420:bec02696b24c12cb4fa2595fd235fc8f3246b2a2
2018-01-09 15:10:05 -08:00
Jun Wu
a5976a9d50 traceprof: move to hgext and make it more portable
Summary:
Get rid of `gettimeofday` and switch to C++11 `std::chrono` for Windows/rare
platform compatibility.

Also format the code using clang-format.

Test Plan:
Make sure it build on both x64 and Power8 platform.
`make local` and try it in IPython:

```
In [1]: from hgext import traceprof

In [2]: def f():
   ...:     g(1)
   ...:

In [3]: def g(x):
   ...:     print(x+1)
   ...:

In [4]: from mercurial import ui

In [7]: with traceprof.profile(ui.ui(), sys.stderr):
   ...:     f()
   ...:
2
    | <module>                                  ipython2:3
    | start_ipython                             IPython/__init__.py:93
    | launch_instance                           application.py:650
    | start                                     ipapp.py:342
    | mainloop                                  interactiveshell.py:479
    | interact                                  interactiveshell.py:459
    | run_cell                                  interactiveshell.py:2591
    | run_ast_nodes                             interactiveshell.py:2770
    | run_code                                  interactiveshell.py:2851
    | <module>                                  <ipython-input-7-2e5a012739d1>:1
    | __exit__                                  contextlib.py:21
Total time: 0 ms
```

Note: it crashes on Windows, which will be workarounded in a later patch.

Reviewers: rmcelroy, #mercurial

Reviewed By: rmcelroy

Subscribers: fried

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

Tags: aarch64

Signature: 6681062:1515488414:6b7a51eda9e9764560d415350630590e4817fae2
2018-01-08 17:45:51 -08:00
Durham Goode
253f51f15e treemanifest: move to hgext/
Summary: Moves the extension itself.

Test Plan:
make local && ./run-tests.py

A future patch fixes the tests once
fastmanifest is also moved.

Reviewers: phillco, #mercurial

Reviewed By: phillco

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

Signature: 6684580:1515521896:68a4d648d9f5433d6eeda8be01740fbe12abf44e
2018-01-09 11:06:49 -08:00
Saurabh Singh
9da30944be cfastmanifest: move to hgext/extlib/
Summary:
Moves ctreemanifest into hgext/extlib/. D6679698 was committed to scratch branch
by mistake.

Test Plan: make local && cd tests && ./run-tests.py

Reviewers: durham, #mercurial, #sourcecontrol

Reviewed By: durham

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

Signature: 6684623:1515522634:9bec363d00990d9ff7d5f655e30ab8cae636155c
2018-01-09 10:36:54 -08:00
Ryan McElroy
66bd74e558 hggit: internalize extension
Test Plan: run-tests-.py

Reviewers: mitrandir, #mercurial

Reviewed By: mitrandir

Subscribers: ps, terrelln

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

Tasks: T24908724

Signature: 6675896:1515448382:df8d80cd7356ae8f5fb04586dc4a0a651bc498fd
2018-01-09 06:08:01 -08:00
Durham Goode
228e6a901e cstore: move to hgext/extlib/
Summary: Moves cstore to hgext/extlib/ and makes it build.

Test Plan: make local && run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6678852
2018-01-08 17:55:53 -08:00
Durham Goode
3ae4bd8cf5 ctreemanifest: move to hgext/extlib/
Summary:
Moves ctreemanifest into hgext/extlib/. It will be built in a later
step when we add cstore to the build.

Test Plan: make local && cd tests && ./run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6678844
2018-01-08 17:55:53 -08:00
Durham Goode
eb099b7fe1 cdatapack: move to lib/
Summary:
This moves the cdatapack code to the new lib/ directory and adds it to the main
setup.py.

Test Plan: hg purge --all && make local && cd tests && ./run-tests.py -S -j 48

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6677491
2018-01-08 17:55:53 -08:00
Jun Wu
1802036ff3 linelog: move to lib/ and mercurial/cyext
Summary:
The `lib/linelog` directory contains pure C code that is unrelated from
either Mercurial or Python. The `mercurial/cyext` contains Cython extension
code (although for linelog's case, the Cython extension is unrelated from
Mercurial).

Cython is now a hard dependence to simplify the code.

Test Plan: `make local` and check `from mercurial.cyext import linelog` works.

Reviewers: durham, #mercurial

Reviewed By: durham

Subscribers: durham, fried

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

Signature: 6678541:1515455512:967266dc69c702dbff95fdea05671e11c32ebf28
2018-01-08 14:35:01 -08:00
Durham Goode
0938fe19a3 clib: move fb-hgext/clib/ to lib
Summary:
cdatapack depends on clib, so let's move it to lib/ outside of fb-hgext.

None of the consumers of these files were changed. They will be changed as they
are moved into the main part of the repo.

Test Plan: hg purge --all && make local && cd tests && ./run-tests.py -S -j 48

Reviewers: mitrandir, #mercurial

Reviewed By: mitrandir

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

Signature: 6677197:1515447873:399fb3e7beb5cc1ad8db18f42b359ffbfbeb21f2
2018-01-08 15:08:18 -08:00
Durham Goode
1ab0bb112d sha1: add sha1detectcoll library to setup.py
Summary:
cdatapack depends on sha1detectcoll, so let's add the library to setup.py before
we add cdatapack.

Test Plan:
hg purge --all && make local && cd tests/ && ./run-tests.py -S -j 48

Verified sha1dc was in the build output and the tests passed.

Reviewers: quark, #mercurial

Reviewed By: quark

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

Signature: 6676405:1515444508:2da65c6c3a18267a1d3c151c8e9acf60b674ffc2
2018-01-08 12:54:57 -08:00
Kostia Balytskyi
e30b4a6f83 fb-hgext: ignore test-check-clang-format failures 2018-01-03 09:46:16 -08:00
Durham Goode
f13c34a644 serve: move hg-ssh readonly logic into hg serve
Recently hg-ssh was changed to block writes via in-memory hook configuration
instead of by passing config hooks, and dispatch.py blocks any invocation of hg
serve --stdio that has options passed. We have infrastructure that sets up read
only serve processes without using hg-ssh, and it was broken by this change.

Let's add a --read-only option to hg serve so non-hg-ssh solutions can still
launch hg in read-only mode. This makes it also work with non-stdio serve
processes as well.
(grafted from 7a0ed9aad8526f689343a5a02aa4a66e5f3be1f2)
(grafted from bf33f750447d8b0dfeae2a311e1d1eb93e19d6a0)
(grafted from 9ada6a6e4ac2a92325592cd58edd9160e17c9e31)
(grafted from 50e676e99c3b7cc929ceaaebbd3c684a8a58f9d8)
(grafted from 01833a49fa4dca204dc0e606f21279530925307c)
(grafted from 301af2e1a42fe912acf90ae9a87ca6a20ce5cd5d)
(grafted from 6ae2eaad3edbfdfb04ac5880a86341e69980529c)
(grafted from fcdedd417b29d28797840fc2393e0ff846fa54c8)
(grafted from ddda3705adfb2ac103f506d694d2b30028dfaca9)
(grafted from 138e3cf3bc394c4ff507341a390e1876c7104042)
(grafted from f8073d595e87086213525dbb642962b84158ee9a)
(grafted from 96bac04dc722030250a53616f0fb55125829f25e)
(grafted from 2aeed48cc3b3324b564343d8515aed1ecec69b14)
(grafted from 4fb2e02a273c868febdae9530b0a07a53a0e92a7)
(grafted from c57b28835f0b880c075d5b8aa99ddb9da54b21b1)
(grafted from 35fd78b021bec96db63e8dd99f98efc3b2342380)
(grafted from 9ac14f96c9a82068f07a709374f359283c206791)
(grafted from 4b64c191a9aacd52ea58ae8ec943605667759398)
(grafted from 1db390a79e32db12dde7a225e26b86ed245f9473)
(grafted from 9a999ed1ce50af8e5fa03dc270488c37304d8c94)
(grafted from b6791f2eb83f176192c9df50c736bc4c54fab5a6)
(grafted from 4b6e87c5be38d9971399e4ad989e4261f283b93a)
(grafted from ae660c075b4af0849d1ff5d36404ef66aeea9933)
(grafted from ff0f3bf0834b38a527654495369cd538ca8744f4)
(grafted from bff8177767c9023295ff93bc520114bb909952a8)
(grafted from 05a833e4071b9da7b447669f6bd8a3f62c1d3c27)
(grafted from be8ab299731fb8295efbe10a014798c7a177d4a0)
(grafted from beec2bc2ebd9eaf7093bba5fca8fef07c669d970)
(grafted from 03d88ba3cd8795d17a99dc1b50ac55e1937d38e1)
(grafted from 92a33bc0d275a96c61553f8bccefcd32f1360931)
(grafted from 3d37833f54e37356f3e32db2ad8fb2ffe4fa14f2)
(grafted from 77fa3393787a9410e14afc26465abb5561253075)
(grafted from 9d908f86cc7986c167cef5cdccaabb565fd2bc04)
(grafted from 0dbc2023c42f72aea6b608e5111725163dcbb64b)
(grafted from 3acf4e9bb718617efaf31abcba583b9b7be2559d)
(grafted from c671696a06e418f5f040427efb3e51fe4c9fa6cd)
(grafted from 309f11e682eb3c6fa497bf767cbcbef3b0dbaf4b)
(grafted from 4f828ef4b70a6a16fe747d5f6393042bff204b5e)
(grafted from 71193e84a71d029dedc744882978285cbe5722e6)
(grafted from 2929832c61c9727bd884f94da5afa29e80334a96)
(grafted from 2ff8a9f1761f82ffa8ebd2a96d86f7de7c712d9c)
(grafted from b438cb1e6cff36e7e197da7669def8a5e528053c)
(grafted from a9ed103481b779af9e160d2b81a9bfe81cc7d173)
(grafted from d139e95d22dc811002dafef1ecaac5dac99825fe)
(grafted from b4e41a9f2c3a6328ada72810407686d11833347c)
(grafted from 2b3826c7b3bdf669b397f1ad31ae106a05d7b05b)
(grafted from 23737fb5e1d6874cf79a1eb841dd1614c0295a1b)
(grafted from 69588396b17d3dafeece8bc9e2101559d871d9fb)
(grafted from b3252a277a53b1657e6bcf31359b413d2becffcc)
(grafted from 12c8e6062d34d4d6cf0b0128084278800a1ed8f7)
(grafted from 8ce5c67748afbe6e82fc3f822e35ddc58cb03694)
(grafted from b0f656426efcf9a70386b1c781507f40ab95af49)
(grafted from 147ae96993dcffbed2f39f31795ef3d60631d43f)
(grafted from 2ecb34a565accf638e6004c59aa5b2d2361f9428)
(grafted from 6bfc53cd4c479b4e789d4086a2c7c2f4045a288f)
(grafted from bf73f92394a079928db6d4b0b3e7aa78448af91a)
(grafted from b69a654342339eb740527fc84af523eb53edeb71)
(grafted from 3f090f44e8a33cde8d5708454a5292d0976269e6)
(grafted from ac4432275d3b750405e53f67b1267579764f4fee)
(grafted from dbfd0bce0eded53dc7d824393f03ddd2f2e693fb)
(grafted from bf7087d072ca6c5d5dac2ddef4c43339d02f6133)
(grafted from b9d63feb8c90f83e74f3e9a89328419c81088082)
(grafted from 718e93a4e545f3e16d09c66f210a567427f1068a)
(grafted from e0ba57c8bf13ccc45b7eaa62d64e03038cd002ad)
(grafted from 5c849011421ad00ef190c2bf15c640656424f681)
(grafted from e833de714167fe6039b42f1cd1890b0470a32ea2)
(grafted from 480872890137130564910a29ed8ef3890810f0c4)
(grafted from 6224dc455a24542cf7d55721fceb14a08e92d391)
(grafted from 24ced5d2b0d6fb837a3994a80ef808e29f62ccc5)
(grafted from 452eb5c8624cc22867fafa692c6c7905e46da27a)
(grafted from cdc9f1b121878c26c986eca2233b5d03ea50ad74)
(grafted from 8b3a45fe3a612fdbee3a1f291f41bfaadfd16a6f)
(grafted from 2a07c0b3cb9785a9f8d5d669b885044e4d4544b1)
(grafted from 56d892df53cfdf3a13f38cd386a437ea59ef0d77)
(grafted from b63c65fad2d28a86a3bc3871d58e45019b11e6a1)
(grafted from 8618bd56f309543d8577000a4310fdf8648f1087)
(grafted from e04c7ddddc5cc40d6347d2336b81d5be2289243e)
(grafted from 5951fe6318d02a9b739f0174f3aecc3d5eead31c)
(grafted from 0f4d380f641a55791ca9eef13cd49da24cf40a7a)
(grafted from d7ecf3376e572d77b670cbe2184370b08d38dcf7)
(grafted from a75534c9e6d7a481303096e44e265593fb5b0b2f)
2018-01-03 05:35:56 -08:00
Matt Harbison
17e2258c44 tests: fix the check-code rule for testing non-existent files
I missed this in d3e2086bc411.
2017-12-16 12:34:40 -05:00
Matt Harbison
44a151c9d6 tests: convert the 'file://\$TESTTMP' rule to an automatic substitution
The rule only triggered on non Windows platforms, even though Windows also
required an adjustment.  Automatic seems better.

The aggressive globbing in test-subrepo-svn.t was found and rewritten by the
substitution.
2017-12-16 11:32:10 -05:00
Yuya Nishihara
3a0cd26f9a check-code: remove unused variable 'winglobmsg'
Follows up 217bd5cb0914.
2017-12-14 22:26:46 +09:00
Martin von Zweigbergk
14dfe2a25c memfilectx: make changectx argument mandatory in constructor (API)
committablefilectx has three subclasses: workingfilectx, memfilectx,
and overlayfilectx. committablefilectx takes an optional (change) ctx
instance to its constructor. If it's provided, it's set on the
instance as self._changectx. If not, that property is supposed to be
defined by the class. However, only workingfilectx does that. The
other two will have the property undefined if it's not passed in the
constructor. That seems bad to me. This patch makes the changectx
argument to the memfilectx constructor mandatory because that fixes
the failure I ran into. It seems like we should also fix the
overlayfilectx case.

Differential Revision: https://phab.mercurial-scm.org/D1658
2017-12-11 09:27:40 -08:00
Martin von Zweigbergk
591bc82392 synthrepo: create filectx instance in 'filectxfn' callback
I would like to pass the memctx to the memfilectx constructor, but
it's not available where we currently create the memfilectx. It is
available in the 'filectxfn' callback, so let's create the memfilectx
there instead. A later patch will start actually passing the memctx.

Differential Revision: https://phab.mercurial-scm.org/D1669
2017-12-09 14:15:30 -08:00
Matt Harbison
1c506fb28b check-code: drop the rules for adding (glob) for Windows paths
I'll probably resurrect at least some of these as replacement patterns to switch
'\' to '/' when creating tests at some point.  But since this subset of globs
isn't needed anymore after 1c1248ea2685, and the rules are blocking the glob
removal, just drop them for now.  It probably isn't worth turning them into
checks for unnecessary globs being present.
2017-12-10 22:45:35 -05:00
Anton Shestakov
d2fc494432 hgweb: implement json-graph
It's essentially a copy of json-log with graph-related things added (col, row,
color, edges).
2017-12-07 17:18:29 +08:00
Pulkit Goyal
c686f85e02 py3: add 32 new tests passing to the whitelist
Yay, we have crossed 100 in number of tests passing on Python 3. There are 662
tests in our test suite, so there is a lot more which is need to be done.

Differential Revision: https://phab.mercurial-scm.org/D1648
2017-12-10 05:41:05 +05:30
Yuya Nishihara
2cc325585b check-code: allow tabs in heredoc 2017-12-09 00:39:15 +09:00
Augie Fackler
b9c19b5c5b contrib: ban find(1)'s -printf operator, as it is a GNU-ism
Differential Revision: https://phab.mercurial-scm.org/D1598
2017-12-05 16:44:20 -05:00
Augie Fackler
35d780eef2 python3: whitelist many more passing tests
Differential Revision: https://phab.mercurial-scm.org/D1584
2017-12-04 15:30:30 -05:00
Anton Shestakov
7187e609f7 spartan: render changesets server-side on /graph page 2017-12-04 19:08:41 +08:00