- Aug 29, 2018
-
-
Boris Feld authored
When interacting with non-publishing repository or bundle, it is useful to have some information about the phase of the changeset we just pulled. This changeset updates the "new changesets MIN:MAX" output to also includes phases information for non-public changesets. Displaying extra data about non-public changesets means the output for exchange with publishing repository (the default) is unaffected.
-
- Sep 08, 2018
-
-
Matt Harbison authored
Per the followup discussion[1]. proc.send_signal(INT) in timeout.py raises a ValueError because of an unsupported signal. I don't like missing test coverage for this on Windows. But this is the last test failing on Windows, and red all the time hides new failures. [1] https://phab.mercurial-scm.org/D3716
-
Matt Harbison authored
The message on Windows comes from win32.unlink(). It looks like os.unlink() on posix platforms is a simple call to unlink(3), which turns into unlinkat(2). Since there's a comment in one of the tests that the message should be improved, I don't think it's worth adding a check in win32.unlink() to see if it's empty, if that function is always going to fail on a directory. (It seems like the POSIX spec allows unlinking directories though.)
-
- Sep 07, 2018
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D4507
-
- Sep 08, 2018
-
-
Yuya Nishihara authored
-
Yuya Nishihara authored
-
- Sep 06, 2018
-
-
Boris Feld authored
It seems odds to first issue the "source" revs and then the other ancestors. In addition, doing so can break the other contract of always issuing a child before its parent. We update the code to apply the same logic to all yielded revision. No tests break so we seem in the clear except where we explicitly test the order.
-
Boris Feld authored
This code previously used a dequeue logic, the first ancestors seen were the first ancestors to be emitted. In branching/merging situations, it can result in ancestors being yielded before their descendants, breaking the object contract. We got affected by this issue while working on the copy tracing code. At about the same time, Axel Hecht <axel@mozilla.com> reported the issue and provided the test case used in this changeset. Thanks Axel. Running `hg perfancestors` does not show a significant difference between the old and the new version.
-
Yuya Nishihara authored
-
- Aug 26, 2018
-
-
Yuya Nishihara authored
Since hgweb is an interface to repository data, we don't need to prohibit any paths conflicting within the filesystem. Still an access to working files is audited by filectx.
-
Yuya Nishihara authored
Abort is so common in our codebase. We could instead introduce a dedicated type for path auditing errors, but we'll probably have to catch error.Abort anyway. As you can see, an abort message may include a full path to the repository, which might be considered information leak. If that matters, we should hide the message and send it to the server log instead.
-
- Sep 07, 2018
-
-
Yuya Nishihara authored
-
Yuya Nishihara authored
-
Augie Fackler authored
-
- Sep 04, 2018
-
-
Pulkit Goyal authored
Before this patch, we are testing `hg tracked --addinclude` by adding a command which is not introduced in the changesets till now. If you closely look at the tests, wider/f was introduced on the server after the narrow clone was done and extending the existing clone to include wider/f does not make sense. We should test extending a file which exists. Differential Revision: https://phab.mercurial-scm.org/D4452
-
Pulkit Goyal authored
This patch improves the error message and uses util.readfile() for reading narrowspecs file while cloning. Differential Revision: https://phab.mercurial-scm.org/D4462
-
Gregory Szorc authored
All I/O is supposed to be performed via vfs instances so filesystems can be abstracted. The previous commit ported the old code in purge, which didn't go through the vfs layer. This commit ports the purge code to use the vfs layer. The vfs layer didn't have a method to remove a single directory, so it was added as part of implementing this. Differential Revision: https://phab.mercurial-scm.org/D4478
-
- Sep 07, 2018
-
-
Gregory Szorc authored
Working directory purging feels like functionality that should be in core rather than in an extension. This commit effectively moves the core purging logic from the purge extension to merge.py. Code was refactored slightly. Rather than deal with printing in this function, the function is a generator of paths and the caller can worry about printing. Differential Revision: https://phab.mercurial-scm.org/D4477
-
Matt Harbison authored
-
- Sep 06, 2018
-
-
Yuya Nishihara authored
-
- Aug 18, 2018
-
-
Kyle Lippincott authored
This improves the speed of visitchildrenset considerably, especially when there are complicated matchers involved that may have many entries in _dirs or _parents. Unfortunately the benchmark isn't easily upstreamed due to its reliance on https://github.com/vstinner/perf (primarily due to the conflict when importing it if I were to contribute the benchmark as contrib/matcherbenchmarks.py) instead of asv or some other perf measurement system. To describe the benchmark briefly: I generated an includematcher of either 5 or 3500 "rootfilesin:prefix1/prefix2/prefix3/<randomsubdirs, 1-8 levels deep>" items in the 'setup' function, and then called `im.visitchildrenset('prefix1/prefix2')` in the 'stmt' function in perf.timeit. For the set of 5: - before: 15.3 us +- 2.9 us - after: 1.59 us +- 0.02 us For the set of 3500: - before: 3.90 ms +- 0.10 ms - after: 3.15 us +- 0.09 us (note the m->u change) Differential Revision: https://phab.mercurial-scm.org/D4351
-
- Sep 05, 2018
-
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D4495
-
Pulkit Goyal authored
The wrong ordering breaks test-check-module-imports.t on Python 3. I am not sure why that test is so much active on py3. Differential Revision: https://phab.mercurial-scm.org/D4496
-
- Sep 06, 2018
-
-
Matt Harbison authored
I noticed a "missing" blob when pushing two repositories with common blobs to a fresh server, and then running `hg verify` as a user different from the one running the web server. When pushing the second repo, several of the blobs already existed in the user cache, so the server indicated to the client that it doesn't need to upload the blobs. That's good enough for the web server process to serve up in the future. But a different user has a different cache by default, so verify complains that `lfs.url` needs to be set, because it wants to fetch the missing blobs. Aside from that corner case, it's better to keep all of the blobs in the repo whenever possible. Especially since the largefiles wiki says the user cache can be deleted at any time to reclaim disk space- users switching over may have the same expectations.
-
- Sep 05, 2018
-
-
Matt Harbison authored
The tests for 2**32 and -7000000000 were blowing up, complaining about not knowing how to encode type 'long'. sys.maxint tops out at 2**31-1 on Windows, but I guess is 2^63-1 on Linux? I *think* we're OK on the decode side, as there is an assertion that the decoded value is equal to the original primitive value. I opted for the pycompat alias instead of swallowing the NameError because the vendored cbor package uses an alias, and I see at least pywatchman and templatefilters open codes their own aliases.
-
durin42 authored
Differential Revision: https://phab.mercurial-scm.org/D4494
-
durin42 authored
`$distance_$node` looks up and concatenates `$distance_` and `$node`. `$distance_` is empty, so we were getting the node without the distance. Using the curly braces makes our intent explicit and produces better-versioned RPMS. Differential Revision: https://phab.mercurial-scm.org/D4493
-
Matt Harbison authored
I'm used to pushing to non-publishing repos, so this was the last thing I thought to check.
-
Gregory Szorc authored
Includes an extra bump of the version number for parsers because the merge produces a new, distinct version of the code.
-
- Sep 04, 2018
-
-
Gregory Szorc authored
This was the last consumer of the vendored CBOR package in core. Differential Revision: https://phab.mercurial-scm.org/D4471
-
- Aug 28, 2018
-
-
Gregory Szorc authored
Behavior should be the same in order to preserve backwards compatibility. We obviously want to stream values in this code. We'll do that in subsequent commits. Differential Revision: https://phab.mercurial-scm.org/D4470
-
Gregory Szorc authored
It implements the set of CBOR needed for the wire protocol. Differential Revision: https://phab.mercurial-scm.org/D4469
-
- Aug 29, 2018
-
-
Gregory Szorc authored
Again, test output changed slightly because of map key ordering differences. This shouldn't matter. I could have called oncommandresponsereadygen() with the raw output from the stream encoder. However, this changed test output further. I left a TODO to follow up on that later. Differential Revision: https://phab.mercurial-scm.org/D4468
-
Gregory Szorc authored
Moving away from the vendored package. Again, our encoder normalizes keys differently from the vendored package (for now), hence the test changes. Differential Revision: https://phab.mercurial-scm.org/D4467
-
Gregory Szorc authored
Tests changed because our CBOR encoder appears to sort map keys differently from the vendored CBOR package. The CBOR specification does define canonical sorting rules for keys based on the byte values. I'm guessing our implementation doesn't follow them. But our encoder doesn't guarantee that it conforms with the canonical specification. Right now, we just care that output is deterministic. And our encoder does guarantee that. Differential Revision: https://phab.mercurial-scm.org/D4466
-
- Aug 28, 2018
-
-
Gregory Szorc authored
We just implemented our own CBOR decoder. Let's use it in httppeer. Differential Revision: https://phab.mercurial-scm.org/D4465
-
- Aug 22, 2018
-
-
Anton Shestakov authored
Differential Revision: https://phab.mercurial-scm.org/D4428
-
- Aug 21, 2018
-
-
Anton Shestakov authored
One of the most important aspects of a completion system is its speed, so 1 call to hg is definitely better than 4. Sorting by rev (descending) is to preserve the same order as in `hg heads` output. While at it, declare branches as an array too. Differential Revision: https://phab.mercurial-scm.org/D4426
-
- Sep 04, 2018
-
-
Martin von Zweigbergk authored
This was caught by someone who was looking for the super(cls, self).__init__(self, ...) pattern in all code in our Google-internal repo. Differential Revision: https://phab.mercurial-scm.org/D4464
-
- Sep 05, 2018
-
-
Matt Harbison authored
-