Apache Ant stuck while calling git pull -



Apache Ant stuck while calling git pull -

in apache ant script have macro:

<macrodef name = "git"> <attribute name = "command" /> <attribute name = "options" /> <attribute name = "dir" default = "" /> <attribute name="failonerror" default="false"/> <sequential> <echo message = "git command: git @{command} @{options}, dir: @{dir}" /> <exec executable = "c:\git\cmd\git.exe" dir = "@{dir}"> <arg value = "@{command}" /> <arg value = "@{options}" /> </exec> </sequential> </macrodef>

and later calling:

<git command = "pull" options = '-v' dir = "subfolder/subsubfolder" failonerror = "true"/>

but when start hudson job dir subfolder/subsubfolder or c:\direct\path\to\subfolder\subsubfolder\ job stuck on , echo in console output. not error or anything. hudson installed on machine windows xp.

i've tried utilize command in windows cmd - it's working when @ repo folder this:

c:\direct\path\to\subfolder\subsubfolder>c:\git\cmd\git.exe pull -v

what doing wrong? there way improve integration git ant?

some new notes:

if trying exec git pull in bad directory error. if trying exec git checkout works. if trying exec git fetch hangs git pull.

another edit, maybe clues: alter direct git calling .bat file git commands in it. it's simple cd directory , git pull. when run script it's working. hangs forever in hudson. maybe it's calling git subprocess in java needs environment variables? git using ssh power-less connection without agent in background.

if "hangs", there interactive prompt , jenkins can't handle that.

try adding <arg line="> out.txt 2>&1"/> exec @ end. redirect file, after hangs again, kill job, , review contents of file out.txt

note need escape > , &, be: <arg line="&gt; out.txt 2&gt;&amp;1"/>

git ant hudson

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -