Determining Changes In The OpenSolaris Mercurial World
By user12607856 on Oct 23, 2008
Coming from the GNOME open source development world, I'm used to seeing active discussion in the GNOME bugs, including patch attachments for the proposed fixes, and then a ChangeLog entry that lists the files that have changed and a description of the fix.
The way that the OpenSolaris pkg engineers work is different. They've got their own equivalent Bugzilla bug database, but patch attachments are rare, and usually the last comment in the bug is something like:
Fixed in changeset ee3df64105403de274760b7de3bf78546105350b
which is not immediately useful if you want to see how the bug was fixed.
But it's not too much more work to derive a patch from that or a list of files that have changed, if you know the appropriate magical incantations.
First, find a wizard. In my case, I asked Danek Duvall.
Here's an example based on a recent change of mine to the pkg source workspace to make a slight adjustment to the fix for bug #2198. You'll see the last changeset value in comment #13. Let's turn that into a patch and a list of files that were changed.
If you want to follow along at home, you will need to first checkout a copy of the hg workspace:
$ hg clone ssh://email@example.com/hg/pkg/gate
To get a list of files that changed in a particular rev, first look at the log:
$ cd gate $ hg log | more changeset: 619:ee3df6410540 tag: tip user: Rich Burridge <...> date: Thu Oct 23 08:08:45 2008 -0700 summary: 2198 Need cluster packaging for OpenOffice.org 3.0 (fix versioning) changeset: 618:7be9399f34fc user: Bart Smaalders <...> date: Wed Oct 22 18:51:16 2008 -0700 summary: 4174 need hostid workaround for build 100a ...
From that, to get a list of the files that changed between rev #618 and #619, do:
$ hg stat --rev 618:619
To get a list of the changes in diff (patch) format for rev #619, you simply do:
$ hg log -p -r ee3df6410540