Patchwork D3085: children: support specifying revision by revset

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 12:51 a.m.
Message ID <1d8b9fa8f86462b86a650da5aa920e68@localhost.localdomain>
Download mbox | patch
Permalink /patch/30313/
State Not Applicable
Headers show

Comments

phabricator - April 5, 2018, 12:51 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3c5331915f0b: children: support specifying revision by revset (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3085?vs=7659&id=7671

REVISION DETAIL
  https://phab.mercurial-scm.org/D3085

AFFECTED FILES
  hgext/children.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/hgext/children.py b/hgext/children.py
--- a/hgext/children.py
+++ b/hgext/children.py
@@ -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)