[PATCH 1 of 2] patch: unify check_binary and binary flags

2018-02-04 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1517707683 -32400 # Sun Feb 04 10:28:03 2018 +0900 # Node ID d41b22b06360ceee3a9e6e66df5f57f267318314 # Parent a9802c9ecfb5aa20d89480763ae15b03f78f3a88 patch: unify check_binary and binary flags Follows up 079b27b5a869. If

[PATCH 2 of 3] logcmdutil: drop default arguments from changesetdisplayer/templater() calls

2018-02-04 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1516512483 -32400 # Sun Jan 21 14:28:03 2018 +0900 # Node ID f1a8a49af81a97618a4b1eb7e78c7372db776cdc # Parent 6815de5ad04ee7cc94071b0806f8859bdc8e6435 logcmdutil: drop default arguments from changesetdisplayer/templater()

[PATCH 3 of 3] logcmdutil: mark changesetprinter.showpatch() as private

2018-02-04 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1516510856 -32400 # Sun Jan 21 14:00:56 2018 +0900 # Node ID 4d7182357056c2672716d7caf849231d7b25691a # Parent f1a8a49af81a97618a4b1eb7e78c7372db776cdc logcmdutil: mark changesetprinter.showpatch() as private diff --git

[PATCH 1 of 3] logcmdutil: make default parameters of changesetprinters consistent

2018-02-04 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1516510026 -32400 # Sun Jan 21 13:47:06 2018 +0900 # Node ID 6815de5ad04ee7cc94071b0806f8859bdc8e6435 # Parent 16b4cc4f0cd6f72f5b7be575a7498ed0017ccea5 logcmdutil: make default parameters of changesetprinters consistent diff

[PATCH 2 of 2] mdiff: use str.startswith/endswith() instead of slicing

2018-02-04 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1517707994 -32400 # Sun Feb 04 10:33:14 2018 +0900 # Node ID 16b4cc4f0cd6f72f5b7be575a7498ed0017ccea5 # Parent d41b22b06360ceee3a9e6e66df5f57f267318314 mdiff: use str.startswith/endswith() instead of slicing diff --git

D2022: ui: improve ui.write performance when not coloring on Windows

2018-02-04 Thread yuja (Yuya Nishihara)
yuja requested changes to this revision. yuja added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > logcmdutil.py:97 > +oldchunks = chunks > +chunks = patch.difflabel(lambda **kwargs: oldchunks, > opts=diffopts) > +if

D2023: cmdutil: introduce deprecated aliases

2018-02-04 Thread lothiraldan (Boris Feld)
lothiraldan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY https://phab.mercurial-scm.org/rHGc8e2d6ed1f9ea4eee7b28250b5aff22433d538b6 moved some objects used by Evolve and hence broke the latest Evolve revision. Next

D2022: ui: improve ui.write performance when not coloring on Windows

2018-02-04 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger updated this revision to Diff 5181. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2022?vs=5177=5181 REVISION DETAIL https://phab.mercurial-scm.org/D2022 AFFECTED FILES mercurial/logcmdutil.py mercurial/ui.py CHANGE DETAILS

D1995: sshpeer: document the handshake mechanism

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg abandoned this revision. indygreg added a comment. I'll submit this as part of another series that targets `sshpeer`. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1995 To: indygreg, #hg-reviewers Cc: mercurial-devel

D1856: wireproto: support for pullbundles

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg added a comment. @joerg.sonnenberger: if you are willing to wait just a week or two more, I think the next version of the wire protocol that I'm writing will make the "pullbundles" feature significantly better. Specifically, servers will be able to send multiple bundle2 bundles or

D2024: sshpeer: make "instance" a function

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The API is that peer modules must provide an "instance" symbol that is callable to return a peer. Making "instance" a function instead of an alias to

D2027: sshpeer: move URL validation out of sshpeer.__init__

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We will soon have another SSH peer class to support the new version of the SSH protocol. However, we won't know which peer class to instantiate until we

D2028: sshpeer: move ssh command and repo creation logic out of __init__

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It was easier to move both of these at once because repository creation requires various variables and I didn't want to add tons of arguments and code to

D2033: sshpeer: inline I/O into _validaterepo()

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We want to move the handshake code out of the peer class so the peer factory function can perform the handshake and instantiate a proper class depending on the

D2026: tests: add low-level SSH protocol tests

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We don't really have good low-level tests for the behavior of the SSH wire protocol. This commit attempts to establish some. The added tests consist of a

D2035: sshpeer: document the handshake mechanism

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The mechanism by which SSH peers establish connections with remotes is wonky and requires a bit of code archeology to understand. While it is already

D2030: sshpeer: remove frivolous call to _cleanup()

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY _validaterepo() is called once during __init__. _cleanup() no-ops if the self._pipe* attributes aren't set. These attributes are set during _validaterepo(). So

D2029: sshpeer: extract pipe cleanup logic to own function

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY So it can be used outside of instantiated classes. This is needed to support pipe creation before __init__ is called. REPOSITORY rHG Mercurial REVISION

D2031: sshpeer: establish SSH connection before class instantiation

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We want to move the handshake to before peers are created so we can instantiate a different peer class depending on the results of the handshake. This

D2034: sshpeer: move handshake outside of sshpeer

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY With the handshake now performed before a peer class is instantiated, we can now instantiate a different peer class depending on the results of the handshake.

D2032: sshpeer: clean up API for sshpeer.__init__ (API)

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Our refactoring left the state of sshpeer.__init__ in a poor state. "create" was no longer used. Process/pipe arguments were passed poorly. "name" was really a

D2025: debugcommands: introduce debugpeer command

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY `hg debugpeer ` will establish a connection to a peer repository and print information about it. If you add --debug, it will log low-level protocol request

D2036: sshpeer: remove support for connecting to <0.9.1 servers (BC)

2018-02-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY https://phab.mercurial-scm.org/rHG197d10e157ce848129ff5e7a53cf81d4ca63a932 made this change for the HTTP peer. Let's do the same for the SSH peer. Test

mercurial@35903: 22 new changesets

2018-02-04 Thread Mercurial Commits
22 new changesets in mercurial: https://www.mercurial-scm.org/repo/hg/rev/87416288be98 changeset: 35882:87416288be98 user:Yuya Nishihara date:Sat Jan 27 14:17:26 2018 +0900 summary: tests: make doctest py3-compatible again