diff -r 004e5c5821b2 -r 7c8524efd847 hgext/children.py --- a/hgext/children.py Wed Apr 04 15:08:26 2018 -0700 +++ b/hgext/children.py Thu Apr 05 14:21:37 2018 +0530 @@ -22,6 +22,7 @@ logcmdutil, pycompat, registrar, + scmutil, ) templateopts = cmdutil.templateopts @@ -59,11 +60,11 @@ """ opts = pycompat.byteskwargs(opts) rev = opts.get('rev') + ctx = scmutil.revsingle(repo, rev) if file_: - fctx = repo.filectx(file_, changeid=rev) + fctx = repo.filectx(file_, changeid=ctx.rev()) childctxs = [fcctx.changectx() for fcctx in fctx.children()] else: - ctx = repo[rev] childctxs = ctx.children() displayer = logcmdutil.changesetdisplayer(ui, repo, opts)