python - Mercurial 审查委员会和后期审查

标签 python mercurial review-board

这是到目前为止的故事,我已经在 Linux 环境上安装了评审板,我已经配置了一切,安装了 post-review 并且它可以工作......

不起作用的是存储库。我们的存储库在某个时候从 SVN 迁移到 Mercurial,然后有很多粗略的文件管理,比如在没有 hg move 的情况下移动文件。所以我想要的是运行一个脚本,该脚本将收集并发布包含两个以上父级的每个 cset(每个 merge 到默认分支的 cset)的评论,并将其与以前的默认分支修订版进行比较,以查看我的同事们有哪些灾难性的变化对代码进行了修改。有点像一本历史书,当然可以安排一项工作来存储将来提出的新审阅请求。

无论如何,审阅后 95% 的时间都会向我抛出错误 207,表示找不到这个或那个文件(由于上面提到的 hg 误用)。不用说,这是一个很大的存储库 - 考虑到它每天都会与其他 8 个存储库同步。

也许有一些解决方法可以跳过丢失的文件差异并直接使用到目前为止的审阅后内容或 smt ?

我一整天都在阅读各种问题的票证......到目前为止还什么都没有:(

请帮忙...

附注

>>> Attempting to create review request on https: //internal.rix.com/hg/project/ for None
>>> HTTP POSTing to http: //localhost/api/review-requests/ {'repository': 'https: //internal.rix.com/hg/project/'}
>>> Review request created
>>> Uploading diff, size: 29809661
>>> HTTP POSTing to http: //localhost/api/review-requests/108/diffs/ {}
>>> Got API Error 207 (HTTP code 400): The file was not found in the repository
>>> Error data: {u'stat': u'fail', u'file': u'.hgignore', u'err': {u'msg': u'The file was not found in the repository', u'code': 207}, u'revision': u'd31d6b626628'}

".hgignore" file not found. The 26652 cset has 2 parents, it was a result of a very big merge into default branch. Actual hg diff -r 26652 -r 26651; produces: 

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -1,39 +1,44 @@
-syntax: re
-/target$
-/lib$
-/bin$
-.settings
-.classpath
-.metadata
-.project
-.iml
... and so on for 400k lines

最佳答案

我也遇到了同样的问题,在我们的例子中,似乎是由于将服务器端存储库更新到了特定版本。

将服务器端存储库重置为“裸”存储库为我们解决了这个问题。

(我做了“hg clone -U repo newrepo”、“mv repo repo-old”、“mv newrepo repo”。)

关于python - Mercurial 审查委员会和后期审查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11248865/

相关文章:

windows - 同步到闪存驱动器和多台计算机

svn - 我可以模拟 svn :externals using mercurial?

apache - 审查委员会差异未上传

review-board - 发表评论后如何删除评论?

python reduce问题对象没有属性

python - 在python中使用正则表达式获取特定IP

svn - 将复杂的 SVN 分支层次结构迁移到 Mercurial

python - PY3MQI。 AMQ9627 使用 sco.CertificateLabel 和 os 用户与证书标签用户不匹配时

python - 获取Python基本函数列表

git - 将一个提交分成 2 个并获取结果差异