Commit Graph

619 Commits

Author SHA1 Message Date
Zuul 5b577fd116 Merge "Fix urwid > 2.4.2 compatibility" 2024-02-27 15:31:59 +00:00
Aleksei Stepanov c9b58583d2 Fix urwid > 2.4.2 compatibility
1. `Columns` widget use FIXED pack method for items
   if they declare sizing as fixed.
2. `Columns` are implicitly declared as FIXED
   if all contents sizes are known or can be calculated without external size information.
3. `Text` is explicitly FIXED and FLOW widget
   (widget knows its size from contents).

Fix: explicit declare that widgets are FLOW-only
Change-Id: Ic0de5957ed47fadf2f0f02b235178eb03ecd1b04
2024-02-26 21:32:47 +01:00
Aleksei Stepanov 9846bcacf3 Drop prehistoric hack for urwid.GridFlow
1. Mentioned PR was merged > 8 years ago.
2. Issue with widget focusing on keypress is invalid:
   arrow keys should point on widgets as it positioned
   (if button at the next row - "right" button is ignored).

Change-Id: I6fecae34576196b63074a4b0db438aab3da3fd65
2024-02-26 11:04:21 +01:00
Zuul 346804a832 Merge "Set SQLAlchemy minimum to 1.4" 2024-02-08 21:32:51 +00:00
Jeremy Stanley 5e9c250ef8 Set SQLAlchemy minimum to 1.4
SQLAlchemy 1.4 is the bridge to support the API required for 2.0
support, so in the wake of I80c007af86cd7102c3c75963ad5b0a051dd9b541
set it as the required minimum version.

Change-Id: I8eb379042d34a60e62131ff631efe4a83c70942e
2024-02-08 21:30:58 +00:00
Matthew Thode 50b3b11ef9
make gertty work with sqlalchemy-2
Change-Id: I80c007af86cd7102c3c75963ad5b0a051dd9b541
Signed-off-by: Matthew Thode <mthode@mthode.org>
2023-04-11 23:46:51 -05:00
Jeremy Stanley 559bcfdb33 More skip patchset-level comments in diff view
Starting in Gerrit 3.3, comments can include a special file-id of
/PATCHSET_LEVEL and these comments have no code context, thus no
line numbers or related files. A previous change
I6505d08b62ba7ad8877561a82732889e142873c3 attempted to skip these
when enumerating comments in diff view, but mistakenly only did so
on the new side of the diff. Apply the same skip to the old side as
well.

Change-Id: I22575015bd9e513d00024f026d2248c7a19c3d9e
2021-10-12 19:48:03 +00:00
Zuul cc97078eb8 Merge "Start cursor at Change-Id on entering ChangeView" 2021-10-09 14:46:05 +00:00
Jeremy Stanley cba4bb4098 Start cursor at Change-Id on entering ChangeView
In order to avoid having urwid warp the cursor to a non-selectable
widget when moving to a new ChangeView, set focus to the first item
we know will be selectable at the top of the screen, the Change-Id.

Change-Id: Ibd502eb18496eec37383370bb15a4f4cd8b3e5d7
2021-10-09 12:40:34 +00:00
James E. Blair 0f5079ded3 Make TextButtons have a cursor
All of our selectable widgets should have a cursor; if we use
SelectableIcon instead of a plain Text widget as the basis for
the TextButton, we will have one.

Change-Id: I490c7317a2d43727700066918b0b486d1a9cdc6b
2021-10-08 18:12:51 -07:00
Jeremy Stanley 3555a0d211 Make related change entries selectable
The default for _selectable in the Pile class was switched to False
with https://github.com/urwid/urwid/pull/367 commit 018509d, so
explicitly declare change entries are selectable in order to allow
them to be navigated by keyboard with urwid 2.1.0 and later.

Change-Id: I31f3d62475ec2e8a10e7a553426412ad6aa43f8f
2021-10-04 14:33:24 +00:00
Zuul 9ddbebd2cb Merge "Import alembic.migration" 2021-10-01 18:36:44 +00:00
James E. Blair e867dec44b Correctly locate cursor in hypertext widgets
The gertty-specific hypertext widget did not handle cursor positioning,
so selectable text did not behave like buttons.  This is an inconsistent
UI and causes problems for screen readers.

Change-Id: Iede3f663775fc169a757751acc1fe752dc00f544
2021-10-01 09:26:22 -07:00
Jeremy Stanley bff537e87c Import alembic.migration
This is needed for alembic >=1.7, though unfortunately goes entirely
unmentioned in its ChangeLog. Without adding the import, startup
raises this:

    AttributeError: module 'alembic' has no attribute 'migration'

Change-Id: Icf4c4a9240a8d1ea993d3aed62664531f8013a3e
2021-09-15 18:32:21 +00:00
Zuul 550df25397 Merge "Make commit and patchset comments nicer" 2021-08-24 16:47:39 +00:00
Zuul 0ccfb0aaec Merge "Update author email address" 2021-08-24 16:47:04 +00:00
Zuul e099120fe0 Merge "examples: match 'commit <hash>'" 2021-08-24 16:47:00 +00:00
Zuul d084c102f9 Merge "Suggest a 'cherry-picked from' line when cherry picking" 2021-08-24 16:46:47 +00:00
Zuul 0116fa3101 Merge "Suggest basic auth in minimal example" 2021-08-24 16:45:55 +00:00
James E. Blair 07827fcae7 Make commit and patchset comments nicer
Rather than display the /PATCHSET_LEVEL and /COMMIT_MSG fake
filenames, translate those to nice strings like the web ui does.

Change-Id: I225c8e2ea9763f9dadbefc4a23329efe0f97d899
2021-08-24 09:43:45 -07:00
Jeremy Stanley 699aa18766 Skip patchset-level comments in diff view
Starting in Gerrit 3.3, comments can include a special file-id of
/PATCHSET_LEVEL and these comments have no code context, thus no
line numbers or related files. Skip these when enumerating comments
in diff view because there is no relevant context for them.

Thanks to Paul Fertser for reporting and debugging this problem.

Change-Id: I6505d08b62ba7ad8877561a82732889e142873c3
2021-08-24 09:43:43 -07:00
Jeremy Stanley ae7b136646 Suggest basic auth in minimal example
Gerrit releases since a few years require HTTP basic authentication
rather than Gertty's default of digest. Add it in the minimal config
example since it's often overlooked by users and the number of
Gerrit deployments where the default works is rapidly dwindling.

Change-Id: I3138197991ae5f50f3ac956bf905ce5e01a50e7c
2021-08-24 13:57:25 +00:00
Dmitry Tantsur c1202c7c63 examples: match 'commit <hash>'
Change-Id: I833e37a60b93b23124f127b5639ab210fd12fa63
2021-07-29 14:40:43 +02:00
Dmitry Tantsur e96a663f1e Suggest a 'cherry-picked from' line when cherry picking
Emulates the behavior of "git cherry-pick -x" and the web UI.

Change-Id: I1c3654e39351cd0c6fc84a57b04560877bdf3b31
2021-07-06 13:05:29 +02:00
Dmitry Tantsur cd60a82f6a examples: matching storyboard stories
Change-Id: I5c3d42adb9f6654c1d0b1cacfa48eb8c5146e2c7
2021-07-05 18:21:33 +02:00
Roman Dobosz b19227ea28 Bump python version.
Current stable Python version is 3.9. I've checked against it and
gertty is running fine.

Change-Id: I5c61a2b5ce89316c0c678993267cd44197fde1e4
2021-06-02 16:54:26 +02:00
Zuul 3775883603 Merge "Highlight WIP state in change view" 2021-05-28 01:39:52 +00:00
Zuul 922acd18a7 Merge "Add support for searching for hashtags" 2021-03-26 14:50:39 +00:00
James E. Blair 363114eb7a Highlight WIP state in change view
To help reviewers notice WIP changes (which can't merge) highlight
that status.

Change-Id: If1a8cb0d6d8f3b29981ac58d6d5900898847e286
2021-03-26 07:44:48 -07:00
Zuul 3083a60069 Merge "Actually allow for overriding the lock file" 2021-03-13 14:54:28 +00:00
James E. Blair c134a8c6f1 Add support for searching for hashtags
Also for setting hashtags in change lists using the process mark.
Editing hashtags on individual change screens was already supported.
Selecting hashtags on a change screen will now perform a search for
that tag.

Change-Id: Icc23e10bbf22fbe9b1d958758ec6ceb3286e795b
2021-03-01 14:45:16 -08:00
James E. Blair 94310529ed Add WIP support
Change-Id: I3b690c3bffdb1ca534e42cef0c3c7d9b797f7e80
2020-12-18 11:02:33 -08:00
James E. Blair bb9d860dde Handle gerrit 3.x style internal urls
A new style of internal url appears in Gerrit 3.x:

  /c/PROJECT/+/NUMBER

This handles that in internal links and updates the terminal
integration docs with the new URL format as well.

Change-Id: I30bc6194b1b467b2e6500c5f11e5d06de1aea721
2020-12-18 09:46:04 -08:00
Zuul 119f96f293 Merge "tokenizer: do not try to decode strings on Python 3" 2020-12-18 16:52:18 +00:00
Zuul bd818d1913 Merge "Fix auth-type in opendev example config" 2020-12-18 16:47:00 +00:00
James E. Blair 444c8e1285 Document removal of /p from default git-url
Change-Id: I5d88dabbc7944f2ad67112a1ead14c11836fcfdb
2020-12-18 08:45:12 -08:00
Jay Faulkner 3b19344e02 Fix auth-type in opendev example config
This change is required as part of the opendev gerrit upgrade.

Change-Id: Ibbe63232f6852202c2176e6ea156ec1f70d8d94e
2020-11-24 15:34:40 +00:00
Alex Schultz 3027ce2735 Add version specific changes for git-url
With the upgrade of opendev's gerrit to 3.2.5.1, the git clones are
failing because the repository url no longer has p/ in it. This change
adds p/ in only if the version is less than 3 when we do a version check.

Change-Id: Id05cfa6449c6c36dd59c7efd74d57cebafcb78c6
2020-11-23 15:58:23 -07:00
Dmitry Tantsur ee9cd7a16c tokenizer: do not try to decode strings on Python 3
Change-Id: I37af7e9495fa3ddc0355f0184f93ed5c3ea87bd3
Story: #2007951
Task: #40427
2020-09-23 15:46:00 +02:00
Pierre Riteau fae6d82bf6 Update author email address
Change-Id: Icd5875b83da6d5e68f16ee0809e767f03b1012e3
2020-09-14 21:47:05 +02:00
James E. Blair f49f27db59 Fix error in message refresh
An extra argument was added recently; this was causing a crash.

Change-Id: I375b7709c28b0bbee265e097d09ea8eecab2ce36
2020-03-05 09:49:05 -08:00
James E. Blair e0515e7480 Fix "Save and Submit" button
This button was not working because we sync the change before sending
a review, which reset the pending state.  Determine whether we are
intending to submit the change before performing that sync, and
remember it after the sync is done.

Change-Id: I8c85c2a8fec50b50fb92037f6dcbcc7917c3baff
2020-02-24 14:31:42 -08:00
James E. Blair 055b11624b Add support for checks plugin
Change-Id: Iabaf1c928571ff0191e1201f395050f278f19a75
2020-02-20 15:40:30 -08:00
James E. Blair 5ff7d2061e Support robot comments
Change-Id: I8623bb2de9a9d7b6f162cd99ae0ea13a320c5a6b
2020-02-20 10:28:26 -08:00
James E. Blair b6ba991215 Display line comments from all patchsets in change view
The change view did not display comments from previous patchsets,
only comments associated with the patchset of the current message.
This displays them from all patchsets, annotating them with the
patchset number when it is different.

Note, the line comments were correctly displayed in the diff view.

Change-Id: Ieda0de0bb24800b9c3f577f339ca1338f2f1cc38
2020-02-20 09:48:52 -08:00
James E. Blair 2df6a24693 Hide errors when syncing conflicts
This is now an optional feature and does not appear in the upstream
gerrit.

Change-Id: Ib29ee107455794465986b04270737590696d5c76
2020-02-20 09:47:09 -08:00
James E. Blair 64b8d6dc6c Handle binary data in diffs
Even though we won't usually display it, binary data may show up
in a diff.  We can't decode it to display it, so just replace it
with a placeholder string so we don't crash.

Change-Id: I4794e707745ed8315afec00c1981e239ec98ef0e
2020-02-20 09:45:34 -08:00
Slawek Kaplonski a8487746e7 Update information about config file location
Default config location was changed recently. This commit
updates information about where this config should be placed in
message printed if there is no config file found at all.

Change-Id: I847005182d2a31a25b51886bd4997ce8a74075c0
2019-10-15 14:13:25 +00:00
James E. Blair 5e6f398cf3 Update googlesource example
The username may not be present for newer accounts on googlesource.

Change-Id: Id76416f323a6d08ba83ab9a175f066a995b10941
2019-08-28 15:17:38 +02:00
James E. Blair 73a6481835 Use account_id to identify the user's own account
This is necessary on systems where the username may not be present
(e.g., gerrit-review.googlesource.com).

Change-Id: Ia91b1e9b0fb0f98728dca46a488a92a97a301274
2019-08-28 15:10:19 +02:00