From volker.simonis at gmail.com Mon Jan 25 18:58:52 2016 From: volker.simonis at gmail.com (Volker Simonis) Date: Mon, 25 Jan 2016 19:58:52 +0100 Subject: Distinguish between a changeset author and the user who actually pushed a change Message-ID: Hi, is it possible to distinguish the actual user who pushed a change from the author of that change (i.e. the one who is mentioned in the 'user' field of the change set). For example for the following change: https://bugs.openjdk.java.net/browse/JDK-8146979 the bug system correctly reports: URL: http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/rev/c649dde41041 User: dholmes Date: 2016-01-14 03:18:30 +0000 as this change was pushed by the user 'dholmes'. But looking at the actual changeset (http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/rev/c649dde41041) reports: user: simonis date: Wed Jan 13 20:47:17 2016 -0500 which is also correct, because the user 'simonis' is the actual author of that change. Is it possible to get both these users (i.e. the user who pushed and the user who authored the change) from a plain Mercurial clone of the OpenJDK? Thank you and best regards, Volker From alejandro.murillo at oracle.com Tue Jan 26 02:24:25 2016 From: alejandro.murillo at oracle.com (Alejandro E Murillo) Date: Mon, 25 Jan 2016 19:24:25 -0700 Subject: Distinguish between a changeset author and the user who actually pushed a change In-Reply-To: References: Message-ID: <56A6D8D9.5050609@oracle.com> On 1/25/2016 11:58 AM, Volker Simonis wrote: > Hi, > > is it possible to distinguish the actual user who pushed a change from > the author of that change (i.e. the one who is mentioned in the 'user' > field of the change set). > > For example for the following change: > > https://bugs.openjdk.java.net/browse/JDK-8146979 > > the bug system correctly reports: > > URL: http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/rev/c649dde41041 > User: dholmes > Date: 2016-01-14 03:18:30 +0000 > > as this change was pushed by the user 'dholmes'. But looking at the > actual changeset > (http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/rev/c649dde41041) > reports: > > user: simonis > date: Wed Jan 13 20:47:17 2016 -0500 > > which is also correct, because the user 'simonis' is the actual author > of that change. > > Is it possible to get both these users (i.e. the user who pushed and > the user who authored the change) from a plain Mercurial clone of the > OpenJDK? > > Thank you and best regards, > Volker hgupdater receives both the pusher and author usernames, and it uses the pusher's to create the log in JBS. looks to me like the username of the pusher is determined by the hook (from the ssh user name I suspect. I didn't check the details) and sent to hgupdater along with the changeset's author, but mercurial itself does not seem to care about the pusher's username, so it's not persisted in the repo. In General -pv shows a lot more info about a changeset, but the pusher is not included, so I don't think is persisted I suspect the use of the pusher by hgupdater was deliberate, in order to keep track of the actual pusher, otherwise it wouldn't be recorded anywhere -- Alejandro From iris.clark at oracle.com Tue Jan 26 02:59:51 2016 From: iris.clark at oracle.com (Iris Clark) Date: Mon, 25 Jan 2016 18:59:51 -0800 (PST) Subject: Distinguish between a changeset author and the user who actually pushed a change In-Reply-To: References: Message-ID: <6cfc8215-0c0c-4091-b605-a7f60f7100a2@default> Hi, Volker. I'm not a Mercurial expert, but I don't believe that it is possible to identify the pusher of a changeset from the repository itself. A repository's changelog is just a collection of changesets. When a changeset is committed, the hash is computed based on the actual code change and any identifying information such as the comment, author, date, and parent(s?). The pusher isn't known until push occurs, which may be an arbitrary time after the commit. The server can't add the pusher information to the changeset since doing so would alter the hash. It looks like hgupdater (the tool which updates the bug system) independently logs the pusher. Thanks, iris -----Original Message----- From: Volker Simonis [mailto:volker.simonis at gmail.com] Sent: Monday, January 25, 2016 10:59 AM To: hg-tools-dev Subject: Distinguish between a changeset author and the user who actually pushed a change Hi, is it possible to distinguish the actual user who pushed a change from the author of that change (i.e. the one who is mentioned in the 'user' field of the change set). For example for the following change: https://bugs.openjdk.java.net/browse/JDK-8146979 the bug system correctly reports: URL: http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/rev/c649dde41041 User: dholmes Date: 2016-01-14 03:18:30 +0000 as this change was pushed by the user 'dholmes'. But looking at the actual changeset (http://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/rev/c649dde41041) reports: user: simonis date: Wed Jan 13 20:47:17 2016 -0500 which is also correct, because the user 'simonis' is the actual author of that change. Is it possible to get both these users (i.e. the user who pushed and the user who authored the change) from a plain Mercurial clone of the OpenJDK? Thank you and best regards, Volker From weijun.wang at oracle.com Tue Jan 26 04:14:33 2016 From: weijun.wang at oracle.com (Wang Weijun) Date: Tue, 26 Jan 2016 12:14:33 +0800 Subject: Distinguish between a changeset author and the user who actually pushed a change In-Reply-To: References: Message-ID: > On Jan 26, 2016, at 2:58 AM, Volker Simonis wrote: > > Is it possible to get both these users (i.e. the user who pushed and > the user who authored the change) from a plain Mercurial clone of the > OpenJDK? What do you want to use it for? BTW, I don't think there is a pusher. I push a changeset to jdk9/dev, someone else push it to jdk9/jdk9, and now there are 2 pushers. Maybe it's possible to add a committer, but what if you export your changeset and ask me to push it? --Max From volker.simonis at gmail.com Tue Jan 26 10:02:50 2016 From: volker.simonis at gmail.com (Volker Simonis) Date: Tue, 26 Jan 2016 11:02:50 +0100 Subject: Distinguish between a changeset author and the user who actually pushed a change In-Reply-To: References: Message-ID: Hi everybody, thanks for all your comments. Your answers confirm my assumptions that this is currently not possible with plain OpenJDK Mercurial repositories. Mozilla seems to have a Mercurial extension for this use case [1] but it doesn't seems to be be used in OpenJDK. Thanks again and best regards, Volker [1] http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmo/pushlog.html On Tue, Jan 26, 2016 at 5:14 AM, Wang Weijun wrote: >> On Jan 26, 2016, at 2:58 AM, Volker Simonis wrote: >> >> Is it possible to get both these users (i.e. the user who pushed and >> the user who authored the change) from a plain Mercurial clone of the >> OpenJDK? > > What do you want to use it for? > > BTW, I don't think there is a pusher. I push a changeset to jdk9/dev, someone else push it to jdk9/jdk9, and now there are 2 pushers. Maybe it's possible to add a committer, but what if you export your changeset and ask me to push it? > > --Max > From chris.hegarty at oracle.com Tue Jan 26 10:07:34 2016 From: chris.hegarty at oracle.com (Chris Hegarty) Date: Tue, 26 Jan 2016 10:07:34 +0000 Subject: Distinguish between a changeset author and the user who actually pushed a change In-Reply-To: References: Message-ID: <92B6508E-6EC9-480F-BF30-FEB8991578F4@oracle.com> It is of course a little hacky, but the ?XXX-changes at o.j.n? mailing archives contain the information you are looking for. -Chris. On 26 Jan 2016, at 10:02, Volker Simonis wrote: > Hi everybody, > > thanks for all your comments. Your answers confirm my assumptions that > this is currently not possible with plain OpenJDK Mercurial > repositories. > > Mozilla seems to have a Mercurial extension for this use case [1] but > it doesn't seems to be be used in OpenJDK. > > Thanks again and best regards, > Volker > > [1] http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmo/pushlog.html > > On Tue, Jan 26, 2016 at 5:14 AM, Wang Weijun wrote: >>> On Jan 26, 2016, at 2:58 AM, Volker Simonis wrote: >>> >>> Is it possible to get both these users (i.e. the user who pushed and >>> the user who authored the change) from a plain Mercurial clone of the >>> OpenJDK? >> >> What do you want to use it for? >> >> BTW, I don't think there is a pusher. I push a changeset to jdk9/dev, someone else push it to jdk9/jdk9, and now there are 2 pushers. Maybe it's possible to add a committer, but what if you export your changeset and ask me to push it? >> >> --Max >> From weijun.wang at oracle.com Tue Jan 26 10:23:05 2016 From: weijun.wang at oracle.com (Wang Weijun) Date: Tue, 26 Jan 2016 18:23:05 +0800 Subject: Distinguish between a changeset author and the user who actually pushed a change In-Reply-To: <92B6508E-6EC9-480F-BF30-FEB8991578F4@oracle.com> References: <92B6508E-6EC9-480F-BF30-FEB8991578F4@oracle.com> Message-ID: <859BD053-FC79-44CF-BBC1-AC8C0CC10CDB@oracle.com> > On Jan 26, 2016, at 6:07 PM, Chris Hegarty wrote: > > It is of course a little hacky, but the ?XXX-changes at o.j.n? mailing archives contain the > information you are looking for. Correct. In fact, I don't understand how pushlog works. A push can happen anywhere, people push to jdk9/dev, jdk9/client or jdk9/hs-*. There are even invisible people pushing to the non-existent jdk9/cpu. All of them end up into jdk9/jdk9 and then synced back. While the repo is distributed, it looks like the pushlog is always local. --Max > > -Chris. > > On 26 Jan 2016, at 10:02, Volker Simonis wrote: > >> Hi everybody, >> >> thanks for all your comments. Your answers confirm my assumptions that >> this is currently not possible with plain OpenJDK Mercurial >> repositories. >> >> Mozilla seems to have a Mercurial extension for this use case [1] but >> it doesn't seems to be be used in OpenJDK. >> >> Thanks again and best regards, >> Volker >> >> [1] http://mozilla-version-control-tools.readthedocs.org/en/latest/hgmo/pushlog.html >> >> On Tue, Jan 26, 2016 at 5:14 AM, Wang Weijun wrote: >>>> On Jan 26, 2016, at 2:58 AM, Volker Simonis wrote: >>>> >>>> Is it possible to get both these users (i.e. the user who pushed and >>>> the user who authored the change) from a plain Mercurial clone of the >>>> OpenJDK? >>> >>> What do you want to use it for? >>> >>> BTW, I don't think there is a pusher. I push a changeset to jdk9/dev, someone else push it to jdk9/jdk9, and now there are 2 pushers. Maybe it's possible to add a committer, but what if you export your changeset and ask me to push it? >>> >>> --Max >>> >