Support range operator in revision range (log and rev-list)

This commit is contained in:
David Nelson 2019-04-22 13:11:52 -05:00
parent 9b4b6627b6
commit 44e7596381
2 changed files with 25 additions and 0 deletions

View file

@ -3079,6 +3079,18 @@ function RevisionRange(engine, specifiers) {
this.processSpecifiers(specifiers);
}
var rangeRegex = /^(.*)\.\.(.*)$/;
RevisionRange.prototype.processAsRange = function(specifier) {
var match = specifier.match(rangeRegex);
if(!match) {
return false;
}
this.tipsToExclude.push(match[1]);
this.tipsToInclude.push(match[2]);
return true;
};
RevisionRange.prototype.processAsExclusion = function(specifier) {
if(!specifier.startsWith('^')) {
return false;
@ -3095,6 +3107,7 @@ RevisionRange.prototype.processAsInclusion = function(specifier) {
RevisionRange.prototype.processSpecifiers = function(specifiers) {
var self = this;
var processors = [
this.processAsRange,
this.processAsExclusion
];