##// END OF EJS Templates
mq: restrict generated patch name to 75 characters (issue5117)...
Pierre-Yves David -
r28388:b1d35e2e stable
parent child Browse files
Show More
@@ -1117,6 +1117,7 b' class queue(object):'
1117 """Return a suitable filename for title, adding a suffix to make
1117 """Return a suitable filename for title, adding a suffix to make
1118 it unique in the existing list"""
1118 it unique in the existing list"""
1119 namebase = re.sub('[\s\W_]+', '_', title.lower()).strip('_')
1119 namebase = re.sub('[\s\W_]+', '_', title.lower()).strip('_')
1120 namebase = namebase[:75] # avoid too long name (issue5117)
1120 if namebase:
1121 if namebase:
1121 try:
1122 try:
1122 self.checkreservedname(namebase)
1123 self.checkreservedname(namebase)
@@ -331,3 +331,12 b' check reserved patch names'
331 2.diff
331 2.diff
332 taken__2
332 taken__2
333
333
334 check very long patch name
335
336 $ hg qpop -qa
337 patch queue now empty
338 $ echo >> b
339 $ hg commit -m 'abcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
340 $ hg qimport -r .
341 $ hg qap
342 abcdefghi_pqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghi_pqrstuvwxyzabcdefg
General Comments 0
You need to be logged in to leave comments. Login now