HomePhabricator

[git] Be more specific when looking for llvm-svn

Description

[git] Be more specific when looking for llvm-svn

Summary:
A commit may, for some reason, have llvm-svn: in it multiple times. It may even take up the whole line and look identical to what gets added automatically when svn commits land in github.

To workaround this, make changes to both lookups:

  1. When doing the git -> svn lookup, make sure to go through the whole message, and: a) Only look for llvm-svn starting at the beginning of the line (excluding the whitespace that git log adds). b) Take the last one (at the end of the commit message), if there are multiple matches.
  1. When doing the svn -> git lookup, look through a sizeable but still reasonably small number of git commits (10k, about 4-5 months right now), and: a) Only consider commits with the '^llvm-svn: NNNNNN' we expect, and b) Only consider those that also follow the same git -> svn matching above. (Error if it's not exactly one commit).

Reviewers: jyknight

Reviewed By: jyknight

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60017

Details

Committed
rupprechtMay 23 2019, 11:43 AM
Reviewer
jyknight
Differential Revision
D60017: [git] Be more specific when looking for llvm-svn
Parents
rL361531: Test commit access by removing a empty line
Branches
Unknown
Tags
Unknown