Created attachment 185801 [details] sys/conf/newvers.sh: Only accept git-svn-id: attributes at the start of the line The attached patch lets sys/conf/newvers.sh only accept "git-svn-id:" attributes at the start of the line. This prevents incorrect subversion revision detection if "git svn" isn't being used to get the sources but git is available. Previously old subversion revisions included in commit messages were favoured over the more recent and correct revisions in the "Notes:" section. For example cf1f35574722 represents r315395 but was treated as r313908 which is referenced in the commit message. Commits following r315395/cf1f35574722 but before another commit with a git-svn-id reference in the commit message would be treated as r313908 as well. Obtained from: ElectroBSD
I applied this to my local tree but discovered it does not work correctly: git log indents the commit message by 4 spaces, so the modified expression does not match. We need grep '^ git-svn-id:' (or perhaps grep '^[[:space:]]*git-svn-id:'). I will commit an updated version of your patch or roll this change into another local change I have for newvers.sh git-svn handling.
A commit references this bug: Author: emaste Date: Sun Sep 10 19:12:01 UTC 2017 New revision: 323394 URL: https://svnweb.freebsd.org/changeset/base/323394 Log: newvers.sh: accept "git-svn-id:" at the start of a line only This prevents incorrect subversion revision detection when "git svn" is not being used to get the sources but git is available. Previously old subversion revisions included in commit messages were favoured over the more recent and correct revisions in git notes. For example cf1f35574722 represents r315395 but was treated as r313908 which is referenced in the commit message. Commits following r315395/cf1f35574722 but before another commit with a git-svn-id reference in the commit message would be treated as r313908 as well. Patch from PR updated to accommodate the initial four space indent in `git log` ouptut. PR: 221848 Submitted by: Fabian Keil Obtained from: ElectroBSD MFC after: 2 weeks Changes: head/sys/conf/newvers.sh
Thanks for fixing the "'git svn' is being used" use case.
A commit references this bug: Author: emaste Date: Sat Oct 7 20:17:03 UTC 2017 New revision: 324396 URL: https://svnweb.freebsd.org/changeset/base/324396 Log: MFC r323394: newvers.sh: accept "git-svn-id:" at the start of a line only This prevents incorrect subversion revision detection when "git svn" is not being used to get the sources but git is available. Previously old subversion revisions included in commit messages were favoured over the more recent and correct revisions in git notes. For example cf1f35574722 represents r315395 but was treated as r313908 which is referenced in the commit message. Commits following r315395/cf1f35574722 but before another commit with a git-svn-id reference in the commit message would be treated as r313908 as well. Patch from PR updated to accommodate the initial four space indent in `git log` ouptut. PR: 221848 Submitted by: Fabian Keil Obtained from: ElectroBSD Changes: _U stable/11/ stable/11/sys/conf/newvers.sh
batch change of PRs untouched in 2018 marked "in progress" back to open.
This was actually fixed. Close.