Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a revision hash key. I would like to get the closest revision that contains anything, but the .hgtags.

For instance, consider the following fragment of a Mercurial history:

d:\CI\NC\8.0>hg log -l3 -v
changeset:   1768:633cf1f61665
branch:      8.0
tag:         tip
user:        ci
date:        Wed Nov 16 21:06:20 2011 +0200
files:       .hgtags
description:
Replaced tag 'good.NC.16' with 'rejected.NC.16' for changeset 9451e8f187b1


changeset:   1767:6cad328c622c
branch:      8.0
parent:      1765:9451e8f187b1
user:        ci
date:        Wed Nov 16 21:04:26 2011 +0200
files:       .hgtags
description:
Added tag 'good.NC.16' for changeset 9451e8f187b1


changeset:   1766:17226ae57082
branch:      7.0
parent:      1642:02263135b9b7
user:        Mark Kharitonov <markk@shunra.co.il>
date:        Thu Nov 10 16:20:14 2011 +0200
files:       .hgignore
description:
Ignore more files

In this case, if the given revision is 633cf1f61665, then I am looking for the revision 17226ae57082, because it is the closest one, which contains not just .hgtags, but something else.

How, given 633cf1f61665, can I locate 17226ae57082 using as few hg.exe invocations as possible?

share|improve this question
1  
Exact duplicate: stackoverflow.com/questions/8163689/… – Martin Geisler Dec 25 '11 at 22:31
Of course, it is. I am the author of them both. – mark Dec 25 '11 at 22:43
Right :-) I think one of them should be closed and redirect to the other, otherwise people will spend time trying to answer them in both places. (I spent the last week going through all Mercurial questions on Server Fault and many of them were also duplicates like this.) – Martin Geisler Dec 25 '11 at 22:46

closed as off topic by random Dec 25 '11 at 23:02

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.