summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Test old and new GerritHEADmasterClark Boylan2023-03-142-10/+36
| | | | | | | | | | | | This change updates the CI testing for git-review to test with Gerrit 3.4.4 and 3.7.1. This should give us good coverage of new and old Gerrit behavior when making changes to git-review. Note we leave 3.4.4 as the default in the test suite for local runs to try and limit possibility of breaking old Gerrit when adding features to git-review for new Gerrit. Change-Id: I4a42eddec1e247cbb0af5e74b8f1cee0ad58a79a
* Test Python bounds onlyClark Boylan2023-03-142-9/+6
| | | | | | | | | | | | This bumps the newest python version tested to 3.11 and drops testing for 3.7, 3.8, and 3.9. We only test the lower and upper python version bounds. We switch to an ed25519 ssh key instead of rsa because Ubuntu Jammy defaults to rsa + sha2 and Gerrit 3.4.4 does not understand this. This results in a golden site version bump. Change-Id: I3989460575fa9c389233244683318a6cfded68fe
* Switch from tox to noxClark Boylan2023-03-137-62/+83
| | | | | | | | Recent tox releases have put us on a config treadmill. Avoid these issues entirely by using nox. Nox is a tox alternative that uses standard tools like pip and should be simpler to use for us. Change-Id: Ie79845bbed7ca1254aec466bd5219186fefcdac9
* Simplify test output strings for new GerritJeremy Stanley2023-03-081-3/+3
| | | | | | | | | | In adapting the integration tests to output from new Gerrit versions, we observed possible nondeterministic ordering or content in some of the fields. We don't need to be nearly so specific in the strings we match anyway, so simplify them for robustness against variable output from the service and improved future flexibility. Change-Id: Icbd70d9c8c9da3637cfa5722a636d140597fe623
* Merge "Upgrade testing to Gerrit 3.4.4"Zuul2023-03-085-11/+13
|\
| * Upgrade testing to Gerrit 3.4.4Jeremy Stanley2023-03-075-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An addition has been proposed to leverage Gerrit's "Cc" feature, but in order to test this we need a newer version of the server. Newer Gerrit versions require HTTP basic auth instead of digest for the REST API, so switch our tests to use that when uploading SSH keys. A newer JDK (11) is required, but this version should still be available on our configured test platforms. We update the test Gerrit server config to not try to send email. This prevents annoying tracebacks from ending up in the Gerrit logs on test failures. We update test_cloned_repo and test_multiple_changes to look for strings that newer Gerrit emits on successful push. Git review passes these through to users and the tests look for them to determine if pushes were successful. Because of an SSH host key negotiation regression in 3.4.5, stick with 3.4.4 for now: https://bugs.chromium.org/p/gerrit/issues/detail?id=16215 Finally we remove skipsdist from tox.ini so that `which git-review` can find git-review installed to the test venv. Tox v4 won't install the project into the venv if skipsdist is set. Change-Id: I540950b93356b1efbc34bca976bfb3134f47a599
* | Add message optionTama McGlinn2022-11-111-0/+7
| | | | | | | | Change-Id: I34741e0baf6dabb5cbf3ab648bf2e4c2a28a9399
* | Fix nodesets for tox jobsDr. Jens Harbott2022-11-091-2/+4
| | | | | | | | | | | | | | The default nodeset has switched from focal to jammy, so we need to pin the jobs that require focal to the correct nodesets. Change-Id: I6d8dad4c4a4cbfa3a395b2f8a5e40f6717878a8b
* | Clarify that test rebases are not keptJeremy Stanley2022-07-153-9/+21
|/ | | | | | | | | | | | There has been a long-standing misconception that git-review pushes automatically rebased changes by default. It does not, but our documentation and context help have been less than clear on that point, contributing to this impression. Try to do a better job of explaining that the default rebasing performed by git-review is purely exploratory, and used only to notify users about possible merge conflicts with their target branch before pushing a change. Change-Id: I3c841af5ff9430a0de4d9dc9526dd3be6ab53ad2
* Merge "Add release note for OSX Git version parsing fix"2.3.1Zuul2022-04-191-0/+5
|\
| * Add release note for OSX Git version parsing fixJeremy Stanley2022-04-191-0/+5
| | | | | | | | | | | | | | | | | | Change I40356ee81b98c1210de348e51335a20be48bec1d fixed this, but was missing a release note. Also close the story task with this change since the other one didn't. Change-Id: Ia27d930bf0ecefe1c26c00d6a5e93136fd120964 Task: #45100
* | Merge "Publish documentation at every release"Zuul2022-04-191-0/+1
|\ \ | |/ |/|
| * Publish documentation at every releaseJeremy Stanley2022-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We normally publish documentation updates in the promote pipeline, using documentation built in the gate. As a result, the published docs tend to lag behind release events until the next post-release change lands. Run a separate docs build and publish it on release, so that release notes and version information included in the documentation reflect the most recent tag prior to the next change merging (which for stable projects like this one, could be a while). Override the tag jobvar to force publication to the branch path rather than using a version-specific tree. Change-Id: Ibf1ecfa0420a3c170beb79c14a9a9ef13fea9046 Depends-On: https://review.opendev.org/838525
* | Fix get_git_version on OS XClark Boylan2022-04-191-1/+7
|/ | | | | | | | | | | Apparently Apple's `git --version` provides different output than Linux's. Improve the version parsing by splitting on all whitespace and taking the exact element that should be the version out of that rather than relying on the version we want being a suffix of the command output. Story: 2010002 Change-Id: I40356ee81b98c1210de348e51335a20be48bec1d
* Merge "Enforce minimum git version"2.3.0Zuul2022-04-181-14/+27
|\
| * Enforce minimum git versionIan Wienand2022-04-121-14/+27
| | | | | | | | | | | | | | | | Id4528209f1cd500afd06e2e61eb5689022251118 introduced a minimum git version. Abstract our existing check and setup a global with the local git version for tests. Add a minimum version check. Change-Id: I9d1de11269758a453ecc8dde0a4c631d8e762a91
* | Merge "Fix submitting signed patches"Zuul2022-04-182-2/+12
|\ \ | |/
| * Fix submitting signed patchesDr. Jens Harbott2022-04-112-2/+12
| | | | | | | | | | | | | | | | | | | | | | When a commit is signed and the git config contains the setting log.ShowSignature=True, even the "--oneline" git log output for it will include multiple lines (the output from gpg verifying the signature), thus fooling us into assuming that multiple commits are to be submitted. Override the option to make sure we always get one line per commit only. Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: Id4528209f1cd500afd06e2e61eb5689022251118
* | Merge "Drop support for Python 3.5"Zuul2022-04-123-4/+4
|\ \ | |/
| * Drop support for Python 3.5Jeremy Stanley2022-04-113-4/+4
| | | | | | | | | | | | | | | | | | An upcoming change needs a feature from Git 2.10, which Ubuntu 16.04 LTS lacks. Since Python 3.5 reached end of life with the 3.5.10 release on 2020-09-05, it's been unsupported by its maintainers for nearly 2 years anyway. Change-Id: I0369c29baa344c4dc76eaa47b3467b6117eb933c
* | Merge "Fix git_review.cmd.CommandFailed: <exception str() failed>"Zuul2022-04-111-2/+2
|\ \ | |/ |/|
| * Fix git_review.cmd.CommandFailed: <exception str() failed>Sunyeop Lee2022-04-111-2/+2
| | | | | | | | | | | | | | | | | | Neither the CommandFailed nor ChangeSetException classes have docstrings, so self.__doc__ is initialized to None and can't be trivially combined with other strings (nor would there be any point in doing so). Just drop these unnecessary references. Change-Id: I1f17325baa69522a4471f5bcf270a74038ad8642
* | Merge "Clean up package metadata"Zuul2022-04-111-6/+2
|\ \
| * | Clean up package metadataJeremy Stanley2022-04-101-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The author-email and python-requires options are deprecated by SetupTools in favor of author_email and setup_requires and trigger warnings now, so update them. The license_files option (since its introduction) automatically includes LICENSE and AUTHORS if not specified, so was always redundant and unnecessary. The warnerrors option for PBR was for Sphinx integration, which we don't use any longer, and is ignored by modern PBR versions anyway so clean it up too. Change-Id: Ic5d1e17dd4926eea4e5b6fff47295fd8e9eb452d
* | | Merge "Force use of scp rather than sftp when possible"Zuul2022-04-112-0/+23
|\ \ \
| * | | Force use of scp rather than sftp when possibleJonathan Rosser2022-04-102-0/+23
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSH has deprecated its use of scp/rcp protocol in favor of SFTP, which the embedded Apache mina-sshd in widely-deployed Gerrit versions does not yet support. The default officially changed in OpenSSH 9.0 (some distributions, such as Fedora and CentOS, switched their default behavior to this as early as OpenSSH 8.7 or 8.8), leading to a ``subsystem request failed on channel 0`` error during commit-msg hook retrieval. Now git-review will attempt to detect whether scp's -O option is available to force use of the legacy scp/rcp protocol, and apply it if so. Change-Id: Ib64c03c3e12a3a8390e38f6ca9393db3b3c2a9e3
* | | Merge "Treat ^C as "no" at confirmation prompt"Zuul2022-04-111-1/+4
|\ \ \ | |_|/ |/| |
| * | Treat ^C as "no" at confirmation promptTim Burke2022-04-071-1/+4
| | | | | | | | | | | | | | | | | | The user intent is clear. Change-Id: Ibdaa2f95e7417619f651d6f41fbf15a357839bf3
* | | Switch to unittest.mockSteve Kowalik2022-03-082-2/+1
| |/ |/| | | | | | | | | | | | | Since mock is a backport of the standard library, and we no longer support Python 2, we can use the standard library, and drop one external dependency. Change-Id: I798c85f1581f4562908c10cd1b58134cdcb40281
* | Add release note for the rebase merge handling fix2.2.0Jeremy Stanley2021-11-231-0/+7
| | | | | | | | | | | | | | In preparation for a new release, include a release note about an important fix we added recently. Change-Id: Icfe0594cc1a4526e0781ac47c0d5f60bbcdce0e3
* | Fix use of removed --preserve-merges optionPierre Riteau2021-11-192-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --preserve-merges (-p) option was replaced by --rebase-merges (-r). This fixes the following error when using git version 2.34.0: Errors running git rebase -p -i remotes/gerrit/stable/xena fatal: --preserve-merges was replaced by --rebase-merges In order to keep compatibility with git < 2.18.0 we detect the git version and use the old --preserve-merges flag when the version is older than 2.18.0. Co-Authored-By: Clark Boylan <clark.boylan@gmail.com> Change-Id: I04de3d0f20aa6bafcf746b7706d61dd9b9af296c
* | Ignore unstaged/uncommitted submodule changesJeremy Stanley2021-07-074-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking for unstaged or uncommitted changes to avoid the test rebase (which could cause data loss for users of git.autostash), it's still fine if there are unstaged or uncommitted changes in submodules since those won't be rebased. Have the git diff invocations explicitly ignore submodules, and also add regression tests which demonstrate it's working. This fixes a regression originally introduced by change Iabb8387c9db59a7d02ebfd43b688e7bb93d3159f. Change-Id: I20d602e86537b573ac1f9788221215047a594f83
* | Doc updates for Git "core.hooksPath" option supportFlorian Haas2021-06-242-8/+12
| | | | | | | | | | | | | | | | | | | | Couple of small follow-ups to Id8a3ac464ff75e6d8207f198089f018cc790eca5: * Fix formatting in the reno (use monospace as applicable). * Update "Installation and Configuration" to say that the local hook *normally* goes into .git/hooks. Change-Id: I1b326bdcaed38d3a82a65f944431f3640652dd33
* | Support the Git "core.hooksPath" option when dealing with hook scriptsFlorian Haas2021-06-213-2/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, git-review would assume that the Git repository's hook directory is .git/hooks, relative to the root of the checkout. This assumption breaks if the user has set the core.hooksPath option on the repository (or, for that matter, in ~/.gitconfig or /etc/gitconfig). core.hooksPath can either be set to an absolute path, in which case it is to be interpreted as-is, or to a relative path, in which case it should be interpreted as relative to the root of the checkout. Introduce a new convenience function to suss out the correct path, and use it in places where the reference to .git/hooks was previously hard-coded. Reference: https: //git-scm.com/docs/git-config#Documentation/git-config.txt-corehooksPath Depends-on: I0f0f44e57a100420d8e6d2eaec7dbb5d77b654af Change-Id: Id8a3ac464ff75e6d8207f198089f018cc790eca5
* | Fix nodeset selections for zuul jobsJens Harbott2021-06-171-8/+7
| | | | | | | | | | | | | | We now are using focal nodes by default, so we no longer need to explicitly select those, instead we need bionic for py36+py37. Change-Id: I0f0f44e57a100420d8e6d2eaec7dbb5d77b654af
* | Merge "Add option for disabling thin pushes"2.1.0Zuul2021-04-234-2/+31
|\ \
| * | Add option for disabling thin pushesClark Boylan2021-04-124-2/+31
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a long standing issue with C Git pushing to Gerrit and Jgit where the occasional push will fail because the negotiated packs are missing a tree object. This happens very occasionally but when it does it would be nice to be able to point users at an easy workaround. Pushing with --no-thin is that workaround. Note that --no-thin is much less efficient so shouldn't be used by default. This old bug, https://bugs.launchpad.net/git-review/+bug/1332549, has details but it seems to affect current C git and Gerrit+Jgit. Change-Id: Id6ba52a656a14c921acab1b14ef668e6251245da
* | Install PBR explicitlyClark Boylan2021-04-232-0/+10
|/ | | | | | | | | | | | | | | We do this because easy_install on python3.5 is failing to find pbr. I believe this is happening due to pypi's deprecation of non SNI tls connections. They report that the version of 3.5 on xenial should be able to do SNI but easy_install at least doesn't seem to do so. Note we restrict this to python>=3 and <=3.5 as python 2.7 had backported fixes. Also, this really only helps with unittesting via tox as we instruct tox to explicitly install the requirements files before creating/installing the package itself. This is the reason we stick this in test-requirements.txt rather than requirements.txt. Change-Id: Iac2c1f4f575de250ed0dba22d33b017322fd7562
* Add missing -h to manpage and remove -c from itRoman Gorshunov2021-03-171-2/+2
| | | | | | | | | | | - Change implementing the -h/--help option did not add corresponding manpage entry for it. - Change removing the -c/--comaptible option did not remove corresponding manpage entry for it. Correcting these oversights now. Task: #41310 Change-Id: I548e63a778e36db65dd776aaf4e6d6a7fc103c2d
* Merge "Remove comments for unstaged/uncommitted tests"Zuul2021-03-031-4/+0
|\
| * Remove comments for unstaged/uncommitted testsJeremy Stanley2021-03-011-4/+0
| | | | | | | | | | | | | | | | The tests for pushing with unstaged or uncommitted edits had some left-over code comments from an earlier revision, which were no longer accurate but also entirely unnecessary. Remove them. Change-Id: Icfc98d426fa994cce6f1ec290acfa5c0d55123bf
* | Adjust categories for some release notes2.0.0Jeremy Stanley2021-03-022-2/+2
| | | | | | | | | | | | | | | | | | In preparation for the 2.0.0 release, move the release notes for dropping Python 2.7 support and ceasing support for draft changes as upgrade notes. This will make it a little more obvious that people who rely on those features may need to hold off upgrading. Change-Id: I6362ef2e878a855cb34e38487cef35ee3bcec75c
* | Merge "Overhaul Python package metadata and OpenDev URLs"2.0.0.0rc1Zuul2021-03-0211-421/+107
|\ \
| * | Overhaul Python package metadata and OpenDev URLsJeremy Stanley2021-02-2611-421/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modernize our package metadata in the following ways: * switch from description-file to long_description with the file attribute, and specify an explicit content type and encoding * replace the home-page parameter with the newer general url one * add specific labelled project links for improved navigation from PyPI's summary sidebar * add commandline keyword to help folks searching * use the specific license metadata in addition to the corresponding trove classifier for it * make sure wheels when built also incorporate the LICENSE and AUTHORS files so that we're not distributing them without a copy of the license text * stop flagging wheels as "universal" now that git-review no longer supports Python 2.7 * drop the old Sphinx integration config for PBR now that it's no longer needed https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html Also update old openstack.org URLs throughout contributor docs and examples/comments to newer opendev.org counterparts. Remove the old redundant HACKING.rst file as well as a lingering MANIFEST.in from the times before PBR was a thing. Replace the CONTRIBUTING.rst with a shorter one cribbed from bindep. Add the test profile to the one entry in bindep.txt to make it more apparent that's not a runtime dependency of git-review. Adjust some old "OpenStack, LLC." copyrights as indicated by the foundation's "Legal Issues FAQ." Change-Id: Ie45d4d73ba7b5a860f09cc4f1d849587761d846c
* | | Merge "Switch to default Sphinx theme"Zuul2021-03-022-49/+12
|\ \ \ | |/ /
| * | Switch to default Sphinx themeJeremy Stanley2021-02-262-49/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we're publishing documentation to docs.opendev.org now, drop the openstackdocstheme extension and just use the default Alabaster theme instead. Also clean up references to OpenStack in the Sphinx configuration and remove a really old (and unnecessary) copyright year. Change-Id: I535783db9dccd36a094d41e6cf08469b6d8c3894
* | | Merge "Don't test rebasing with unstaged changes"Zuul2021-03-023-0/+45
|\ \ \ | | |/ | |/|
| * | Don't test rebasing with unstaged changesJeremy Stanley2021-02-263-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For safety, attempts to push a commit with unstaged or uncommitted changes in the worktree will be caught and an error reported, rather than leaving it up to ``git rebase`` to spot them. This addresses a situation where users enabling "rebase.autostash" would otherwise experience data loss when the test rebase is subsequently reset. Change-Id: Iabb8387c9db59a7d02ebfd43b688e7bb93d3159f Task: #38921
* | | Merge "Add test helpers for unstaged/uncommitted changes"Zuul2021-03-011-3/+15
|\ \ \ | |/ /
| * | Add test helpers for unstaged/uncommitted changesJeremy Stanley2021-02-261-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to better test detection of unstaged and uncommitted changes, add base test methods to create changes and not stage or commit them, ensuring they can result in an unstaged diff or staged but uncommitted edits. To ensure that these work, use them within the simple change creation method to perform the actual file edit. Change-Id: Ib698d0057a404f073490d1683a8eef8d0c143122