aboutsummaryrefslogtreecommitdiff
path: root/b4/ty.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-04-10 11:19:42 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-04-10 11:19:42 -0400
commit39181293c0cb1780e56e3eaee9ac2cc8abd8d43f (patch)
tree479b4bdd27f20ca8389ce16086df7cd0bf69abe0 /b4/ty.py
parent7210e188cc087f2f9a2aba23420d781d6d1a8691 (diff)
downloadb4-39181293c0cb1780e56e3eaee9ac2cc8abd8d43f.tar.gz
Don't use git patch-id for patch tracking
Looks like some of the patches sent from quilt (at least from Andrew Morton) are not properly parsed by git patch-id, so use our own patch hashing routines, even if this means we're likely going to miss some of the patches that were edited by maintainers. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/ty.py')
-rw-r--r--b4/ty.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/b4/ty.py b/b4/ty.py
index 245525a..8b76ff9 100644
--- a/b4/ty.py
+++ b/b4/ty.py
@@ -149,15 +149,13 @@ def get_all_commits(gitdir, branch, since='1.week', committer=None):
return MY_COMMITS
logger.info('Found %s of your comits since %s', len(lines), since)
- logger.info('Calculating patch-ids, may take a moment...')
- # Get patch-id of each commit
+ logger.info('Calculating patch hashes, may take a moment...')
+ # Get patch hash of each commit
for line in lines:
commit_id, subject = line.split(maxsplit=1)
ecode, out = git_get_rev_diff(gitdir, commit_id)
- gitargs = ['patch-id', '--stable']
- ecode, out = b4.git_run_command(None, gitargs, stdin=out.encode('utf-8'))
- chunks = out.split()
- MY_COMMITS[chunks[0]] = (commit_id, subject)
+ pwhash = b4.LoreMessage.get_patch_hash(out)
+ MY_COMMITS[pwhash] = (commit_id, subject)
return MY_COMMITS
@@ -235,7 +233,7 @@ def auto_thankanator(cmdargs):
sys.exit(1)
wantbranch = cmdargs.branch
- logger.info('Auto-thankinating using branch %s', wantbranch)
+ logger.info('Auto-thankinating commits in %s', wantbranch)
tracked = list_tracked()
if not len(tracked):
logger.info('Nothing to do')
@@ -366,7 +364,7 @@ def discard_selected(cmdargs):
logger.info('Nothing to do')
sys.exit(0)
- if '_all' in cmdargs.discard:
+ if 'all' in cmdargs.discard:
listing = tracked
else:
listing = list()