从脚本运行时,SVN在每个级别创建.svn目录

时间:2017-08-09 12:53:19

标签: svn version-control

我需要检查回购的一部分。这就是我的工作:

rm -rf root_dir
mkdir -p root_dir
svn co --depth empty https://some.repo/branches/branch1 root_dir
svn up --set-depth empty root_dir/level1
svn up --set-depth empty root_dir/level1/level2
svn up --set-depth empty root_dir/level1/level2/level3
svn up --set-depth infinity root_dir/level1/level2/level3/level4

当我以交互方式进行此操作时,一切似乎都没问题。但是当我将这些相同的行粘贴到脚本中并运行它时,.svn目录将添加到目录层次结构的每个级别。

$ svn --version
svn, version 1.9.4 (r1740329)
   compiled May 26 2016, 12:44:27 on x86_64-redhat-linux-gnu

$ rpm -qi subversion
Name        : subversion
Version     : 1.9.4
Release     : 2.fc23
Architecture: x86_64
Install Date: Thu Jan 19 20:35:00 2017
Group       : Development/Tools
Size        : 5245105
License     : ASL 2.0
Signature   : RSA/SHA256, Thu May 26 19:22:58 2016, Key ID 32474cf834ec9cba
Source RPM  : subversion-1.9.4-2.fc23.src.rpm
Build Date  : Thu May 26 15:25:52 2016
Build Host  : buildvm-16.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://subversion.apache.org/
Summary     : A Modern Concurrent Version Control System
Description :
Subversion is a concurrent version control system which enables one
or more users to collaborate in developing and maintaining a
hierarchy of files and directories while keeping a history of all
changes.  Subversion only stores the differences between versions,
instead of every complete file.  Subversion is intended to be a
compelling replacement for CVS.

问题:

  1. 为什么?
  2. 从脚本执行时如何避免?

0 个答案:

没有答案