Mercurial log between two tags -
Mercurial log between two tags -
i want utilize hg log
generate brief changelog covering changes of latest release. releases tagged "v" prefix e.g. "v0.9.1" or "v1.0". possible revsets select range between 2 lastly tags start "v", not including older 1 of 2 tags?
as illustration if have:
changeset 0 changeset 1 tag: v0.1 changeset 2 changeset 3 tag: bar changeset 4 tag: v0.9 changeset 5 tag: foo changeset 6 changeset 7 tag: v1.0 changeset 8i'd select changesets 5 7, if possible without specifying v0.9 , v1.0 using "v" prefix.
if want reply question, "what changed between 2 revisions" have little verbose:
hg log -r 'ancestors(relb) - ancestors(rela)'
this different rela::relb in case there branched development.
consider next history graph:
$ hg glog @ changeset: 7:cb998461fc2f | tag: tip | user: danny sadinoff <danny> | date: fri nov 21 09:28:46 2014 +0000 | summary: added tag relb changeset b37a8f32de1d | o changeset: 6:b37a8f32de1d |\ tag: relb | | parent: 5:187092bb7e9b | | parent: 3:2d5af4e62ad5 | | user: danny sadinoff <danny> | | date: fri nov 21 09:27:47 2014 +0000 | | summary: merged | | | o changeset: 5:187092bb7e9b | | user: danny sadinoff <danny> | | date: fri nov 21 09:27:21 2014 +0000 | | summary: more branch work | | | o changeset: 4:dbfe8f003e51 | | parent: 1:68f933b431ec | | user: danny sadinoff <danny> | | date: fri nov 21 09:26:51 2014 +0000 | | summary: branched dev | | o | changeset: 3:2d5af4e62ad5 | | user: danny sadinoff <danny> | | date: fri nov 21 09:26:17 2014 +0000 | | summary: added tag rela changeset 0ad160ab1455 | | o | changeset: 2:0ad160ab1455 |/ tag: rela | user: danny sadinoff <danny> | date: fri nov 21 09:25:13 2014 +0000 | summary: mainline dev | o changeset: 1:68f933b431ec | user: danny sadinoff <danny> | date: fri nov 21 09:24:18 2014 +0000 | summary: added line | o changeset: 0:4738f4f68f1e user: danny sadinoff <danny> date: fri nov 21 09:23:54 2014 +0000
observe difference between @kevin's result , ancestors() approach:
$ hg log -r 'ancestor(rela, relb)::relb - ancestor(rela, relb)' changeset: 3:2d5af4e62ad5 user: danny sadinoff <danny> date: fri nov 21 09:26:17 2014 +0000 summary: added tag rela changeset 0ad160ab1455 changeset: 6:b37a8f32de1d tag: relb parent: 5:187092bb7e9b parent: 3:2d5af4e62ad5 user: danny sadinoff <danny> date: fri nov 21 09:27:47 2014 +0000 summary: merged
versus ancestors approach, tells whole story.
$ hg log -r 'ancestors(relb) - ancestors(rela)' changeset: 3:2d5af4e62ad5 user: danny sadinoff <danny> date: fri nov 21 09:26:17 2014 +0000 summary: added tag rela changeset 0ad160ab1455 changeset: 4:dbfe8f003e51 parent: 1:68f933b431ec user: danny sadinoff <danny> date: fri nov 21 09:26:51 2014 +0000 summary: branched dev changeset: 5:187092bb7e9b user: danny sadinoff <danny> date: fri nov 21 09:27:21 2014 +0000 summary: more branch work changeset: 6:b37a8f32de1d tag: relb parent: 5:187092bb7e9b parent: 3:2d5af4e62ad5 user: danny sadinoff <danny> date: fri nov 21 09:27:47 2014 +0000 summary: merged
the actual "greatest mutual revision" between 2 revisions seems be:
ancestor(ancestors(relb) - ancestors(rela))
so pretty glog of changes becomes:
$ hg glog -r 'ancestor(ancestors(relb) - ancestors(rela)):: relb' o changeset: 6:b37a8f32de1d |\ tag: relb | | parent: 5:187092bb7e9b | | parent: 3:2d5af4e62ad5 | | user: danny sadinoff <danny@sadinoff.com> | | date: fri nov 21 09:27:47 2014 +0000 | | summary: merged | | | o changeset: 5:187092bb7e9b | | user: danny sadinoff <danny@sadinoff.com> | | date: fri nov 21 09:27:21 2014 +0000 | | summary: more branch work | | | o changeset: 4:dbfe8f003e51 | | parent: 1:68f933b431ec | | user: danny sadinoff <danny@sadinoff.com> | | date: fri nov 21 09:26:51 2014 +0000 | | summary: branched dev | | o | changeset: 3:2d5af4e62ad5 | | user: danny sadinoff <danny@sadinoff.com> | | date: fri nov 21 09:26:17 2014 +0000 | | summary: added tag rela changeset 0ad160ab1455 | | o | changeset: 2:0ad160ab1455 |/ tag: rela | user: danny sadinoff <danny@sadinoff.com> | date: fri nov 21 09:25:13 2014 +0000 | summary: mainline dev | o changeset: 1:68f933b431ec | user: danny sadinoff <danny@sadinoff.com> | date: fri nov 21 09:24:18 2014 +0000 | summary: added line |
mercurial
Comments
Post a Comment