D9441: run-tests: use a context manager when looking for available ports

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9441 AFFECTED FILES tests/run-tests.py CHANGE DETAILS diff --git

D9440: dispatch: print the version of each extension in the bug report, if available

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Sometimes the wrong extensions is blamed, so we might as well print the version info for all of them. Additionally, since the internal extensions are

D9439: dispatch: sort the loaded extension names in the bug report

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This makes a long list of extensions easier to read. On very rare occasion I've seen issues where the load order mattered, however that info should still

D9438: dispatch: quote the extension when printing the bug report

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I think this reads better in the wall of text. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9438 AFFECTED

D9437: dispatch: print the version of the extension being blamed in a bug report

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I don't know of a lot of extensions using this, but it seems like useful info in a bug report. REPOSITORY rHG Mercurial BRANCH default REVISION

D9436: git: show the version of `pygit2` with verbose version output

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This seems like useful info to have when debugging. I followed the precedent of hg-git, which prints something like:

D9432: formatting: drop a few extra double quotes in docstrings

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These were made obvious by the reformatting in D9430 . REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D9434: tests: add a comment that we're purposely testing py2 extension attributes

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Avoid someone unknowingly removing test coverage. There are tests for a properly byteified `testedwith` a few lines down. I don't see similar for

D9433: extensions: avoid a crash when the version isn't properly byteified on py3

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We already force bytestr on the `testedwith` and `buglink` attributes in dispatch.py when generating a bug report with a similar comment about not every

D9435: git: add the standard `testedwith` attribute

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Otherwise this shows up as an external extension. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

[PATCH STABLE] diff: do not concatenate immutable bytes while building a/b bodies (issue6445)

2020-11-27 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1606529754 -32400 # Sat Nov 28 11:15:54 2020 +0900 # Branch stable # Node ID 1e93d856abc0ecb7f537af5c77e0d75ffe93db08 # Parent 81da6feb5000140adb8972607415855953415233 diff: do not concatenate immutable bytes while building a/b bodies

D9431: hghave: adjust the detection of `pylint` for modern versions

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I have pylint 2.6.0 installed locally, and it only has a single space. I have no idea when this changed. REPOSITORY rHG Mercurial BRANCH default

D9430: formating: upgrade to black 20.8b1

2020-11-27 Thread durin42 (Augie Fackler)
durin42 created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: martinvonz. Herald added a reviewer: martinvonz. Herald added subscribers: mercurial-patches, Kwan. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This required a couple of small tweaks to

D9428: merge: remove spurious ' and trailing whitespace from triple-quoted string

2020-11-27 Thread durin42 (Augie Fackler)
durin42 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9428 AFFECTED FILES mercurial/merge.py CHANGE DETAILS diff --git

D9429: osutil: reformat triple-quoted string so black doesn't confuse itself

2020-11-27 Thread durin42 (Augie Fackler)
durin42 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9429 AFFECTED FILES mercurial/pure/osutil.py CHANGE DETAILS diff --git

D9427: cleanup: fix a few recent black formatting violations

2020-11-27 Thread mharbison72 (Matt Harbison)
mharbison72 created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9427 AFFECTED FILES hgext/git/gitlog.py

[Bug 6445] New: hg log command taking 115 seconds with large added css file

2020-11-27 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6445 Bug ID: 6445 Summary: hg log command taking 115 seconds with large added css file Product: Mercurial Version: stable branch Hardware: PC OS: Linux

[Bug 6444] New: `hg fix -w` raises a TypeError on py3(.8)

2020-11-27 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6444 Bug ID: 6444 Summary: `hg fix -w` raises a TypeError on py3(.8) Product: Mercurial Version: 5.5rc0 Hardware: All OS: All Status: UNCONFIRMED Severity: bug

D9426: copies-rust: hide most of the comparison details inside a closure

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The function that compares values needs various supporting elements that are the same for each call. We are about to both make change to these element and

D9425: copies-rust: move the mapping merging into a else clause

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We are going to add more cases, to it is time to stop using early returns and to move everything in a single if/elif/else block for clarity. REPOSITORY rHG

D9422: copies: iterate over children directly (instead of parents)

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Before this change we would gather all parent → child edges and iterate on all parent, gathering copy information for children and aggregating them from

D9424: copies-rust: extract conflicting value comparison in its own function

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY First, that logic is complicated enough to be in it own function. Second, we want to start adding alternative path within the merge code so we need this logic

D9423: copies: no longer cache the ChangedFiles during copy tracing

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that the copies information for both parents are processed all at once, we no longer needs to cache this information, so we simplify the code. The

D9421: copies-rust: extract the processing of a ChangedFiles in its own function

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a reasonably independent piece of code that we can extract in its own function. This extraction will be very useful for the next changeset, where we

D9420: copies-rust: move the parent token to an enum

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We carry around information about which parent of a revision is been dealt with. So far this was a `usize` but as we are about to pass it around to more

D9419: copies: properly copies parent dictionary before updating it

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This enforces the copy on write logic. Otherwise independant unrelated branches could affected each other. More testing of these case are coming, but I

D9418: copies: clarify the return of _merge_copies_dict

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I misused that function twice in the past few days, so lets clarify the API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D9417: copies: simplify the call to _merge_copies_dict

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Let's get the argument into the right order, then call the function once. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D9416: copies: avoid unwanted side effect from one branch to another

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Without this copy, change in a one descendant branch (With "remove" change only) could affect computation on another descendant branches. This was not

D9415: copies: fast path no-op merge

2020-11-27 Thread Raphaël Gomès
Alphare created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If the two sides of the merge are the same (they come an unaltered common ancestors) we don't need any merging. REPOSITORY rHG Mercurial BRANCH default

D9414: tests: update test-chg.t with output change

2020-11-27 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since this part of tests is only run with chg, hence it didn't get updated when the error message changed. REPOSITORY rHG Mercurial REVISION DETAIL

D9413: helptext: document share safe functionality in `hg help config -v`

2020-11-27 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If share safe functionality is enabled, we read `.hg/hgrc' of shared source. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D9412: helptext: mention in `hg help config` that `.hg/hgrc-not-shared` is consulted

2020-11-27 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Recently we added `.hg/hgrc-not-shared` which is a config file which won't be shared with shares when share-safe mode is enabled. Irrespective of whether we

D9411: share: add documentation about share-safe mode in `hg help -e share`

2020-11-27 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9411 AFFECTED FILES hgext/share.py CHANGE DETAILS diff --git a/hgext/share.py

D9410: helptext: update first hg version when share-safe will be released

2020-11-27 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I authored the patch which added the helptext before 5.6 release hoping that my patches will make it. However they didn't before the release and were pushed