Hello community, here is the log from the commit of package b4 for openSUSE:Factory checked in at 2020-11-29 12:29:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/b4 (Old) and /work/SRC/openSUSE:Factory/.b4.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "b4" Sun Nov 29 12:29:25 2020 rev:7 rq:851292 version:0.5.3+0 Changes: -------- --- /work/SRC/openSUSE:Factory/b4/b4.changes 2020-11-23 18:37:55.912587726 +0100 +++ /work/SRC/openSUSE:Factory/.b4.new.5913/b4.changes 2020-11-29 12:29:30.638067862 +0100 @@ -1,0 +2,10 @@ +Fri Nov 27 11:02:21 UTC 2020 - [email protected] + +- Update to version 0.5.3+0: + * Increment version to 0.5.3 in prep for release + * Unbreak thanks-tracking + * Fix crash on incomplete series thanks tracking + * Improve ty with cherrypicked subsets + * Unquote msgid if we're getting a full https URL + +------------------------------------------------------------------- Old: ---- b4-0.5.2+9.obscpio New: ---- b4-0.5.3+0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ b4.spec ++++++ --- /var/tmp/diff_new_pack.Uff30E/_old 2020-11-29 12:29:31.130068360 +0100 +++ /var/tmp/diff_new_pack.Uff30E/_new 2020-11-29 12:29:31.134068363 +0100 @@ -17,9 +17,9 @@ %define skip_python2 1 -%define version_unconverted 0.5.2+9 +%define version_unconverted 0.5.3+0 Name: b4 -Version: 0.5.2+9 +Version: 0.5.3+0 Release: 0 Summary: Helper scripts for kernel.org patches License: GPL-2.0-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.Uff30E/_old 2020-11-29 12:29:31.178068409 +0100 +++ /var/tmp/diff_new_pack.Uff30E/_new 2020-11-29 12:29:31.178068409 +0100 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://git.kernel.org/pub/scm/utils/b4/b4.git</param> - <param name="changesrevision">46b9e092457c2921653704a4f824c9674f5967cb</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">08d58022600f213e8f71d192fb672d03593f2c62</param></service></servicedata> \ No newline at end of file ++++++ b4-0.5.2+9.obscpio -> b4-0.5.3+0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/b4-0.5.2+9/b4/__init__.py new/b4-0.5.3+0/b4/__init__.py --- old/b4-0.5.2+9/b4/__init__.py 2020-11-17 21:54:52.000000000 +0100 +++ new/b4-0.5.3+0/b4/__init__.py 2020-11-25 23:04:35.000000000 +0100 @@ -28,7 +28,7 @@ charset.add_charset('utf-8', None) emlpolicy = email.policy.EmailPolicy(utf8=True, cte_type='8bit', max_line_length=None) -__VERSION__ = '0.5.2' +__VERSION__ = '0.5.3' ATTESTATION_FORMAT_VER = '0.1' logger = logging.getLogger('b4') @@ -1922,7 +1922,7 @@ matches = re.search(r'^https?://[^/]+/([^/]+)/([^/]+@[^/]+)', msgid, re.IGNORECASE) if matches: chunks = matches.groups() - msgid = chunks[1] + msgid = urllib.parse.unquote(chunks[1]) # Infer the project name from the URL, if possible if chunks[0] != 'r': cmdargs.useproject = chunks[0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/b4-0.5.2+9/b4/mbox.py new/b4-0.5.3+0/b4/mbox.py --- old/b4-0.5.2+9/b4/mbox.py 2020-11-17 21:54:52.000000000 +0100 +++ new/b4-0.5.3+0/b4/mbox.py 2020-11-25 23:04:35.000000000 +0100 @@ -246,10 +246,6 @@ def thanks_record_am(lser, cherrypick=None): - if not lser.complete: - logger.debug('Incomplete series, not tracking for thanks') - return - # Are we tracking this already? datadir = b4.get_data_dir() slug = lser.get_slug(extended=True) @@ -257,24 +253,39 @@ patches = list() at = 0 - for pmsg in lser.patches[1:]: - at += 1 + padlen = len(str(lser.expected)) + lmsg = None + + for pmsg in lser.patches: if pmsg is None: + at += 1 + continue + + if lmsg is None: + lmsg = pmsg + + if not pmsg.has_diff: + # Don't care about the cover letter + at += 1 continue if cherrypick is not None and at not in cherrypick: logger.debug('Skipped non-cherrypicked: %s', at) + at += 1 continue pmsg.load_hashes() if pmsg.attestation is None: logger.debug('Unable to get hashes for all patches, not tracking for thanks') return - patches.append((pmsg.subject, pmsg.pwhash, pmsg.msgid)) - lmsg = lser.patches[0] + prefix = '%s/%s' % (str(pmsg.counter).zfill(padlen), pmsg.expected) + patches.append((pmsg.subject, pmsg.pwhash, pmsg.msgid, prefix)) + at += 1 + if lmsg is None: - lmsg = lser.patches[1] + logger.debug('All patches missing, not tracking for thanks') + return allto = email.utils.getaddresses([str(x) for x in lmsg.msg.get_all('to', [])]) allcc = email.utils.getaddresses([str(x) for x in lmsg.msg.get_all('cc', [])]) @@ -289,6 +300,7 @@ 'references': b4.LoreMessage.clean_header(lmsg.msg['References']), 'sentdate': b4.LoreMessage.clean_header(lmsg.msg['Date']), 'quote': b4.make_quote(lmsg.body, maxlines=5), + 'cherrypick': cherrypick is not None, 'patches': patches, } fullpath = os.path.join(datadir, filename) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/b4-0.5.2+9/b4/ty.py new/b4-0.5.3+0/b4/ty.py --- old/b4-0.5.2+9/b4/ty.py 2020-11-17 21:54:52.000000000 +0100 +++ new/b4-0.5.3+0/b4/ty.py 2020-11-25 23:04:35.000000000 +0100 @@ -99,10 +99,11 @@ else: msg['References'] = '<%s>' % jsondata['msgid'] - if jsondata['subject'].find('Re: ') < 0: - msg['Subject'] = 'Re: %s' % jsondata['subject'] + subject = re.sub(r'^Re:\s+', '', jsondata['subject'], flags=re.I) + if jsondata.get('cherrypick'): + msg['Subject'] = 'Re: (subset) ' + subject else: - msg['Subject'] = jsondata['subject'] + msg['Subject'] = 'Re: ' + subject mydomain = jsondata['myemail'].split('@')[1] msg['Message-Id'] = email.utils.make_msgid(idstring='b4-ty', domain=mydomain) @@ -189,11 +190,13 @@ # We need to find all of them in the commits found = list() matches = 0 + at = 0 for patch in jsondata['patches']: + at += 1 logger.debug('Checking %s', patch) if patch[1] in patchids: logger.debug('Found: %s', patch[0]) - found.append(commits[patch[1]]) + found.append((at, commits[patch[1]][0])) matches += 1 else: # try to locate by subject @@ -201,7 +204,7 @@ for pwhash, commit in commits.items(): if commit[1] == patch[0]: logger.debug('Matched using subject') - found.append(commit) + found.append((at, commit[0])) success = True matches += 1 break @@ -209,7 +212,7 @@ for tracker in commit[2]: if tracker.find(patch[2]) >= 0: logger.debug('Matched using recorded message-id') - found.append(commit) + found.append((at, commit[0])) success = True matches += 1 break @@ -218,7 +221,7 @@ if not success: logger.debug(' Failed to find a match for: %s', patch[0]) - found.append((None, patch[0])) + found.append((at, None)) return found @@ -320,24 +323,27 @@ if not cidmask: cidmask = 'commit: %s' slines = list() - counter = 0 nomatch = 0 padlen = len(str(len(commits))) - for commit in commits: - counter += 1 - prefix = '[%s/%s] ' % (str(counter).zfill(padlen), len(commits)) - slines.append('%s%s' % (prefix, commit[1])) - if commit[0] is None: + patches = jsondata['patches'] + for at, cid in commits: + try: + prefix = '[%s] ' % patches[at-1][3] + except IndexError: + prefix = '[%s/%s] ' % (str(at).zfill(padlen), len(commits)) + slines.append('%s%s' % (prefix, patches[at-1][0])) + if cid is None: slines.append('%s(no commit info)' % (' ' * len(prefix))) nomatch += 1 else: - slines.append('%s%s' % (' ' * len(prefix), cidmask % commit[0])) + slines.append('%s%s' % (' ' * len(prefix), cidmask % cid)) jsondata['summary'] = '\n'.join(slines) - if nomatch == counter: + if nomatch == len(commits): logger.critical(' WARNING: None of the patches matched for: %s', jsondata['subject']) logger.critical(' Please review the resulting message') elif nomatch > 0: - logger.critical(' WARNING: Could not match %s of %s patches in: %s', nomatch, counter, jsondata['subject']) + logger.critical(' WARNING: Could not match %s of %s patches in: %s', + nomatch, len(commits), jsondata['subject']) logger.critical(' Please review the resulting message') msg = make_reply(thanks_template, jsondata) ++++++ b4.obsinfo ++++++ --- /var/tmp/diff_new_pack.Uff30E/_old 2020-11-29 12:29:31.278068510 +0100 +++ /var/tmp/diff_new_pack.Uff30E/_new 2020-11-29 12:29:31.282068513 +0100 @@ -1,5 +1,5 @@ name: b4 -version: 0.5.2+9 -mtime: 1605646492 -commit: 46b9e092457c2921653704a4f824c9674f5967cb +version: 0.5.3+0 +mtime: 1606341875 +commit: 08d58022600f213e8f71d192fb672d03593f2c62 _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
