...
 
Commits (2)
......@@ -653,7 +653,7 @@ class SeriesRevision(models.Model):
return False
for index, name in enumerate(names):
match = re.search(r"\[(\d+)/(\d+)\]", name)
match = re.search(r"\[[^]]*(\d+)/(\d+).*\]", name)
if not match: # we have a patch without proper numbering
return True
if (index + 1) != int(match.group(1)): # numbering is off
......
......@@ -50,7 +50,6 @@ $(document).ready(function() {
{% block body %}
<h1>{{ series.name }}</h1>
=
<div class="core-info">
<span>Submitted by {{ series.submitter|personify:project }} on {{ series.submitted }}</span>
</div>
......
......@@ -120,7 +120,8 @@ class RevisionStatus(GeneratedSeriesTest):
return list(self.series.revisions())[-1]
def setUp(self):
(self.test_series, self.mails) = self._create_series(3)
# 20 patches for multi-digit testing
(self.test_series, self.mails) = self._create_series(20)
def testFreshSeriesWithoutAllMailsShouldNotBeComple(self):
self.test_series.insert(self.mails[:-2])
......@@ -164,6 +165,17 @@ class RevisionStatus(GeneratedSeriesTest):
self.assertTrue(self.last_revision.is_complete)
self.assertTrue(self.last_revision.is_strange)
def testCompleteSeriesWithExtraTagShouldNotBeStrange(self):
for mail in self.mails:
new_subject = mail['Subject'].replace('PATCH', 'PATCH extra')
del(mail['Subject'])
mail['Subject'] = new_subject
self.test_series.insert(self.mails)
self.assertTrue(self.last_revision.is_complete)
self.assertFalse(self.last_revision.is_strange)
class BasicGeneratedSeriesTests(GeneratedSeriesTest):
......