oneliner for add line to svn:ignore

时间:2017-05-26 12:51:31

标签: bash svn svnignore

[TestClass]
public class FixedPrologueTests
{
    private const string DATA_PROVIDER = "Microsoft.VisualStudio.TestTools.DataSource.CSV";
    private const string DATA_FILE_PATH = @".\UnitTests\ViewModelTests\FixedPrologueTestData.csv";
    private const string DATA_OUTPUT_PATH = @"UnitTests\ViewModelTests";
    private const string DATA_TABLE_NAME = "FixedPrologueTestData.csv";

    public TestContext TestContext { get; set; }

    private PaginationPrologueTestData data;
    private PaginationPrologue prologue;
    private System.Collections.Generic.IEnumerable<int> epilogue;

    [TestInitialize]
    public void Setup()
    {
        data = new PaginationPrologueTestData(TestContext.DataRow);
        prologue = new PaginationPrologue(data.Padding, data.CurrentPage, data.TotalPages);
        epilogue = prologue.CreateEpilogue();
    }

    [TestMethod]
    [TestProperty("PaginationPrologue", "Prologue remains fixed when nearing end of result set")]
    [DataSource(DATA_PROVIDER, DATA_FILE_PATH, DATA_TABLE_NAME, DataAccessMethod.Sequential)]
    [DeploymentItem(DATA_FILE_PATH, DATA_OUTPUT_PATH)]
    public void WhenNearingEndOfResultSet_EpilogueIsNotIncluded()
    {
        Assert.AreEqual(data.EpilogueLength, epilogue.Count());
    }

如何在一行命令中使用bash将$ svn pg svn:ignore . file1 file2 file3 $ svn pe svn:ignore . // manually add file4 in default text editor 添加到file4

1 个答案:

答案 0 :(得分:1)

当然不优雅但它有效:

svn propget svn:ignore . > /tmp/svnproperties && echo "file4" >> /tmp/svnproperties && svn propset svn:ignore . --file /tmp/svnproperties