[Bug 5534] New: Add subscript support to template lists

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue Apr 11 23:33:46 UTC 2017


https://bz.mercurial-scm.org/show_bug.cgi?id=5534

            Bug ID: 5534
           Summary: Add subscript support to template lists
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: templater
          Assignee: bugzilla at mercurial-scm.org
          Reporter: matt_harbison at yahoo.com
                CC: mercurial-devel at mercurial-scm.org

It would be nice to be able to do something like this to get the last tag in
the list, when there are multiple tags on one revision:

   hg log -r . -T '{latesttag[-1]}'

That much is pretty simple, but the [] syntax cries out for dictionary support
(even though there's a get() method), and maybe list slicing with [:].

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list