本文字档尚在编写中,内容可能会发生重大变化,可能无法准确地描述任何已发布的 Apache™ Subversion® 软件版本。 将此页面添加书签或推荐给其他人可能不是一个明智的选择。 请访问 https://svnbook.subversion.org.cn/ 以获取本书的稳定版本。
svndumpfilter exclude — 从转储流中过滤掉具有给定前缀的节点。
svndumpfilter exclude PATH_PREFIX...
如果我们有一个来自存储库的转储文件,其中包含许多不同的与野餐相关的目录,但我们想保留除了 sandwiches
部分之外的所有内容,我们将只排除该路径。
$ svndumpfilter exclude sandwiches < dumpfile > filtered-dumpfile Excluding 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 1 node(s): '/sandwiches' $
从 Subversion 1.7 开始,svndumpfilter 可以选择性地将 PATH_PREFIX
不仅仅视为明确的子字符串,而是视为文件模式。 因此,例如,如果您希望过滤掉以 .OLD
结尾的路径,您将执行以下操作。
$ svndumpfilter exclude --pattern "*.OLD" < dumpfile > filtered-dumpfile Excluding prefix patterns: '/*.OLD' 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 3 node(s): '/condiments/salt.OLD' '/condiments/pepper.OLD' '/toppings/cheese.OLD' $