none
How can I use .tfignore effectively? RRS feed

  • Question

  • I'm using TFS 2015.

    Consider I have this server source folder structure:  A/a, A/b, A/c, A/d, A/e, A/f, A/g

    If I want to create a workspace containing only A/a and A/b, I have two choices:
    1) Map A/a and A/b, each
    2) Map A and cloak A/c, A/d, A/e, A/f, A/g

    Obviously, method 1) is more convenient in this case.

    The problem comes with .tfignore.
    Assuming that A/a and A/b are mapped to C:\local\A\a and C:\local\A\b, resp.
    From the description of .tfignore, I would expect that C:\local\A was the right location to place it.
    Since its effect is recursive, all folders below C:\local\A\a and C:\local\A\b should be filtered.

    But this is not the case, because every mapped folder needs its own copy of .tfignore.
    So using method 1), both folders, A/a and A/b need a copy of .tfignore each.
    Using method 2), only folder A needs a .tfignore file.

    So am I doomed to always map a single root folder and cloak everything I don't need if I need a small workspace or can I specify the ignored file patterns in a different way?

    I also entered the file patterns as regexes into the Forbidden pattern policy.
    This does cause Policy Warnings "Filename $/.....tli matches forbidden regular expression: \.tli$" to be thrown at me if I attempt to add forbidden files to the repository but it does not hide the forbidden files from the "Detected: xxx add(s)" list.

    Which is my whole point. I want the "Pending Changes..." tab to become completely blind to *.tli files and neither offer nor allow me to add them to the repository.

    Friday, September 2, 2016 6:24 PM

All replies