Mercurial > hg > easyhg
comparison src/mainwindow.cpp @ 418:93cb9005bb6f ignore
Minor adjustments to glob syntaxes
author | Chris Cannam |
---|---|
date | Thu, 16 Jun 2011 16:46:35 +0100 |
parents | 4593555915cf |
children | 69b2338c06e1 |
comparison
equal
deleted
inserted
replaced
417:4593555915cf | 418:93cb9005bb6f |
---|---|
660 | 660 |
661 if (!glob) { | 661 if (!glob) { |
662 out << "syntax: glob" << endl; | 662 out << "syntax: glob" << endl; |
663 } | 663 } |
664 | 664 |
665 //!!! should we be warning the user which files this will mean | |
666 //!!! they ignore? -- probably | |
667 | |
665 if (itype == HgIgnoreDialog::IgnoreAllFilesOfGivenSuffixes) { | 668 if (itype == HgIgnoreDialog::IgnoreAllFilesOfGivenSuffixes) { |
666 foreach (QString s, suffixes) { | 669 foreach (QString s, suffixes) { |
667 out << "*." << s << endl; | 670 out << "*." << s << endl; |
668 } | 671 } |
669 } else if (itype == HgIgnoreDialog::IgnoreGivenFilesOnly) { | 672 } else if (itype == HgIgnoreDialog::IgnoreGivenFilesOnly) { |
673 // The default for glob seems to be to ignore the file | |
674 // anywhere -- anchor the path to / to make it specific to | |
675 // this file only | |
676 //!!! check this! | |
677 foreach (QString f, files) { | |
678 out << "/" + f << endl; | |
679 } | |
680 } else { | |
670 foreach (QString f, files) { | 681 foreach (QString f, files) { |
671 out << f << endl; | 682 out << f << endl; |
672 } | 683 } |
673 } else { | |
674 | |
675 //!!! uh, can we do this in glob mode?? | |
676 } | 684 } |
677 | 685 |
678 //!!! report, and offer to edit .hgignore now | 686 //!!! report, and offer to edit .hgignore now |
679 | 687 |
680 | 688 |