- Apr 13, 2018
-
-
Yuya Nishihara authored
Spotted while porting jsonchangeset printer to formatter. A timestamp may be float type, but its meaningful part is just int.
-
- Apr 17, 2018
-
-
Jörg Sonnenberger authored
If experimental.bundlecomplevel.$engine is set, prefer it over the generic experimental.bundlecomplevel. Given that compression levels have widely different meanings across engines, this allows much saner configuration. Differential Revision: https://phab.mercurial-scm.org/D3393
-
Jörg Sonnenberger authored
Always provide the human readable version of compression and version. Add the translated wire format name in the new wirecompression and wireversion fields. Differential Revision: https://phab.mercurial-scm.org/D3392
-
Martin von Zweigbergk authored
Follow-up to 7b2955624777 (scmutil: make shortesthexnodeidprefix() take a full binary nodeid, 2018-04-14). Differential Revision: https://phab.mercurial-scm.org/D3403
-
- Apr 06, 2018
-
-
Matt Harbison authored
The client copies all of these properties under 'header' to the HTTP Headers of the subsequent GET or PUT request that it performs. That allows the Basic HTTP authentication used to authorize the Batch API request to also authorize the upload/download action. There's likely further work to do here. There's an 'authenticated' boolean key in the Batch API response that can be set, and there is an 'LFS-Authenticate' header that is used instead of 'WWW-Authenticate'[1]. (We likely need to support both, since some hosting solutions are likely to only respond with the latter.) In any event, this works with SCM Manager, so there is real world benefit. I'm limiting the headers returned to 'Basic', because that's all the lfs spec calls out. In practice, I've seen gitbucket emit custom header content[2]. [1] https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md#response-errors [2] https://github.com/gitbucket/gitbucket/blob/35655f33c7713f08515ed640ece0948acd6d6168/src/main/scala/gitbucket/core/servlet/GitRepositoryServlet.scala#L119
-
- Apr 15, 2018
-
-
Matt Harbison authored
At this point, I think all of the core commands are prefetching, except grep and verify. Verify will need some special handling, in case the revlogs are corrupt. Grep has an issue that still needs to be debugged, but we probably need to give the behavior some thought too- it would be a shame to have to download everything in order to search. I think the benefit of having this info for all commands outweighs extra printing in a command that is arguably not well behaved in this context anyway.
-
Matt Harbison authored
By invoking it this deep within the command, we pick up both subrepo and hgweb support, as well as --patch support for commands that implement logopts.
-
- Apr 14, 2018
-
-
Matt Harbison authored
cmdutil.exportfile() is only called by shelve, mq and patchbomb. Those are unlikely to mix with lfs, but it may as well be invoked there for completeness.
-
Matt Harbison authored
The remainder of the commands that need prefetch deal with multiple revisions. I initially coded this as a separate hook, but then it needed a list of files to handle `diff` and `grep`, so it didn't seem worth keeping them separate. Not every matcher will emit bad file messages (some are built from a list of files that are known to exist). But it seems better to filter this in one place than to push this on either each caller or each hook implementation.
-
- Apr 17, 2018
-
-
Matt Harbison authored
The stray servers were piling up after the test harness exited. On Windows, this means the *.pyd files can't be rebuilt, which is why the build warning count dropped to 1 recently.
-
- Apr 10, 2018
-
-
Boris Feld authored
Currently, multiple labels can take forms that can be confused with revset (eg: "rev(0)" is a valid tag). Since we look up for tags before evaluating revset, this means a tag can shadow a valid revset at any time. We now enforce the strict revset parsing when wrapped with 'revset(...)'. For now, This only work on a whole revspec (but can be used within the revset without effect). This might change in the future if we improve the implementation. The feature is undocumented for now, keeping it in the experimental namespace. In case a better approach to achieve the same goal is found. The syntax looks like a revset but is not implemented as such for now. Since the goal is to avoid some preprocessing that happens before revset parsing, we cannot simply implement it as a revset predicate. There was other approaches discussed over the mailing-list but they were less convincing. Having a configuration flag to disable legacy lookup have been considered but discarded. There are too many common uses of ambiguous identifier (eg: '+', '-' or '..') to have the legacy lookup mechanism turned off. In addition, the approach can control the parsing of each revset, making it more flexible. For example, a revset used as the value of an existing configuration option (eg: pushrev) could enforce its resolution as a revset (by using the prefix) while user inputs would still use the legacy lookup. In addition of offering a way to unambiguously input a revset, this prefix allow skipping the name lookup providing a significant speedup in some case.
-
- Mar 01, 2018
-
-
Boris Feld authored
There are very few constraints on what character can be put into tags and other labels. We add more tests showing some of extreme cases that user can currently use.
-
- Apr 15, 2018
-
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D3391
-
Gregory Szorc authored
So the requests are compatible with version 2 peers. Differential Revision: https://phab.mercurial-scm.org/D3390
-
- Mar 22, 2018
-
-
Sushil Khanchi authored
Also added confirmopts in cmdutil.py Differential Revision: https://phab.mercurial-scm.org/D2934
-
- Apr 14, 2018
-
-
Augie Fackler authored
test-largefiles.t now passes. Differential Revision: https://phab.mercurial-scm.org/D3364
-
Augie Fackler authored
This test *almost* passes now, but some import errors print very differently in ways that seem at least somewhat important. Differential Revision: https://phab.mercurial-scm.org/D3363
-
Augie Fackler authored
Changes the output a bit, but not in an important way. Differential Revision: https://phab.mercurial-scm.org/D3362
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3361
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3360
-
Augie Fackler authored
I need this to preserve some behavior in hook.py. Differential Revision: https://phab.mercurial-scm.org/D3359
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3358
-
Augie Fackler authored
The test doesn't pass for what superficially look like good reasons. We'll need to come back to it later. # skip-blame because it's b prefixes and a couple of b'N' instead of str(N) Differential Revision: https://phab.mercurial-scm.org/D3357
-
Augie Fackler authored
The Python 3 WSGI behavior is that the environ dict should be full of unicodes. We previously tried Too Hard here, so we unwind that bit of porting. Also add some bytesurl() encodes on status and headers. test-clone-cgi.t now passes. Differential Revision: https://phab.mercurial-scm.org/D3356
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3355
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3354
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3353
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3352
-
Augie Fackler authored
We get a better error message out of the abort here, which is fine. Differential Revision: https://phab.mercurial-scm.org/D3351
-
Augie Fackler authored
Only in the automatic bisection code, so fortunately nothing major is amiss. Fixes test-run-tests.t under Python 3. Differential Revision: https://phab.mercurial-scm.org/D3350
-
Augie Fackler authored
I'm fairly certain it hasn't been until now. Mercifully, there doesn't appear to be any ninja breakage. Differential Revision: https://phab.mercurial-scm.org/D3349
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3348
-
Augie Fackler authored
Since this is only a problem in httppeer, I'd rather keep this a local-to-the-module kludge rather than pile more on pycompat. We'll still find it easily to clean up later because it checks pycompat.ispy3. Differential Revision: https://phab.mercurial-scm.org/D3347
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3346
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3345
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3344
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3343
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D3342
-
- Apr 09, 2018
-
-
Jun Wu authored
The previous worddiff algorithm has many problems. The major problem is it does a "similarity check" that selects a subset of matched lines to do inline diffs. It is a bad idea because: - The "similarity check" is non-obvious to users. For example, a simple change from "long long x" to "int64_t x" will fail the similarity check and won't be diff-ed as expected. - Selecting "lines" to diff won't work as people expect if there are line wrapping changes. - It has a sad time complexity if lines do not match, could be O(N^2)-ish. There are other problems in implementation details. - Lines can match across distant hunks (if the next hunk does not have "-" lines). - "difflib" is slow. The solution would be removing the "similarity check", and just diff all words in a same hunk. So no content will be missed and everything will be diff-ed as expected. This is similar to what code review tool like Phabricator does. This diff implements the word diff algorithm as described above. It also avoids difflib to be faster. Note about colors: To be consistent, "changed inserted" parts and "purely insertion blocks" should have a same color, since they do not exist in the previous version. Instead of highlighting differences, this patch chooses to dim common parts. This is also more consistent with Phabricator or GitHub webpage. That said, the labels are defined in a way that people can still highlight changed parts and leave purely inserted/deleted hunks use the "non-highlighted" color. As one example, running: hg log -pr df50b87d8f736aff8dc281f816bddcd6f306930c mercurial/commands.py \ --config experimental.worddiff=1 --color=debug --config diff.unified=0 The previous algorithm outputs: [diff.file_a|--- a/mercurial/commands.py Fri Mar 09 15:53:41 2018 +0100] [diff.file_b|+++ b/mercurial/commands.py Sat Mar 10 12:33:19 2018 +0530] [diff.hunk|@@ -2039,1 +2039,4 @@] [diff.deleted|-][diff.deleted.highlight|@command('^forget',][diff.deleted| ][diff.deleted.highlight|walkopts,][diff.deleted| _('[OPTION]... FILE...'), inferrepo=True)] [diff.inserted|+@command(] [diff.inserted|+ '^forget',] [diff.inserted|+ walkopts + dryrunopts,] [diff.inserted|+ ][diff.inserted.highlight| ][diff.inserted| _('[OPTION]... FILE...'), inferrepo=True)] [diff.hunk|@@ -2074,1 +2077,3 @@] [diff.deleted|- rejected = cmdutil.forget(ui, repo, m, prefix="",][diff.deleted.highlight| explicitonly=False)[0]] [diff.inserted|+ dryrun = opts.get(r'dry_run')] [diff.inserted|+ rejected = cmdutil.forget(ui, repo, m, prefix="",] [diff.inserted|+ explicitonly=False, dryrun=dryrun)[0]] The new algorithm outputs: [diff.file_a|--- a/mercurial/commands.py Fri Mar 09 15:53:41 2018 +0100] [diff.file_b|+++ b/mercurial/commands.py Sat Mar 10 12:33:19 2018 +0530] [diff.hunk|@@ -2039,1 +2039,4 @@] [diff.deleted|-][diff.deleted.unchanged|@command(][diff.deleted.unchanged|'^forget',][diff.deleted.unchanged| ][diff.deleted.changed|walkopts][diff.deleted.unchanged|,][diff.deleted.changed| ][diff.deleted.unchanged|_('[OPTION]... FILE...'), inferrepo=True)] [diff.inserted|+][diff.inserted.unchanged|@command(] [diff.inserted|+][diff.inserted.changed| ][diff.inserted.unchanged|'^forget',] [diff.inserted|+][diff.inserted.changed| walkopts][diff.inserted.unchanged| ][diff.inserted.changed|+ dryrunopts][diff.inserted.unchanged|,] [diff.inserted|+][diff.inserted.changed| ][diff.inserted.unchanged|_('[OPTION]... FILE...'), inferrepo=True)] [diff.hunk|@@ -2074,1 +2077,3 @@] [diff.deleted|-][diff.deleted.unchanged| rejected = cmdutil.forget(ui, repo, m, prefix="",][diff.deleted.changed| ][diff.deleted.unchanged|explicitonly=False][diff.deleted.unchanged|)[0]] [diff.inserted|+][diff.inserted.changed| dryrun = opts.get(r'dry_run')] [diff.inserted|+][diff.inserted.unchanged| rejected = cmdutil.forget(ui, repo, m, prefix="",] [diff.inserted|+][diff.inserted.changed| ][diff.inserted.unchanged|explicitonly=False][diff.inserted.changed|, dryrun=dryrun][diff.inserted.unchanged|)[0]] Practically, when diffing a 8k line change, the time spent on worddiff reduces from 4 seconds to 0.14 seconds. Differential Revision: https://phab.mercurial-scm.org/D3212
-
- Mar 19, 2018
-
-
Jun Wu authored
Instead of yielding tokens directly, buffer them if they belong to a same hunk. This makes it easier for the upcoming new worddiff algorithm to only focus on the diff hunk, instead of having to worry about other contents. This breaks how the existing experimental worddiff algorithm works, so the algorithm was removed, and related tests are disabled for now. The next patch will add a new worddiff algorithm. Differential Revision: https://phab.mercurial-scm.org/D3211
-