I wan't to determine the age of the "foo" branch. As I understand it is impossible to get this info straight. I trying to write command that will find information about first commit on the "foo" branch.
hg log -r "parents(min(branch(foo)))"
This one returns not exactly what I want. Can somebody help me?
I should write it without parents
:
hg log -r "min(branch(foo))"
Now it does what I need.
Does this give you what you need?
hg log -r "branch(default) and 0:" -l 1 --template "{date|isodate}\n"
I think this gives you the date of the first changeset on the named branch.
So, first changeset on branch "testbranch"
% hg log -r "branch(testbranch) and 0:" -l 1
changeset: 107:bd91c8e6fa5f
branch: testbranch
user: Nick Pierpoint
date: Fri May 15 15:16:44 2015 +0100
summary: test one
... adding the template
just to get the date:
% hg log -r "branch(testbranch) and 0:" -l 1 --template "{date|isodate}\n"
2015-05-15 15:16 +0100
Your min
also works if you always want to return a single changeset:
% hg log -r "min(branch(testbranch))"
changeset: 107:bd91c8e6fa5f
branch: testbranch
user: Nick Pierpoint <[email protected]>
date: Fri May 15 15:16:44 2015 +0100
summary: test one
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