SVN リポジトリの構造が複雑なため、一部の外部ファイルはリポジトリから正しく取得されません。リポジトリ構造を変更することはオプションではないため、必要に応じて外部を反復処理し、それらを「手動で」取得するスクリプトを開発しました (「svn export」のおかげです)。この操作が実際に必要かどうかを検出するために、「svn info」を実行します。ファイルが存在しない場合、またはバージョン管理されていない場合は、0 とは異なる値が返されると想定しています。これは確かに、host1 (SVN Client 1.6.17) で得られた動作でした:
# Initially, the directory is empty
host1$ ls
host1$ svn update
Fetching external item into 'main.rbf'
svn: warning: '<REMOTE_SVN_LOCATION1>'
is not the same repository as
'<REMOTE_SVN_LOCATION2>'
At revision 18413.
# Although we do the update, the external item is not fetched,
# as it is a single file coming from a different repository
# (known problem)
host1$ ls
# The file is not present, and SVN info acts accordingly
host1$ svn info main.rbf
main.rbf: (Not a versioned resource)
svn: A problem occurred; see other errors for details
# If we force the SVN export
host1$ svn export <REMOTE_SVN_LOCATION1> main.rbf
A main.rbf
Export complete.
host1$ ls
main.rbf
# then SVN info detects it and acts accordingly
host1$ svn info main.rbf
main.rbf: (Not a versioned resource)
svn: A problem occurred; see other errors for details
host1$
host2 (SVN Client 1.6.11) では、「SVN 情報」の動作はまったく異なります。ファイルが (以前のエクスポートから) そこにあるかどうかに関係なく、答えは次のとおりです。
# Directory is empty
host2$ ls
host2$ svn info main.rbf
Path: .
URL: <REMOTE_LOCATION>
Repository Root: ...
Repository UUID: ...
Revision: 18413
Node Kind: directory
Schedule: normal
Last Changed Author: ...
Last Changed Rev: 18326
Last Changed Date: ...
host2$
この一貫性のない動作を説明する理由はありますか? このバージョン管理されていないファイルを host2 で検出するにはどうすればよいですか?