# HG changeset patch # User Matt Mackall # Date 2011-04-04 13:26:08 # Node ID 38906cf9d15cabb89a520d22325d6c29b70ea93a # Parent 28f557e8b4198d58a65621447544f0eec7048eb3 # Parent e33ebe67657a481fd0c0f53ea929aa41925fd972 merge with stable diff --git a/mercurial/templates/atom/bookmarkentry.tmpl b/mercurial/templates/atom/bookmarkentry.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/atom/bookmarkentry.tmpl @@ -0,0 +1,8 @@ + + {bookmark|escape} + + {urlbase}{url}#bookmark-{node} + {date|rfc3339date} + {date|rfc3339date} + {bookmark|strip|escape} + diff --git a/mercurial/templates/atom/bookmarks.tmpl b/mercurial/templates/atom/bookmarks.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/atom/bookmarks.tmpl @@ -0,0 +1,11 @@ +{header} + {urlbase}{url} + + + {repo|escape}: bookmarks + {repo|escape} bookmark history + Mercurial SCM + {latestentry%feedupdated} + +{entries%bookmarkentry} + diff --git a/mercurial/templates/atom/map b/mercurial/templates/atom/map --- a/mercurial/templates/atom/map +++ b/mercurial/templates/atom/map @@ -8,4 +8,6 @@ filelog = filelog.tmpl filelogentry = filelogentry.tmpl tags = tags.tmpl tagentry = tagentry.tmpl +bookmarks = bookmarks.tmpl +bookmarkentry = bookmarkentry.tmpl error = error.tmpl diff --git a/mercurial/templates/coal/map b/mercurial/templates/coal/map --- a/mercurial/templates/coal/map +++ b/mercurial/templates/coal/map @@ -140,6 +140,18 @@ tagentry = ' {node|short} ' +bookmarks = ../paper/bookmarks.tmpl +bookmarkentry = ' + + + + {bookmark|escape} + + + + {node|short} + + ' branches = ../paper/branches.tmpl branchentry = ' @@ -154,6 +166,7 @@ branchentry = ' ' changelogtag = '{name|escape} ' changesettag = '{tag|escape} ' +changesetbookmark = '{bookmark|escape} ' changelogbranchhead = '{name|escape} ' changelogbranchname = '{name|escape} ' diff --git a/mercurial/templates/gitweb/bookmarks.tmpl b/mercurial/templates/gitweb/bookmarks.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/gitweb/bookmarks.tmpl @@ -0,0 +1,32 @@ +{header} +{repo|escape}: Bookmarks + + + + + + + + + +
 
+ +{entries%bookmarkentry} +
+ +{footer} diff --git a/mercurial/templates/gitweb/branches.tmpl b/mercurial/templates/gitweb/branches.tmpl --- a/mercurial/templates/gitweb/branches.tmpl +++ b/mercurial/templates/gitweb/branches.tmpl @@ -17,6 +17,7 @@ changelog | graph | tags | +bookmarks | branches | files | help diff --git a/mercurial/templates/gitweb/changelog.tmpl b/mercurial/templates/gitweb/changelog.tmpl --- a/mercurial/templates/gitweb/changelog.tmpl +++ b/mercurial/templates/gitweb/changelog.tmpl @@ -24,6 +24,7 @@ changelog | graph | tags | +bookmarks | branches | files{archives%archiveentry} | help diff --git a/mercurial/templates/gitweb/changelogentry.tmpl b/mercurial/templates/gitweb/changelogentry.tmpl --- a/mercurial/templates/gitweb/changelogentry.tmpl +++ b/mercurial/templates/gitweb/changelogentry.tmpl @@ -1,5 +1,5 @@
-{date|age}{desc|strip|firstline|escape|nonempty} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag} +{date|age}{desc|strip|firstline|escape|nonempty} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}
-{desc|strip|escape|firstline|nonempty} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag} +{desc|strip|escape|firstline|nonempty} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}
diff --git a/mercurial/templates/gitweb/error.tmpl b/mercurial/templates/gitweb/error.tmpl --- a/mercurial/templates/gitweb/error.tmpl +++ b/mercurial/templates/gitweb/error.tmpl @@ -12,7 +12,15 @@
diff --git a/mercurial/templates/gitweb/fileannotate.tmpl b/mercurial/templates/gitweb/fileannotate.tmpl --- a/mercurial/templates/gitweb/fileannotate.tmpl +++ b/mercurial/templates/gitweb/fileannotate.tmpl @@ -17,6 +17,7 @@ changelog | graph | tags | +bookmarks | branches | files | changeset | diff --git a/mercurial/templates/gitweb/filediff.tmpl b/mercurial/templates/gitweb/filediff.tmpl --- a/mercurial/templates/gitweb/filediff.tmpl +++ b/mercurial/templates/gitweb/filediff.tmpl @@ -17,6 +17,7 @@ changelog | graph | tags | +bookmarks | branches | files | changeset | diff --git a/mercurial/templates/gitweb/filelog.tmpl b/mercurial/templates/gitweb/filelog.tmpl --- a/mercurial/templates/gitweb/filelog.tmpl +++ b/mercurial/templates/gitweb/filelog.tmpl @@ -17,6 +17,7 @@ changelog | graph | tags | +bookmarks | branches | file | revisions | diff --git a/mercurial/templates/gitweb/filerevision.tmpl b/mercurial/templates/gitweb/filerevision.tmpl --- a/mercurial/templates/gitweb/filerevision.tmpl +++ b/mercurial/templates/gitweb/filerevision.tmpl @@ -17,6 +17,7 @@ changelog | graph | tags | +bookmarks | branches | files | changeset | diff --git a/mercurial/templates/gitweb/graph.tmpl b/mercurial/templates/gitweb/graph.tmpl --- a/mercurial/templates/gitweb/graph.tmpl +++ b/mercurial/templates/gitweb/graph.tmpl @@ -24,6 +24,7 @@ changelog | graph | tags | +bookmarks | branches | files | help @@ -85,7 +86,7 @@ graph.vertex = function(x, y, color, par item = item.replace(/_DATE/, cur[5]); var tagspan = ''; - if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) \{ + if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) \{ tagspan = ''; if (cur[6][1]) \{ tagspan += ''; @@ -100,6 +101,12 @@ graph.vertex = function(x, y, color, par tagspan += '' + tag + ' '; } } + if (cur[8].length) \{ + for (var t in cur[8]) \{ + var bookmark = cur[8][t]; + tagspan += '' + bookmark + ' '; + } + } tagspan += ''; } diff --git a/mercurial/templates/gitweb/help.tmpl b/mercurial/templates/gitweb/help.tmpl --- a/mercurial/templates/gitweb/help.tmpl +++ b/mercurial/templates/gitweb/help.tmpl @@ -8,7 +8,7 @@ diff --git a/mercurial/templates/gitweb/helptopics.tmpl b/mercurial/templates/gitweb/helptopics.tmpl --- a/mercurial/templates/gitweb/helptopics.tmpl +++ b/mercurial/templates/gitweb/helptopics.tmpl @@ -8,7 +8,7 @@ -
{path|escape} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}
+
{path|escape} {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}
diff --git a/mercurial/templates/gitweb/map b/mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map +++ b/mercurial/templates/gitweb/map @@ -170,6 +170,17 @@ tagentry = ' files' +bookmarks = bookmarks.tmpl +bookmarkentry = ' + + + + + ' branches = branches.tmpl branchentry = ' @@ -214,6 +225,7 @@ graph = graph.tmpl tagtag = '{name} ' branchtag = '{name} ' inbranchtag = '{name} ' +bookmarktag = '{name} ' shortlogentry = ' @@ -221,7 +233,7 @@ shortlogentry = ' ' +bookmarks = bookmarks.tmpl +bookmarkentry = ' + + + + + ' branches = branches.tmpl branchentry = ' diff --git a/mercurial/templates/monoblue/notfound.tmpl b/mercurial/templates/monoblue/notfound.tmpl --- a/mercurial/templates/monoblue/notfound.tmpl +++ b/mercurial/templates/monoblue/notfound.tmpl @@ -23,6 +23,7 @@
  • changelog
  • graph
  • tags
  • +
  • bookmarks
  • branches
  • files{archives%archiveentry}
  • help
  • diff --git a/mercurial/templates/monoblue/search.tmpl b/mercurial/templates/monoblue/search.tmpl --- a/mercurial/templates/monoblue/search.tmpl +++ b/mercurial/templates/monoblue/search.tmpl @@ -23,6 +23,7 @@
  • changelog
  • graph
  • tags
  • +
  • bookmarks
  • branches
  • files{archives%archiveentry}
  • help
  • diff --git a/mercurial/templates/monoblue/shortlog.tmpl b/mercurial/templates/monoblue/shortlog.tmpl --- a/mercurial/templates/monoblue/shortlog.tmpl +++ b/mercurial/templates/monoblue/shortlog.tmpl @@ -23,6 +23,7 @@
  • changelog
  • graph
  • tags
  • +
  • bookmarks
  • branches
  • files
  • {archives%archiveentry} diff --git a/mercurial/templates/monoblue/summary.tmpl b/mercurial/templates/monoblue/summary.tmpl --- a/mercurial/templates/monoblue/summary.tmpl +++ b/mercurial/templates/monoblue/summary.tmpl @@ -23,6 +23,7 @@
  • changelog
  • graph
  • tags
  • +
  • bookmarks
  • branches
  • files
  • help
  • diff --git a/mercurial/templates/monoblue/tags.tmpl b/mercurial/templates/monoblue/tags.tmpl --- a/mercurial/templates/monoblue/tags.tmpl +++ b/mercurial/templates/monoblue/tags.tmpl @@ -23,6 +23,7 @@
  • changelog
  • graph
  • tags
  • +
  • bookmarks
  • branches
  • files
  • help
  • diff --git a/mercurial/templates/rss/bookmarkentry.tmpl b/mercurial/templates/rss/bookmarkentry.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/rss/bookmarkentry.tmpl @@ -0,0 +1,6 @@ + + {bookmark|escape} + {urlbase}{url}rev/{node|short} + + {date|rfc822date} + diff --git a/mercurial/templates/rss/bookmarks.tmpl b/mercurial/templates/rss/bookmarks.tmpl new file mode 100644 --- /dev/null +++ b/mercurial/templates/rss/bookmarks.tmpl @@ -0,0 +1,6 @@ +{header} + {repo|escape}: bookmarks + {repo|escape} bookmark history + {entries%bookmarkentry} + + diff --git a/mercurial/templates/rss/map b/mercurial/templates/rss/map --- a/mercurial/templates/rss/map +++ b/mercurial/templates/rss/map @@ -7,4 +7,6 @@ filelog = filelog.tmpl filelogentry = filelogentry.tmpl tags = tags.tmpl tagentry = tagentry.tmpl +bookmarks = bookmarks.tmpl +bookmarkentry = bookmarkentry.tmpl error = error.tmpl diff --git a/mercurial/templates/static/style-gitweb.css b/mercurial/templates/static/style-gitweb.css --- a/mercurial/templates/static/style-gitweb.css +++ b/mercurial/templates/static/style-gitweb.css @@ -80,6 +80,10 @@ span.logtags span.inbranchtag { background-color: #d5dde6; border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4; } +span.logtags span.bookmarktag { + background-color: #afdffa; + border-color: #ccecff #46ace6 #46ace6 #ccecff; +} /* Graph */ div#wrapper { diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t +++ b/tests/test-hgweb-commands.t @@ -640,6 +640,7 @@ Overviews changelog | graph | tags | + bookmarks | branches | files | help @@ -662,7 +663,7 @@ Overviews
    drwxr-xr-x
    {date|age}{bookmark|escape}
    {date|age} {desc|strip|firstline|escape|nonempty} - {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag} + {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}
    {date|age}{bookmark|escape} + changeset | + changelog | + files +
    branch - stable tip + stable tip something