hgext/children.py
changeset 37357 7c8524efd847
parent 37265 923362010525
child 40293 c303d65d2e34
--- 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)