Explicitly documenting patch submission
I just read the whole thread and I can't help but wonder if you aren't trying to solve the 5% problem while avoiding the 95% problem. Right now, because of how patches are fanned in through maintainers, lots and lots of patches are going into the SCM system (BK and/or CVS since that is derived from BK) as authored by a handful of people. Just go look at the stats: http://linux.bkbits.net:8080/linux-2.5/stats?nav=index.html
As productive as Andrew is I find it difficult to believe he has personally authored more than 5000 patches. He hasn't, he doesn't pretend to have done so but we are not getting the authorship right.
Solve that problem and you are lightyears closer to having an audit trail. You currently aren't recording the original author and you are trying to record all the people who touched the patch along the way. If you can't get the easy part right what makes you think you are going to get the hard part right?
Before the obligatory BK flames start up, note this is a problem that you would have with any SCM system. The problem has nothing to do with which SCM system you use, it has to do with recording authorship.
I think it's great that you are looking for a better audit trail but I think it is strange that you are trying to get a perfect audit trail when you don't even have the basics in place. What was it that you said, "Perfect is the enemy of good", right? In my opinion the 99% part of the problem space is who wrote the patch, not who passed it on. If, and that's a big if, you get to the point where you have proper authorship recorded and then you still want to record the path it took, that's a different matter. The way you are going about it I think you may end up with nothing by trying to be so perfect. If I'm wrong, what's wrong with fixing things so that you get the authorship right and then extend to get the full path right?
This leaves aside the issue that patches can get applied multiple times (and do all the time, I think we've counted thousands or tens of thousands of this in the kernel history).
For what it is worth, we've actually thought through what you are trying to do long ago and calculated the amount of metadata you'd end up carrying around and found it to be way way way way too large for an SCM system to justify. It's unlikely we'd ever want full audit trails in BK because patches tend to flow through multiple trees and get merged with other patches, etc. The thing we found useful was who wrote the patch and in what context.
We did change BK a few revs back to record both the importer and the patch author when people use your import scripts (bk import -temail) so we have a 2 deep audit trail already. More than that seems like overkill.
The more I think about it the more I wonder what problem it is you are trying to solve with the A->B->C->D->Linus audit trail. Legally, the issue is going to be with A more than anyone else. What am I missing?
Signature · 2 lines
--- Larry McVoy lm at bitmover.com http://www.bitkeeper.com
Quoted 10 lines · Larry McVoy
I just read the whole thread and I can't help but wonder if you aren't trying to solve the 5% problem while avoiding the 95% problem. Right now, because of how patches are fanned in through maintainers, lots and lots of patches are going into the SCM system (BK and/or CVS since that is derived from BK) as authored by a handful of people. Just go look at the stats: http://linux.bkbits.net:8080/linux-2.5/stats?nav=index.html
As productive as Andrew is I find it difficult to believe he has personally authored more than 5000 patches. He hasn't, he doesn't pretend to have done so but we are not getting the authorship right.
Numerous people have asked Linus to make that small change to his scripts but he prefers it the way it is, because the current practice better represents how the patch got into the tree. The authors names are in the changelog and the submitter's name is in the SCM metadata.
The scripts which Linus uses to generate the kernel release announcements do fish inside the changelog and do accurately represent who-did-what.
Once the Signed-off-by: thing is fully underway perhaps he'll change this, I don't know.
The problem is that the question "how did this code get into the tree" is usually different from "who wrote that code". And Linus values the former.
Quoted 1 line
You currently aren't recording the original author
We are, with care. It's in the changelogs. Every single patch which I didn't originate has a From: line at the start of the changelog.
Quoted 4 lines
and you are trying
to record all the people who touched the patch along the way. If you can't get the easy part right what makes you think you are going to get the hard part right?
We've got it as Linus wants it.
If you want to enhance BK to parse the Signed-off-by: stuff, or to embed it in some manner as a first-class thing then that'd be neat, but parsing the changelogs will suffice I expect.
Quoted 4 lines
...
I think it's great that you are looking for a better audit trail but I think it is strange that you are trying to get a perfect audit trail when you don't even have the basics in place.
Disagree. When multiple people work on a patch their identities are already captured. The Signed-off-by: stuff changes the format and formalises it a bit.
What we're not capturing fully is who-did-what amongst the multiple authors, unless that is specifically itemised in the changelog.
What also tends to not be captured is that in a quite large percentage of cases I've diddled people's patches on the way through - bugfixes, cleanups, spelling fixes and very frequent changelog improvements. I'll sometimes mention that in the changelog but usually don't bother.
A purist would say "that should have been a separate changeset" but I disagree - I'd prefer that the patch which hits the tree is a single, complete, logical whole. Because the quality and integrity of the changeset is more important than precisely tracking the little fixes which got added on the way through.
Quoted 12 lines · Andrew Morton
Quoted 10 lines · Larry McVoy
I just read the whole thread and I can't help but wonder if you aren't trying to solve the 5% problem while avoiding the 95% problem. Right now, because of how patches are fanned in through maintainers, lots and lots of patches are going into the SCM system (BK and/or CVS since that is derived from BK) as authored by a handful of people. Just go look at the stats: http://linux.bkbits.net:8080/linux-2.5/stats?nav=index.html
As productive as Andrew is I find it difficult to believe he has personally authored more than 5000 patches. He hasn't, he doesn't pretend to have done so but we are not getting the authorship right.
Quoted 4 lines
Numerous people have asked Linus to make that small change to his scripts but he prefers it the way it is, because the current practice better represents how the patch got into the tree. The authors names are in the changelog and the submitter's name is in the SCM metadata.
That means that all the SCM tools, BK, CVS, whatever, get the wrong attribution when you are trying to track down a bug. Which is more important when you are
debugging: knowing who created the change or who pushed the change to Linus?
The high order bit, in my not humble opinion, is the author. If Linus wants to keep the info about the submitter then do that in the check in comments.
Quoted 5 lines
A purist would say "that should have been a separate changeset" but I disagree - I'd prefer that the patch which hits the tree is a single, complete, logical whole. Because the quality and integrity of the changeset is more important than precisely tracking the little fixes which got added on the way through.
I think we can have our cake and eat it too, at least in BK (and there is no reason other systems couldn't do this as well): BK does not have the concept of a 1:1 binding between a change to a file and a changeset. A changeset is a container which may have one or more deltas to one or more files, i.e., it is many:1.
If you took to sending your patches as the original patch plus another patch, bundling them together (I can work out a format and GPLed tools for this) then what we could do is have the BK import tools record the first one as a set of deltas, the next one as another set of deltas, and so on. We can handle an arbitrary number of patches to patches to patches. Then when the import finishes we bundle up all the deltas in one logical changeset. 99% of the time people won't care about the details, when they are looking through the code the interfaces will all work as they do today, the BK/Web interface would export this as a patch just like you are used to, but when people do care the full information is there.
I suspect that with a little practice this could be quite useful. I could build tools which record the secondary patches as diffs to the patches (I think) and if you have ever read a diff of a diff it is suprisingly useful. I tend to save diffs of my work in progress and then later I'll generate diffs again and diff them to get my context back.
Signature · 2 lines
--- Larry McVoy lm at bitmover.com http://www.bitkeeper.com
Quoted 7 lines · Larry McVoy
I think we can have our cake and eat it too, at least in BK (and there is no reason other systems couldn't do this as well): BK does not have the concept of a 1:1 binding between a change to a file and a changeset. A changeset is a container which may have one or more deltas to one or more files, i.e., it is many:1.
Quoted 10 lines
If you took to sending your patches as the original patch plus another patch, bundling them together (I can work out a format and GPLed tools for this) then what we could do is have the BK import tools record the first one as a set of deltas, the next one as another set of deltas, and so on. We can handle an arbitrary number of patches to patches to patches. Then when the import finishes we bundle up all the deltas in one logical changeset. 99% of the time people won't care about the details, when they are looking through the code the interfaces will all work as they do today, the BK/Web interface would export this as a patch just like you are used to, but when people do care the full information is there.
Sounds good, as long as it is simple (read: simplest) to read and export the result of everything as one patch. I.e. I wouldn't want to see this:
@@ -28,6 +28,7 @@
+ /* new comment in empty raea */
@@ -28,67+28,7 @@
- /* new comment in empty raea */
+ /* new comment in empty area */
But that goes without saying, doesn't it? ;)
Quoted 6 lines
I suspect that with a little practice this could be quite useful. I could build tools which record the secondary patches as diffs to the patches (I think) and if you have ever read a diff of a diff it is suprisingly useful. I tend to save diffs of my work in progress and then later I'll generate diffs again and diff them to get my context back.
Diffs to diffs I am even less eager to read. As an internal format, they make sense, though.
Jörn
Signature · 3 lines
There's nothing better for promoting creativity in a medium than making an audience feel "Hmm I could do better than that!" -- Douglas Adams in a slashdot interview
Quoted 6 lines · Larry McVoy
I suspect that with a little practice this could be quite useful. I could build tools which record the secondary patches as diffs to the patches (I think) and if you have ever read a diff of a diff it is suprisingly useful. I tend to save diffs of my work in progress and then later I'll generate diffs again and diff them to get my context back.
This is a classic case of wanting an audit trail just like you have in accounting packages. For audit trails you have to have the entire trail, not just pieces of it.
I like the idea of nested packages signed by each person who touched it. The gives a perfect audit trail back to who authored each line. I'm sure bk could be modified to produce these automatically.
I don't believe the size of this would get out of control. Only the master Linux repository has to keep all of it. bk clone could get a new option that says, i don't care about the downstream audit trail. Disks are cheap, I doubt if the entire Linux audit trail would fill up more than a couple of them.
Audit trails are something that are rarely looked at but of vital importance. Linux needs complete and accurate audit trails. I agree that audit trails can clutter up patches, but the patches have to have these trails. The way to address this is via tools that convert the new patches into the old formats for people to read. Plus the bitkeeper interface would also hide all of the detail unless asked. Of course other source control systems will also need a set of helper tools too.
Another problem is that you need a central key repository. Since it's pretty stupid to for each developer to send $2,000 to verisign for a key maybe bitmover would consider running the key repository. This is a painful job, if they want to do it, I'd let them.
Jon Smirl, [email protected]
Quoted 10 lines · Andrew Morton
Quoted 3 lines · Larry McVoy
You currently aren't recording the original author
We are, with care. It's in the changelogs. Every single patch which I didn't originate has a From: line at the start of the changelog.
For patches that I've been involved with, the changelog line almost always mentions one of the intermediate handlers, not the original author. I suspect that Larry is mostly right.
Signature · 1 line
Anyone who quotes me in their sig is an idiot. -- Rusty Russell's sig
Quoted 6 lines · La Monte H.P. Yarroll
Quoted 3 lines
We are, with care. It's in the changelogs. Every single patch which I didn't originate has a From: line at the start of the changelog.
For patches that I've been involved with, the changelog line almost always mentions one of the intermediate handlers, not the original author. I suspect that Larry is mostly right.
Up until recently we've had the person doing the BK commit, plus person they received it from. That's identical to the two-level chain of custody which Larry was proposing as being "good enough" most of the time. But more recently, there have been changelog comments like this:
[email protected], 2004-05-25 08:43:49-07:00, [email protected]
[PATCH] minor sched.c cleanup
The following obviously correct patch from Christian Meder simplifies the DELTA() define.
Which do show the original author.
- Ted
Quoted 10 lines
[email protected], 2004-05-25 08:43:49-07:00, [email protected]
[PATCH] minorsched.ccleanupSigned-off-by Christian Meder <[email protected]>Signed-off-by Ingo Molnar <[email protected]>The following obviously correct patch from Christian Meder simplifies the
DELTA()define.Which do show the original author.
Not in any useful way. If I go look at the file history, which is what I'm going to do when tracking down a bug, all I see on the files included in this changeset is [email protected].
That means any annotated listing (BK or CVS blame) shows the wrong author.
[email protected], 2004-05-25 08:43:49-07:00, [email protected] +1 -0
[PATCH] minor sched.c cleanup
The following obviously correct patch from Christian Meder simplifies the DELTA() define.
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
kernel/[email protected], 2004-05-25 02:58:45-07:00, [email protected] +1 -2
minor sched.c cleanup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Signature · 2 lines
--- Larry McVoy lm at bitmover.com http://www.bitkeeper.com
Quoted 5 lines · Larry McVoy
Not in any useful way. If I go look at the file history, which is what I'm going to do when tracking down a bug, all I see on the files included in this changeset is [email protected].
That means any annotated listing (BK or CVS blame) shows the wrong author.
One of the ways that I often use for tracking down potential fixes is to simply do "bk changes > /tmp/foo" and then use emacs's incremental search to look for interesting potential changes. (I know, you're probably throwing up all over your keyboard just about now. :-)
One "interesting" thing I've wished for is to be able to do "bk revtool drivers/net/wireless/airo.c", and then when I put my mouse over a particular line number, have it display in a little popup box the changelog description of whatever line my mouse happened to be over. It would be a real pain to try to implement that in tcl/Tk, though.... that would make it easier to solve the specific problem you've mentioned of "bk blame" showing the wrong author when looking at a particular source file.
- Ted
Quoted 12 lines · Theodore Ts'o
Quoted 5 lines · Larry McVoy
Not in any useful way. If I go look at the file history, which is what I'm going to do when tracking down a bug, all I see on the files included in this changeset is [email protected].
That means any annotated listing (BK or CVS blame) shows the wrong author.
One of the ways that I often use for tracking down potential fixes is to simply do "bk changes >
/tmp/foo" and then use emacs's incremental search to look for interesting potential changes. (I know, you're probably throwing up all over your keyboard just about now. :-)
Quoted 5 lines
One "interesting" thing I've wished for is to be able to do "bk revtool
drivers/net/wireless/airo.c", and then when I put my mouse over a particular line number, have it display in a little popup box the changelog description of whatever line my mouse happened to be over.
bk revtool $filename
ctrl-c in the gui that pops up
click line that looks interesting - jumps to the cset with commit comments.
That what you meant ?
Dave
Quoted 11 lines · Theodore Ts'o
Quoted 5 lines · Larry McVoy
Not in any useful way. If I go look at the file history, which is what I'm going to do when tracking down a bug, all I see on the files included in this changeset is [email protected].
That means any annotated listing (BK or CVS blame) shows the wrong author.
One of the ways that I often use for tracking down potential fixes is to simply do "bk changes >
/tmp/foo" and then use emacs's incremental search to look for interesting potential changes. (I know, you're probably throwing up all over your keyboard just about now. :-)
Hey, whatever works for you.
Quoted 6 lines
One "interesting" thing I've wished for is to be able to do "bk revtool
drivers/net/wireless/airo.c", and then when I put my mouse over a particular line number, have it display in a little popup box the changelog description of whatever line my mouse happened to be over. It would be a real pain to try to implement that in tcl/Tk, though....
We already have that implemented in some tree somewhere, I think one of the commercial branches. It's not hard at all, but it's fairly slow because it has to go pawing through the ChangeSet file. Yeah, we could add a cache but it seems rather pointless.
It is simply better to have the correct information recorded in the correct place. Saying that you can go dig it out of the ChangeSet file is self defeating, that sucker is 40MB and digging anything out of it hurts. So even if we gave you this feature in revtool, which is just
bk sccslog -rbk r2c -r$REV $FILE $FILE
it's going to be too slow to be useful.
I dunno what to tell you other than I'm trying to guide you towards the use of the SCM that will be productive for you. This would be true in CVS as well, except it is worse unless you are using the bk2cvs tree which maintains the backpointer to the changeset file there.
Why people persist in storing the less used information cheaply and the commonly used information expensively is beyond me. But hey, it's your source base, knock yourself out.
Signature · 2 lines
--- Larry McVoy lm at bitmover.com http://www.bitkeeper.com
Quoted 2 lines
bk revtool $filename
ctrl-c in the gui that pops up
That's just "c", Ctrl-c just happens to work and is not supported. And "c" is a very funny listing, it's rare that that is what you want. I suspect what you want is to click the last node and then hit "a".
Quoted 2 lines
click line that looks interesting - jumps to the cset with commit comments.
double click.
Signature · 2 lines
--- Larry McVoy lm at bitmover.com http://www.bitkeeper.com
Quoted 6 lines · Larry McVoy
Quoted 2 lines
bk revtool $filename
ctrl-c in the gui that pops upThat's just "c", Ctrl-c just happens to work and is not supported. And "c" is a very funny listing, it's rare that that is what you want. I suspect what you want is to click the last node and then hit "a".
Ah, I found this by accident 8-)
Quoted 3 lines
Quoted 2 lines
click line that looks interesting - jumps to the cset with commit comments.
double click.
ah, for full comments, yes.
Dave
Quoted 6 lines · Dave Jones
bk revtool $filename
ctrl-c in the gui that pops up
click line that looks interesting - jumps to the cset with commit comments.That what you meant ?
Yes, except you have to type all of the extra characters, and manually dismiss the window after looking at the comments. I was looking for something where the window pops up automatically when you mouse over the line number, and disappear when you move the mouse away. (This is not new; a number of modern GUI interfaces have this style of interface).
Quoted 4 lines · Larry McVoy
We already have that implemented in some tree somewhere, I think one of the commercial branches. It's not hard at all, but it's fairly slow because it has to go pawing through the ChangeSet file. Yeah, we could add a cache but it seems rather pointless.
How slow could it be on a 1.6 GHz Pentium-M with 2 gigs of memory? :-)
All other BK operations tend to fly when everything is in the page cache. <grin>
Quoted 3 lines
It is simply better to have the correct information recorded in the correct place. Saying that you can go dig it out of the ChangeSet file is self defeating, that sucker is 40MB and digging anything out of it hurts.
I agree with you, but that decision isn't up to me. So I (and all of us) have to make the best with what the Big Penguin has decided....
A compromise position might be to store multiple authorships (who committed it into BK, who was the original author, etc.) into the SCM metadata, but I'm not sure we could justify your putting that kind feature into BK, especially when it's likely that the only users of it would be the Linux kernel tree.
- Ted
Quoted 5 lines
A compromise position might be to store multiple authorships (who committed it into BK, who was the original author, etc.) into the SCM metadata, but I'm not sure we could justify your putting that kind feature into BK, especially when it's likely that the only users of it would be the Linux kernel tree.
We're always open to adding new features but we're not going to code around delibrate misuse of the system. We wouldn't be doing you any favors by doing so. If you ever migrate off of BK then you'll need the next system to have those same workarounds.
Go educate Linus that he got this one wrong, he's a reasonable guy, he listens if enough people scream.
Signature · 2 lines
--- Larry McVoy lm at bitmover.com http://www.bitkeeper.com