mercurial - 如何使用 javahg 从远程 Mercurial 存储库获取传入的更改?
问题描述
我正在尝试编写一个示例程序,该程序使用 javahg 来获取有关项目存储库的信息。我在 Windows 客户端上运行,远程存储库在 Linux 服务器上。但是,当我尝试获取传入的更改时,它会挂起或给我一个空包。
class Mercurial {
static void main(String[] args) {
def projectDir = 'c:/my-workbench/my-project'
RepositoryConfiguration repoConfig = new RepositoryConfiguration()
repoConfig.hgBin = 'c:/Program Files/TortoiseHg/hg.exe'
repoConfig.sshBin = 'c:/opt/putty/plink.exe'
repoConfig.hgrcPath = null
//repoConfig.hgrcPath = 'c:/users/david/mercurial.ini' //nothing changes
def localRepo = Repository.open(repoConfig, new File(projectDir))
IncomingCommand incoming = IncomingCommand.on(localRepo)
//this is the content of the HGRC file in the .hg folder
def remoteRepoURL = 'ssh://hg@9.9.9.9/my-project')
def bundle = incoming.execute(remoteRepoURL)
}
相反,如果我克隆远程存储库,一切都很好,所以配置应该是正确的。
BaseRepository br = BaseRepository.clone(repoConfig, new File('c:/temp/local'), remoteRepoURL)
如何从远程存储库获取传入的更改?
解决方案
推荐阅读
- php - 从css传递php post变量
- yii2 - 唯一验证不适用于模块明智配置 YII2
- model - {“错误”:“服务签名名称:“服务默认”未在签名定义中找到“}
- java - 批量发布Kafka对象
- java - 使用 Random 编写单元测试
- c - 不同.c文件之间公共变量的c语法错误
- java - Java 进程消耗超过 100% 的 CPU
- javascript - Gear S4 Web 应用程序在语音合成上不断崩溃
- azure-sdk-.net - 使用 SAS 令牌和自定义域通过 Azure SDK 上传 Blob
- javascript - 我想要光滑的轮播在中心模式下一次显示一张不同大小的图片,但它不起作用