- 22 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
This very similar to earlier patches (e.g. for `InputError`) and part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. Differential Revision: https://phab.mercurial-scm.org/D9339
-
- 31 Oct, 2020 1 commit
-
-
Barret Rennie authored
When using Windows wrappers of PDCurses (e.g., windows-curses), the chunkpad does not render when executing `hg commit -i`. This is due to attempting to refresh one too many columns of the pad. Differential Revision: https://phab.mercurial-scm.org/D9267 --HG-- branch : stable
-
- 08 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9179
-
- 17 Jul, 2020 2 commits
-
-
Rodrigo Damazio Bovendorp authored
Differential Revision: https://phab.mercurial-scm.org/D8763
-
Rodrigo Damazio Bovendorp authored
The chunk reversal used by `revert -i` in Curses mode was not taking this case into account. Differential Revision: https://phab.mercurial-scm.org/D8762
-
- 28 Jun, 2020 1 commit
-
-
Manuel Jacob authored
701341f57ceb moved the setlocale() call to right before curses was used. This didn’t fully solve the problem it was supposed to solve (locale-dependent functions, like date formatting/parsing and str methods on Python 2), but only postponed it. Initializing LC_CTYPE seems to be sufficient for curses to work correctly. Therefore LC_CTYPE is set while curses is used and reset afterwards. Some locale-dependent str methods might behave differently on Python 2 while curses is used, but that shouldn’d be a problem. --HG-- branch : stable
-
- 22 Jan, 2020 1 commit
-
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D7970 --HG-- branch : stable
-
- 10 Dec, 2019 2 commits
-
-
Jordi Gutiérrez Hermoso authored
Previous commit removed its only calling site.
-
Jordi Gutiérrez Hermoso authored
I really don't like "a". I keep accidentally hitting it when I actually want "A", and then I'm suddenly in a state I don't want to be in. There's a big wall of text telling me that I've turned amend mode on or off (which one was I orginally in?), and this seems very useless. If I wanted to amend or not, I would have chosen that from the command-line, not change my mind after I've already started picking hunks apart. Furthermore, for most uses of the hunk selector (revert, uncommit, shelve/unshelve), this amend toggle doesn't make sense. It seems much better to repurpose this key to be a "weaker" version of "A". It toggles all selections. This is pretty harmless if hit accidentally, (can just hit "a" again to toggle everything and undo it), and has immediate visual feedback that something happened: all the x's and blank spaces get switched around. And unlike with amend, the current flipped state is also immediately visible without having to read a wall of text. I'm calling this a BC, however, because somewhere, someone out there has probably really fallen in love with the old use of "a" and will get angry that we took it away.
-
- 12 Dec, 2019 1 commit
-
-
Jordi Gutiérrez Hermoso authored
Despite its heritage, "crecord" is now mostly Mercurial-internal jargon. I find it better to call it "the curses hunk selector". Also slightly rewrote the part about which commands can use it. While I do believe that commit, shelve, and revert are the only commands in core that can use it, Evolve also adds at least amend and uncommit to the list.
-
- 06 Nov, 2019 3 commits
-
-
Denis Laxalde authored
The "keypressed" value in handlekeypressed() is a key name obtained by curses's getkey(); this can be a multibyte string for special keys like CTRL keys. Calling curses.unctrl() with such a value fails on Python 3 with a TypeError as described in issue6213. (On Python 2, this does not crash, but I'm not sure the result is correct, though it does no matter here.) So instead of calling unctrl(), we compare "keypressed" with the expected "^L" obtained by curses.ascii.ctrl("L"). --HG-- branch : stable
-
Denis Laxalde authored
This will help in the next changeset by avoiding a decode step. Also, the actual bytes conversion seems superfluous since values coming from curses's getkey() will be a native string. As a consequence, we open the "testcommands" file (used in test-interactive-curses.t) in text mode. --HG-- branch : stable
-
Denis Laxalde authored
confirmationwindow() returns a native string, as a result of calling chr() on getch(). On Python 3, response.lower().startswith(b"y") leads to a TypeError. This fixes a crash when typing "r" in the curses interface of interactive commit. --HG-- branch : stable
-
- 01 Nov, 2019 1 commit
-
-
Emmanuel Leblond authored
Differential Revision: https://phab.mercurial-scm.org/D7194 --HG-- branch : stable
-
- 01 Dec, 2019 1 commit
-
-
Matt Harbison authored
This is just removing the b'' prefix (except demandimportpy2), and making sure it is triple quoted. I skipped the mapping.py module in zope because that's 3rd party code. Differential Revision: https://phab.mercurial-scm.org/D7539
-
- 28 Jun, 2020 1 commit
-
-
Manuel Jacob authored
The changeset was based on a25343d16ebe, which will be backed out, too. Another fix for the problem will be resubmitted to the stable branch.
-
- 27 Jun, 2020 1 commit
-
-
Manuel Jacob authored
The original import of crecord in 2008 already said "I have no idea if wcurses works with crecord...". The last reference to a Python package called wcurses is https://web.archive.org/web/20101025073658/http://adamv.com/dev/python/curses/. However, the Python package from there is called "curses" and not "wcurses". I didn’t find any evidence that it ever worked.
-
- 26 Jun, 2020 1 commit
-
-
Manuel Jacob authored
701341f57ceb moved the setlocale() call to right before curses was used. This didn’t fully solve the problem it was supposed to solve (locale-dependent functions, like date formatting/parsing), but only postponed it. Initializing LC_CTYPE seems to be sufficient for curses to work correctly. Luckily this is already done at interpreter startup on modern Python versions and, since recently, by Mercurial in the pycompat module in all other cases.
-
- 08 Nov, 2019 1 commit
-
-
Augie Fackler authored
This is the promised second step on single-quoted strings. These had existed because our source transformer didn't turn r'' into b'', so we had tagged some strings as r-strings to get "native" strings on both Pythons. Now that the transformer is gone, we can dispense with this nonsense. Methodology: I ran hg locate 'set:added() or modified() or clean()' | egrep '.*\.py$' | xargs egrep --color=never -n -- \[\^b\]\[\^a-z\]r\'\[\^\'\\\\\]\*\'\[\^\'\ in an emacs grep-mode buffer, and then used a keyboard macro to iterate over the results and remove the r prefix as needed. # skip-blame removing unneeded r prefixes left over from Python 3 migration. Differential Revision: https://phab.mercurial-scm.org/D7306
-
- 25 Jul, 2019 1 commit
-
-
Yuya Nishihara authored
setlocale() can break date formatting/parsing functions because they are locale dependent. We should avoid doing setlocale() as possible. This patch moves setlocale() just before curses.wrapper(), which function is documented to "initialize curses." I don't know the details about the curses initialization, but I *think* this would work as well. Maybe we can extract a curses setup function later. https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-February/128788.html --HG-- branch : stable
-
- 10 Oct, 2019 2 commits
-
-
Denis Laxalde authored
This fixes a crash when scrolling in curses UI when refresh() is called when a float value (namely 'self.firstlineofpadtoprint', taking its value indirectly from 'self.linesprintedtopadsofar').
-
Denis Laxalde authored
The attribute is already set a couple of lines above, in curseschunkselector.__init__().
-
- 08 Jul, 2019 5 commits
-
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D6621
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D6620
-
Kyle Lippincott authored
This shouldn't actually change any behavior, I only noticed it since I started using KEY_UP in tests, and it was complaining when it got down to the ^L handler that initscr hadn't been called yet. Differential Revision: https://phab.mercurial-scm.org/D6619
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D6618
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D6617
-
- 25 Oct, 2018 1 commit
-
-
Anton Shestakov authored
Items that represent files in curses interface don't have parents. --HG-- branch : stable
-
- 14 Jun, 2018 1 commit
-
-
Jun Wu authored
`@@ -1,1 +-1,0 @@` is not a valid patch hunk header. Change it to `@@ -1,1 +0,0 @@`. Differential Revision: https://phab.mercurial-scm.org/D3737 --HG-- branch : stable
-
- 06 Oct, 2019 4 commits
-
-
Gregory Szorc authored
The march continues. Differential Revision: https://phab.mercurial-scm.org/D7009
-
Gregory Szorc authored
We want to eliminate the source transformer. Currently it inserts a `from mercurial.pycompat import ...` at the top of files to alias some builtins. This commit replaces the implicit import of `open` with an explicit import on files that need it and changes the source transformer to no longer import `open`. As part of this, we needed to store an explicit local for `open` in the Python 2 code path in `pycompat` so the import works. (Builtins that are automatically in scope cannot be imported.) Differential Revision: https://phab.mercurial-scm.org/D7005
-
Augie Fackler authored
Done with python3.7 contrib/byteify-strings.py -i $(hg files 'set:mercurial/**.py - mercurial/thirdparty/** + hgext/**.py - hgext/fsmonitor/pywatchman/** - mercurial/__init__.py') black -l 80 -t py33 -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**') # skip-blame mass-reformatting only Differential Revision: https://phab.mercurial-scm.org/D6972
-
Augie Fackler authored
This is using my patch to black (https://github.com/psf/black/pull/826) so we don't un-wrap collection literals. Done with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S # skip-blame mass-reformatting only # no-check-commit reformats foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D6971
-
- 22 Mar, 2018 1 commit
-
-
Yuya Nishihara authored
This might conflict with other patches floating around, sorry.
-
- 02 Apr, 2019 1 commit
-
-
Arun Chandrasekaran authored
This patch introduces two new keys 'g' and 'G' that helps to navigate to the top and bottom of the file/hunk/line respectively. This is inline with the shortcuts used in man, less, more and such tools that makes it convenient to navigate swiftly. 'g' or HOME navigates to the top most file in the ncurses window. 'G' or END navigates to the bottom most file/hunk/line depending on the whether the fold is active or not. If the bottom most file is folded, it navigates to that file and stops there. If the bottom most file is unfolded, it navigates to the bottom most hunk in that file and stops there. If the bottom most hunk is unfolded, it navigates to the bottom most line in that hunk. Differential Revision: https://phab.mercurial-scm.org/D6178
-
- 21 Jan, 2020 1 commit
-
-
Pulkit Goyal authored
Looks like py3 raises AttributeError instead of ImportError. This is caught on windows. Differential Revision: https://phab.mercurial-scm.org/D7965
-
- 21 Mar, 2019 1 commit
-
-
Alexander Kobjolke authored
When starting crecord, one can see that it has a small gap on the rightmost column which doesn't get used. This is in contrast to other interactive curses frontends such as chistedit. Disabling the displaying of the cursor allows drawing on the whole availabe area and thus some hacky code in align() could be removed. Differential Revision: https://phab.mercurial-scm.org/D6171
-
- 14 Mar, 2019 3 commits
-
-
Kyle Lippincott authored
Failure to do this can cause screen corruption like: <headerline> [X] filename.cc <several blank lines> <output from previous iteration of split that happened to be here> I believe this might only happen in some terminals, and maybe only when using the "alternate screen". Regardless of the exact conditions to reproduce, it should be safe to always clear it when starting up and is probably the correct thing to do anyway :) Differential Revision: https://phab.mercurial-scm.org/D6131
-
Kyle Lippincott authored
This is the normal use of Ctrl-L, so I think this is going to be what most people expect it to do. We're keeping the adjustment of what line we're scrolled to as well. I believe both to be necessary to handle otherwise inescapable situations when we've got screen corruption or edge-cases during window resizing. Differential Revision: https://phab.mercurial-scm.org/D6130
-
Kyle Lippincott authored
Differential Revision: https://phab.mercurial-scm.org/D6129
-