--- a/hgext3rd/evolve/utility.py Thu Feb 07 16:24:59 2019 +0800
+++ b/hgext3rd/evolve/utility.py Wed Jan 30 10:03:00 2019 -0800
@@ -164,7 +164,7 @@
promptmsg = customheader + "\n"
for idx, rev in enumerate(revs):
curctx = repo[rev]
- revmsg = "%d: [%s] %s\n" % (idx, curctx,
+ revmsg = "%d: [%s] %s\n" % (idx + 1, curctx,
curctx.description().split("\n")[0])
promptmsg += revmsg
@@ -181,9 +181,9 @@
ui.write_err(_("invalid value '%s' entered for index\n") % idxselected)
return None
- if intidx >= len(revs) or intidx < 0:
+ if intidx > len(revs) or intidx <= 0:
# we can make this error message better
ui.write_err(_("invalid value '%d' entered for index\n") % intidx)
return None
- return revs[intidx]
+ return revs[intidx - 1]