更改如下,希望可以帮助你~~
@echo offecho [HgVersionInfo]>versionInfoini
for /f "delims=" %%i in ('hg parent --template "{rev}"') do (set var=%%i)
echo rev=%var%>>versionInfoini
for /f "delims=" %%i in ('hg parent --template "{node}"') do (set var=%%i)
echo node=%var%>>versionInfoini
for /f "delims=" %%i in ('hg parent --template "{branch}"') do (set var=%%i)
echo branch=%var%>>versionInfoini
如果再简化一些,可以写成:
@echo offecho [HgVersionInfo]>versionInfoini
for %%a in (rev,node,branch) do (
for /f "delims=" %%i in ('hg parent --template "{%%a}"') do (
echo %%a=%%i%>>versionInfoini))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)