templates: upgrade templates for Mercurial 4.8 compatibility (Bug 1501686) r=gps
authorConnor Sheehan <sheehan@mozilla.com>
Tue, 06 Nov 2018 03:24:03 +0000
changeset 6710 084a352be3be5bb9e23fc994efd80ca282ff46bf
parent 6709 44468bade5404c4bef6fb574b452f6479d5dcd49
child 6711 d495609b21ef2a8f805cb26ac9f8728d7d4714a3
push id3319
push usergszorc@mozilla.com
push dateTue, 06 Nov 2018 21:55:57 +0000
treeherderversion-control-tools@a604d7375ed7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1501686
templates: upgrade templates for Mercurial 4.8 compatibility (Bug 1501686) r=gps Following the process at `docs/hgmo/upgrading.rst`, this commit upgrades `gitweb_mozilla` for use with Mercurial 4.8. Differential Revision: https://phabricator.services.mozilla.com/D10972
hgserver/tests/test-template-sync.t
hgtemplates/json/map
hgtemplates/map-cmdline.bisect
hgtemplates/map-cmdline.default
hgtemplates/map-cmdline.phases
hgtemplates/map-cmdline.status
--- a/hgserver/tests/test-template-sync.t
+++ b/hgserver/tests/test-template-sync.t
@@ -4,17 +4,17 @@ and exactly produce the gitweb_mozilla t
 Create a repo so we can test differences against v-c-t
 
   $ hg init templates
   $ cd templates
 
 Run script to apply our templates changes
 
   $ $TESTDIR/hgtemplates/.patches/mozify-templates.py \
-  >   $TESTDIR/venv/mercurials/4.7.2/lib/python2.7/site-packages/mercurial/templates \
+  >   $TESTDIR/venv/mercurials/4.8/lib/python2.7/site-packages/mercurial/templates \
   >   $TESTDIR/hgtemplates \
   >   `pwd`/hgtemplates
   adding atom/bookmarkentry.tmpl
   adding atom/bookmarks.tmpl
   adding atom/branchentry.tmpl
   adding atom/branches.tmpl
   adding atom/changelog.tmpl
   adding atom/changelogentry.tmpl
@@ -193,16 +193,18 @@ Run script to apply our templates change
   replacing b'<a href="{url|urlescape}'... in $TESTTMP/templates/hgtemplates/gitweb_mozilla/tags.tmpl
   committing automated transformations
   applying patch atom.patch
   applying patch from stdin
   applying patch firefoxreleases.patch
   applying patch from stdin
   applying patch json.patch
   applying patch from stdin
+  patching file hgtemplates/json/map
+  Hunk #1 succeeded at 4 with fuzz 1 (offset 2 lines).
   applying patch logo.patch
   applying patch from stdin
   patching file hgtemplates/static/style-gitweb.css
   Hunk #1 succeeded at 78 with fuzz 1 (offset 1 lines).
   applying patch pushlog-header.patch
   applying patch from stdin
   applying patch link-atom.patch
   applying patch from stdin
--- a/hgtemplates/json/map
+++ b/hgtemplates/json/map
@@ -1,10 +1,12 @@
+default = 'shortlog'
 mimetype = 'application/json'
 
+
 error = '{error|json}'
 info = '\{
   {join(csets%infocset, ",\n")}
   }'
 infocset = '"{node|short}": \{
   "branch": {branch|json},
   "children": {children|json},
   "date": {date(date, "%Y-%m-%d %H:%M %1%2")|json},
@@ -292,8 +294,11 @@ firefoxreleasebuild = '\{
   }'
 repoinfo = '\{
   "group_owner": {groupowner|json}
   }'
 automationrelevance = '\{
   "changesets": {changesets|json},
   "visible": {visible|json}
   }'
+error = '\{
+  "error": {error|utf8|json}
+  }'
--- a/hgtemplates/map-cmdline.bisect
+++ b/hgtemplates/map-cmdline.bisect
@@ -1,15 +1,15 @@
 %include map-cmdline.default
 
 [templates]
-changeset = '{cset}{lbisect}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}\n'
+changeset = '{cset}{lbisect}{branches}{bookmarks}{tags}{parents}{luser}{ldate}{summary}\n'
 changeset_quiet = '{lshortbisect} {rev}:{node|short}\n'
-changeset_verbose = '{cset}{lbisect}{branches}{bookmarks}{tags}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
-changeset_debug = '{fullcset}{lbisect}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
+changeset_verbose = '{cset}{lbisect}{branches}{bookmarks}{tags}{parents}{luser}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
+changeset_debug = '{fullcset}{lbisect}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{luser}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
 
 # We take the zeroth word in order to omit "(implicit)" in the label
 bisectlabel = ' bisect.{word('0', bisect)}'
 
 lbisect ='{label("log.bisect{if(bisect, bisectlabel)}",
                                 "bisect:      {bisect}\n")}'
 lshortbisect ='{label("log.bisect{if(bisect, bisectlabel)}",
                                     "{bisect|shortbisect}")}'
--- a/hgtemplates/map-cmdline.default
+++ b/hgtemplates/map-cmdline.default
@@ -1,16 +1,16 @@
 # Base templates. Due to name clashes with existing keywords, we have
 # to replace some keywords with 'lkeyword', for 'labelled keyword'
 
 [templates]
-changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{ltroubles}{lobsfate}{summary}\n'
+changeset = '{cset}{branches}{bookmarks}{tags}{parents}{luser}{ldate}{ltroubles}{lobsfate}{summary}\n'
 changeset_quiet = '{lnode}'
-changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{ltroubles}{lobsfate}{lfiles}{lfile_copies_switch}{description}\n'
-changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{ltroubles}{lobsfate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
+changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{luser}{ldate}{ltroubles}{lobsfate}{lfiles}{lfile_copies_switch}{description}\n'
+changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{luser}{ldate}{ltroubles}{lobsfate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
 
 # File templates
 lfiles = '{if(files,
                label("ui.note log.files",
                      "files:       {files}\n"))}'
 
 lfile_mods = '{if(file_mods,
                   label("ui.debug log.files",
@@ -49,18 +49,18 @@ branch = '{label("log.branch",
                  "branch:      {branch}")}\n'
 
 tag = '{label("log.tag",
               "tag:         {tag}")}\n'
 
 bookmark = '{label("log.bookmark",
                    "bookmark:    {bookmark}")}\n'
 
-user = '{label("log.user",
-               "user:        {author}")}\n'
+luser = '{label("log.user",
+                "user:        {author}")}\n'
 
 summary = '{if(desc|strip, "{label('log.summary',
                                    'summary:     {desc|firstline}')}\n")}'
 
 ldate = '{label("log.date",
                 "date:        {date|date}")}\n'
 
 ltroubles = '{if(instabilities, "{label('log.instability',
@@ -69,17 +69,17 @@ ltroubles = '{if(instabilities, "{label(
 extra = '{label("ui.debug log.extra",
                 "extra:       {key}={value|stringescape}")}\n'
 
 description = '{if(desc|strip, "{label('ui.note log.description',
                                        'description:')}
                                 {label('ui.note log.description',
                                        '{desc|strip}')}\n\n")}'
 
-status = '{status} {path}\n{if(copy, "  {copy}\n")}'
+status = '{status} {path|relpath}\n{if(source, "  {source|relpath}\n")}'
 
 # Obsfate templates, it would be removed once we introduce the obsfate
 # template fragment
 lobsfate = '{if(obsfate, "{label('log.obsfate', '{obsfate % "obsolete:    {fate}\n"}')}")}'
 
 [templatealias]
 labelcset(expr) = label(separate(" ",
                                  "log.changeset",
--- a/hgtemplates/map-cmdline.phases
+++ b/hgtemplates/map-cmdline.phases
@@ -1,5 +1,5 @@
 %include map-cmdline.default
 
 [templates]
-changeset = '{cset}{branches}{bookmarks}{tags}{lphase}{parents}{user}{ldate}{summary}\n'
-changeset_verbose = '{cset}{branches}{bookmarks}{tags}{lphase}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
+changeset = '{cset}{branches}{bookmarks}{tags}{lphase}{parents}{luser}{ldate}{summary}\n'
+changeset_verbose = '{cset}{branches}{bookmarks}{tags}{lphase}{parents}{luser}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
--- a/hgtemplates/map-cmdline.status
+++ b/hgtemplates/map-cmdline.status
@@ -1,15 +1,15 @@
 %include map-cmdline.default
 
 [templates]
 # 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'
+changeset = '{cset}{branches}{bookmarks}{tags}{parents}{luser}{ldate}{summary}{lfiles}\n'
+changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{luser}{ldate}{description}{lfiles}\n'
+changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{luser}{ldate}{extras}{description}{lfiles}\n'
 
 # Override the file templates
 lfiles = '{if(files,
               label('ui.note log.files',
                     'files:\n'))}{lfile_mods}{lfile_adds}{lfile_dels}'
 
 lfile_adds = '{file_adds % "{lfile_add}{lfile_src}"}'
 lfile_mods = '{file_mods % "{lfile_mod}{lfile_src}"}'