Not much to add to the title. hg branches --help --verbose
doesn't show anything useful, although I'm not sure if the user can be shown via the --template
option (in this case tools like grep
could help). Or may be I'm looking in the wrong direction?
Automating this search would be really useful because there are a lot of unclosed branches in the current project and that would help for both checking if I left some opened branch and suggesting collegues to take a look at certain branches.
Bashism of @Jello is rather good, but... it's bashism.
Some steps (not ready to use solution) to almost pure hg-style
hg help revsets
+ hg help templates
All starting points of branches (named and anonymous) are child of branchpoints. All changesets have authors. Because every branch may have any amounts branchpoints in it (and every branchpoint means 2 branches of child), branchnames can be duplicated in output of suggested command (and I'm too lazy to clean-up it)
Task 1 - find all starting revisions of branches
-r "children(branchpoint())"
Task 2 - output only branch and author of changeset
--template "{branch} - {author}"
full command (T1+T2, all branches of all users), somrthing like this
hg log -r "children(branchpoint())" --template "{branch} - {author}\n"
as starting point.
You can:
ifeq
logic into template (don't print "old" branchname for changesets with
branch(r)=branch(p1))
Try a bash loop like this:
for branch in $(hg branches -q); do hg log -r "branch($branch)and 0:" -u "username" -l 1; done
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