Comment 4 for bug 383245

Revision history for this message
Gioele Barabucci (gioele) wrote :

A way to limit the growth of checks on unversioned files would be to use the the reverse syntax

  "RE:(\1)\.png" if "RE:(.*)\.svg"
  "RE:(\1)\.pdf" if "RE:(.*)\.svg"

With that, you can check which "right side" regexp matches the versioned files and build a list of additional regexp to add to the list of checks already loaded from .bzrignore. For example, the versioned files

  ~/Documents/foo/test.svg
  ~/Documents/foo/test2.pdf
  ~/Documents/bar/try.svg

would add the following regexps to list of regexp originally loaded from .bzrignore:

  ~/Documents/foo/test.png
  ~/Documents/foo/test.pdf
  ~/Documents/bar/try.png
  ~/Documents/bar/try.pdf

The end result, performance-wise, would not be different from letting the application or the build system call "bzr ignore" on the generated file, with the additional benefit that there no "dangling" regexp left in .bzrignore, a problem to take into account if you want applications and build systems to "bzr ignore" all the generated files.