Is there a way to list heads that were created by a specific user?
With the hg heads
command I am unable to filter on user.
While with hg log
I can filter on a user, but am unable to figure out how to list only the last changeset on a branch.
UPDATE:
Thanks to Tim Henigan's answer below. I arrived at the following conclusion.
log -r "head() and not closed() and user('<username>')"
In my particular case I wanted only the latest heads in reverse order so I made an alias for this functionality.
[alias]
myhist = log -r "reverse(head() and not closed() and user('<username>'))" --template "{rev}: {branches}\n" -l 10
so that calling hg myhist
gives me up to ten recent changesets which are all the last one on their branch. I am using the --template
option to only see the revision number and branch name so as to get a quick overview of my recent activity.
A head is a changeset with no child changesets. The tip is the most recently changed head. Other heads are recent pulls into a repository that have not yet been merged. If you have just made a commit, that commit will be the tip.
Mercurial groups related changes to multiple files into single atomic changesets, which are revisions of the whole project. These each get a sequential revision number. Because Mercurial allows distributed parallel development, these revision numbers may disagree between users.
Pull changes from the Mercurial upstream (Pull)From the main menu, choose Hg | Mercurial | Pull. Specify the required URL address of the source remote repository.
If you are using a newer version of Mercurial, you can build this query using revsets:
hg log -r "heads(all()) and not closed() and user('<user>')"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With