hgtemplates: synchronize templates with Mercurial 3.8.4; r?smacleod draft
authorGregory Szorc <gps@mozilla.com>
Tue, 30 Aug 2016 18:15:04 -0700
changeset 9486 53bb7c72e76bc613afa8b1779b962fcf1dffd336
parent 9485 bb8e0391c8bd95431e3e9a50e79993aab42d657c
child 9487 3df58e7074a17c06129272717c6bd7fe674ed646
child 9494 fdb525fc1d07ec061cc1b0faacb59c8c22776bfc
child 9497 900df1cf8a62e36f8cded2db10c78205bfc19127
push id1193
push userbmo:gps@mozilla.com
push dateThu, 01 Sep 2016 18:31:18 +0000
reviewerssmacleod
hgtemplates: synchronize templates with Mercurial 3.8.4; r?smacleod Changes between Mercurial 3.7 and 3.8.4 were applied to our local copy. MozReview-Commit-ID: 8uAX4y5uWkD
hgtemplates/atom/bookmarks.tmpl
hgtemplates/atom/branches.tmpl
hgtemplates/json/map
hgtemplates/map-cmdline.compact
hgtemplates/map-cmdline.status
--- a/hgtemplates/atom/bookmarks.tmpl
+++ b/hgtemplates/atom/bookmarks.tmpl
@@ -1,11 +1,11 @@
 {header}
  <id>{urlbase}{url|urlescape}</id>
  <link rel="self" href="{urlbase}{url|urlescape}atom-bookmarks"/>
  <link rel="alternate" href="{urlbase}{url|urlescape}bookmarks"/>
  <title>{repo|escape}: bookmarks</title>
  <summary>{repo|escape} bookmark history</summary>
  <author><name>Mercurial SCM</name></author>
- {latestentry%feedupdated}
+ {lastchange%feedupdated}
 
 {entries%bookmarkentry}
 </feed>
--- a/hgtemplates/atom/branches.tmpl
+++ b/hgtemplates/atom/branches.tmpl
@@ -1,11 +1,11 @@
 {header}
  <id>{urlbase}{url|urlescape}</id>
- <link rel="self" href="{urlbase}{url|urlescape}atom-tags"/>
- <link rel="alternate" href="{urlbase}{url|urlescape}tags"/>
+ <link rel="self" href="{urlbase}{url|urlescape}atom-branches"/>
+ <link rel="alternate" href="{urlbase}{url|urlescape}branches"/>
  <title>{repo|escape}: branches</title>
  <summary>{repo|escape} branch history</summary>
  <author><name>Mercurial SCM</name></author>
  {latestentry%feedupdated}
 
  {entries%branchentry}
 </feed>
--- a/hgtemplates/json/map
+++ b/hgtemplates/json/map
@@ -31,50 +31,51 @@ filerevision = '"not yet implemented"'
 search = '"not yet implemented"'
 # changelog and shortlog are the same web API but with different
 # number of entries.
 changelog = changelist.tmpl
 shortlog = changelist.tmpl
 changelistentry = '\{
   "node": {node|json},
   "date": {date|json},
-  "desc": {desc|json},
+  "desc": {desc|utf8|json},
   "bookmarks": [{join(bookmarks%changelistentryname, ", ")}],
   "tags": [{join(tags%changelistentryname, ", ")}],
-  "user": {author|json}
+  "user": {author|utf8|json},
+  "parents": [{join(allparents%changesetparent, ", ")}]
   }'
-changelistentryname = '{name|json}'
+changelistentryname = '{name|utf8|json}'
 changeset = '\{
   "node": {node|json},
   "date": {date|json},
-  "desc": {desc|json},
+  "desc": {desc|utf8|json},
   "backedoutby": {if(backedoutbynode, backedoutbynode|json, ""|json)},
   "branch": {if(branch, branch%changesetbranch, "default"|json)},
   "bookmarks": [{join(changesetbookmark, ", ")}],
   "tags": [{join(changesettag, ", ")}],
-  "user": {author|json},
+  "user": {author|utf8|json},
   "parents": [{join(parent%changesetparent, ", ")}],
   "phase": {phase|json},
   "pushid": {pushid|json},
   "pushdate": {pushdate|json},
   "pushuser": {pushuser|json}
   }'
-changesetbranch = '{name|json}'
-changesetbookmark = '{bookmark|json}'
-changesettag = '{tag|json}'
+changesetbranch = '{name|utf8|json}'
+changesetbookmark = '{bookmark|utf8|json}'
+changesettag = '{tag|utf8|json}'
 changesetparent = '{node|json}'
 manifest = '\{
   "node": {node|json},
   "abspath": {path|json},
   "directories": [{join(dentries%direntry, ", ")}],
   "files": [{join(fentries%fileentry, ", ")}],
   "bookmarks": [{join(bookmarks%name, ", ")}],
   "tags": [{join(tags%name, ", ")}]
   }'
-name = '{name|json}'
+name = '{name|utf8|json}'
 direntry = '\{
   "abspath": {path|json},
   "basename": {basename|json},
   "emptydirs": {emptydirs|json}
   }'
 fileentry = '\{
   "abspath": {file|json},
   "basename": {basename|json},
@@ -82,45 +83,45 @@ fileentry = '\{
   "size": {size|json},
   "flags": {permissions|json}
   }'
 tags = '\{
   "node": {node|json},
   "tags": [{join(entriesnotip%tagentry, ", ")}]
   }'
 tagentry = '\{
-  "tag": {tag|json},
+  "tag": {tag|utf8|json},
   "node": {node|json},
   "date": {date|json}
   }'
 bookmarks = '\{
   "node": {node|json},
   "bookmarks": [{join(entries%bookmarkentry, ", ")}]
   }'
 bookmarkentry = '\{
-  "bookmark": {bookmark|json},
+  "bookmark": {bookmark|utf8|json},
   "node": {node|json},
   "date": {date|json}
   }'
 branches = '\{
   "branches": [{join(entries%branchentry, ", ")}]
   }'
 branchentry = '\{
-  "branch": {branch|json},
+  "branch": {branch|utf8|json},
   "node": {node|json},
   "date": {date|json},
   "status": {status|json}
   }'
 summary = '"not yet implemented"'
 filediff = '\{
   "path": {file|json},
   "node": {node|json},
   "date": {date|json},
-  "desc": {desc|json},
-  "author": {author|json},
+  "desc": {desc|utf8|json},
+  "author": {author|utf8|json},
   "parents": [{join(parent%changesetparent, ", ")}],
   "children": [{join(child%changesetparent, ", ")}],
   "diff": [{join(diff%diffblock, ", ")}]
   }'
 diffblock = '\{
   "blockno": {blockno|json},
   "lines": [{join(lines, ", ")}]
   }'
@@ -143,18 +144,18 @@ diffline = '\{
   "t": "",
   "n": {lineno|json},
   "l": {line|json}
   }'
 filecomparison = '\{
   "path": {file|json},
   "node": {node|json},
   "date": {date|json},
-  "desc": {desc|json},
-  "author": {author|json},
+  "desc": {desc|utf8|json},
+  "author": {author|utf8|json},
   "parents": [{join(parent%changesetparent, ", ")}],
   "children": [{join(child%changesetparent, ", ")}],
   "leftnode": {leftnode|json},
   "rightnode": {rightnode|json},
   "comparison": [{join(comparison, ", ")}]
   }'
 comparisonblock = '\{
   "lines": [{join(lines, ", ")}]
@@ -164,28 +165,28 @@ comparisonline = '\{
   "ln": {leftlineno|json},
   "ll": {leftline|json},
   "rn": {rightlineno|json},
   "rl": {rightline|json}
   }'
 fileannotate = '\{
   "abspath": {file|json},
   "node": {node|json},
-  "author": {author|json},
+  "author": {author|utf8|json},
   "date": {date|json},
-  "desc": {desc|json},
+  "desc": {desc|utf8|json},
   "parents": [{join(parent%changesetparent, ", ")}],
   "children": [{join(child%changesetparent, ", ")}],
   "permissions": {permissions|json},
   "annotate": [{join(annotate%fileannotation, ", ")}]
   }'
 fileannotation = '\{
   "node": {node|json},
-  "author": {author|json},
-  "desc": {desc|json},
+  "author": {author|utf8|json},
+  "desc": {desc|utf8|json},
   "abspath": {file|json},
   "targetline": {targetline|json},
   "line": {line|json},
   "lineno": {lineno|json},
   "revdate": {revdate|json}
   }'
 filelogentry = '\{
   "node": {node|json},
@@ -201,17 +202,26 @@ filelog = '\{
    }'
 graph = '"not yet implemented"'
 helptopics = '\{
   "topics": [{join(topics%helptopicentry, ", ")}],
   "earlycommands": [{join(earlycommands%helptopicentry, ", ")}],
   "othercommands": [{join(othercommands%helptopicentry, ", ")}]
   }'
 helptopicentry = '\{
-  "topic": {topic|json},
-  "summary": {summary|json}
+  "topic": {topic|utf8|json},
+  "summary": {summary|utf8|json}
   }'
 help = '\{
-  "topic": {topic|json},
-  "rawdoc": {doc|json}
+  "topic": {topic|utf8|json},
+  "rawdoc": {doc|utf8|json}
   }'
 filenodelink = ''
 filenolink = ''
+index = '\{
+  "entries": [{join(entries%indexentry, ", ")}]
+  }'
+indexentry = '\{
+  "name": {name|utf8|json},
+  "description": {description|utf8|json},
+  "contact": {contact|utf8|json},
+  "lastchange": {lastchange|json}
+  }'
\ No newline at end of file
--- a/hgtemplates/map-cmdline.compact
+++ b/hgtemplates/map-cmdline.compact
@@ -1,12 +1,30 @@
-changeset = '{rev}{tags}{bookmarks}{parents}   {node|short}   {date|isodate}   {author|user}\n  {desc|firstline|strip}\n\n'
-changeset_quiet = '{rev}:{node|short}\n'
-changeset_verbose = '{rev}{tags}{parents}   {node|short}   {date|isodate}   {author}\n  {desc|strip}\n\n'
+ldate = '{label("log.date",
+                "{date|isodate}")}'
+
+ldesc = '{label('ui.note log.description',
+                      '{desc|strip}')}'
+ldescfirst = '{label('ui.note log.description',
+                     '{desc|firstline|strip}')}'
+
+changeset = '{lrev}{tags}{bookmarks}{parents}   {lnode}   {ldate}   {luser}\n  {ldescfirst}\n\n'
+changeset_quiet = '{lrev}:{lnode}\n'
+changeset_verbose = '{lrev}{tags}{parents}   {lnode}   {ldate}   {lauthor}\n  {ldesc}\n\n'
+lrev = '{label("log.changeset changeset.{phase}",
+              "{rev}")}'
+lnode = '{label("log.node",
+                "{node|short}")}'
+lauthor = '{label("log.user",
+                  "{author}")}'
+luser = '{label("log.user",
+                "{author|user}")}'
 start_tags = '['
-tag = '{tag},'
+tag = '{label("log.tag",
+              "{tag},")}'
 last_tag = '{tag}]'
 start_parents = ':'
-parent = '{rev},'
-last_parent = '{rev}'
+parent = '{lrev},'
+last_parent = '{lrev}'
 start_bookmarks = '['
-bookmark = '{bookmark},'
+bookmark = '{label("log.bookmark",
+                   "{bookmark},")}'
 last_bookmark = '{bookmark}]'
--- a/hgtemplates/map-cmdline.status
+++ b/hgtemplates/map-cmdline.status
@@ -3,23 +3,18 @@
 # Override base templates
 changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}{lfiles}\n'
 changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{description}{lfiles}\n'
 changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{extras}{description}{lfiles}\n'
 
 # Override the file templates
 lfiles = '{if(files,
               label('ui.note log.files',
-                    'files:\n'))}{lfile_mods}{lfile_adds}{lfile_copies_switch}{lfile_dels}'
+                    'files:\n'))}{lfile_mods}{lfile_adds}{lfile_dels}'
 
-# Exclude copied files, will display those in lfile_copies_switch
-lfile_adds  = '{file_adds % "{ifcontains(file, file_copies_switch,
-                                         '',
-                                         '{lfile_add}')}"}'
+lfile_adds = '{file_adds % "{lfile_add}{lfile_src}"}'
+lfile_mods = '{file_mods % "{lfile_mod}{lfile_src}"}'
 lfile_add = '{label("status.added", "A {file}\n")}'
-
-lfile_copies_switch = '{file_copies_switch % "{lfile_copy_orig}{lfile_copy_dest}"}'
-lfile_copy_orig = '{label("status.added", "A {name}\n")}'
-lfile_copy_dest = '{label("status.copied", "  {source}\n")}'
-
-lfile_mods = '{file_mods % "{label('status.modified', 'M {file}\n')}"}'
+lfile_mod = '{label("status.modified", "M {file}\n")}'
+lfile_src = '{ifcontains(file, file_copies_switch,
+              label("status.copied", "  {get(file_copies_switch, file)}\n"))}'
 
 lfile_dels = '{file_dels % "{label('status.removed', 'R {file}\n')}"}'