Re: helping with tracking commits across repos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I notice that where a commit is cherry-picked cleanly on a stable
branch, like 6b90466cfec2a2fe027187d675d8d14217c12d82, your script finds
the corresponding commit on the stable branch.  This is useful.

But where some backporting changes are needed, such as for
f01fc1a82c2ee68726b400fadb156bd623b5f2f1, which became
8ebfe28181b02766ac41d9d841801c146e6161c1 on the 3.2.y branch, the
corresponding commit isn't found.

It should be possible to find such backported commits based on a simple
regex search over the commit message:

	for (<$body>) {
	    if (/^commit (.*) upstream\.\n/) {
		$upstream = $1;
	    } elsif (/^\[ Upstream commit (.*) \]\n/) {
		$upstream = $1;
	    } elsif (/^\(cherry picked from commit (.*)\)\n/) {
		$upstream = $1;
	    }
	}

This covers all formats in current use to show a direct correspondence
between a single mainline and stable branch commit.  (Really we should
settle on just one format...)

Ben.

-- 
Ben Hutchings
It is impossible to make anything foolproof because fools are so ingenious.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]