Commit Graph

73 Commits

Author SHA1 Message Date
Andreas Jaeger 0ec5a78f66 Sync with governance
Run script generate-gitmodules.py to sync with governace repository to
add new repositories and remove retired ones.

Change-Id: Ia42b717ad242958ba4a9689ac814c956f460712f
2020-06-07 16:15:34 +02:00
Zuul 018484c95f Update git submodules
* Update git-review from branch 'master'
  - Merge "Make it possible to specify who is notified"
  - Make it possible to specify who is notified
    
    This is documented at
    <https://gerrit-review.googlesource.com/Documentation/user-upload.html#push_options>.
    
    Change-Id: Ifbc0ec1225052cb804fcf537f5a071cad29e8328
2020-02-05 18:03:31 +00:00
Zuul a8cd655247 Update git submodules
* Update git-review from branch 'master'
  - Merge "Install commit hook into submodules"
  - Install commit hook into submodules
    
    If there are submodules, the commit hook should be installed into them,
    according to https://gerrit-review.googlesource.com/Documentation/dev-crafting-changes.html#git-commit-settings
    
    git submodule foreach is a no-op if there are no submodules, so just run
    it directly.
    
    Change-Id: I559e2786c84be9975cc082bce80b32c8e47a9fb5
2020-01-17 11:25:13 +00:00
David Ostrovsky cb9fb3c62e Update git submodules
* Update git-review from branch 'master'
  - Discontinue support for draft workflow
    
    As of gerrit 2.15 and later, draft workflow is replaced with
    work-in-progress and private workflow. See this CL: [1] and this
    issue upstream: [2].
    
    Even though support for draft worklfow was removed, the drafts magic
    draft option was preserved, and is mapped to creation of the private
    change when pushed first time, or creation of change edit on subsequent
    pushes. These behaviour was alaways controvesial, but was kept in place
    because 2 major Gerrit clients: repo and git-review were still
    referencing drafts magic branch. In upcoming gerrit releases the support
    for drafts magic branch option is discontinued, and thus removed from
    both repo and git-review: [3].
    
    [1] https://gerrit-review.googlesource.com/c/gerrit/+/97230
    [2] https://crbug.com/gerrit/6880
    [3] https://gerrit-review.googlesource.com/c/gerrit/+/238898
    
    Sem-Ver: api-break
    Change-Id: I08a590d42e1ebaa230da960cd192c0b1df528332
2020-01-17 11:22:48 +00:00
Stephen Finucane c43bc54676 Update git submodules
* Update git-review from branch 'master'
  - tox: Use python3 for all testenvs
    
    Change-Id: I8ec8c65be8448b49ed915262c9026281958e982a
    Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-01-16 16:07:19 +00:00
Stephen Finucane eb934f940d Update git submodules
* Update git-review from branch 'master'
  - gitignore: Ignore reno artefacts
    
    Change-Id: I762e7e77b74fc72653cb35663f0458a8365c83b6
    Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-01-16 16:07:18 +00:00
Stephen Finucane c8c431673e Update git submodules
* Update git-review from branch 'master'
  - trivial: Update to hacking 2.x
    
    Fixes an issue we're seeing in the python3-based gate plus some other
    random things.
    
    Change-Id: I417c0a7669090ee3419c406024f6f3e3289b4c4b
    Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-01-16 15:59:14 +00:00
Zuul 6931f83148 Update git submodules
* Update git-review from branch 'master'
  - Merge "Corrected git-review project organization"
  - Corrected git-review project organization
    
    Change-Id: Iddfa7b308ecbc7d826f47488b0c0d6625a592bae
2019-06-19 15:28:08 +00:00
Zuul 9bf826047e Update git submodules
* Update git-review from branch 'master'
  - Merge "Push with --no-follow-tags"
  - Push with --no-follow-tags
    
    When the git configuration value push.followTags is set and a repo has
    tags, git-review pushes are rejected:
    
        ! [remote rejected]   TAG -> TAG
           (cannot combine normal pushes and magic pushes)
    
    This change ensures that git-review never pushes with followTags.
    
    Change-Id: Ifbd13284b16bad1165e73d25b99f17344180d423
2019-06-19 15:28:07 +00:00
Zuul 50f3b628d9 Update git submodules
* Update git-review from branch 'master'
  - Merge "Change StoryBoard URL to be a permalink"
  - Change StoryBoard URL to be a permalink
    
    StoryBoard supports permalinks to project names now,
    so take advantage of that.
    
    Change-Id: I7ffab014e95e62eb0d3245b78d2a6d8e76df9766
2019-05-31 13:41:34 +00:00
Adam Spiers 1c731120dd Update git submodules
* Update git-review from branch 'master'
  - Fix complimentary typo
    
    Complimentary means something is free or given as a compliment,
    whereas complementary means that it goes well with something else.
    
    https://www.brandtuitive.com/agency-blog/2016/3/29/grammar-matters-complimentary-vs-complementary
    
    Change-Id: I6a1a7db537cc98ea5a93153573a7d6b68eb8aa59
2019-05-30 12:36:18 +00:00
Adam Spiers 6c6648d275 Update git submodules
* Update git-review from branch 'master'
  - Build docs using Python 3
    
    The docs testenv in tox.ini was attempting to use Python 2.7.x with
    Sphinx 2.x, which is not a compatible combination.  This caused tox
    failures like this:
    
      2019-05-08 12:45:48.060953 | TASK [tox : Run tox without tests]
      2019-05-08 12:45:48.759277 | ubuntu-bionic | docs create: /home/zuul/src/opendev.org/openstack/os-resource-classes/.tox/docs
      2019-05-08 12:45:52.775007 | ubuntu-bionic | docs installdeps: -r/home/zuul/src/opendev.org/openstack/os-resource-classes/doc/requirements.txt
      2019-05-08 12:45:53.838450 | ubuntu-bionic | ERROR: invocation failed (exit code 1), logfile: /home/zuul/src/opendev.org/openstack/os-resource-classes/.tox/docs/log/docs-1.log
      2019-05-08 12:45:53.838669 | ubuntu-bionic | ================================== log start ===================================
      2019-05-08 12:45:53.838995 | ubuntu-bionic | DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
      2019-05-08 12:45:53.839207 | ubuntu-bionic | Looking in indexes: http://mirror.iad.rax.openstack.org/pypi/simple, http://mirror.iad.rax.openstack.org/wheel/ubuntu-18.04-x86_64
      2019-05-08 12:45:53.839421 | ubuntu-bionic | Collecting sphinx!=1.6.6,!=1.6.7,>=1.6.2 (from -r /home/zuul/src/opendev.org/openstack/os-resource-classes/doc/requirements.txt (line 1))
      2019-05-08 12:45:53.839619 | ubuntu-bionic |   Downloading http://mirror.iad.rax.openstack.org/wheel/ubuntu-18.04-x86_64/sphinx/Sphinx-2.0.1-py2.py3-none-any.whl (3.2MB)
      2019-05-08 12:45:53.839749 | ubuntu-bionic | ERROR: Sphinx requires Python '>=3.5' but the running Python is 2.7.15
      2019-05-08 12:45:53.839778 | ubuntu-bionic |
      2019-05-08 12:45:53.839912 | ubuntu-bionic | =================================== log end ====================================
      2019-05-08 12:45:53.840347 | ubuntu-bionic | ERROR: could not install deps [-r/home/zuul/src/opendev.org/openstack/os-resource-classes/doc/requirements.txt]; v = InvocationError(u'/home/zuul/src/opendev.org/openstack/os-resource-classes/.tox/docs/bin/pip install -r/home/zuul/src/opendev.org/openstack/os-resource-classes/doc/requirements.txt', 1)
    
    So switch to Python 3 for building docs.
    
    Change-Id: If04bd7cf8c316f3ae621c182a05aebc779b4d5b4
    
  - OpenDev Migration Patch
    
    This commit was bulk generated and pushed by the OpenDev sysadmins
    as a part of the Git hosting and code review systems migration
    detailed in these mailing list posts:
    
    http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
    http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html
    
    Attempts have been made to correct repository namespaces and
    hostnames based on simple pattern matching, but it's possible some
    were updated incorrectly or missed entirely. Please reach out to us
    via the contact information listed at https://opendev.org/ with any
    questions you may have.
2019-05-30 12:19:23 +00:00
Monty Taylor f0d56f5cf7 Update git submodules
* Update git-review from branch 'master'
  - Use remote_url instead of remote for download
    
    If usepushurl is set, then it's likely that the pushurl is pointing
    to the code review system while the normal url is pointing to a read
    only mirror. If the read-only mirror in question doesn't contain
    the gerrit refs (like opendev.org currently) then git fetch origin
    won't work properly. However, we already calculate the correct
    URL at the top of the function for use in query_reviews, and fetch
    will happily work with a full url rather than a named remote.
    
    Update the function to use the remote_url so that usepushurl works
    even if the mirror url does not contain refs/changes.
    
    Change-Id: Ib72afe97e65cb1dcaf95e28450dfe6e7d5f88965
2019-03-18 20:30:15 +00:00
Jan Kundrát 2c97f2f066 Update git submodules
* Update git-review from branch 'master'
  - Support usernames that contain '@' and ssh Git URLs
    
    Our company-internal Gerrit uses federated logins (Shibboleth/SAML), and
    the login names happen to include the at-signs. This needed a patch to
    Gerrit ([1], released in 2.13.10) to allow them. Cloning using regular
    git tools as well as through the gertty work, but `git-review --list`
    complained because it couldn't parse these URLs.
    
    [1] https://gerrit-review.googlesource.com/c/94914/
    
    Change-Id: I6c1c75a585184ee3fb2847c1e6d30802e53f8b4c
2019-03-02 16:22:00 +00:00
Sorin Sbarnea b44a99670e Update git submodules
* Update git-review from branch 'master'
  - Switch from testrepository to stestr
    
    Adopts use of newer stestr for running the test suite.
    
    Passing TERM is needed or stestr will ignore the --color option when
    run under tox.
    
    Change-Id: Id2d4ce36cdfedd5a847e0428854753d2cf4140ee
2019-02-12 10:29:58 +00:00
Sorin Sbarnea 0b93dc97b2 Update git submodules
* Update git-review from branch 'master'
  - Allow user to control Java version used by tox
    
    This allows user to define JAVA_HOME in order to control which version
    of Java will be used by Gerrit during tox testing.
    
    Avoid Gerrit startup failure due to use of wrong version of Java,
    even if `java -version` would have reported the right version.
    
    On systems with multiple versions of Java 8/9/10 it was impossible to
    run tox because the launcher would have always picked the latest
    version which is clearly not compatible with Gerrit war archive used
    for testing.
    
    In the future we will start using a gerrit container for testing and
    avoid dependency on local Java version.
    
    Change-Id: I05b6f7125393a009e1fdcf556b17df158c10eea0
    
  - Merge "Fix wrong and misleading "using default: None" in --verbose mode"
  - Fix wrong and misleading "using default: None" in --verbose mode
    
    When something is not found in git config, the --verbose option logs the
    wrong value "None", example:
    
    2018-12-12  Running: git config --get gitreview.branch
    2018-12-12  using default: None
    2018-12-12  Running: git config --get gitreview.scheme
    2018-12-12  using default: None
    2018-12-12  Running: git config --get remote.gerrit.pushurl
    2018-12-12  using default: None
    2018-12-12  Running: git config --get remote.gerrit.url
    2018-12-12  result: ssh://marc@review.openstack.org:29418/openstack-infra/git-review
    
    From a --verbose user perspective this is plain wrong for (at least) all the
    options defined in the DEFAULTS list.
    
    Change --verbose message to look like this instead:
    
    2018-12-12  Running: git config --get gitreview.branch
    2018-12-12  Config['branch'] = master
    2018-12-12  Running: git config --get gitreview.scheme
    2018-12-12  Config['scheme'] = ssh
    2018-12-12  Running: git config --get remote.gerrit.pushurl
    2018-12-12  Running: git config --get remote.gerrit.url
    2018-12-12  ... remote.gerrit.url = ssh://marc@review.openstack.org:29418/openstack-infra/git-review
    
    If git_config_get_value('new_option',... ) is ever invoked in the future
    with a not None, default="fubar" parameter then --verbose will print these
    lines:
    
    2018-12-19  Running: git config --get gitreview.new_option
    2018-12-19  ... nothing in git config, returning func parameter: fubar
    
    This logging issue is especially misleading considering the many levels of
    defaults and fallbacks: git config x3; .gitreview; DEFAULTS list,
    git_config_get_value(default=...) parameter, options parser logic, etc.
    
    Change-Id: I6cee46e88b90b8f11689be3875d64ec5e577f12f
    
  - Add hint to just "git remote rename origin gerrit" when no .gitreview
    
    ... because it Just Works with absolutely zero configuration when cloning
    with ssh://
    
    Change-Id: I7a413704c4a567e397b5bb6075677175b8997704
    
  - Merge "tox.ini: add passenv = http_proxy https_proxy # _JAVA_OPTIONS"
  - Merge "docs: Call out use of an agent to store SSH passwords"
  - Merge "docs: Misc updates"
  - Merge "test_uploads_with_nondefault_rebase: fix git screen scraping"
  - tox.ini: add passenv = http_proxy https_proxy # _JAVA_OPTIONS
    
    Add: 'passenv = http_proxy https_proxy' whitelist to tox.ini because there's
    basically never any good reason to throw away proxy configuration.
    
    The addition of http_proxy allows downloading
    http://tarballs.openstack.org/ci/gerrit/gerrit-<version>.war
    behind a proxy.
    
    https_proxy is not needed right now but added for consistency and
    "future-proofing"
    
    _JAVA_OPTIONS is added but only as a clue and commented out by default
    because it could hold non-proxy configuration which would defeat tox'
    environment cleaning and introduce test variability.
    
    This is just the tox.ini source code part of the larger
    I764ed51314c8e2d0572d1f01c9792bee0a40c7e6
    includes documentation of workarounds and troubleshooting tips.
    
    Change-Id: I764ed51314c8e2d0572d1f01c9792bee0a40c7e7
    
  - Merge "CONTRIBUTING.rst, HACKING.rst: fix broken link, minor flow updates"
  - Merge "tox: Remove dead settings/targets"
  - Merge "tests/__init__.py: ssh-keygen -m PEM for bouncycastle"
  - CONTRIBUTING.rst, HACKING.rst: fix broken link, minor flow updates
    
    Paraphrasing parts of a private email from Stephen Finucane.
    
    Change-Id: I2b66af40ca16e311bde3b482229ef00b70dcd1f7
    
  - test_uploads_with_nondefault_rebase: fix git screen scraping
    
    Newer versions of git quote branch names in their output; at least git
    2.16.3 does. This causes all test_uploads_with_nondefault_rebase tests to
    fail like this:
    
    testtools.matchers._impl.MismatchError:
     'Branch test_branch set up to track remote branch maint from origin.'
     not in
      u"Switched to a new branch 'test_branch'\n\
     Branch 'test_branch' set up to track remote branch 'maint' from 'origin'."
    
    Add a testtools.matchers.MatchesRegex() to support both styles.
    
    Change-Id: I9f1417c53de2f7d638e845f553df3bd426a4c750
    
  - Merge "Avoid UnicodeEncodeError on python 2"
  - tests/__init__.py: ssh-keygen -m PEM for bouncycastle
    
    From: https://www.openssh.com/txt/release-7.8 change log:
    
     * ssh-keygen(1): write OpenSSH format private keys by default
       instead of using OpenSSL's PEM format. The OpenSSH format,
       supported in OpenSSH releases since 2014 and described in the
       PROTOCOL.key file in the source distribution, offers substantially
       better protection against offline password guessing and supports
       key comments in private keys. If necessary, it is possible to write
       old PEM-style keys by adding "-m PEM" to ssh-keygen's arguments
       when generating or updating a key.
    
    This fixes all tests failing with this error:
    
    [2018-12-04 17:46:24,130] WARN  org.apache.sshd.common.keyprovider.FileKeyPairProvider :
       Unable to read key /home/mherber2/pip/src/git-review/.gerrit/site-5123/etc/ssh_host_rsa_key
    java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY
    	at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)
    	at org.apache.sshd.common.keyprovider.FileKeyPairProvider.doLoadKey(FileKeyPairProvider.java:124)
    
    Change-Id: Id10f9b5be928f2ba57847fa32814e9db979375f5
    
  - Use six for cross python compatibility
    
    - Fixes linting error related to undefined unicode on python3.
    - Simplifies code
    
    Change-Id: Ib40237e0fb7156b084dfdab47be69ccad09547fe
    
  - Avoid UnicodeEncodeError on python 2
    
    Python2 has default encoding as ascii which means
    that is likely that some print() commands would
    fails with UnicodeEncodeError.
    
    This hack changes default encoding in order to
    avoid such errors.
    
    Change-Id: I4e21e6e32d4bb815693b7d6ce35efb6a5cca2fc2
    
  - As suggested by pep8 don't compare boolean values or empty sequences
    
    Refactoring to improve code style as suggested by pep8.
    
    - "rc" and "status" variables cannot be None beacause the process is
      terminated after the "run_command_status"
    
    - It's better to ignore an empty "username"
    
    Change-Id: I8a34f4ab9e05d91786ce6d62e4db96811787b633
    
  - Improve exit code implementation
    
    Unnecessary dynamic GitReviewException.EXIT_CODE attribute
    lookup refactored into static to benefit static analyzers.
    
    Default process exit code changed from 127 (command not found error)
    to 1 (general error)
    
    Change-Id: I1fcb583a740bf32c4427a587e208d099712a7bc4
    
  - docs: Call out use of an agent to store SSH passwords
    
    This is included as a note on the usage page for want of a better place
    to put it.
    
    Change-Id: I647cc8239e04e1f064aef3e0942ca94b0d5b4025
    Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
    Story: 2000431
    Task: 2663
    
  - Don't set topic when submitting no-topic patches
    
    Change-Id: I8f8880791ad7e46fb9e18623ab8bd295457424b2
    Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
    
  - Remove auto-branch name
    
    The feature to configure branch names based on the presence of "bug",
    "lp", "blueprint" or "bp" in the commit message is overly elaborate and
    very OpenStack specific. Even with this, it hasn't been updated to keep
    up with the times as many projects have migrated to Storyboard, which
    isn't handled here.
    
    Given that it frequently does the wrong thing and likely doesn't apply
    to anyone outside of the OpenStack ecosystem, the wisest thing it to
    simply remove the feature. This is a break in behavior but it seems
    better than adding yet another flag for something that many users will
    want enabled by default.
    
    Change-Id: I82ecc1719de5c87d59bbfe73a042917e6559da1e
    Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
    Story: 1130330
    Task: 566
    Story: 2001247
    Task: 5777
    
  - tox: Remove dead settings/targets
    
    The sdist target is useless given that releases are automated.
    Similarly, the '[testenv] install_command' uses the default value and is
    therefore not required. Finally, some other things were slightly off or
    otherwise annoying and can be fixed.
    
    Change-Id: Ia029aba9ee5bc79cf39043a5fcaf9463aa1518f7
    Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
    
  - docs: Misc updates
    
    I tried splitting these into separate commits but the splits were too
    abstract.
    
    Change-Id: I996c920e861d7507d0d0bb41ba4f5e65362e0b44
    Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
    Story: 1388398
    Task: 584
    
  - Clean up vestigal scripting in cmd.py
    
    This was brought up by an RPM lint checker. It complaned about
    a non-script being executable. Apparently the shebang was not
    removed when we went all PBR.
    
    Change-Id: I60098f334d136fe98d3492a3578516310e31296c
    
  - Merge "Fix compare_review's use of fetch_review"
  - Merge "Use new %topic=XXXX syntax for topic pushes"
  - Fix compare_review's use of fetch_review
    
    fetch_review was updated to take project config information so that
    projects hosted over http below some root (eg
    https://gerrit.org/gerrit/here) could be properly fetched against. But
    in adding this we broke the compare_review functionality which is the
    other user of fetch_review.
    
    Fix this by passing project config info into compare_review so that it
    can pass that along to fetch_review.
    
    Additionally we need to compare like types when looking at patchset
    numbers so coerce them to ints when comparing.
    
    Change-Id: I98fbf31821dc3a9162700725dec07bc7685ea5ca
    
  - Always print failure case when testing remotes
    
    Rather than requiring verbose to be specified when testing remote URLs,
    always print the failure case to allow easier debugging, for example,
    with unsigned CLAs.
    
    Change-Id: I37e2d8b6b70a573a4a3f9091205d31100e3bf9f2
    
  - Use new %topic=XXXX syntax for topic pushes
    
    The old syntax is undocumented and slated to be removed.
    
    Uniformize handling of % options. Previously, combining options could
    yield destination refs that look like
    
       refs/for/BRANCH%wip%private
    
    which tries to switch on a non-existent option "wip%private".
    
    Change-Id: Ia4e97eafbf685fcba78d95370dae08254a2c718b
    
  - Merge "Start using reno for releasenotes"
  - Merge "Use doc/requirements and openstackdocstheme"
  - Start using reno for releasenotes
    
    It's probably a good idea to be specific about what's changing in reno
    releases.
    
    Since reno support wasn't in tree we didn't pick up notes for these two
    changes, but they're things users might want to know about.
    
    Change-Id: I249a3a4d0cf378b60bf43ce65d49416879d5517e
    
  - Use doc/requirements and openstackdocstheme
    
    oslosphinx is the old hotness. openstackdocstheme is the new hotness.
    Also, we can use doc/requirements.txt for docs requirements.
    
    Change-Id: I9cbc670c8fb065d240251f061919479c87193ff5
    
  - Merge "Testing getting specific patchset"
  - Merge "`work-in-progress` and `private` workflow in Gerrit 2.15"
  - Merge "Update tox docs environment to use sphinx-build"
  - Merge "Document usepushurl in the man page"
  - Update tox docs environment to use sphinx-build
    
    We've been moving to running sphinx-build directly instead of python
    setup.py build_sphin.
    
    Change-Id: Ic847b5911aa7499033e879ffe6c1cac4d9c9f80e
    
  - Merge "support review URLs as download arguments"
  - Merge "Fix git review -d M,N with later gerrit"
  - Update default gerrit namespace
    
    According to latest Gerrit documentation, 2.15.3, refs/for/'branch'
    should be used when pushing changes to Gerrit. Change the default
    behavior to refs/for/* instead of refs/publish/* which has been
    deprecated. This removes a warning from Gerrit remotes running the
    latest version when pushing changes without commandline options.
    
    Change-Id: Ibaddfda96457a72c54ca9c91a8ad25d14b88c582
    
  - tox: default envlist to supported python versions
    
    - Removes py26,py32,py33 due EOL
    - Added missing py36,py36,py37
    
    Change-Id: I365c11decab680d3c7d3bfdd1b7328cb7efb3a1a
    
  - support review URLs as download arguments
    
    Rather than forcing users to copy only part of a URL to a review, allow
    them to paste the whole URL and then parse it for them to find the
    change id.
    
    Change-Id: Ic012c86b2b477d17354bf8d119e1d4b698378dd7
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
    
  - `work-in-progress` and `private` workflow in Gerrit 2.15
    
    In Gerrit 2.15 two new workflow states(`work-in-progress` and
    `private`) are introduced. This patch tries to implement them.
    
    Gerrit documentation says:
    
    To push a private change or to turn a change private on push the private
     option can be specified:
    
      git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%private
    
    Omitting the private option when pushing updates to a private change
    doesn’t make change non-private again. To remove the private flag from a
     change on push, explicitly specify the remove-private option:
    
      git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%remove-private
    
    To push a wip change or to turn a change to wip the work-in-progress
    (or wip) option can be specified:
    
      git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%wip
    
    Omitting the wip option when pushing updates to a wip change doesn’t
    make change ready again. To remove the wip flag from a change on push,
     explicitly specify the ready option:
    
      git push ssh://john.doe@git.example.com:29418/kernel/common HEAD:refs/for/master%ready
    
    https://gerrit-documentation.storage.googleapis.com/Documentation/2.15/intro-user.html#private-changes
    https://gerrit-documentation.storage.googleapis.com/Documentation/2.15/intro-user.html#wip
    
    Change-Id: Ia093e4a691fa8eb17c798473a79a97694202fd03
    
  - Document usepushurl in the man page
    
    usepushurl is a great setting - it reduces the number of actions git has
    to do for things like a bare 'git fetch'. It is, unfortunately, not
    documented in the manpage.
    
    Change-Id: Ia7b179c6fcf6490454087aa359d891d1ff3af1a0
    
  - Fix git review -d M,N with later gerrit
    
    It seems the "number" field returned via gerrit JSON can be a string
    (2.13) or a integer (~2.14).  Ensure we can handle both.
    
    Change-Id: I3cbda6c07343332aba592bd96fd8545f08a2cbfe
    
  - Testing getting specific patchset
    
    Add a test for "change,patchset" downloading
    
    Change-Id: I0cc340b9dc24d7f4457e336176649d7fc7994624
2019-02-11 20:19:59 +00:00
Doug Hellmann e162908c88 Update git submodules
* Update git-review from branch 'master'
  - expand help for --download option
    
    Show the syntax for requesting a specific version of a patch.
    
    Change-Id: Id72935c715a7b5c17722400dde6175b99e61860b
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-30 00:02:52 +00:00
Ian Wienand e352c819f8 Update git submodules
* Update git-review from branch 'master'
  - Add bindep.txt
    
    Add bindep.txt with java to get CI going again
    
    Change-Id: I0583eeb928c1e303f27bae00c73a25df0030369c
2018-01-12 22:20:46 +00:00
Zuul 5862896109 Update git submodules
* Update git-review from branch 'master'
  - Merge "Add a note on Windows and Unicode"
  - Add a note on Windows and Unicode
    
    Add a rough note on what we've discovered about Windows and Unicode.
    tl;dr use Python 3.6+
    
    Change-Id: I219cfca6cb9ad427a55a7a1821f9fe0a9cf632f3
2017-11-17 21:07:54 +00:00
Zuul 9b50f4dc79 Update git submodules
* Update git-review from branch 'master'
  - Merge "Fix output printing with python3"
  - Fix output printing with python3
    
    I'm not sure what print_safe_encoding is trying to do
    (Ie834931a549175471af029a6ec4d5794543d8c92).
    
      print(str.encode(sys.stdout.encoding, 'replace'))
    
    means that print() ends up getting a bytes-object encoded in the
    output encoding.  Thus print() is then going to output this as raw
    bytes... not only is unicode going to come out as "\x..\x.." etc, but
    even newlines get squished and you end up with stuff like
    
      $ /tmp/gitreview3/bin/git-review
      b'remote: \rremote: Processing changes: updated: 1, refs: 1\rremote: Processing changes: updated: 1,
    
    I think this problem stems from not ensuring that incoming data
    (output of git) is encoded as a string.  By setting
    universal_newlines=True in run_command_status() we automatically
    ensure that any incoming data is a unicode str, not bytes.
    
    The final section, with the message about rhbz#1058167, appears to be
    related to running git under an alternative locale where it's output
    is translated.  I1bf1124f0b09d6658a7b0703e3b9e74ed80f4eea changed
    things to run the commands under C locale, so there shouldn't be
    unicode in here I wouldn't think.  But, by ensuring it's just a
    string, we can print() it safely anyway.
    
    Change-Id: I596dcba317ecfbaf437cb72d9850580ed6765fce
2017-11-17 21:07:53 +00:00
Zuul 9c6be60a94 Update git submodules
* Update git-review from branch 'master'
  - Merge "Add a note about contribution priorities"
  - Add a note about contribution priorities
    
    It's been poorly documented so far that the current git-review
    maintainers are avoiding addition of new features. Gerrit-based
    change workflows are already confusing enough to new users, and
    providing them with too many complex options risks making things
    worse. This tool's goal is to do a few things well and simply in
    support of an opinionated workflow, without becoming everything to
    everyone.
    
    Since git-review sees broad usage outside the OpenStack contributor
    community, it is subject to a lot of drive-by feature additions. Add
    a note to the contributing document indicating its maintainers
    consider it to be mostly complete (modulo bug fixes, compatibility
    improvements, adding test coverage), so that readers will consider
    strongly whether their particular improvement is well suited to the
    existing scope of the tool.
    
    Change-Id: I11b9f898286b75177493af31e209c2853d78f245
2017-11-17 20:50:56 +00:00
Clark Boylan e29fa9c99b Update git submodules
* Update git-review from branch 'master'
  - Handle http queries below /
    
    Previously git review could not properly query Gerrit servers via http
    if the root of the Gerrit api was below /. This is because it was always
    rooting the changes query api at /changes instead of /foo/changes if
    hosted at /foo.
    
    To fix this we read the project name from the config so that we can
    remove the project name suffix from the urls then append changes/ to the
    resulting url to get a properly rooted query url.
    
    Note this was never a problem with ssh because ssh can't be hosted as
    some subpath. Everything is rooted with ssh and gerrit.
    
    Change-Id: I46e21dfdbbb7f60aa89a7b028501c0d953ae1d7f
2017-11-16 03:08:41 +00:00
Zuul debccd25d1 Update git submodules
* Update git-review from branch 'master'
  - Merge "Support git 2.15 and newer"
  - Support git 2.15 and newer
    
    The 2.15 release of git drops support for `git branch --set-upstream`
    and replaces it with `git branch --set-upstream-to` which was added in
    git 1.8. Move from --set-upstream to --set-upstream-to in order to
    support git 2.15 and beyond. Note that this specifically affects the
    `git review -d` functionality as it is what needs to update the
    upstream.
    
    This does drop support for git 1.7 and older though as this option did
    not exist then. Polling linux distros and OS X the oldest git I can find
    is on CentOS 7 which has 1.8 so this should be fine.
    
    Story: 2001266
    Co-Authored-By: Harry Mallon <Harry.Mallon@codex.online>
    Change-Id: I5ded1ab39bb2c76bdc38655299bac11b4584e138
2017-11-15 04:32:14 +00:00
Zuul ec00575557 Update git submodules
* Update git-review from branch 'master'
  - Merge "show the config value result after fetching it in verbose mode"
  - show the config value result after fetching it in verbose mode
    
    We show the command used to retrieve the config value, but don't show
    what we find. Fix that, and also show cases where we are going to use
    the default setting.
    
    Change-Id: I53ee9ea6e3af4e951587c0845c8333874238f0c2
    Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-11-15 03:58:08 +00:00
Daniel Lublin 0209c58356 Update git submodules
* Update git-review from branch 'master'
  - Actually output the warning
    
    Change-Id: If47f0be53e4b80eae9f03e48acb299c686984d95
2017-11-15 03:53:09 +00:00
Christoph Settgast 45aea580b4 Updated openstack/openstack
Project: openstack-infra/git-review  b61f5b2ec9ab140960a1c6e0a424389cdd8951a0

Fix listing changes over SSH for 2.14

The SSH query API changed from 2.13 to 2.14 from

{"number":"1", ...}

to

{"number":1, ...}

so we need to stringify everything in order to do len, encode etc. on
it.

Change-Id: I06bdd1b4b1181d00a27ce1e76f97baed8cde1284
Story: 2001095
2017-08-07 18:03:44 +00:00
Jenkins e5874846d9 Updated openstack/openstack
Project: openstack-infra/git-review  089e8e64b1fcc0b0a2adf9c3f0bd0a8107647278

Refactor displaying of reviews

Split the displaying of reviews into a separate class to make it easier
to alter the output and accommodate different display options.

Change-Id: I6007259686fc15ae21ae6843faa4ff7ad545cef1
2017-07-21 16:05:47 +00:00
Jenkins 43c858bc0e Updated openstack/openstack
Project: openstack-infra/git-review  b3e0cac1aa5444662086dee1a776bfa352203ab4

Added topic field to the list output

Now you can pass multiple '-l' options like '-ll' and when doing so, it
will show also the topic of the patches

Change-Id: Iabc1107d66a17fde751f90d7fa33f15fe54c7f58
Signed-off-by: David Caro <dcaroest@redhat.com>
Co-Authored-By: Darragh Bailey <dbailey@hpe.com>
2017-07-21 16:04:12 +00:00
Jenkins 7ba34222e4 Updated openstack/openstack
Project: openstack-infra/git-review  54221b107552b5a5d15a38f48196afcb31376682

Switch to string format to avoid interpolation issues

Convert to using python format to align and interpolate values to
ensure the correct output on python 2 & 3 when dealing with unicode and
str.

Interpolating strings using encode into '%s' and subsequently
interpolating the results into a second string results in the output
printing embedded byte strings on python 3.

 $ git-review -l
 b'226894'  b'master'  b'Add pem key parameter (WIP)'
 b'199225'  b'master'  b'support urls as change-id input

Which occurs because after converting a string to unicode bytes, it was
then interpolated using '%s'.

Switching to using '.format()' method takes care of converting the
output to the correct string format for python 2 & 3 automatically.

Change-Id: Ia962d18bda34e0244fb05636a7be263045ecb256
2017-07-21 15:54:05 +00:00
Jenkins db4a104378 Updated openstack/openstack
Project: openstack-infra/git-review  50cb05db6af52ce7c0a2b0d69166eaafede82b20

Provide link to MediaWiki platform specific page

Provide a link to the MediaWiki page on git-review installation, which
provides details for a range of platforms, including Windows and OS
X/macOS.

Change-Id: If030fa7614a7cea33c2a55605a6f0d68751173ea
Story: #2000481
2017-05-16 04:48:40 +00:00
Sorin Sbarnea f9c3f8b330 Updated openstack/openstack
Project: openstack-infra/git-review  72175104ddff76282ad36cebecc7397bc74a85a0

Better username detection for add_remote()

Change-Id: Ia083ec9d5f19bff4944080559672b5947d4e43ee
2017-03-07 20:01:59 +00:00
Jenkins 0c4afa6867 Updated openstack/openstack
Project: openstack-infra/git-review  67dbbc2e59b0b104c9de0a8ab1d39ca54e9845ca

Set a default EXIT_CODE for GitReviewException

This should avoid:

  Could not connect to gerrit at ssh://some random string I typed@review.openstack.org:29418/openstack/repo.git
  Traceback (most recent call last):
    File "/usr/local/bin/git-review", line 11, in <module>
      sys.exit(main())
    File "/usr/local/lib/python2.7/site-packages/git_review/cmd.py", line 1534, in main
      sys.exit(e.EXIT_CODE)
  AttributeError: 'GitReviewException' object has no attribute 'EXIT_CODE'

Change-Id: I288dadd7bb2cc2766fb719171e2f0303aa250171
2016-08-30 14:33:40 +00:00
Jenkins 827fa7060f Updated openstack/openstack
Project: openstack-infra/git-review  051f37c1c849e7f6a5e0c87bb9952eaecf0193d8

Support git without git credential

Old versions (typically 1.7.9) of git don't provide git credential
subcommand but it's required in some cases by git-review over http(s).

This change updates git-review in order to handle correctly such case.

Change-Id: I6db5aca67818ae48f1d7d84bcdffff9c0e48767a
2016-08-30 14:33:35 +00:00
Jenkins 4c594148fc Updated openstack/openstack
Project: openstack-infra/git-review  59f87fe3d6cf55d88115d101f4fb9e1ea38f18c8

Fix no_git_dir UnboundLocalError in except block

In Python 3, exception blocks clean their variables up, and we get
a UnbloundLocalError when we try to reference the target outside
of the except block.

To pass the exception out we set a variable from the target.

Also pull --license above raising the error, as it should work
outside a git repo too.

https://www.python.org/dev/peps/pep-3110/#semantic-changes

Change-Id: I298ac3648068cd07c4cf232e32ab3daaaf8e549d
2016-08-30 14:26:37 +00:00
Jenkins 34bb7e9040 Updated openstack/openstack
Project: openstack-infra/git-review  535202f57902be9885a4b76dfae0a92ca6e1cfcd

fix encoding issue on Windows

git review will throw an encoding error while sending reviews
whose commit message contains Chinese characters on an English Windows。

To fix this issue,convert the output to the console encoding verbosely.

Change-Id: Ie834931a549175471af029a6ec4d5794543d8c92
2016-08-30 14:25:30 +00:00
Jenkins 83eda0ba14 Updated openstack/openstack
Project: openstack-infra/git-review  58851ab3143e24e2ab988699722a5936da89aa08

Avoid AttributeError when raising raw GitReviewExceptions

Previously, if a GitReviewException was raised (not, for example, a
BranchTrackingMismatch or GitDirectoriesException which subclasses it,
but an actual GitReviewException), it would still get handled in main(),
but it wouldn't have an EXIT_CODE attribute.

This happens, for example, in add_remote(), if test_remote_url() fails
both times.

Now, if the caught exception doesn't have an EXIT_CODE, it will default
to -1.

Change-Id: I8529b320795717ef8d19ca87d3fa6bd523ef93ae
2016-08-30 14:25:10 +00:00
Jenkins 5a47d1c60e Updated openstack/openstack
Project: openstack-infra/git-review  66da56d8952fec34d34f63025b603d2666a30a25

Remove worthless print

The traceback isn't even formatted, so we just get something like

  <traceback object at 0x7fd30809f440>

Change-Id: Iacbb01bdcede40e07058b46d907cd3184bfa4880
2016-08-30 14:24:27 +00:00
Jenkins 7f952f619b Updated openstack/openstack
Project: openstack-infra/git-review  8cdabbf90d5a50c69a8fc24682c2645e2c0a3d88

Fix AttributeError when can not connect to Gerrit

Change-Id: I0c29bc29b9364c8203184a4dedc397e71e7ed437
Story: #2000586
2016-08-30 14:22:35 +00:00
Jenkins f60cce3136 Updated openstack/openstack
Project: openstack-infra/git-review  cc0fbc286ef7be29e26173f349a0bf5aaca5f976

Add several missing options to the man page

The bulk of this patch is based on suggestions by Robert P.J. Day,
as found here:
  https://bugzilla.redhat.com/show_bug.cgi?id=1266468

Change-Id: I6411adec228950623a3cc1269701d47df38e8e62
2016-08-30 14:22:29 +00:00
Jenkins 5cff7ae686 Updated openstack/openstack
Project: openstack-infra/git-review  c2c3418edeeeb24a1f4748e9cd81ddec75ffc39f

Refactor Isolated Env to use in unit tests

Refactor the setup of the Environment and base test directories to
allow the same settings to be applied to the unit tests.

Change-Id: I554b4aa4f07fe4230c11d3ae62a77acbd66e7d84
2016-08-30 14:22:23 +00:00
Jenkins 342c8fc356 Updated openstack/openstack
Project: openstack-infra/git-review  f747ca3d1f7aa04b66ef9a6de79df7efd2d9159a

Set author and committer explicitly

With the isolated home area for the unit tests, either missing
GIT_COMMITTER_NAME and GIT_AUTHOR_NAME environment variables or failure
to set the user.name on the local repository config will cause tests to
fail with git complaining about needing to know who is performing the
commit.

Results in seeing the following error message:

  Stdout: *** Please tell me who you are.

  Run

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

Change-Id: I4b87b6df3f19260c180af9beed77daf53dc6a7cc
2016-08-30 14:09:28 +00:00
Jenkins a0bd3c12ac Updated openstack/openstack
Project: openstack-infra/git-review  6b056e4d0bd34d7004a9eb7a4ee77e5bb026ca63

Use hash of test ID to pick Gerrit ports in tests

This eliminates need for 127.* IPs mapped to loopback interface (which
is true only for Linux) and makes test site generation even more
predictable (name of site dir for a test is the same on any machine).

Hash function used is md5(test_id) % 10000 which is enough for now. This
function is checked for collisions before every run in tox.ini, so if
someone happens to add test that will cause a collision, it'll be
immediately visible. Hash function can be changed to anything else that
maps test ID string to a number in [0,10000].

Change-Id: Ib05d9b489a80e4f55c84db2f8bea20b88e959649
2016-08-30 14:06:54 +00:00
Jenkins 1fe473e519 Updated openstack/openstack
Project: openstack-infra/git-review  9149685eea6341f22dbaf8537e43d00fa0b4e54a

Remove discover from test-requirements

It's only needed for python < 2.7 which is not supported

Change-Id: I5adfe5ccc0f64c8788a8e985f40c9450a599bd0e
2016-08-30 14:06:42 +00:00
Jenkins 6da5d7c01d Updated openstack/openstack
Project: openstack-infra/git-review  3de21e4075c7ac49fbcc20a2aa03ed319e2757f9

Remove argparse from requirements

argparse was external in python 2.6 but not anymore, remove it from
requirements. This project is not supporting Python 2.6 anymore.

Change-Id: Ib7e74912b36c1b5ccb514e31fac35efeff57378d
2016-08-26 16:15:11 +00:00
Zane Bitter 0a38a9e3bd Updated openstack/openstack
Project: openstack-infra/git-review  cf4e7cdb5fbbfcf0b828e35ad7df69f97010d441

Clarify that submitting multiple commits is OK

I've heard feedback that the message that appears when you send multiple
commits for the review appears to imply that Gerrit cannot handle
multiple patches in a series, and that users should avoid submitting
them in favour of squashing all of their patches before submission. Of
course nothing could be further from the truth, and Gerrit's ability to
gracefully handle patch series is one of its major advantages over other
code review tools.

This changes the message to clarify that multiple self-contained patches
are perfectly OK.

Change-Id: Ia659149ce9332909b4bdbf09a2817a2015ebafd2
2016-08-15 16:34:52 +00:00
Clark Boylan 50460b3d68 Updated openstack/openstack
Project: openstack-infra/git-review  c99d3a4f2b09f3a7622c9bdebd71fab5dd166358

Install bc libs when running testsuite

Newer openssh clients refuse to connect to Gerrit when it doesn't have
bouncy castle libs installed bceause the available encryption methods
are not secure. Fix this by installing the bc libs making ssh clients
happy.

Note that this changes the war to one with working bouncy castle package
urls, it also reindexes after init to make this new war happy.

Change-Id: I1c5db09c53a56ffd856da24decf29566e86f9d87
2016-07-14 16:25:17 +00:00
Jenkins 0668eeee09 Updated openstack/openstack
Project: openstack-infra/git-review  69e240352a79b30dd092cf0fac7855f4fddc2059

Update gerrit version for testing

Openstack is now running a fork of Gerrit 2.11.4 so we should update
the tests to validate against something similar.

Change-Id: I62eeef6df47f79a249ed6f7d4b0565ddef79d52d
2016-07-12 00:10:42 +00:00
Jeremy Stanley d3df51d648 Updated openstack/openstack
Project: openstack-infra/git-review  6eee79466abb29c96ee08261bf3b1acc909a8c1a

Use consistent formatting for deprecations

Add a warn() function for use in consistently displaying warning
messages, for use in things like deprecation warnings. Also make the
one current deprecation warning use this and be more explicit about
future removal.

Change-Id: I423524b30233ae45fbc04133566acf7a23828036
2016-07-01 13:50:03 +00:00
Frederic Lepied 406b603fab Updated openstack/openstack
Project: openstack-infra/git-review  47cbee96872e5cbf8ea127277d64d1f0bdf075d4

Fix git-review -d behavior with branches

- Fix fetch_review to use the information from the correct branch.
- Improve the unit test for git review -d to exercice the backport
workflow using branches.

Change-Id: I47c2e0149648a1f4f558e7f1ad6204f7f551865a
Closes-Bug: #2000294
2016-04-29 20:16:56 +00:00
James E. Blair 2ef7f4a9b9 Updated openstack/openstack
Project: openstack-infra/git-review  aaa416e697217afecc643a2e99624a4aaee169f2

Correct metadata URLs

Change-Id: Id1969eae49095ca7d2434a37366806863fea0eef
2016-03-10 17:33:16 +00:00