Show More
@@ -395,10 +395,12 b' def newcommit(repo, phase, *args, **kwar' | |||
|
395 | 395 | class AbortNoCleanup(error.Abort): |
|
396 | 396 | pass |
|
397 | 397 | |
|
398 | def makepatchname(existing, title): | |
|
398 | def makepatchname(existing, title, fallbackname): | |
|
399 | 399 | """Return a suitable filename for title, adding a suffix to make |
|
400 | 400 | it unique in the existing list""" |
|
401 | 401 | namebase = re.sub('[\s\W_]+', '_', title.lower()).strip('_') |
|
402 | if not namebase: | |
|
403 | namebase = fallbackname | |
|
402 | 404 | name = namebase |
|
403 | 405 | i = 0 |
|
404 | 406 | while name in existing: |
@@ -2101,7 +2103,8 b' class queue(object):' | |||
|
2101 | 2103 | |
|
2102 | 2104 | if not patchname: |
|
2103 | 2105 | patchname = makepatchname(self.fullseries, |
|
2104 |
repo[r].description().split('\n', 1)[0] |
|
|
2106 | repo[r].description().split('\n', 1)[0], | |
|
2107 | '%d.diff' % r) | |
|
2105 | 2108 | checkseries(patchname) |
|
2106 | 2109 | self.checkpatchname(patchname, force) |
|
2107 | 2110 | self.fullseries.insert(0, patchname) |
@@ -290,3 +290,26 b' check qimport phase:' | |||
|
290 | 290 | $ cd .. |
|
291 | 291 | |
|
292 | 292 | $ killdaemons.py |
|
293 | ||
|
294 | check patch name generation for non-alpha-numeric summary line | |
|
295 | ||
|
296 | $ cd repo | |
|
297 | ||
|
298 | $ hg qpop -a -q | |
|
299 | patch queue now empty | |
|
300 | $ hg qseries -v | |
|
301 | 0 U imported_patch_b_diff | |
|
302 | 1 U 0 | |
|
303 | 2 U this-name-is-better | |
|
304 | 3 U url.diff | |
|
305 | ||
|
306 | $ echo bb >> b | |
|
307 | $ hg commit -m '==++--==' | |
|
308 | ||
|
309 | $ hg qimport -r tip | |
|
310 | $ hg qseries -v | |
|
311 | 0 A 1.diff | |
|
312 | 1 U imported_patch_b_diff | |
|
313 | 2 U 0 | |
|
314 | 3 U this-name-is-better | |
|
315 | 4 U url.diff |
General Comments 0
You need to be logged in to leave comments.
Login now