arc Undefined index: Repository UUID 解决

在执行arcdiff--trace时遇到错误,原因是`svninfo.`命令返回的RepositoryUUID是中文版本,导致无法解析。解决方法是设置环境变量`export LANGUAGE=en_US.en`,使svninfo.显示英文结果,从而避免Unicode问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题:

执行arc diff --trace后,碰到错误。

No unit test engine is configured for this project.
>>> [10] (+11,571) <exec> $ svn diff --depth empty --diff-cmd /Users/mac-mini2/Repository/phabricator/arcanist/scripts/repository/binary_safe_diff.sh -x -U32767 php/AuditLog.php
>>> [11] (+11,572) <exec> $ svn info /Users/mac-mini2/Repository/phabricator/test/phabrictor/php/AuditLog.php@
<<< [11] (+11,586) <exec> 13,890 us
<<< [10] (+11,592) <exec> 20,548 us
>>> [12] (+11,593) <exec> $ svn info .
<<< [12] (+11,608) <exec> 14,111 us

[2021-03-08 06:35:01] EXCEPTION: (RuntimeException) Undefined index: Repository UUID at [<arcanist>/src/error/PhutilErrorHandler.php:252]
arcanist(head=master, ref.master=2d6452acb5f1)
  #0 PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<arcanist>/src/repository/api/ArcanistSubversionAPI.php:606]
  #1 ArcanistSubversionAPI::getRepositoryUUID() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2225]
  #2 ArcanistDiffWorkflow::buildDiffSpecification() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:382]
  #3 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:419]

查看ArcanistSubversionAPI.php:606的代码:

  public function getRepositoryUUID() {
    $info = $this->getSVNInfo('/');
    return $info['Repository UUID'];
  }

通过trace信息,可以知道Repository UUID是从svn info .这个命令的结果得来的,由于svn info .的结果是中文的版本库 UUID,所以获取不到,报错。

路径: .
URL: https://lcut.googlecode.com/svn/trunk
版本库根: https://lcut.googlecode.com/svn
版本库 UUID: 22405a7c-d843-be82-cc3b-46f1d7cb9705
版本: 57
节点种类: 目录
调度: 正常
最后修改的作者: bigwhite.cn@gmail.com
最后修改的版本: 57

所以解决方法是让svn info .显示英文结果。解决方法:

export LANGUAGE=en_US.en
Path: .
URL: https://lcut.googlecode.com/svn/trunk
Repository Root: https://lcut.googlecode.com/svn
Repository UUID: 22405a7c-d843-be82-cc3b-46f1d7cb9705
Revision: 57
Node Kind: directory
Schedule: normal
Last Changed Author: bigwhite.cn@gmail.com
Last Changed Rev: 57

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值