D9745: revlog: use size_t for nodetree capacity

2021-01-12 Thread quark (Jun Wu)
quark created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This allows handling revlog containing more than 33554432 (INT_MAX / sizeof(nodetreenode)) revisions on x64 platforms. REPOSITORY rHG Mercurial BRANCH defaul

D9059: procutil: assign stdio objects if they are None

2020-09-18 Thread quark (Jun Wu)
quark created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY On Python 3 stdio objects can be None. That causes crashes. Fix it by opening devnull automatically. `stdin` can be `None` by using `0<&-` in bash, or spawnin

D9058: chg: fallback to original hg if stdio fds are missing

2020-09-18 Thread quark (Jun Wu)
quark created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If stdio fds are missing (ex. fd 0 is not present), chg might open fds that take the numbers 0, and attachio would send the wrong fds to the client, which might

D7295: pytype: add a (very slow) test that executes pytype

2020-01-31 Thread quark (Jun Wu)
quark added a comment. > No, initially because I'd never heard of it, but now because I don't want to deal with ocaml. :) The `pip install` version ships with a pre-compiled binary so an ocaml compiler is not needed. > I'm dubious that it's doing anywhere near the checking of pytype

D7295: pytype: add a (very slow) test that executes pytype

2020-01-30 Thread quark (Jun Wu)
quark added a comment. Have `pyre` been considered? It seems `pyre` only takes 10 seconds to check all the `.py` files. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7295/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7295 To: durin42, #hg-r

D8039: chg: force-set LC_CTYPE on server start to actual value from the environment

2020-01-30 Thread quark (Jun Wu)
quark added a comment. What do you think about this approach: 1. The server detects that LC_TYPE is coerced. 2. When handling the "validate" command, the server sends back "invalidate this server, and fallback to original hg" response. This makes chg/non-chg behave consistently wit

D7812: examples: specify rustfmt nightly using a $() construct

2020-01-08 Thread quark (Jun Wu)
quark added a comment. You can use `rustfmt +nightly` if it's installed by rustup. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7812/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7812 To: durin42, #hg-reviewers Cc: quark, gracinet, mercuria

D7631: RFC: absorb: allowing committed changes to be absorbed into their ancestors

2019-12-13 Thread quark (Jun Wu)
quark added a comment. `--rev` seems ambiguous since there might be different kinds of revisions to specify - target and revisions to edit. Maybe something like `--source`, `--from`, `--target`? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7631/new/

D7582: rust-configparser: run rustfmt

2019-12-07 Thread quark (Jun Wu)
quark added a comment. We actually ran rustfmt, but it's an older version (rustfmt 1.3.0-stable (d334502 2019-06-09)) and I verified the code still formats under that particular version of rustfmt with empty `rustfmt.toml`. In other words, rustfmt itself seems to change over time. REPOSITOR

D7575: hg-core: vendor Facebook's configparser crate

2019-12-07 Thread quark (Jun Wu)
quark added inline comments. INLINE COMMENTS > config.rs:72 > +/// > +/// If `path` is a directory, it is ignored. > +/// If `path` is a file, it will be loaded directly. You might want to revert D13875655 for the directory include feature, which has some test changes. > generate_p

D7518: revlog: fix revset in reachableroots docstring

2019-11-26 Thread quark (Jun Wu)
Closed by commit rHG1a42f8451a92: revlog: fix revset in reachableroots docstring (authored by quark). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7518?vs=18390&id=18394 CHANGES S

D7520: dateutil: correct default for Ymd in parsedate

2019-11-26 Thread quark (Jun Wu)
Closed by commit rHGaef7b91dba51: dateutil: correct default for Ymd in parsedate (authored by quark). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7520?vs=18392&id=18396 CHANGES S

D7519: test-doctest: include dateutil

2019-11-26 Thread quark (Jun Wu)
Closed by commit rHG92518ca66c76: test-doctest: include dateutil (authored by quark). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7519?vs=18391&id=18395 CHANGES SINCE LAST ACTION

D7520: dateutil: correct default for Ymd in parsedate

2019-11-25 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The code uses `0` for the default value of Ymd (year, month, and day), which seems suboptimal. For example, these will fail to parse: dateutil.parsedate('2000

D7519: test-doctest: include dateutil

2019-11-25 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY `mercurial.utils.dateutil` has dostrings that contain doctests. Include them. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7519 AFFE

D7518: revlog: fix revset in reachableroots docstring

2019-11-25 Thread quark (Jun Wu)
quark created this revision. Herald added a reviewer: indygreg. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY `reachableroots` will only return a subset of `roots` when `includepath` is False. For example, given the following linear DAG:

D4464: drawdag: correctly pass repo to super constructor

2018-09-04 Thread quark (Jun Wu)
quark accepted this revision. quark added a comment. LGTM REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4464 To: martinvonz, #hg-reviewers, quark Cc: quark, mercurial-devel ___ Mercurial-devel mailing list Mercurial-d

D4150: linelog: optimize replacelines

2018-08-09 Thread quark (Jun Wu)
quark added a comment. To clarify, I do like stateless API is better. It can be done by keeping `_lastannotate` as a private cache inaccessible from other APIs, move `annotateresult` to the return value of `annotate`, then add `arev` to `replacelines` to verify the cache. The C code use `bre

D4148: perf: add a command to benchmark linelog edits

2018-08-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG1601afbb573c: perf: add a command to benchmark linelog edits (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4148?vs=10065&id=1

D4150: linelog: optimize replacelines

2018-08-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGee97f7a677f3: linelog: optimize replacelines (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4150?vs=10067&id=10135 REVISION D

D4149: linelog: extract `len(self._program)` to a local function

2018-08-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG32b1967b8734: linelog: extract `len(self._program)` to a local function (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4149?vs

D4147: linelog: update internal help text

2018-08-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc10be3fc200b: linelog: update internal help text (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4147?vs=10064&id=10132 REVISI

D4149: linelog: extract `len(self._program)` to a local function

2018-08-07 Thread quark (Jun Wu)
quark updated this revision to Diff 10066. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4149?vs=10026&id=10066 REVISION DETAIL https://phab.mercurial-scm.org/D4149 AFFECTED FILES mercurial/linelog.py CHANGE DETAILS diff --git a/mercurial/linelog.p

D4150: linelog: optimize replacelines

2018-08-07 Thread quark (Jun Wu)
quark updated this revision to Diff 10067. quark edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4150?vs=10025&id=10067 REVISION DETAIL https://phab.mercurial-scm.org/D4150 AFFECTED FILES mercurial/linelog.py CHANG

D4148: perf: add a command to benchmark linelog edits

2018-08-07 Thread quark (Jun Wu)
quark updated this revision to Diff 10065. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4148?vs=10061&id=10065 REVISION DETAIL https://phab.mercurial-scm.org/D4148 AFFECTED FILES contrib/perf.py tests/test-contrib-perf.t CHANGE DETAILS diff --gi

D4147: linelog: update internal help text

2018-08-07 Thread quark (Jun Wu)
quark updated this revision to Diff 10064. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4147?vs=10027&id=10064 REVISION DETAIL https://phab.mercurial-scm.org/D4147 AFFECTED FILES mercurial/help/internals/linelog.txt CHANGE DETAILS diff --git a/mer

D4148: perf: add a command to benchmark linelog edits

2018-08-07 Thread quark (Jun Wu)
quark added inline comments. INLINE COMMENTS > indygreg wrote in perf.py:904-912 > I'm a bit concerned about the use of random data in a benchmark. Since every > run will be different, the benchmark may not be stable. And if the random > source is slow, we could be spending time waiting on entr

D4148: perf: add a command to benchmark linelog edits

2018-08-07 Thread quark (Jun Wu)
quark updated this revision to Diff 10061. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4148?vs=10023&id=10061 REVISION DETAIL https://phab.mercurial-scm.org/D4148 AFFECTED FILES contrib/perf.py tests/test-contrib-perf.t CHANGE DETAILS diff --gi

D4151: linelog: fix infinite loop vulnerability

2018-08-07 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG27a54096c92e: linelog: fix infinite loop vulnerability (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4151?vs=10032&id=10046

D4151: linelog: fix infinite loop vulnerability

2018-08-06 Thread quark (Jun Wu)
quark updated this revision to Diff 10032. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4151?vs=10031&id=10032 REVISION DETAIL https://phab.mercurial-scm.org/D4151 AFFECTED FILES mercurial/linelog.py tests/test-linelog.py CHANGE DETAILS diff --g

D4151: linelog: fix infinite loop vulnerability

2018-08-06 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Checking `len(lines)` is not a great way of detecting infinite loops, as demonstrated in the added test. Therefore check instruction count instead. The original

D4147: linelog: update internal help text

2018-08-06 Thread quark (Jun Wu)
quark updated this revision to Diff 10027. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4147?vs=10022&id=10027 REVISION DETAIL https://phab.mercurial-scm.org/D4147 AFFECTED FILES mercurial/help/internals/linelog.txt CHANGE DETAILS diff --git a/mer

D4149: linelog: extract `len(self._program)` to a local function

2018-08-06 Thread quark (Jun Wu)
quark updated this revision to Diff 10026. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4149?vs=10024&id=10026 REVISION DETAIL https://phab.mercurial-scm.org/D4149 AFFECTED FILES mercurial/linelog.py CHANGE DETAILS diff --git a/mercurial/linelog.p

D4148: perf: add a command to benchmark linelog edits

2018-08-06 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The use pattern of creating a linelog is usually by calling "replacelines" multiple times. Add a command to benchmark it. REPOSITORY rHG Mercurial REVISION DETAI

D4147: linelog: update internal help text

2018-08-06 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This clarifies the details asked by @martinvonz on https://phab.mercurial-scm.org/D3990. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org

D4150: linelog: optimize replacelines

2018-08-06 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The optimization to avoid calling `annotate` inside replacelines is critical for practical uses. Before this patch: hg perflinelogedits ! wall 10.883

D4149: linelog: extract `len(self._program)` to a local function

2018-08-06 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is a micro optimization prepared for following changes where `len(self._program)` is used in a loop. REPOSITORY rHG Mercurial REVISION DETAIL https://phab

D4049: testrunner: allow multiple #testcases

2018-08-02 Thread quark (Jun Wu)
quark added a comment. `--stack` should work as expected if dependency is set manually. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4049 To: martinvonz, #hg-reviewers, mharbison72 Cc: quark, lothiraldan, mharbison72, mercurial-devel __

D4049: testrunner: allow multiple #testcases

2018-08-02 Thread quark (Jun Wu)
quark added a comment. In https://phab.mercurial-scm.org/D4049#63026, @martinvonz wrote: > Sorry, I was just misremembering that https://phab.mercurial-scm.org/D4052 had been queued. I don't know why phabricator doesn't understand that this patch is on top of https://phab.mercurial-scm.o

D3994: fastannotate: initial import from Facebook's hg-experimental

2018-08-02 Thread quark (Jun Wu)
quark added a comment. I'd also like to see C linelog benchmark data mentioned. The current commit message implies diff algorithm is the bottleneck. That's misleading. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3994 To: durin42, #hg-reviewers Cc: quark, mer

D3994: fastannotate: initial import from Facebook's hg-experimental

2018-08-01 Thread quark (Jun Wu)
quark added a comment. I would mention in the commit message that building cache is much faster with linkrevcache prebuilt. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3994 To: durin42, #hg-reviewers Cc: quark, mercurial-devel ___

D3986: split: abort if there's an unfinished operation

2018-08-01 Thread quark (Jun Wu)
quark added a comment. I think a most flexible solution is to not do the check if there is nothing to rebase. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3986 To: martinvonz, #hg-reviewers Cc: quark, mercurial-devel __

D3986: split: abort if there's an unfinished operation

2018-07-30 Thread quark (Jun Wu)
quark added a comment. FB has users reporting they need to split commits in the middle of a histedit. So this might be too restrictive. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3986 To: martinvonz, #hg-reviewers Cc: quark, mercurial-devel

D3980: contrib/phabricator: Convert description into local

2018-07-25 Thread quark (Jun Wu)
quark added a comment. Yeah, if only there is a `json.loadb` function. That could replace `json.loads` at line 211. I guess it could be done by using a function that recursively convert strings. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3980 To: ced, #hg-

D3818: scmutil: make cleanupnodes optionally also fix the phase

2018-06-20 Thread quark (Jun Wu)
quark added a comment. Not directly related to this patch. On API complexity: One of the unimplemented ideas is to require a transaction and make `operation` optional - default to the transaction name. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3818 To: ma

D3665: graph: improve graph output by using Unicode characters

2018-06-16 Thread quark (Jun Wu)
quark added a comment. In https://phab.mercurial-scm.org/D3665#58932, @johnstiles wrote: > Looks like your font is missing the dashed vertical line, and has an oddly small regular-circle glyph. I don't recognize the font at all so I can't really speak much more to that. Fortunately thoug

D3665: graph: improve graph output by using Unicode characters

2018-06-16 Thread quark (Jun Wu)
quark added a comment. Since you mentioned Linux... Here is what your extension renders on my Linux terminal: F103407: 2018-06-16-122437_1046x658_scrot.png The characters do not render as question marks, because I have fonts covering them an

D3665: graph: improve graph output by using Unicode characters

2018-06-16 Thread quark (Jun Wu)
quark added a comment. To be clear, I have no interest in +1 or -1 this feature, and I'm not interested in spending more time testing it. I think I have made it very clear that Windows (at least WSL) is going to be a headache. Not to say, Linux (as my primary OS) font rendering is another st

D3665: graph: improve graph output by using Unicode characters

2018-06-16 Thread quark (Jun Wu)
quark added a comment. In https://phab.mercurial-scm.org/D3665#58864, @johnstiles wrote: > Are you capable of running the extension? > > The output of `type` is irrelevant to me. The behavior of python.exe when outputting to the Windows shell is all that really matters here. If `enco

D3665: graph: improve graph output by using Unicode characters

2018-06-16 Thread quark (Jun Wu)
quark added a comment. In https://phab.mercurial-scm.org/D3665#58862, @johnstiles wrote: > Without more context I have no idea what you are trying to show. Windows is > certainly capable of rendering Unicode characters in the console. It is > also very possible to get ? characters if

D3665: graph: improve graph output by using Unicode characters

2018-06-16 Thread quark (Jun Wu)
quark added a comment. In https://phab.mercurial-scm.org/D3665#58860, @johnstiles wrote: > What are you trying to demonstrate here? I'm lost. I'm sorry you feel lost. Since Windows was mentioned in the thread and I happen to have a Windows system, I thought it's somehow useful to

D3665: graph: improve graph output by using Unicode characters

2018-06-15 Thread quark (Jun Wu)
quark added a comment. Maybe I should change cmd.exe font. But here's what I got pasting the text into the console: F103261: cmd.png REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3665 To: johnstiles, #hg-reviewers,

D3737: crecord: fix line number in hunk header (issue5917)

2018-06-14 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG03350f5234a4: crecord: fix line number in hunk header (issue5917) (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3737?vs=9065&

D3737: crecord: fix line number in hunk header (issue5917)

2018-06-14 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY `@@ -1,1 +-1,0 @@` is not a valid patch hunk header. Change it to `@@ -1,1 +0,0 @@`. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3

D3720: commandserver: close server's fds explicitly from a worker

2018-06-13 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc07424ec633c: commandserver: close server's fds explicitly from a worker (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3720?v

D3720: commandserver: close server's fds explicitly from a worker

2018-06-12 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The forked worker does not need to accept connections from the server's socket fd. So let's just close them explicitly to avoid surprises. REPOSITORY rHG Mercuria

D3698: chg: fix an undefined behavior about memcpy

2018-06-06 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3c84493556db: chg: fix an undefined behavior about memcpy (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3698?vs=8989&id=8990

D3698: chg: fix an undefined behavior about memcpy

2018-06-06 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Spot by Wez Furlong. `memcpy(x, NULL, 0)` is undefined according to [1]: [1]: https://stackoverflow.com/questions/5243012 REPOSITORY rHG Mercurial REVISION D

D3556: run-tests: update the test case name format

2018-05-14 Thread quark (Jun Wu)
quark accepted this revision. quark added a comment. I like this change. Didn't realize it's this simple. Marking as accetped. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3556 To: lothiraldan, #hg-reviewers, quark Cc: quark, mercurial-devel __

D3554: xdiff: fix Py_BuildValue types (issue5885)

2018-05-13 Thread quark (Jun Wu)
quark abandoned this revision. quark added a comment. Duplicated with https://phab.mercurial-scm.org/D3538. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3554 To: quark, #hg-reviewers Cc: mercurial-devel ___ Mercurial

D3554: xdiff: fix Py_BuildValue types (issue5885)

2018-05-13 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Julien Cristau reported and provided the fix [1]. I added an assertion. Note Python documentation (2.7 to 3.5) says "L" in `Py_BuildValue` might be unsupported

D3212: patch: implement a new worddiff algorithm

2018-04-16 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG35632d392279: patch: implement a new worddiff algorithm (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3212?vs=7924&id=8335 R

D3211: patch: buffer lines for a same hunk

2018-04-16 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG5471348921c1: patch: buffer lines for a same hunk (authored by quark, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D3211?vs=7923&id=8334#toc REPOSITORY rHG Mercurial CHANG

D3210: patch: move yielding "\n" to the end of loop

2018-04-16 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8d730f96e792: patch: move yielding "\n" to the end of loop (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3210?vs=7922&id=8333

D3212: patch: implement a new worddiff algorithm

2018-04-12 Thread quark (Jun Wu)
quark added a comment. I think one alternative is just to use `green_background` like `git/contrib/diff-highlight/diff-highlight.perl`. It satisfies all properties I'd like to have, and is supported by weird terminals including cmd.exe and less.exe. And is different from `diff.file_a`, `diff

D3210: patch: move yielding "\n" to the end of loop

2018-04-11 Thread quark (Jun Wu)
quark added a comment. I thought it was `for line in mdiff.splitnewlines(...)`. If we have both `rawline` and `line` variables, then it is easier. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3210 To: quark, #hg-reviewers Cc: yuja, mercurial-devel ___

D3212: patch: implement a new worddiff algorithm

2018-04-11 Thread quark (Jun Wu)
quark added a comment. In https://phab.mercurial-scm.org/D3212#51917, @yuja wrote: > Can you split a patch changing the color scheme so we can easily > back it out as needed? Note the color configs are not entirely equivalent to the old code. To give an example: -LINE-1

D3212: patch: implement a new worddiff algorithm

2018-04-10 Thread quark (Jun Wu)
quark added inline comments. INLINE COMMENTS > spectral wrote in color.py:94 > I understand the reasoning for wanting `diff.inserted` and > `diff.inserted.changed` to be the same color, but unfortunately I think it > might not be super feasible in upstream. > > 'dim' support in my terminfo dat

D3210: patch: move yielding "\n" to the end of loop

2018-04-10 Thread quark (Jun Wu)
quark added a comment. That's ideal. But a lot of code in this area expects "line" to not contain "\n". So the change won't be as easy as it looks. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3210 To: quark, #hg-reviewers Cc: yuja, mercurial-devel __

D3212: patch: implement a new worddiff algorithm

2018-04-10 Thread quark (Jun Wu)
quark added a comment. Git first had a `contrib/diff-highlight/diff-highlight` script which inverts foreground/background for hunks with len(deleted_lines) = len(inserted_lines). Then the latest version shows diff inline. That is: common words [+inserted words with green color][-de

D3212: patch: implement a new worddiff algorithm

2018-04-09 Thread quark (Jun Wu)
quark added inline comments. INLINE COMMENTS > spectral wrote in color.py:94 > These are the first uses of 'dim' in the default set of things, and I don't > think we can rely on it; for color.mode=auto, we really mean "ansi" (aka > ecma48) (unless on windows), and don't do any detection of capa

D3209: amend: exit 0 if there are no changes

2018-04-09 Thread quark (Jun Wu)
quark added a comment. I think it depends on what scripts want to do. I guess mpm's original point is, suppose you have a build script, or something that should do nothing if nothing changed, then `hg amend && build_script` just works as expected. If amend returns 0, then it'd be more comple

D3209: amend: exit 0 if there are no changes

2018-04-09 Thread quark (Jun Wu)
quark added a comment. Returning 1 is actually more consistent with other core commands like pull, push, commit. See https://www.mercurial-scm.org/pipermail/mercurial-devel/2012-January/037711.html. Scripts should be updated to use `$?` explicitly. REPOSITORY rHG Mercurial REVISION DETAI

D2668: rebase: introduce support for automatically rebasing orphan changes

2018-04-09 Thread quark (Jun Wu)
quark added a subscriber: mbthomas. quark added a comment. In https://phab.mercurial-scm.org/D2668#51423, @durin42 wrote: > I like the way `--auto` (or some other name) is discoverable in `hg help rebase`. Losing that inside the long-form prose of the help text (which is the only place I

D3212: patch: implement a new worddiff algorithm

2018-04-09 Thread quark (Jun Wu)
quark added a comment. This is the before and after comparison: F69700: worddiff-compare.png REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3212 To: quark, #hg-reviewers, durin42 Cc: mercurial-devel __

D3210: patch: move yielding "\n" to the end of loop

2018-04-09 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The original logic makes it harder to reason about - it yields the "\n" character belonging to the last line in the next loop iteration. The new code is in theo

D3211: patch: buffer lines for a same hunk

2018-04-09 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY 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 d

D3212: patch: implement a new worddiff algorithm

2018-04-09 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY 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

D3153: tests: call rawsize() directly

2018-04-06 Thread quark (Jun Wu)
quark added a comment. It was `revlog.revlog.size`, and got changed to `rawsize` before committed. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3153 To: indygreg, #hg-reviewers Cc: quark, mercurial-devel ___ Mercuria

D3138: rebase: make "destnode" consistently a revnum and rename it to "destrev"

2018-04-05 Thread quark (Jun Wu)
quark accepted this revision. quark added a comment. Thanks. I was not too happy about the old code using `rev` as `node`s. But I didn't spend much time changing them. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3138 To: martinvonz, #hg-reviewers, quark Cc:

D3139: rebase: convert "oldrev" to revnum earlier

2018-04-05 Thread quark (Jun Wu)
quark accepted this revision. quark added a comment. Nice catch. I guess my initial consideration was `oldrev` was not always a valid node. But it seems no longer a concern. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3139 To: martinvonz, #hg-reviewers, quar

D3140: rebase: fix explicit handling of nullid in rebase state

2018-04-05 Thread quark (Jun Wu)
quark accepted this revision. quark added a comment. Hmm... maybe just remove it. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3140 To: martinvonz, #hg-reviewers, quark Cc: quark, mercurial-devel ___ Mercurial-devel

D2057: rust implementation of hg status

2018-03-20 Thread quark (Jun Wu)
quark added a comment. https://crates.io/crates/local-encoding seems to be the right choice. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2057 To: Ivzhh, #hg-reviewers, kevincox Cc: quark, yuja, glandium, krbullock, indygreg, durin42, kevincox, mercurial-deve

D2848: xdiff: move stdint.h to xdiff.h

2018-03-13 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGafebb7588e95: xdiff: move stdint.h to xdiff.h (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2848?vs=7005&id=7006 REVISION DE

D2848: xdiff: move stdint.h to xdiff.h

2018-03-13 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It's more correct to put it in xdiff.h since that file actually uses int64_t etc and xdiff.h is included by xinclude.h. This should fix the oss-fuzz build. Than

D2763: xdiff: remove unused flags parameter

2018-03-09 Thread quark (Jun Wu)
quark added a comment. I don't think the Python ".so"s should be consumed by non-Python "dlopen". So "version" doesn't change since Python API remains the same. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2763 To: quark, #hg-reviewers, indygreg Cc: indygreg,

D2765: xdiff: use int64 for hash table size

2018-03-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG71fbceb58746: xdiff: use int64 for hash table size (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2765?vs=6802&id=6809 REVISI

D2766: xdiff: resolve signed unsigned comparison warning

2018-03-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9ddc9aa26801: xdiff: resolve signed unsigned comparison warning (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2766?vs=6803&id

D2762: xdiff: replace {unsigned ,}long with {u,}int64_t

2018-03-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGe882437cc082: xdiff: replace {unsigned ,}long with {u,}int64_t (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2762?vs=6799&id=

D2763: xdiff: remove unused flags parameter

2018-03-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG4c8ffc67bac2: xdiff: remove unused flags parameter (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2763?vs=6800&id=6808 REVISI

D2686: xdiff: add a preprocessing step that trims files

2018-03-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG665958f30789: xdiff: add a preprocessing step that trims files (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2686?vs=6797&id=

D2764: xdiff: remove unused xpp and xecfg parameters

2018-03-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG2e2b48cca761: xdiff: remove unused xpp and xecfg parameters (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2764?vs=6801&id=680

D2685: xdiff: add comments for fields in xdfile_t

2018-03-09 Thread quark (Jun Wu)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG58028f6d1fb8: xdiff: add comments for fields in xdfile_t (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2685?vs=6798&id=6805

D2764: xdiff: remove unused xpp and xecfg parameters

2018-03-09 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY They are unused. Thus removed. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2764 AFFECTED FILES mercurial/thirdparty/xdiff/xdiffi.

D2765: xdiff: use int64 for hash table size

2018-03-09 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Follow-up of the previous "long" -> "int64" change. Now xdiff only uses int for return values and small integers (ex. booleans, shifting score, bits in hash table

D2762: xdiff: replace {unsigned ,}long with {u,}int64_t

2018-03-09 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY MSVC treats "long" as 4-byte. That could cause overflows since the xdiff code uses "long" in places where "size_t" or "ssize_t" should be used. Let's use explicit

D2763: xdiff: remove unused flags parameter

2018-03-09 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY After https://phab.mercurial-scm.org/D2683, the flags parameter in some functions is no longer needed. Thus removed. REPOSITORY rHG Mercurial REVISION DETAIL

D2766: xdiff: resolve signed unsigned comparison warning

2018-03-09 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Since the value won't be changed inside the code (because context lines feature was removed by https://phab.mercurial-scm.org/D2705), let's just remove the variable

D2686: xdiff: add a preprocessing step that trims files

2018-03-09 Thread quark (Jun Wu)
quark updated this revision to Diff 6797. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2686?vs=6708&id=6797 REVISION DETAIL https://phab.mercurial-scm.org/D2686 AFFECTED FILES mercurial/thirdparty/xdiff/xdiffi.c mercurial/thirdparty/xdiff/xprepare

D2685: xdiff: add comments for fields in xdfile_t

2018-03-09 Thread quark (Jun Wu)
quark updated this revision to Diff 6798. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2685?vs=6643&id=6798 REVISION DETAIL https://phab.mercurial-scm.org/D2685 AFFECTED FILES mercurial/thirdparty/xdiff/xtypes.h CHANGE DETAILS diff --git a/mercuri

  1   2   3   4   5   6   7   8   9   10   >