# HG changeset patch # User Brendan Cully # Date 1159572369 25200 # Node ID 48395d2692ded2b1bc861595d105a4ad41c8d4a3 # Parent 367a009c2acb29b8f110a1f658418d9336063280 hgweb: kill #manifest# diff -r 367a009c2acb -r 48395d2692de mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Thu Sep 28 21:00:01 2006 +0100 +++ b/mercurial/hgweb/hgweb_mod.py Fri Sep 29 16:26:09 2006 -0700 @@ -202,7 +202,6 @@ "child": self.siblings(cl.children(n), cl.rev, cl.rev(n) + 1), "changelogtag": self.showtag("changelogtag",n), - "manifest": hex(changes[0]), "desc": changes[4], "date": changes[2], "files": self.listfilediffs(changes[3], n), @@ -223,7 +222,7 @@ yield self.t(shortlog and 'shortlog' or 'changelog', changenav=changenav, - manifest=hex(mf), + node=hex(cl.tip()), rev=pos, changesets=count, entries=changelist, archives=self.archivelist("tip")) @@ -265,7 +264,6 @@ parent=self.siblings(cl.parents(n), cl.rev), child=self.siblings(cl.children(n), cl.rev), changelogtag=self.showtag("changelogtag",n), - manifest=hex(changes[0]), desc=changes[4], date=changes[2], files=self.listfilediffs(changes[3], n), @@ -280,7 +278,7 @@ yield self.t('search', query=query, - manifest=hex(mf), + node=hex(cl.tip()), entries=changelist) def changeset(self, nodeid): @@ -309,7 +307,6 @@ parent=self.siblings(cl.parents(n), cl.rev), child=self.siblings(cl.children(n), cl.rev), changesettag=self.showtag("changesettag",n), - manifest=hex(changes[0]), author=changes[1], desc=changes[4], date=changes[2], @@ -385,7 +382,6 @@ mimetype=mt, rev=changerev, node=hex(cn), - manifest=hex(mfn), author=cs[1], date=cs[2], parent=self.siblings(fl.parents(n), fl.rev, file=f), @@ -424,7 +420,6 @@ path=_up(f), rev=fctx.rev(), node=hex(fctx.node()), - manifest=hex(fctx.changectx().changeset()[0]), author=fctx.user(), date=fctx.date(), rename=self.renamelink(fl, n), @@ -432,14 +427,9 @@ child=self.siblings(fl.children(n), fl.rev, file=f), permissions=fctx.manifest().execf(f)) - def manifest(self, mnode, path): - man = self.repo.manifest - mn = man.lookup(mnode) - mnode = hex(mn) - mf = man.read(mn) - rev = man.rev(mn) - changerev = man.linkrev(mn) - node = self.repo.changelog.node(changerev) + def manifest(self, ctx, path): + mf = ctx.manifest() + node = ctx.node() files = {} @@ -469,7 +459,6 @@ continue yield {"file": full, - "manifest": mnode, "filenode": hex(fnode), "parity": self.stripes(parity), "basename": f, @@ -487,13 +476,11 @@ yield {"parity": self.stripes(parity), "path": os.path.join(path, f), - "manifest": mnode, "basename": f[:-1]} parity += 1 yield self.t("manifest", - manifest=mnode, - rev=rev, + rev=ctx.rev(), node=hex(node), path=path, up=_up(path), @@ -503,7 +490,6 @@ def tags(self): cl = self.repo.changelog - mf = cl.read(cl.tip())[0] i = self.repo.tagslist() i.reverse() @@ -514,19 +500,17 @@ if notip and k == "tip": continue yield {"parity": self.stripes(parity), "tag": k, - "tagmanifest": hex(cl.read(n)[0]), "date": cl.read(n)[2], "node": hex(n)} parity += 1 yield self.t("tags", - manifest=hex(mf), + node=hex(self.repo.changelog.tip()), entries=lambda **x: entries(False, **x), entriesnotip=lambda **x: entries(True, **x)) def summary(self): cl = self.repo.changelog - mf = cl.read(cl.tip())[0] i = self.repo.tagslist() i.reverse() @@ -550,8 +534,7 @@ parity = self.stripes(parity), tag = k, node = hex(n), - date = t, - tagmanifest = hex(m)) + date = t) parity += 1 def changelist(**map): @@ -568,7 +551,6 @@ 'shortlogentry', parity = parity, author = changes[1], - manifest = hex(changes[0]), desc = changes[4], date = t, rev = i, @@ -577,8 +559,6 @@ yield l - cl = self.repo.changelog - mf = cl.read(cl.tip())[0] count = cl.count() start = max(0, count - self.maxchanges) end = min(count, start + self.maxchanges) @@ -589,9 +569,9 @@ self.repo.ui.config("web", "contact") or # deprecated self.repo.ui.config("web", "author", "unknown")), # also lastchange = (0, 0), # FIXME - manifest = hex(mf), tags = tagentries, shortlog = changelist, + node = hex(self.repo.changelog.tip()), archives=self.archivelist("tip")) def filediff(self, file, changeset): @@ -693,6 +673,15 @@ form[name] = value del form[k] + if form.has_key('manifest'): + changeid = req.form['manifest'][0] + try: + req.changectx = self.repo.changectx(changeid) + except hg.RepoError: + man = self.repo.manifest + mn = man.lookup(changeid) + req.changectx = self.repo.changectx(man.linkrev(mn)) + self.refresh() expand_form(req.form) @@ -771,7 +760,7 @@ req.write(self.changeset(req.form['node'][0])) def do_manifest(self, req): - req.write(self.manifest(req.form['manifest'][0], + req.write(self.manifest(req.changectx, self.cleanpath(req.form['path'][0]))) def do_tags(self, req): diff -r 367a009c2acb -r 48395d2692de templates/changelog-gitweb.tmpl --- a/templates/changelog-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/changelog-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -20,7 +20,7 @@ diff -r 367a009c2acb -r 48395d2692de templates/changelog.tmpl --- a/templates/changelog.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/changelog.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -8,7 +8,7 @@
shortlog tags -manifest +manifest #archives%archiveentry# rss
diff -r 367a009c2acb -r 48395d2692de templates/changelogentry.tmpl --- a/templates/changelogentry.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/changelogentry.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -19,7 +19,7 @@ #date|date# - files: + files: #files# diff -r 367a009c2acb -r 48395d2692de templates/changeset-gitweb.tmpl --- a/templates/changeset-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/changeset-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -10,7 +10,7 @@
@@ -21,7 +21,7 @@ author#author|obfuscate# #date|date# (#date|age# ago) changeset#node|short# -manifest#manifest|short# +manifest#node|short# #parent%changesetparent# #child%changesetchild# #changesettag# diff -r 367a009c2acb -r 48395d2692de templates/changeset.tmpl --- a/templates/changeset.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/changeset.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -7,7 +7,7 @@ changelog shortlog tags -manifest +manifest raw #archives%archiveentry#
diff -r 367a009c2acb -r 48395d2692de templates/error-gitweb.tmpl --- a/templates/error-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/error-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -10,7 +10,7 @@
diff -r 367a009c2acb -r 48395d2692de templates/fileannotate-gitweb.tmpl --- a/templates/fileannotate-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/fileannotate-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -10,7 +10,7 @@
#file|escape#
@@ -24,7 +24,7 @@ #child%fileannotatechild# manifest: - #manifest|short# + #node|short# author: #author|obfuscate# diff -r 367a009c2acb -r 48395d2692de templates/fileannotate.tmpl --- a/templates/fileannotate.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/fileannotate.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -8,7 +8,7 @@ shortlog tags changeset -manifest +manifest file revisions raw diff -r 367a009c2acb -r 48395d2692de templates/filerevision-gitweb.tmpl --- a/templates/filerevision-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/filerevision-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -10,7 +10,7 @@
#file|escape#
@@ -24,7 +24,7 @@ #child%fileannotatechild# manifest: - #manifest|short# + #node|short# author: #author|obfuscate# diff -r 367a009c2acb -r 48395d2692de templates/filerevision.tmpl --- a/templates/filerevision.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/filerevision.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -8,7 +8,7 @@ shortlog tags changeset -manifest +manifest revisions annotate raw diff -r 367a009c2acb -r 48395d2692de templates/manifest-gitweb.tmpl --- a/templates/manifest-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/manifest-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -18,7 +18,7 @@ - + #dentries%manifestdirentry# diff -r 367a009c2acb -r 48395d2692de templates/manifest.tmpl --- a/templates/manifest.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/manifest.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -1,5 +1,5 @@ #header# -#repo|escape#: manifest #manifest|short# +#repo|escape#: manifest for changeset #node|short# @@ -16,7 +16,7 @@
drwxr-xr-x[up][up]
drwxr-xr-x  - [up] + [up] #dentries%manifestdirentry# #fentries%manifestfileentry#
diff -r 367a009c2acb -r 48395d2692de templates/map --- a/templates/map Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/map Fri Sep 29 16:26:09 2006 -0700 @@ -14,7 +14,7 @@ searchentry = changelogentry.tmpl changeset = changeset.tmpl manifest = manifest.tmpl -manifestdirentry = 'drwxr-xr-x #basename|escape#/' +manifestdirentry = 'drwxr-xr-x #basename|escape#/' manifestfileentry = '#permissions|permissions# #basename|escape#' filerevision = filerevision.tmpl fileannotate = fileannotate.tmpl diff -r 367a009c2acb -r 48395d2692de templates/map-gitweb --- a/templates/map-gitweb Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/map-gitweb Fri Sep 29 16:26:09 2006 -0700 @@ -14,7 +14,7 @@ searchentry = changelogentry-gitweb.tmpl changeset = changeset-gitweb.tmpl manifest = manifest-gitweb.tmpl -manifestdirentry = 'drwxr-xr-x#basename|escape#/manifest' +manifestdirentry = 'drwxr-xr-x#basename|escape#/manifest' manifestfileentry = '#permissions|permissions##basename|escape#file | revisions | annotate' filerevision = filerevision-gitweb.tmpl fileannotate = fileannotate-gitweb.tmpl @@ -36,7 +36,7 @@ filerevchild = 'child:#node|short#' fileannotatechild = 'child:#node|short#' tags = tags-gitweb.tmpl -tagentry = '#date|age# ago#tag|escape#changeset | changelog | manifest' +tagentry = '#date|age# ago#tag|escape#changeset | changelog | manifest' diffblock = '
#lines#
' changelogtag = 'tag:#tag|escape#' changesettag = 'tag#tag|escape#' @@ -45,6 +45,6 @@ filediffchild = 'child #rev#:#node|short#' filelogchild = 'child #rev#: #node|short#' shortlog = shortlog-gitweb.tmpl -shortlogentry = '#date|age# ago#author##desc|strip|firstline|escape#changeset | manifest' +shortlogentry = '#date|age# ago#author##desc|strip|firstline|escape#changeset | manifest' filelogentry = '#date|age# ago#desc|strip|firstline|escape#file | annotate #rename%filelogrename#' archiveentry = ' | #type|escape# ' diff -r 367a009c2acb -r 48395d2692de templates/search-gitweb.tmpl --- a/templates/search-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/search-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -1,6 +1,6 @@ #header#

searching for #query|escape#

diff -r 367a009c2acb -r 48395d2692de templates/search.tmpl --- a/templates/search.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/search.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -7,7 +7,7 @@ changelog shortlog tags -manifest +manifest

searching for #query|escape#

diff -r 367a009c2acb -r 48395d2692de templates/shortlog-gitweb.tmpl --- a/templates/shortlog-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/shortlog-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -19,7 +19,7 @@ diff -r 367a009c2acb -r 48395d2692de templates/tags-gitweb.tmpl --- a/templates/tags-gitweb.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/tags-gitweb.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -10,7 +10,7 @@ diff -r 367a009c2acb -r 48395d2692de templates/tags.tmpl --- a/templates/tags.tmpl Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/tags.tmpl Fri Sep 29 16:26:09 2006 -0700 @@ -8,7 +8,7 @@
changelog shortlog -manifest +manifest rss
diff -r 367a009c2acb -r 48395d2692de templates/template-vars.txt --- a/templates/template-vars.txt Thu Sep 28 21:00:01 2006 +0100 +++ b/templates/template-vars.txt Fri Sep 29 16:26:09 2006 -0700 @@ -3,14 +3,11 @@ node a changeset node changesets total number of changesets file a filename -filenode a file node filerev a file revision filerevs total number of file revisions up the directory of the relevant file path a path in the manifest, starting with "/" basename a short pathname -manifest a manifest node -manifestrev a manifest revision date a date string age age in hours, days, etc line a line of text (escaped)