# HG changeset patch # User Chris Cannam # Date 1308239195 -3600 # Node ID 93cb9005bb6fd885443f1727325620d6c93f95e4 # Parent 4593555915cf3526590c18f8868d58b2bcb5c3cf Minor adjustments to glob syntaxes diff -r 4593555915cf -r 93cb9005bb6f src/mainwindow.cpp --- a/src/mainwindow.cpp Thu Jun 16 15:33:28 2011 +0100 +++ b/src/mainwindow.cpp Thu Jun 16 16:46:35 2011 +0100 @@ -662,17 +662,25 @@ out << "syntax: glob" << endl; } + //!!! should we be warning the user which files this will mean + //!!! they ignore? -- probably + if (itype == HgIgnoreDialog::IgnoreAllFilesOfGivenSuffixes) { foreach (QString s, suffixes) { out << "*." << s << endl; } } else if (itype == HgIgnoreDialog::IgnoreGivenFilesOnly) { + // The default for glob seems to be to ignore the file + // anywhere -- anchor the path to / to make it specific to + // this file only + //!!! check this! + foreach (QString f, files) { + out << "/" + f << endl; + } + } else { foreach (QString f, files) { out << f << endl; } - } else { - - //!!! uh, can we do this in glob mode?? } //!!! report, and offer to edit .hgignore now