How to set svn:ignore with multiple values?

前端 未结 5 1535
别那么骄傲
别那么骄傲 2020-12-29 01:27

Let\'s say I want to set the svn:ignore property for directory dir1 with multiple values, file1, file2, and file3

相关标签:
5条回答
  • 2020-12-29 01:43

    One line solution:

    svn propset svn:ignore "file1"$'\n'"file2"$'\n'"file3" dir1
    
    0 讨论(0)
  • 2020-12-29 01:43

    Use:

    cat > ignorelist << END
    file1
    file2
    file3
    END
    
    svn propset svn:ignore -F ignorelist dir1
    

    Or without an external file, and assuming you're on Linux or a system with /dev/fd:

    svn propset svn:ignore -F /dev/fd/0 dir1 << END
    file1
    file2
    file3
    END
    
    0 讨论(0)
  • 2020-12-29 01:46

    In powershell:

    $ignore = "*.dll`n*.xml"
    svn propset svn:global-ignores $ignore .
    
    0 讨论(0)
  • 2020-12-29 01:51

    Type exactly like here with line breaks:

    svn propset svn:ignore "file1
    file2
    file3" dir1
    

    If you want to pass a list from another command, try xargs. Unfortunately, the svn command doesn't allow reading from stdin with -F -.

    0 讨论(0)
  • 2020-12-29 01:52

    Adding multiple entries is much easier. Use the following command:

    svn propedit svn:ignore .
    

    This will open a text editor. Now you can add multiple entries easily.

    0 讨论(0)
提交回复
热议问题