本文本尚未完善,内容可能随时变更,可能无法准确描述任何已发布的 Apache™ Subversion® 软件版本。将此页面添加书签或推荐给他人可能不是明智之举。请访问 http://svnbooks.subversion.org.cn/ 以获取本书的稳定版本。

名称

svndumpfilter include — 从转储流中过滤掉没有指定前缀的节点。

概要

svndumpfilter include PATH_PREFIX...

描述

可用于在过滤后的转储文件中包含以一个或多个 PATH_PREFIX 开头的节点(从而排除所有其他路径)。

选项

示例

如果我们从一个包含许多不同野餐相关目录的存储库中获取转储文件,但只想保留存储库的 sandwiches 部分,我们将只包含该路径

$ svndumpfilter include sandwiches < dumpfile > filtered-dumpfile
Including prefixes:
   '/sandwiches'

Revision 0 committed as 0.
Revision 1 committed as 1.
Revision 2 committed as 2.
Revision 3 committed as 3.
Revision 4 committed as 4.

Dropped 12 node(s):
   '/condiments'
   '/condiments/pepper'
   '/condiments/pepper.OLD'
   '/condiments/salt'
   '/condiments/salt.OLD'
   '/drinks'
   '/snacks'
   '/supplies'
   '/toppings'
   '/toppings/cheese'
   '/toppings/cheese.OLD'
   '/toppings/lettuce'
$

从 Subversion 1.7 开始,svndumpfilter 可以选择性地将 PATH_PREFIX 不仅仅视为显式子字符串,而是视为文件模式。例如,如果只想包含以 ks 结尾的路径,则可以执行以下操作

$ svndumpfilter include --pattern "*ks" < dumpfile > filtered-dumpfile
Including prefix patterns:
   '/*ks'

Revision 0 committed as 0.
Revision 1 committed as 1.
Revision 2 committed as 2.
Revision 3 committed as 3.
Revision 4 committed as 4.

Dropped 11 node(s):
   '/condiments'
   '/condiments/pepper'
   '/condiments/pepper.OLD'
   '/condiments/salt'
   '/condiments/salt.OLD'
   '/sandwiches'
   '/supplies'
   '/toppings'
   '/toppings/cheese'
   '/toppings/cheese.OLD'
   '/toppings/lettuce'
$
TortoiseSVN 官方中文版 1.14.7 发布