try to report old patches

This commit is contained in:
Jeff Carr 2025-09-04 22:37:55 -05:00
parent 5dbfed7a31
commit e09849b1a2
2 changed files with 13 additions and 10 deletions

View File

@ -37,6 +37,7 @@ func doPatch() error {
for p := range old.IterAll() {
log.Info("patch", p.Filename, p.Namespace)
}
me.forge.SubmitPatchesNew(old, "oldpatchset")
return nil
}

View File

@ -266,12 +266,13 @@ func findExpired() *forgepb.Patches {
continue
}
os.Chdir(repo.GetFullPath())
newhash, err := findCommitByHash(patch.StartHash, comment)
if err != nil {
// this patch has not been applied yet
log.Info("patch: not found hash:", patch.Namespace, patch.CommitHash, comment, err)
_, err := findCommitByHash(patch.StartHash, comment)
if err == nil {
log.Info("found applied patch", patch.Namespace, ": newhash:", patch.NewHash, "commithash:", patch.CommitHash, comment)
found.AppendByCommitHash(patch) // double check to ensure the commit hash isn't added twice
continue
}
/*
newhash, err = findCommitBySubject(comment)
if err == nil {
@ -280,6 +281,7 @@ func findExpired() *forgepb.Patches {
found.AppendByCommitHash(patch) // double check to ensure the commit hash isn't added twice
continue
}
*/
}
return found