忽略文件中颠覆从SVN删除旧值:ignore属性 [英] Ignore file in Subversion removes old values from svn:ignore property

查看:417
本文介绍了忽略文件中颠覆从SVN删除旧值:ignore属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Subversion工作副本 G:\\ csmdepot \\构建与不同势文件在里面,有些被忽略有些没有(我忽视与龟文件):

I have a Subversion Working Copy G:\csmdepot\Builds with diffrent files in it, some are ignored some aren't (I ignored the files with Tortoise):


  • \\ Build_1.wim的忽略

  • \\ Build_2.wim的忽略

  • \\ WimID.xml的(不忽略)

  • \Build_1.wim ignored
  • \Build_2.wim ignored
  • \WimID.xml (not ignored)

现在实现自动化的一切,我想通过命令行来做到这一点,我尝试以下(我在一个VBScript编写一个批处理文件并运行它):

Now to automate everything I'd like to do it via the command line and I tried the following (I'm writing a batch file in a vbscript and run it):

fso.MoveFile "G:\csmdepot\Builds\WimID.xml", "G:\WimID.xml"

---批处理文件启动

--- Batch file start

G:
cd G:\csmdepot\Builds\
svn commit WimID.xml -m "Commit that WimID.xml is away"
svn propset svn:ignore WimID.xml .

批处理文件末尾---

Batch file end ---

fso.MoveFile "G:\WimID.xml", "G:\csmdepot\Builds\WimID.xml"

...
但是,当我回到我的文件夹G:\\ csmdepot \\生成所有忽略的文件被标记为未版本和SVN唯一值:忽略属性WimID.xml而且该文件版本。当我手动提交至少WimID.xml被忽略。

... But when I go back to my folder G:\csmdepot\Builds all ignored files are marked as not versioned and the only value in svn:ignore property is WimID.xml but also this file is versioned. When I manually commit at least the WimID.xml is ignored.

我能做些什么
追加WimID.xml的svn的值:忽略属性,而不取出旧的

什么是错我的SVN提交语句?

编辑:fso.MoveFile语句工作。它与我的svn命令的东西。

The fso.MoveFile statement is working. It has to do something with my svn commands.

推荐答案

如您使用注意到的svn propset命令的svn:忽略将覆盖不管你有svn:ignore属性设置为之前。

As you have noticed using svn propset svn:ignore will override whatever you had the svn:ignore property set to before.

不幸的是,对此没有简单直接的附加命令。如上所述<一个href=\"http://stackoverflow.com/questions/10648586/append-directories-to-ignored-list-in-svn\">here如果你想有一个附加的工作,你需要做一些批处理/ shell脚本来解决这个问题。

Unfortunately there is no easy straightforward append command regarding this. As described here if you want a working append you need to do some kind of batch/shell script to fix it.

不过,如果你只是想偶尔这样做,你可能还与其他解决方案做到这一点:

However if you just want to do this occasionally you might also do it with other solutions:


  1. 指定整个忽视使用所有需要的图案在一个文件中(我称之为ignoredFiles),然后使用的svn propset命令设置的svn:忽略-F ignoredFiles

  2. 您可以使用由pressing此命令的文件名和周围的整个参数有引号之间进入,但这个只能在特定的操作系统/壳工作多行添加文件。喜欢的东西:的svn propset命令的svn:忽略Build_1.wim [进入] Build_2.wim [进入] WimID.xml。 [进入] (从评论在博客中拍摄帖子

  3. 使用propedit,而不是:的svn propedit的svn:忽略然而,这需要一点点建立使用命令行SVN。参见 SVN帮助propedit 了解更多信息。

  1. Specifying the entire ignore set by using all the desired patterns in a file (which I call ignoredFiles) and then use svn propset svn:ignore -F ignoredFiles .
  2. You can add files on multiple lines using this command by pressing enter between the file names and having quotes around the entire argument but this may only work on certain operating systems/shells. Something like: svn propset svn:ignore ‘Build_1.wim [enter] Build_2.wim [enter] WimID.xml’ . [enter] (taken from a comment in a blog post)
  3. Use propedit instead: svn propedit svn:ignore . however this takes a little setting up using command-line svn. See svn help propedit for more details.

这篇关于忽略文件中颠覆从SVN删除旧值:ignore属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆