我已经在我的Mac上从MacPorts安装了git-core(+ svn).这给了我:
git-core @1.7.12.2_0+credential_osxkeychain+doc+pcre+python27+svn
subversion @1.7.6_2
Run Code Online (Sandbox Code Playgroud)
我试图打电话给以下内容:
git svn clone http://my.svn.com/svn/area/subarea/project -s
Run Code Online (Sandbox Code Playgroud)
输出看起来像这样:
Initialized empty Git repository in /Users/bitwise/work/svn/project/.git/
Using higher level of URL: http://my.svn.com/svn/area/subarea/project => http://my.svn.com/svn/area
A folder/file.txt
A folder/file2.txt
[... some number of files from svn ... ]
A folder44/file0.txt
Temp file with moniker 'svn_delta' already in use at /opt/local/lib/perl5/site_perl/5.12.4/Git.pm line 1024.
Run Code Online (Sandbox Code Playgroud)
我已经完成了通常的搜索,但大多数线程似乎都没有提出明确的解决方案.
我试图让prebuild合并在multibranch管道中工作,我想避免在我的管道脚本中硬编码git url.
似乎scm step必须以某种方式存储url,但我无法弄清楚如何访问它.
鉴于我使用了管道插件+所有的github插件都安装在jenkins中,因此我很难检查出当前触发请求的触发请求,该请求在管道脚本中如下所示:
#!groovy
node('master') {
stage 'Checkout'
checkout changelog: true, poll: true, scm: [$class: 'GitSCM', branches: [[name: "origin/????"]], doGenerateSubmoduleConfigurations: false, submoduleCfg: [], userRemoteConfigs: [[name: 'origin', url: 'git@github.com/project.git', credentialsId: 'github-id']]]
}
Run Code Online (Sandbox Code Playgroud)
但是我找不到任何从任何env变量中获取当前请求请求分支的方法,也许不是检查已触发分支的那种方法吗?