用于稀疏检查特定修订版中更改的SVN文件的Shell脚本无法正常工作

时间:2018-02-08 11:43:18

标签: shell svn version-control

我有以下脚本,用于稀疏地检查SVN中某个修订版本的文件。我想将这些文件复制为"补丁"各种。

repo文件夹已签出为--depth empty,因此在运行此脚本之前,repo的根目录应该只有.svn。我做了这个,因为回购很庞大,我只想快速创建一个特定版本的补丁。

for currentFile in $(svn log -r 3131 -v | grep "/branches" | cut -c 7-)
do
    curDir="$(dirname $currentFile)"

    curName=$(basename "$currentFile")

    svn checkout svn://localhost/LocalRepo@3131 $curDir --depth empty

    cd $curDir

    svn up -r 3131 $curName

    cd /e/partials/RepoInstance
done

for循环获取我想要的内容。

curDircurName似乎提取了正确的字符串。

目录的checkout会创建文件夹,但up不会创建文件,但也不会出错。

upUpdating myFile.blah to revision 3131,然后说At revision 3131,就像它有效一样。

我最初在没有文件夹签出的情况下更简单,cd进出,但我遇到了诸如svn: E155007: None of the targets are working copies之类的问题。

0 个答案:

没有答案