Mercurial > hg-stable
diff i18n/da.po @ 27513:707cdf2c3700 stable
mq: use fallback patch name if no alpha-numeric in summary line (issue5025)
Before this patch, "hg qimport -r REV" fails, if the summary line of
description of REV doesn't contain any alpha-numeric bytes.
In this case, all bytes in the summary line 'title' are dropped from
'namebase' by the code path below.
namebase = re.sub('[\s\W_]+', '_', title.lower()).strip('_')
'makepatchname()' immediately returns this empty string as valid patch
name, because patch name conflicting against empty string never
exists.
Then, "hg qimport -r REV" is aborted at creation of patch file with
empty filename.
This situation isn't so rare. For example, ordinary texts in Japanese
often consist of non alpha-numeric bytes in UTF-8.
This patch makes 'makepatchname()' use fallback patch name if the
summary line of imported revision doesn't contain any alpha-numeric
bytes.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 23 Dec 2015 22:28:52 +0900 |
parents | cf798a7f2694 |
children | 4acf569facef |