[PATCH 1 of 4] util: wrap s.decode('string_escape') calls for future py3 compatibility

2017-03-17 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1489761766 -32400 # Fri Mar 17 23:42:46 2017 +0900 # Node ID fa032607ed52a0ba605bb4c496426ffb01b09c54 # Parent 96929bd6e58d29bc3d44e1db7c1283f224bd1dc1 util: wrap s.decode('string_escape') calls for future py3 compatibility

[PATCH 4 of 4] py3: convert log opts to bytes-key dict

2017-03-17 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1489483439 -32400 # Tue Mar 14 18:23:59 2017 +0900 # Node ID d32b1cfe597ebe2093c42b67e85143190eda0e8b # Parent 9a758c848fe08e97386fca95d2428aa003939b4d py3: convert log opts to bytes-key dict Now simple log command works.

[PATCH 2 of 4] py3: call codecs.escape_decode() directly

2017-03-17 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1489762102 -32400 # Fri Mar 17 23:48:22 2017 +0900 # Node ID 49922515f01eae376dcc9af7b04d450d301e4782 # Parent fa032607ed52a0ba605bb4c496426ffb01b09c54 py3: call codecs.escape_decode() directly The same rule as 3b7a6941a6ef

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Martin von Zweigbergk via Mercurial-devel
On Fri, Mar 17, 2017 at 6:49 AM, Rishabh Madan wrote: > Sorry. I didn't know that changing the changeset message for V2 forwards > it as a different stream. > ᐧ > > On Fri, Mar 17, 2017 at 7:14 PM, Rishabh Madan > wrote: > >> # HG changeset

[PATCH config easy] ui: move configlist parser to config.py

2017-03-17 Thread Jun Wu
# HG changeset patch # User Jun Wu # Date 1489767596 25200 # Fri Mar 17 09:19:56 2017 -0700 # Node ID 012156d455f06480e3825edb450fcb37b63e9a1c # Parent 96929bd6e58d29bc3d44e1db7c1283f224bd1dc1 # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull

[PATCH] tests: allow ModuleNotFoundError in addition to ImportError

2017-03-17 Thread Martin von Zweigbergk via Mercurial-devel
# HG changeset patch # User Martin von Zweigbergk # Date 1489769929 25200 # Fri Mar 17 09:58:49 2017 -0700 # Node ID 0308a2a076f5e9591c3f4b6da8f42a96eb6ec2d4 # Parent d1ce2124ec83d3eef61aa0e6b7ef89c738a5d8fe tests: allow ModuleNotFoundError in addition to ImportError

Re: [PATCH 01 of 10 RFC v2] ui: refactoring handling of trusted, user and overlay

2017-03-17 Thread Jun Wu
Another issue with the "compat" layer outside "ucfg" or "tcfg" is that it cannot handle the case where ucfg or tcfg have different ui.compat setting. I just discovered this when writing the immutable stuff. Hopefully I can send a V1 today. Excerpts from David Soria Parra's message of 2017-03-12

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Rishabh Madan
> > Do you know how that works? Since it's not pycompat.bytestr, I don't > understand what makes it work. So if you add something like this at the end > of the "if fm.isplain():" block: > if pycompat.ispy3: >print 'value is bytestr', isinstance(value, >

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Rishabh Madan
The replace() function for py3 wasn't working when `value` was being typecasted as str. When I used pycompat.bytestr the error was resolved. So I guess it is preserved by such methods. ᐧ On Fri, Mar 17, 2017 at 10:45 PM, Martin von Zweigbergk < martinv...@google.com> wrote: > > > On Fri, Mar

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Martin von Zweigbergk via Mercurial-devel
On Fri, Mar 17, 2017 at 11:22 AM, Rishabh Madan wrote: > The replace() function for py3 wasn't working when `value` was being > typecasted as str. When I used pycompat.bytestr the error was resolved. > So I guess it is preserved by such methods. > Do you know how that

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Martin von Zweigbergk via Mercurial-devel
On Fri, Mar 17, 2017 at 12:55 PM, Rishabh Madan wrote: > Do you know how that works? Since it's not pycompat.bytestr, I don't >> understand what makes it work. So if you add something like this at the end >> of the "if fm.isplain():" block: >> if

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Rishabh Madan
> Oh, so bytestr.replace() does return a bytestr. I guess I just > misunderstood Yuya then. Yuya, can you confirm? I was talking about value. I tried isinstance(value.replace('\n', '\\n'), pycompat.bytestr) and it returns false. The type of value.replace('\n', '\\n') returns ``. ᐧ On Sat, Mar

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Martin von Zweigbergk via Mercurial-devel
On Fri, Mar 17, 2017 at 1:09 PM, Rishabh Madan wrote: > > Oh, so bytestr.replace() does return a bytestr. I guess I just >> misunderstood Yuya then. Yuya, can you confirm? > > > I was talking about value. I tried isinstance(value.replace('\n', '\\n'), >

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Martin von Zweigbergk via Mercurial-devel
On Fri, Mar 17, 2017 at 1:12 PM, Martin von Zweigbergk < martinv...@google.com> wrote: > > > On Fri, Mar 17, 2017 at 1:09 PM, Rishabh Madan > wrote: > >> >> Oh, so bytestr.replace() does return a bytestr. I guess I just >>> misunderstood Yuya then. Yuya, can you

Re: [PATCH] subrepo: move prompts out of the if (issue5505)

2017-03-17 Thread Simon Farnsworth
On 17/03/2017 17:28, FUJIWARA Katsunori wrote: At Fri, 17 Mar 2017 13:10:57 -0700, Simon Farnsworth wrote: # HG changeset patch # User Simon Farnsworth # Date 1489781443 25200 # Fri Mar 17 13:10:43 2017 -0700 # Node ID 0ccc212fc0224209864e8c902920a91acd1bc414 # Parent

mercurial@31472: 18 new changesets

2017-03-17 Thread Mercurial Commits
18 new changesets in mercurial: https://www.mercurial-scm.org/repo/hg/rev/7b5fb4b0c0e8 changeset: 31455:7b5fb4b0c0e8 user:Jun Wu date:Thu Mar 16 14:15:20 2017 -0700 summary: commit: get rid of ui.backupconfig

[PATCH 1 of 4 V2] histedit: add a method to cleanup nodes safely

2017-03-17 Thread Jun Wu
# HG changeset patch # User Jun Wu # Date 1489464645 25200 # Mon Mar 13 21:10:45 2017 -0700 # Node ID 19a0f5164fcd28240327beffc3c90cdddfb17123 # Parent 96929bd6e58d29bc3d44e1db7c1283f224bd1dc1 # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull

[PATCH 3 of 4 V2] histedit: use safecleanupnode in _aborthistedit (issue5500)

2017-03-17 Thread Jun Wu
# HG changeset patch # User Jun Wu # Date 1489468938 25200 # Mon Mar 13 22:22:18 2017 -0700 # Node ID 4b3b1a9932d9af65893d293a92684649f0d25772 # Parent e9c84e5081e18d67e061bae2a77e7465d8a6f685 # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull

[PATCH 2 of 4 V2] histedit: use safecleanupnode in _finishhistedit

2017-03-17 Thread Jun Wu
# HG changeset patch # User Jun Wu # Date 1489468746 25200 # Mon Mar 13 22:19:06 2017 -0700 # Node ID e9c84e5081e18d67e061bae2a77e7465d8a6f685 # Parent 19a0f5164fcd28240327beffc3c90cdddfb17123 # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull

Re: [PATCH 1 of 4 V2] histedit: add a method to cleanup nodes safely

2017-03-17 Thread Yuya Nishihara
On Fri, 17 Mar 2017 20:17:48 -0700, Jun Wu wrote: > # HG changeset patch > # User Jun Wu > # Date 1489464645 25200 > # Mon Mar 13 21:10:45 2017 -0700 > # Node ID 19a0f5164fcd28240327beffc3c90cdddfb17123 > # Parent 96929bd6e58d29bc3d44e1db7c1283f224bd1dc1 > # Available At

Re: [PATCH config easy] ui: move configlist parser to config.py

2017-03-17 Thread Yuya Nishihara
On Fri, 17 Mar 2017 09:34:09 -0700, Jun Wu wrote: > # HG changeset patch > # User Jun Wu > # Date 1489767596 25200 > # Fri Mar 17 09:19:56 2017 -0700 > # Node ID 012156d455f06480e3825edb450fcb37b63e9a1c > # Parent 96929bd6e58d29bc3d44e1db7c1283f224bd1dc1 > # Available At

Re: [PATCH 1 of 4] histedit: add a method to cleanup nodes safely

2017-03-17 Thread Yuya Nishihara
On Fri, 17 Mar 2017 08:37:14 -0700, Jun Wu wrote: > Excerpts from Yuya Nishihara's message of 2017-03-17 22:32:45 +0900: > > On Mon, 13 Mar 2017 22:36:16 -0700, Jun Wu wrote: > > > # HG changeset patch > > > # User Jun Wu > > > # Date 1489464645 25200 > > > # Mon Mar 13

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Yuya Nishihara
On Fri, 17 Mar 2017 11:42:03 -0700, Martin von Zweigbergk via Mercurial-devel wrote: > On Fri, Mar 17, 2017 at 11:22 AM, Rishabh Madan > wrote: > > > The replace() function for py3 wasn't working when `value` was being > > typecasted as str. When I used

Re: [PATCH 6 of 8] mq: get rid of ui.backupconfig

2017-03-17 Thread Jun Wu
Excerpts from Yuya Nishihara's message of 2017-03-18 11:34:21 +0900: > On Thu, 16 Mar 2017 14:57:01 -0700, Jun Wu wrote: > > # HG changeset patch > > # User Jun Wu > > # Date 1489700358 25200 > > # Thu Mar 16 14:39:18 2017 -0700 > > # Node ID

Re: [PATCH 1 of 4] histedit: add a method to cleanup nodes safely

2017-03-17 Thread Jun Wu
Excerpts from Yuya Nishihara's message of 2017-03-18 11:48:30 +0900: > (+CC Pierre-Yves) I guess he may be busy with other stuffs. > I meant they both could be iterators/generators now, but 'sucs' wouldn't > be by design. I'm saying that because it seems not common to take a nested > iterator as

Re: [PATCH 1 of 4] histedit: add a method to cleanup nodes safely

2017-03-17 Thread Jun Wu
Excerpts from Yuya Nishihara's message of 2017-03-18 11:13:36 +0900: > On Fri, 17 Mar 2017 08:37:14 -0700, Jun Wu wrote: > > Excerpts from Yuya Nishihara's message of 2017-03-17 22:32:45 +0900: > > > On Mon, 13 Mar 2017 22:36:16 -0700, Jun Wu wrote: > > > > # HG changeset patch > > > > # User Jun

Re: [PATCH 6 of 8] mq: get rid of ui.backupconfig

2017-03-17 Thread Yuya Nishihara
On Thu, 16 Mar 2017 14:57:01 -0700, Jun Wu wrote: > # HG changeset patch > # User Jun Wu > # Date 1489700358 25200 > # Thu Mar 16 14:39:18 2017 -0700 > # Node ID 8b086a28d1b605d6c0726d77c21f8d13188691fa > # Parent 93772a7ad2c443b7c92d0d23e85405f5b0d1a800 > # Available At

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Martin von Zweigbergk via Mercurial-devel
On Fri, Mar 17, 2017 at 7:01 PM, Yuya Nishihara wrote: > On Fri, 17 Mar 2017 11:42:03 -0700, Martin von Zweigbergk via Mercurial-devel > wrote: >> On Fri, Mar 17, 2017 at 11:22 AM, Rishabh Madan >> wrote: >> >> > The replace() function for py3 wasn't

Re: [PATCH V2] merge: add `internal:dumpjson` tool to `resolve`, which outputs conflict state

2017-03-17 Thread Phil Cohen
I agree with pretty much all of that. Short standardized names that represent universal concepts in the codebase (like p1) are very useful. To steal Siracusa's description of Perl, it is a bit like Huffman coding: make the common case easy and short, and the more unusual case longer and more

Re: [PATCH] wfile: fix deprecation warning version

2017-03-17 Thread Yuya Nishihara
On Thu, 16 Mar 2017 11:24:31 -0700, Pierre-Yves David wrote: > # HG changeset patch > # User Pierre-Yves David > # Date 1489688275 25200 > # Thu Mar 16 11:17:55 2017 -0700 > # Node ID d26d5987f6ef6a8a260f2aef67838a66b9fe > # Parent

Re: [PATCH 01 of 11] bdiff: use Python memory allocator in fixws

2017-03-17 Thread Yuya Nishihara
On Thu, 16 Mar 2017 09:27:14 -0700, Gregory Szorc wrote: > On Wed, Mar 15, 2017 at 11:16 PM, Jun Wu wrote: > > > Excerpts from Jun Wu's message of 2017-03-15 23:15:13 -0700: > > > I think it makes sense to migrate Python modules to PyMem_*. > > > > > > However, I'm also a bit

Re: [PATCH 1 of 2 STABLE] exchange: reject new compression engines for v1 bundles (issue5506)

2017-03-17 Thread FUJIWARA Katsunori
At Thu, 16 Mar 2017 12:33:33 -0700, Gregory Szorc wrote: > > # HG changeset patch > # User Gregory Szorc > # Date 1489692236 25200 > # Thu Mar 16 12:23:56 2017 -0700 > # Branch stable > # Node ID 8fed20619acd7a4346408e5819a1c91c52a39ed2 > # Parent

[PATCH] py3: change explicit conversion from str to bytes

2017-03-17 Thread Rishabh Madan
# HG changeset patch # User Rishabh Madan # Date 1489746142 -19800 # Fri Mar 17 15:52:22 2017 +0530 # Node ID 2aac5780c5b3c30602ca128cfeb6e38a42f2c0fb # Parent a5bad127128d8f60060be53d161acfa7a32a17d5 py3: change explicit conversion from str to bytes diff -r

Re: [PATCH V2] merge: add `internal:dumpjson` tool to `resolve`, which outputs conflict state

2017-03-17 Thread Yuya Nishihara
On Tue, 7 Mar 2017 11:40:59 -0800, Phil Cohen wrote: > # HG changeset patch > # User Phil Cohen > # Date 1488915535 28800 > # Tue Mar 07 11:38:55 2017 -0800 > # Node ID bbce62e3790220f19e7b37160a2f8351b7461272 > # Parent 91e86a6c61c0c6a3b554eefeba906311aa29 > merge: add

Re: [PATCH py3] global: add __bool__ to every class defining __nonzero__

2017-03-17 Thread Yuya Nishihara
On Mon, 13 Mar 2017 12:40:49 -0700, Gregory Szorc wrote: > # HG changeset patch > # User Gregory Szorc > # Date 1489434014 25200 > # Mon Mar 13 12:40:14 2017 -0700 > # Node ID a00f6470c72774efa74b04ed46e5d0918224de0a > # Parent

Re: [PATCH V2] py3: change explicit conversion from str to pycompat.bytestr

2017-03-17 Thread Yuya Nishihara
On Fri, 17 Mar 2017 19:14:26 +0530, Rishabh Madan wrote: > # HG changeset patch > # User Rishabh Madan > # Date 1489758142 -19800 > # Fri Mar 17 19:12:22 2017 +0530 > # Node ID 3d6d9294e2247316541942c4bec5186cb5772cd6 > # Parent

Re: [PATCH 2 of 2] pager: skip running the pager if it's set to 'cat'

2017-03-17 Thread Yuya Nishihara
On Wed, 15 Mar 2017 21:44:26 -0400, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler > # Date 1489624466 14400 > # Wed Mar 15 20:34:26 2017 -0400 > # Node ID bc0c38ec3f7be807607d4fdf871f344e7079d992 > # Parent 07d488f16da6e12b225d2827f1020f32c8050a7a >

[Bug 5507] New: Merge fails with "assert sf not in data['diverge']"

2017-03-17 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=5507 Bug ID: 5507 Summary: Merge fails with "assert sf not in data['diverge']" Product: Mercurial Version: 4.1 Hardware: PC OS: Linux Status: UNCONFIRMED

Re: [PATCH py3] global: add __bool__ to every class defining __nonzero__

2017-03-17 Thread Yuya Nishihara
On Mon, 13 Mar 2017 12:40:49 -0700, Gregory Szorc wrote: > # HG changeset patch > # User Gregory Szorc > # Date 1489434014 25200 > # Mon Mar 13 12:40:14 2017 -0700 > # Node ID a00f6470c72774efa74b04ed46e5d0918224de0a > # Parent