# HG changeset patch # User Thomas Arendsen Hein # Date 1160596884 -7200 # Node ID ce8f31e0b3b826f5c73e601b18fa0ea43688e2d7 # Parent 887da2247b577a02b0128517dc542c3dc6fa383e hgweb: Apply the new method of passing session variables to links. diff -r 887da2247b57 -r ce8f31e0b3b8 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Wed Oct 11 20:59:37 2006 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Wed Oct 11 22:01:24 2006 +0200 @@ -715,25 +715,10 @@ if style != self.repo.ui.config('web', 'style', ''): fields.append(('style', style)) + separator = req.url[-1] == '?' and ';' or '?' for name, value in fields: - yield dict(name=name, value=value) - - def queryprefix(**map): - return req.url[-1] == '?' and ';' or '?' - - def getentries(**map): - fields = {} - if req.form.has_key('style'): - style = req.form['style'][0] - if style != self.repo.ui.config('web', 'style', ''): - fields['style'] = style - - if fields: - fields = ['%s=%s' % (k, urllib.quote(v)) - for k, v in fields.iteritems()] - yield '%s%s' % (queryprefix(), ';'.join(fields)) - else: - yield '' + yield dict(name=name, value=value, separator=separator) + separator = ';' self.refresh() @@ -764,9 +749,7 @@ "header": header, "footer": footer, "rawfileheader": rawfileheader, - "sessionvars": sessionvars, - "queryprefix": queryprefix, - "getentries": getentries + "sessionvars": sessionvars }) if not req.form.has_key('cmd'): diff -r 887da2247b57 -r ce8f31e0b3b8 templates/changelog.tmpl --- a/templates/changelog.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/changelog.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,9 +6,9 @@
-shortlog -tags -manifest +shortlog +tags +manifest #archives%archiveentry# rss
diff -r 887da2247b57 -r ce8f31e0b3b8 templates/changelogentry.tmpl --- a/templates/changelogentry.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/changelogentry.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -5,7 +5,7 @@ changeset #rev#: - #node|short# + #node|short# #parent%changelogparent# #child%changelogchild# @@ -19,7 +19,7 @@ #date|date# - files: + files: #files# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/changeset.tmpl --- a/templates/changeset.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/changeset.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -4,10 +4,10 @@
-changelog -shortlog -tags -manifest +changelog +shortlog +tags +manifest raw #archives%archiveentry#
@@ -17,7 +17,7 @@ - + #parent%changesetparent# #child%changesetchild# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/fileannotate.tmpl --- a/templates/fileannotate.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/fileannotate.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -4,13 +4,13 @@
-changelog -shortlog -tags -changeset -manifest -file -revisions +changelog +shortlog +tags +changeset +manifest +file +revisions raw
@@ -19,7 +19,7 @@
changeset #rev#:#node|short##node|short#
- + #rename%filerename# #parent%fileannotateparent# #child%fileannotatechild# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/filediff.tmpl --- a/templates/filediff.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/filediff.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -4,13 +4,13 @@
-changelog -shortlog -tags -changeset -file -revisions -annotate +changelog +shortlog +tags +changeset +file +revisions +annotate raw
@@ -19,7 +19,7 @@
changeset #rev#:#node|short#
#node|short#
- + #parent%filediffparent# #child%filediffchild# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/filelog.tmpl --- a/templates/filelog.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/filelog.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -7,11 +7,11 @@
-changelog -shortlog -tags -file -annotate +changelog +shortlog +tags +file +annotate rss
diff -r 887da2247b57 -r ce8f31e0b3b8 templates/filelogentry.tmpl --- a/templates/filelogentry.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/filelogentry.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -1,14 +1,14 @@
revision #rev#:#node|short##node|short#
- + #rename%filelogrename# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/filerevision.tmpl --- a/templates/filerevision.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/filerevision.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -4,13 +4,13 @@
-changelog -shortlog -tags -changeset -manifest -revisions -annotate +changelog +shortlog +tags +changeset +manifest +revisions +annotate raw
@@ -19,7 +19,7 @@
#date|age# ago:#desc|strip|firstline|escape##desc|strip|firstline|escape#
revision #filerev#: - #node|short# - (diff) - (annotate) + #node|short# + (diff) + (annotate)
- + #rename%filerename# #parent%filerevparent# #child%filerevchild# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/changelog.tmpl --- a/templates/gitweb/changelog.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/changelog.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,7 +6,7 @@ @@ -18,7 +18,7 @@ diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/changelogentry.tmpl --- a/templates/gitweb/changelogentry.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/changelogentry.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -1,9 +1,9 @@
-#date|age# ago#desc|strip|firstline|escape# +#date|age# ago#desc|strip|firstline|escape#
#author|obfuscate# [#date|rfc822date#] rev #rev#
diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/changeset.tmpl --- a/templates/gitweb/changeset.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/changeset.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,11 +6,11 @@
@@ -21,7 +21,7 @@
- + #parent%changesetparent# #child%changesetchild# #changesettag# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/error.tmpl --- a/templates/gitweb/error.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/error.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,11 +6,11 @@
diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/fileannotate.tmpl --- a/templates/gitweb/fileannotate.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/fileannotate.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,20 +6,20 @@ @@ -28,13 +28,13 @@
changeset #rev#:#node|short#
#node|short#
author#author|obfuscate#
#date|date# (#date|age# ago)
changeset#node|short#
manifest#node|short#
manifest#node|short#
- + #rename%filerename# #parent%fileannotateparent# #child%fileannotatechild# - + diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/filediff.tmpl --- a/templates/gitweb/filediff.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/filediff.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,18 +6,18 @@
changeset #rev#:#node|short#
#node|short#
manifest:#node|short#
#node|short#
author: #author|obfuscate#
- + {parent%filediffparent} {child%filediffchild} - +
changeset {rev}:{node|short}{node|short}
manifest:{node|short}{node|short}
diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/filelog.tmpl --- a/templates/gitweb/filelog.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/filelog.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,18 +6,18 @@ diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/filerevision.tmpl --- a/templates/gitweb/filerevision.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/filerevision.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,20 +6,20 @@ @@ -28,13 +28,13 @@ - + #rename%filerename# #parent%fileannotateparent# #child%fileannotatechild# - + diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/manifest.tmpl --- a/templates/gitweb/manifest.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/manifest.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,16 +6,16 @@
#path|escape#
@@ -24,7 +24,7 @@ - + #dentries%manifestdirentry# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/map --- a/templates/gitweb/map Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/map Wed Oct 11 22:01:24 2006 +0200 @@ -5,50 +5,51 @@ changelog = changelog.tmpl summary = summary.tmpl error = error.tmpl -naventry = '#label|escape# ' -navshortentry = '#label|escape# ' -filedifflink = '#file|escape# ' -filenodelink = '' +naventry = '#label|escape# ' +navshortentry = '#label|escape# ' +filedifflink = '#file|escape# ' +filenodelink = '' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl changeset = changeset.tmpl manifest = manifest.tmpl -manifestdirentry = '' -manifestfileentry = '' +manifestdirentry = '' +manifestfileentry = '' filerevision = filerevision.tmpl fileannotate = fileannotate.tmpl filediff = filediff.tmpl filelog = filelog.tmpl fileline = '
   #linenumber# #line|escape#
' -annotateline = '' +annotateline = '' difflineplus = '
#line|escape#
' difflineminus = '
#line|escape#
' difflineat = '
#line|escape#
' diffline = '
#line|escape#
' -changelogparent = '' -changesetparent = '' -filerevparent = '' -filerename = '' -filelogrename = '| base' -fileannotateparent = '' -changelogchild = '' -changesetchild = '' -filerevchild = '' -fileannotatechild = '' +changelogparent = '' +changesetparent = '' +filerevparent = '' +filerename = '' +filelogrename = '| base' +fileannotateparent = '' +changelogchild = '' +changesetchild = '' +filerevchild = '' +fileannotatechild = '' tags = tags.tmpl -tagentry = '' +tagentry = '' diffblock = '
#lines#
' changelogtag = '' changesettag = '' -filediffparent = '' -filelogparent = '' -filediffchild = '' -filelogchild = '' +filediffparent = '' +filelogparent = '' +filediffchild = '' +filelogchild = '' shortlog = shortlog.tmpl -shortlogentry = '' -filelogentry = '' +shortlogentry = '' +filelogentry = '' archiveentry = ' | #type|escape# ' indexentry = '' index = index.tmpl +urlparameter = '#separator##name#=#value|urlescape#' hiddenformentry = '' diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/search.tmpl --- a/templates/gitweb/search.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/search.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -1,10 +1,10 @@ #header#

searching for #query|escape#

diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/shortlog.tmpl --- a/templates/gitweb/shortlog.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/shortlog.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,7 +6,7 @@ @@ -17,11 +17,11 @@
changeset #rev#:#node|short#
#node|short#
manifest:#node|short#
#node|short#
author: #author|obfuscate#
drwxr-xr-x [up][up]
#file|escape#
#file|escape#
drwxr-xr-x#basename|escape#/
#permissions|permissions##size##basename|escape#
drwxr-xr-x#basename|escape#/
#permissions|permissions##size##basename|escape#
#author|obfuscate#@#rev#
#line|escape#
#author|obfuscate#@#rev#
#line|escape#
parent #rev#:#node|short#
parent#node|short#
parent:#node|short#
parent:#file|escape#@#node|short#
parent:#node|short#
child #rev#:#node|short#
child#node|short#
child:#node|short#
child:#node|short#
parent #rev#:#node|short#
parent#node|short#
parent:#node|short#
parent:#file|escape#@#node|short#
parent:#node|short#
child #rev#:#node|short#
child#node|short#
child:#node|short#
child:#node|short#
#date|age# ago#tag|escape#
#date|age# ago#tag|escape#
tag:#tag|escape#
tag#tag|escape#
parent #rev#:#node|short#
parent #rev#: #node|short#
child #rev#:#node|short#
child #rev#: #node|short#
parent #rev#:#node|short#
parent #rev#: #node|short#
child #rev#:#node|short#
child #rev#: #node|short#
#date|age# ago#author##desc|strip|firstline|escape#
#date|age# ago#desc|strip|firstline|escape#
#date|age# ago#author##desc|strip|firstline|escape#
#date|age# ago#desc|strip|firstline|escape#
#name|escape##description##contact|obfuscate##lastchange|age# ago
last change#lastchange|rfc822date#
-
changes
+
changes
#shortlog# - +
...
...
-
tags
+
tags
#tags# - +
...
...
#footer# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/gitweb/tags.tmpl --- a/templates/gitweb/tags.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/gitweb/tags.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,15 +6,15 @@ diff -r 887da2247b57 -r ce8f31e0b3b8 templates/manifest.tmpl --- a/templates/manifest.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/manifest.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -4,10 +4,10 @@
-changelog -shortlog -tags -changeset +changelog +shortlog +tags +changeset #archives%archiveentry#
@@ -17,7 +17,7 @@ drwxr-xr-x    - [up] + [up] #dentries%manifestdirentry# #fentries%manifestfileentry# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/map --- a/templates/map Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/map Wed Oct 11 22:01:24 2006 +0200 @@ -5,50 +5,51 @@ changelog = changelog.tmpl shortlog = shortlog.tmpl shortlogentry = shortlogentry.tmpl -naventry = '#label|escape# ' -navshortentry = '#label|escape# ' -filedifflink = '#file|escape# ' -filenodelink = '#file|escape# ' +naventry = '#label|escape# ' +navshortentry = '#label|escape# ' +filedifflink = '#file|escape# ' +filenodelink = '#file|escape# ' fileellipses = '...' changelogentry = changelogentry.tmpl searchentry = changelogentry.tmpl changeset = changeset.tmpl manifest = manifest.tmpl -manifestdirentry = 'drwxr-xr-x  #basename|escape#/' -manifestfileentry = '#permissions|permissions# #size# #basename|escape#' +manifestdirentry = 'drwxr-xr-x  #basename|escape#/' +manifestfileentry = '#permissions|permissions# #size# #basename|escape#' filerevision = filerevision.tmpl fileannotate = fileannotate.tmpl filediff = filediff.tmpl filelog = filelog.tmpl fileline = '
#linenumber##line|escape#
' filelogentry = filelogentry.tmpl -annotateline = '#author|obfuscate#@#rev#
#line|escape#
' +annotateline = '#author|obfuscate#@#rev#
#line|escape#
' difflineplus = '#line|escape#' difflineminus = '#line|escape#' difflineat = '#line|escape#' diffline = '#line|escape#' -changelogparent = 'parent #rev#:#node|short#' -changesetparent = 'parent #rev#:#node|short#' -filerevparent = 'parent:#node|short#' -filerename = 'parent:#file|escape#@#node|short#' -filelogrename = 'base:#file|escape#@#node|short#' -fileannotateparent = 'parent:#node|short#' -changesetchild = 'child #rev#:#node|short#' -changelogchild = 'child #rev#:#node|short#' -filerevchild = 'child:#node|short#' -fileannotatechild = 'child:#node|short#' +changelogparent = 'parent #rev#:#node|short#' +changesetparent = 'parent #rev#:#node|short#' +filerevparent = 'parent:#node|short#' +filerename = 'parent:#file|escape#@#node|short#' +filelogrename = 'base:#file|escape#@#node|short#' +fileannotateparent = 'parent:#node|short#' +changesetchild = 'child #rev#:#node|short#' +changelogchild = 'child #rev#:#node|short#' +filerevchild = 'child:#node|short#' +fileannotatechild = 'child:#node|short#' tags = tags.tmpl -tagentry = '
  • #node# #tag|escape#
  • ' +tagentry = '
  • #node# #tag|escape#
  • ' diffblock = '
    #lines#
    ' changelogtag = 'tag:#tag|escape#' changesettag = 'tag:#tag|escape#' -filediffparent = 'parent #rev#:#node|short#' -filelogparent = 'parent #rev#:#node|short#' -filediffchild = 'child #rev#:#node|short#' -filelogchild = 'child #rev#:#node|short#' +filediffparent = 'parent #rev#:#node|short#' +filelogparent = 'parent #rev#:#node|short#' +filediffchild = 'child #rev#:#node|short#' +filelogchild = 'child #rev#:#node|short#' indexentry = '#name|escape##description##contact|obfuscate##lastchange|age# agoRSS #archives%archiveentry#' index = index.tmpl archiveentry = '#type|escape# ' notfound = notfound.tmpl error = error.tmpl +urlparameter = '#separator##name#=#value|urlescape#' hiddenformentry = '' diff -r 887da2247b57 -r ce8f31e0b3b8 templates/search.tmpl --- a/templates/search.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/search.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -4,10 +4,10 @@
    -changelog -shortlog -tags -manifest +changelog +shortlog +tags +manifest

    searching for #query|escape#

    diff -r 887da2247b57 -r ce8f31e0b3b8 templates/shortlog.tmpl --- a/templates/shortlog.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/shortlog.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,9 +6,9 @@
    -changelog -tags -manifest +changelog +tags +manifest #archives%archiveentry# rss
    diff -r 887da2247b57 -r ce8f31e0b3b8 templates/shortlogentry.tmpl --- a/templates/shortlogentry.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/shortlogentry.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -2,6 +2,6 @@ #date|age# #author|obfuscate# - #desc|strip|firstline|escape# + #desc|strip|firstline|escape# diff -r 887da2247b57 -r ce8f31e0b3b8 templates/tags.tmpl --- a/templates/tags.tmpl Wed Oct 11 20:59:37 2006 +0200 +++ b/templates/tags.tmpl Wed Oct 11 22:01:24 2006 +0200 @@ -6,9 +6,9 @@
    -changelog -shortlog -manifest +changelog +shortlog +manifest rss