一个工具可以帮助您从gerrit服务器中挑选补丁

pick-patch的Python项目详细描述


Pypi versionBuild StatusPython CompatibilityGitHub code size in bytesGitHub

拾取修补程序

帮助您从Gerrit服务器上挑选补丁

pick-patch-demo-optimize

安装

pip install pick-patch

配置

  1. 在gerrit设置网页中获取用户名和http密码(例如https://review.gerrithub.io/settings/#HTTPCredentials
  2. 在~/.netrc(例如machine)中添加用户名和http密码评论.gerrithub.io登录susu9密码xxxooxxxoo)
  3. 现在你可以走了。(默认情况下,脚本解析~/.netrc)

监护

您可以在~/.pickrc中创建一个配置文件来定制您的首选项

^{pr2}$

特点

  1. 输入一个变更号列表,pick patch可以帮助您从Gerrit服务器上挑选补丁
  2. 自动重新解析安装路径(如果您的项目是由Repo创建的)。你可以摘樱桃 同时在不同的存储库中有多个修补程序
$pick-patch -g https://gerrit.mycompany.com 1234 5566 7788/1
Getting patches from 'https://gerrit.mycompany.com' ...
Fetching and installing patches
------------------------------------------------------------
[kernel]
Pick: https://gerrit.mycompany.com/kernel refs/changes/34/1234/5
------------------------------------------------------------
...
============================================================
[middleware]
Pick: https://gerrit.mycompany.com/middleware refs/changes/66/5566/3
------------------------------------------------------------
...
============================================================
[app]
Pick: https://gerrit.mycompany.com/app refs/changes/88/7788/1
------------------------------------------------------------
...
============================================================
  1. 支持gerrit搜索更改和cherry pick
$pick-patch -g https://gerrit.mycompany.com -q 'branch:master after:"2018-01-01"'
Querying change numbers from 'https://gerrit.mycompany.com'
Searching patches by 'branch:master after:"2018-01-01"' ...
------------------------------------------------------------
  1234 - kernel: add defconfig
  5566 - middleware: fix playback issue
  7788 - app: Update UI
(Total: 3 changes)
============================================================
Getting patches from 'https://gerrit.mycompany.com' ...
Fetching and installing patches
------------------------------------------------------------
[kernel]
Pick: https://gerrit.mycompany.com/kernel refs/changes/34/1234/5
------------------------------------------------------------
...
============================================================
[middleware]
Pick: https://gerrit.mycompany.com/middleware refs/changes/66/5566/3
------------------------------------------------------------
...
============================================================
[app]
Pick: https://gerrit.mycompany.com/app refs/changes/88/7788/2
------------------------------------------------------------
...
============================================================

使用

usage: pick-patch [-h] [-u USER] [-p PASSWORD] [-q QUERY] [--query-only]
                  [-r PREVIEW] [-g GERRIT] [-d] [-n NETRC_FILE]
                  [-c CONFIG_FILE] [-m NAME.xml] [-i INSTALL_PATH] [-F] [-N]
                  [-x EXE] [--verbose] [-v]
                  [change_num [change_num ...]]

positional arguments:
  change_num            ex. '12345', '12345/1'

optional arguments:
  -h, --help            show this help message and exit
  -u USER, --user USER  gerrit user id
  -p PASSWORD, --password PASSWORD
                        gerrit HTTP password
  -q QUERY, --query QUERY
                        get patches from query command (change_num arguments
                        will be ignored if any) ex. 'branch:master
                        status:merged after:"2018-11-17 22:06:00"'
  --query-only          do not install patch
  -r PREVIEW, --preview PREVIEW
                        preview command for changes (default: git log --no-
                        decorate -1)
  -g GERRIT, --gerrit GERRIT
                        gerrit server url (default:
                        https://review.gerrithub.io)
  -d, --dryrun          show what would be done
  -n NETRC_FILE, --netrc-file NETRC_FILE
                        netrc path (default: ~/.netrc). (if user or password
                        has been specified, netrc config will be ignored)
  -c CONFIG_FILE, --config-file CONFIG_FILE
                        config path (default: ~/.pickrc)
  -m NAME.xml, --manifest NAME.xml
                        assign manifest file to resolve patch install path
                        instead of using repo command
  -i INSTALL_PATH, --install-path INSTALL_PATH
                        assign patch install path instead of resolving path by
                        repo command or manifest
  -F, --full-path       display the full install path instead of the relative
                        install path
  -N, --name-path       display the project name instead of the relative
                        install path
  -x EXE, --exec EXE    append command after all changes installed in each
                        project
  --verbose             show more logs
  -v, --version         show program's version number and exit

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Maven:无法找到或加载主类   java如何解决JRE旧版本中的enhancedforloop错误?   java连续internet签入后台Android   java在Eclipse的包资源管理器中,除了文件名之外,>(大于括号)意味着什么?   不注册为服务的java查询eureka   多线程对于可以在java中暂停和取消暂停的线程化应用程序,有一个好的解决方案吗?   java是收集器中的错误报告。toMap()坏了吗?   使用java命令在mysql中恢复数据库   在服务器上运行程序的java   如何使用java在excel中读取和写入值?   JavaSpringBoot:从请求中读取特定字段并在响应中设置它的拦截器   java Gluon应用程序无法在iOS上启动   从C++访问java方法的最有效方法   EclipseJava空指针异常JMenuBar   连接用户输入字符串以转换为完整的文件路径(Java)   使用多个证书为java小程序签名   安卓 E/log_标签(1601):解析数据组织时出错。json。JSONException:值<!java类型的DOCTYPE。无法将lang.String转换为JSONArray   java在Eclipse/EMF中是否可以将操作参数建模为vararg?   从csv平面文件填充JavaBean树结构的算法   java如何为我当前的实时应用程序Android实现Inapp更新Google API