refs/changes/* 未从 gerrit 复制到 bitbucket
refs/changes/* not replicated from gerrit to bitbucket
我设置了我的 gerrit 服务器以使用 HTTPS 将我项目中的所有更改复制到 bitbucket。
我可以在任何分支(主分支和其他分支)中获取提交(合并)的更改,以便很好地复制。但是,等待代码审查的未决更改不会被复制。在 replication.log 文件中,我看到这一行:
[2017-07-18 15:32:00,064] [] Push to https://***@bitbucket.org/***/***.git references: [RemoteRefUpdate[remoteName=refs/changes/12/12/1, NOT_ATTEMPTED, (null)...****, srcRef=refs/changes/12/12/1, message=null]]
我看了源码,好像NOT_ATTEMPTED就是"this ref is not configured to be replicated"的意思。
/** The ref is not configured to be replicated. */
NOT_ATTEMPTED,
我的配置很简单,我只定义了一个远程url和项目:
[remote "bitbucket"]
url = https://***@bitbucket.org/***/${name}.git
projects = ***
或者,我尝试专门为 refs/changes 添加一个 'push' 设置:
[remote "bitbucket"]
url = https://***@bitbucket.org/***/${name}.git
projects = ***
push = +refs/changes/*:refs/changes/*
不过,这并没有影响。
有什么想法吗?
显然我的评论已复制到 bitbucket,但我没有在 bitbucket UI 上看到它们,因为 UI 仅显示在 refs/heads/* 下推送的分支,而gerrit 评论被推送到 refs/changes/*.
下
我通过将这一行添加到 replication.config:
解决了这个问题
push = refs/changes/*:refs/heads/review/*
这会将 gerrit 更改分支变成 'real' 分支,这些分支显示在 bitbucket UI 上并且可以轻松访问。
我设置了我的 gerrit 服务器以使用 HTTPS 将我项目中的所有更改复制到 bitbucket。
我可以在任何分支(主分支和其他分支)中获取提交(合并)的更改,以便很好地复制。但是,等待代码审查的未决更改不会被复制。在 replication.log 文件中,我看到这一行:
[2017-07-18 15:32:00,064] [] Push to https://***@bitbucket.org/***/***.git references: [RemoteRefUpdate[remoteName=refs/changes/12/12/1, NOT_ATTEMPTED, (null)...****, srcRef=refs/changes/12/12/1, message=null]]
我看了源码,好像NOT_ATTEMPTED就是"this ref is not configured to be replicated"的意思。
/** The ref is not configured to be replicated. */
NOT_ATTEMPTED,
我的配置很简单,我只定义了一个远程url和项目:
[remote "bitbucket"]
url = https://***@bitbucket.org/***/${name}.git
projects = ***
或者,我尝试专门为 refs/changes 添加一个 'push' 设置:
[remote "bitbucket"]
url = https://***@bitbucket.org/***/${name}.git
projects = ***
push = +refs/changes/*:refs/changes/*
不过,这并没有影响。
有什么想法吗?
显然我的评论已复制到 bitbucket,但我没有在 bitbucket UI 上看到它们,因为 UI 仅显示在 refs/heads/* 下推送的分支,而gerrit 评论被推送到 refs/changes/*.
下我通过将这一行添加到 replication.config:
解决了这个问题push = refs/changes/*:refs/heads/review/*
这会将 gerrit 更改分支变成 'real' 分支,这些分支显示在 bitbucket UI 上并且可以轻松访问。