Gabriël
Gabriël

Reputation: 1315

(Visual)SVN ignore files by Regex

I need to exclude files with the following pattern:

ProjectFoo.Data[0-9]{14}.lgp

How can I use RegEx for (Visual)SVN ignore list?

Upvotes: 4

Views: 3277

Answers (3)

Bert Huijben
Bert Huijben

Reputation: 19622

The subversion ignore list doesn't support regular expressions. They are implemented as glob/file patterns.

These patterns don't support the {14} repeat construct.

The pattern

ProjectFoo.Data[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].lgp

should do what you ask, but I would recommend using something like ProjectFoo.Data[0-9]*.lgp as that would be 'good enough'.

Upvotes: 10

twamley
twamley

Reputation: 801

Some basic advice for how to use the other answers on this page with TortoiseSVN backed by VisualSVN Server. You can manually add an svn:ignore property to the folder. Bert's glob/file advice for the patterns works well there (I went with the "good enough" [0-9]* myself). More info here.

Navigate to the folder you want and right click | TortoiseSVN | Properties | New | Advanced. Choose a Property Name of svn:ignore and then enter your glob/file patterns on separate lines in the value box.

Upvotes: 0

Frans Bouma
Frans Bouma

Reputation: 8357

As the file looks like an LLBLGen Pro project backup file, you can force llblgen pro to store backup files into a separate folder (See preferences: default backup folder), e.g. .\Backup. This way you can exclude that folder in svn and you're done :)

Upvotes: 2

Related Questions