Patchwork [Bug,5843] New: extdata doesn't support a symbol as a string

login
register
mail settings
Submitter mercurial-bugs@mercurial-scm.org
Date April 18, 2018, 6:20 p.m.
Message ID <bug-5843-285@https.bz.mercurial-scm.org/>
Download mbox | patch
Permalink /patch/31179/
State Not Applicable
Headers show

Comments

mercurial-bugs@mercurial-scm.org - April 18, 2018, 6:20 p.m.
https://bz.mercurial-scm.org/show_bug.cgi?id=5843

            Bug ID: 5843
           Summary: extdata doesn't support a symbol as a string
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla@mercurial-scm.org
          Reporter: durin42@gmail.com
                CC: mercurial-devel@mercurial-scm.org

I'd expect all three of these to work the same way, but the first one fails
pretty mysteriously:


Is this expected, and we should fix the error message, or should we fix extdata
somehow?

Patch

diff --git a/tests/test-extdata.t b/tests/test-extdata.t
--- a/tests/test-extdata.t
+++ b/tests/test-extdata.t
@@ -83,6 +83,11 @@  test bad extdata() template source
   abort: unknown extdata source 'unknown'
   [255]

+Works at top-level of a template:
+  $ hg log -r0 -T "{extdata(notes)}\n"
+  $ hg log -r0 -T "{extdata('notes')}\n"
+  $ hg log -r0 -T '{extdata("notes")}\n'
+
 we don't fix up relative file URLs, but we do run shell commands in repo root

   $ mkdir sub