Mercurial > hg > easyhg
comparison src/mainwindow.cpp @ 423:06e5c4f3dd7c
Ensure "this file only" ignore RE is anchored at end
author | Chris Cannam <chris.cannam@eecs.qmul.ac.uk> |
---|---|
date | Wed, 22 Jun 2011 17:31:48 +0100 |
parents | 653e9694a694 |
children | ad106f5fe75f |
comparison
equal
deleted
inserted
replaced
422:2af4b5b0bf83 | 423:06e5c4f3dd7c |
---|---|
713 line = "*." + a; | 713 line = "*." + a; |
714 } else if (itype == HgIgnoreDialog::IgnoreGivenFilesOnly) { | 714 } else if (itype == HgIgnoreDialog::IgnoreGivenFilesOnly) { |
715 // Doesn't seem to be possible to do this with a glob, | 715 // Doesn't seem to be possible to do this with a glob, |
716 // because the glob is always unanchored and there is no | 716 // because the glob is always unanchored and there is no |
717 // equivalent of ^ to anchor it | 717 // equivalent of ^ to anchor it |
718 line = "re:^" + regexEscape(a); | 718 line = "re:^" + regexEscape(a) + "$"; |
719 } else if (itype == HgIgnoreDialog::IgnoreAllFilesOfGivenNames) { | 719 } else if (itype == HgIgnoreDialog::IgnoreAllFilesOfGivenNames) { |
720 line = a; | 720 line = a; |
721 } else if (itype == HgIgnoreDialog::IgnoreWholeDirectory) { | 721 } else if (itype == HgIgnoreDialog::IgnoreWholeDirectory) { |
722 line = "re:^" + regexEscape(a) + "/"; | 722 line = "re:^" + regexEscape(a) + "/"; |
723 } | 723 } |