changeset 1372:544633f0080d

Merge with TAH
author Matt Mackall <mpm@selenic.com>
date Mon, 03 Oct 2005 12:52:45 -0700
parents 710079d2a821 (diff) 68e84563c540 (current diff)
children 965d1db5c95d
files
diffstat 11 files changed, 622 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/hbisect.py	Mon Oct 03 12:52:45 2005 -0700
@@ -0,0 +1,287 @@
+#!/usr/bin/env python
+#
+# This software may be used and distributed according to the terms
+# of the GNU General Public License, incorporated herein by reference.
+
+from mercurial.demandload import demandload
+demandload(globals(), "os sys sets")
+from mercurial import hg
+
+versionstr = "0.0.3"
+
+def lookup_rev(ui, repo, rev=None):
+    """returns rev or the checked-out revision if rev is None"""
+    if not rev is None:
+        return repo.lookup(rev)
+    parents = [p for p in repo.dirstate.parents() if p != hg.nullid]
+    if len(parents) != 1:
+        ui.warn("unexpected number of parents\n")
+        ui.warn("please commit or revert\n")
+        sys.exit(1)
+    return parents.pop()
+
+def check_clean(ui, repo):
+        c, a, d, u = repo.changes()
+        if c or a or d:
+            ui.warn("Repository is not clean, please commit or revert\n")
+            sys.exit(1)
+
+class bisect:
+    """dichotomic search in the DAG of changesets"""
+    def __init__(self, ui, repo):
+        self.repo = repo
+        self.path = os.path.join(repo.join(""), "bisect")
+        self.ui = ui
+        self.goodrevs = []
+        self.badrev = None
+        self.good_dirty = 0
+        self.bad_dirty = 0
+        self.good_path = os.path.join(self.path, "good")
+        self.bad_path = os.path.join(self.path, "bad")
+
+        s = self.good_path
+        if os.path.exists(s):
+            self.goodrevs = self.repo.opener(s).read().splitlines()
+            self.goodrevs = [hg.bin(x) for x in self.goodrevs]
+        s = self.bad_path
+        if os.path.exists(s):
+            r = self.repo.opener(s).read().splitlines()
+            if r:
+                self.badrev = hg.bin(r.pop(0))
+
+    def __del__(self):
+        if not os.path.isdir(self.path):
+            return
+        f = self.repo.opener(self.good_path, "w")
+        f.write("\n".join([hg.hex(r) for r in  self.goodrevs]))
+        if len(self.goodrevs) > 0:
+            f.write("\n")
+        f = self.repo.opener(self.bad_path, "w")
+        if self.badrev:
+            f.write(hg.hex(self.badrev) + "\n")
+
+    def init(self):
+        """start a new bisection"""
+        if os.path.isdir(self.path):
+            self.ui.warn("bisect directory already exists\n")
+            return 1
+        os.mkdir(self.path)
+        check_clean(self.ui, self.repo)
+        return 0
+
+    def reset(self):
+        """finish a bisection"""
+        if os.path.isdir(self.path):
+            sl = [self.bad_path, self.good_path]
+            for s in sl:
+                if os.path.exists(s):
+                    os.unlink(s)
+            os.rmdir(self.path)
+        # Not sure about this
+        #self.ui.write("Going back to tip\n")
+        #self.repo.update(self.repo.changelog.tip())
+        return 1
+
+    def num_ancestors(self, head=None, stop=None):
+        """
+        returns a dict with the mapping:
+        node -> number of ancestors (self included)
+        for all nodes who are ancestor of head and
+        not in stop.
+        """
+        if head is None:
+            head = self.badrev
+        return self.__ancestors_and_nb_ancestors(head, stop)[1]
+        
+    def ancestors(self, head=None, stop=None):
+        """
+        returns the set of the ancestors of head (self included)
+        who are not in stop.
+        """
+        if head is None:
+            head = self.badrev
+        return self.__ancestors_and_nb_ancestors(head, stop)[0]
+        
+    def __ancestors_and_nb_ancestors(self, head, stop=None):
+        """
+        if stop is None then ancestors of goodrevs are used as
+        lower limit.
+
+        returns (anc, n_child) where anc is the set of the ancestors of head
+        and n_child is a dictionary with the following mapping:
+        node -> number of ancestors (self included)
+        """
+        cl = self.repo.changelog
+        if not stop:
+            stop = sets.Set([])
+            for g in reversed(self.goodrevs):
+                if g in stop:
+                    continue
+                stop.update(cl.reachable(g))
+        def num_children(a):
+            """
+            returns a dictionnary with the following mapping
+            node -> [number of children, empty set]
+            """
+            d = {a: [0, sets.Set([])]}
+            for i in xrange(cl.rev(a)+1):
+                n = cl.node(i)
+                if not d.has_key(n):
+                    d[n] = [0, sets.Set([])]
+                parents = [p for p in cl.parents(n) if p != hg.nullid]
+                for p in parents:
+                    d[p][0] += 1
+            return d
+        
+        if head in stop:
+            self.ui.warn("Unconsistent state, %s is good and bad\n"
+                          % hg.hex(head))
+            sys.exit(1)
+        n_child = num_children(head)
+        for i in xrange(cl.rev(head)+1):
+            n = cl.node(i)
+            parents = [p for p in cl.parents(n) if p != hg.nullid]
+            for p in parents:
+                n_child[p][0] -= 1
+                if not n in stop:
+                    n_child[n][1].union_update(n_child[p][1])
+                if n_child[p][0] == 0:
+                    n_child[p] = len(n_child[p][1])
+            if not n in stop:
+                n_child[n][1].add(n)
+            if n_child[n][0] == 0:
+                if n == head:
+                    anc = n_child[n][1]
+                n_child[n] = len(n_child[n][1])
+        return anc, n_child
+
+    def next(self):
+        if not self.badrev:
+            self.ui.warn("You should give at least one bad\n")
+            sys.exit(1)
+        if not self.goodrevs:
+            self.ui.warn("No good revision given\n")
+            self.ui.warn("Assuming the first revision is good\n")
+        ancestors, num_ancestors = self.__ancestors_and_nb_ancestors(self.badrev)
+        tot = len(ancestors)
+        if tot == 1:
+            if ancestors.pop() != self.badrev:
+                self.ui.warn("Could not find the first bad revision\n")
+                sys.exit(1)
+            self.ui.write(
+                "The first bad revision is : %s\n" % hg.hex(self.badrev))
+            sys.exit(0)
+        self.ui.write("%d revisions left\n" % tot)
+        best_rev = None
+        best_len = -1
+        for n in ancestors:
+            l = num_ancestors[n]
+            l = min(l, tot - l)
+            if l > best_len:
+                best_len = l
+                best_rev = n
+        return best_rev
+
+    def autonext(self):
+        """find and update to the next revision to test"""
+        check_clean(self.ui, self.repo)
+        rev = self.next()
+        self.ui.write("Now testing %s\n" % hg.hex(rev))
+        return self.repo.update(rev, allow=True, force=True)
+
+    def good(self, rev):
+        self.goodrevs.append(rev)
+
+    def autogood(self, rev=None):
+        """mark revision as good and update to the next revision to test"""
+        check_clean(self.ui, self.repo)
+        rev = lookup_rev(self.ui, self.repo, rev)
+        self.good(rev)
+        if self.badrev:
+            self.autonext()
+
+    def bad(self, rev):
+        self.badrev = rev
+
+    def autobad(self, rev=None):
+        """mark revision as bad and update to the next revision to test"""
+        check_clean(self.ui, self.repo)
+        rev = lookup_rev(self.ui, self.repo, rev)
+        self.bad(rev)
+        if self.goodrevs:
+            self.autonext()
+
+# should we put it in the class ?
+def test(ui, repo, rev):
+    """test the bisection code"""
+    b = bisect(ui, repo)
+    rev = repo.lookup(rev)
+    ui.write("testing with rev %s\n" % hg.hex(rev))
+    anc = b.ancestors()
+    while len(anc) > 1:
+        if not rev in anc:
+            ui.warn("failure while bisecting\n")
+            sys.exit(1)
+        ui.write("it worked :)\n")
+        new_rev = b.next()
+        ui.write("choosing if good or bad\n")
+        if rev in b.ancestors(head=new_rev):
+            b.bad(new_rev)
+            ui.write("it is bad\n")
+        else:
+            b.good(new_rev)
+            ui.write("it is good\n")
+        anc = b.ancestors()
+        repo.update(new_rev, allow=True, force=True)
+    for v in anc:
+        if v != rev:
+            ui.warn("fail to found cset! :(\n")
+            return 1
+    ui.write("Found bad cset: %s\n" % hg.hex(b.badrev))
+    ui.write("Everything is ok :)\n")
+    return 0
+
+def bisect_run(ui, repo, cmd=None, *args):
+    """bisect extension: dichotomic search in the DAG of changesets
+for subcommands see "hg bisect help\"
+    """
+    def help_(cmd=None, *args):
+        """show help for a given bisect subcommand or all subcommands"""
+        cmdtable = bisectcmdtable
+        if cmd:
+            doc = cmdtable[cmd][0].__doc__
+            synopsis = cmdtable[cmd][2]
+            ui.write(synopsis + "\n")
+            ui.write("\n" + doc + "\n")
+            return
+        ui.write("list of subcommands for the bisect extension\n\n")
+        cmds = cmdtable.keys()
+        cmds.sort()
+        m = max([len(c) for c in cmds])
+        for cmd in cmds:
+            doc = cmdtable[cmd][0].__doc__.splitlines(0)[0].rstrip()
+            ui.write(" %-*s   %s\n" % (m, cmd, doc))
+    
+    b = bisect(ui, repo)
+    bisectcmdtable = {
+        "init": (b.init, 0, "hg bisect init"),
+        "bad": (b.autobad, 1, "hg bisect bad [<rev>]"),
+        "good": (b.autogood, 1, "hg bisect good [<rev>]"),
+        "next": (b.autonext, 0, "hg bisect next"),
+        "reset": (b.reset, 0, "hg bisect reset"),
+        "help": (help_, 1, "hg bisect help [<subcommand>]"),
+    }
+            
+    if not bisectcmdtable.has_key(cmd):
+        ui.warn("bisect: Unknown sub-command\n")
+        return help_()
+    if len(args) > bisectcmdtable[cmd][1]:
+        ui.warn("bisect: Too many arguments\n")
+        return help_()
+    return bisectcmdtable[cmd][0](*args)
+
+cmdtable = {
+    "bisect": (bisect_run, [], 
+               "hg bisect [help|init|reset|next|good|bad]"),
+    #"bisect-test": (test, [], "hg bisect-test rev"),
+}
--- a/contrib/hgk	Wed Sep 28 19:42:03 2005 +0200
+++ b/contrib/hgk	Mon Oct 03 12:52:45 2005 -0700
@@ -1,4 +1,4 @@
-#!/usr/bin/wish
+#!/usr/bin/env wish
 
 # Copyright (C) 2005 Paul Mackerras.  All rights reserved.
 # This program is free software; it may be used, copied, modified
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/zsh_completion	Mon Oct 03 12:52:45 2005 -0700
@@ -0,0 +1,312 @@
+#compdef hg
+
+# Zsh completion script for mercurial.  Rename this file to _hg and copy
+# it into your zsh function path (/usr/share/zsh/site-functions for
+# instance)
+#
+# Copyright (C) 2005 Steve Borho
+#
+# This is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+
+local curcontext="$curcontext" state line
+typeset -A opt_args
+local subcmds repos tags newFiles addedFiles
+
+tags=($(hg tags 2> /dev/null | sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//'))
+subcmds=($(hg -v help | sed -e '1,/^list of commands:/d' \
+      -e '/^global options:/,$d' -e '/^ [^ ]/!d; s/[,:]//g;'))
+
+if [[ $service == "hg" ]]; then
+    _arguments -C -A "-*" \
+    '-R+[repository root directory]' \
+    '-y[non-interactive]' \
+    '-v[verbose]' \
+    '-q[quiet]' \
+    '--time[time how long the command takes]' \
+    '--profile[profile]' \
+    '-h-[display help and exit]' \
+    '--version-[output version information and exit]' \
+    '--cwd[change working directory]:new working directory:_files -/' \
+    '*::command:->subcmd' && return 0
+
+    if (( CURRENT == 1 )); then
+        _wanted commands expl 'hg command' compadd -a subcmds
+        return
+    fi
+    service="$words[1]"
+    curcontext="${curcontext%:*}=$service:"
+fi
+
+case $service in
+    (addremove)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '*:directories:_files -/'  # assume they want to add/remove a dir
+    ;;
+
+    (add)
+        newFiles=( $(hg status -un) )
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/'
+        _wanted files expl 'unknown files' compadd -a newFiles
+    ;;
+
+    (remove|rm)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '*:file:_files'
+    ;;
+
+    (cat)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '-o[output to file]:file:' \
+        '-r[revision]:revision:($tags)' \
+        '*:file:_files'
+    ;;
+
+    (checkout|update|up|co)
+        _arguments \
+        '-b[checkout the head of a specific branch]:tag:' \
+        '-m[allow merging of conflicts]' \
+        '-C[overwrite locally modified files]' \
+        '*:revision:->revs'
+        _wanted revs expl 'revision or tag' compadd -a tags
+    ;;
+
+    (commit|ci)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '-A[run addremove during commit]' \
+        '-m[commit message]:string:' \
+        '-d[date code]:string:' \
+        '-u[user]:string:' \
+        '*:file:_files'
+    ;;
+
+    (tag)
+        _arguments \
+        '-l[make the tag local]:' \
+        '-m[commit message]:string:' \
+        '-d[date code]:string:' \
+        '-u[user]:string:' \
+        '*:name and revision:'
+    ;;
+
+    (clone)
+        _arguments \
+        '-U[skip update after cloning]' \
+        '-e[ssh command]:string:' \
+        '--pull[use pull protocol to copy metadata]' \
+        '--remotecmd[remote hg command]:command:->subcmd'
+    ;;
+
+    (export)
+        _arguments \
+        '-o[output to a file]:file:' \
+        '-a-[tread all files as text]' \
+        '*:revision:->revs'
+        _wanted revs expl 'revision or tag' compadd -a tags
+    ;;
+
+    (heads)
+        _arguments '-b[find branch info]'
+    ;;
+
+    (outgoing|out)
+        _arguments '-p[show patch]'
+    ;;
+
+    (paths)
+        _arguments '*:symbolic name:(default default-push)'
+    ;;
+
+    (init)
+        _arguments '*:new repo directory:_files -/'
+    ;;
+
+    (unbundle)
+        _arguments '*:changegroup file:_files'
+    ;;
+
+    (manifest)
+        _arguments \
+        '*:revision:->revs'
+        _wanted revs expl 'revision or tag' compadd -a tags
+    ;;
+
+    (parents)
+        _arguments \
+        '*:revision:->revs'
+        _wanted revs expl 'revision or tag' compadd -a tags
+    ;;
+
+    (serve)
+        _arguments \
+        '-A[access log file]:log file:_files' \
+        '-E[error log file]:log file:_files' \
+        '-p[listen port]:listen port:' \
+        '-a[interface address]:interface address:' \
+        '-n[repository name]:repository name:' \
+        '--stdio[for remote clients]' \
+        '-t[template directory]:template dir:_files -/' \
+        '--style[template style]:style' \
+        '-6[use IPv6 in addition to IPv4]'
+    ;;
+
+    (pull)
+        repos=( $(hg paths | sed -e 's/^.*= //') )
+        _arguments \
+        '-u[update working directory]' \
+        '-e[ssh command]:remote commands:' \
+        '--remotecmd[remote hg command]:command:->subcmd' \
+        '*:pull source:->repo'
+        _wanted source expl 'source repository' compadd -a repos
+    ;;
+
+	(push)
+        repos=( $(hg paths | sed -e 's/^.*= //') )
+        _arguments \
+        '-f[force push]' \
+        '-e[ssh command]:remote commands:' \
+        '--remotecmd[remote hg command]:command:->subcmd' \
+        '*:pull source:->repo'
+        _wanted source expl 'source repository' compadd -a repos
+    ;;
+
+    (id|identify)
+    ;;
+
+    (recover)
+    ;;
+
+    (rawcommit)
+        _arguments \
+        '-p[parent]:revision:($tags)' \
+        '-d[date]:date:' \
+        '-u[user]:user:' \
+        '-F[file list]:file list:_files' \
+        '-m[commit message]:string:' \
+        '-l[commit message file]:message file:_files -g *.txt' \
+        '*:files to commit:_files'
+    ;;
+
+    (copy|cp)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '-A-[record a copy after it has happened]' \
+        '-f[replace destination if it exists]' \
+        '-p[append source path to dest]' \
+        '*:destination:'
+    ;;
+
+    (rename|mv)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '-A-[record a copy after it has happened]' \
+        '-f[replace destination if it exists]' \
+        '-p[append source path to dest]' \
+        '*:destination:'
+    ;;
+
+    (forget)
+        addedFiles=( $(hg status -an) )
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/'
+        _wanted files expl 'newly added files' compadd -a addedFiles
+    ;;
+
+    (import|patch)
+        _arguments \
+        '-p[path strip (default: 1)]:count:' \
+        '-f[skip check for outstanding changes]' \
+        '-b[base path]:file:_files -W $(hg root)' \
+        '*:patch file:_files'
+    ;;
+
+    (incoming|in)
+        _arguments \
+        '-p[show patch]' \
+        '*:mercurial repository:_files'
+    ;;
+
+    (diff)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '-r[revision]:revision:($tags)' \
+        '-a-[tread all files as text]' \
+        '*:file:_files'
+    ;;
+
+    (log|history)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '-r[revision]:revision:($tags)' \
+        '-b[show branches]' \
+        '-p[show patch]' \
+        '*:file:_files'
+    ;;
+
+    (grep)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '-0[end fields with NUL]' \
+        '--all[print all revisions with matches]' \
+        '-i[ignore case]' \
+        '-l[print names of files and revs with matches]' \
+        '-n[print line numbers]' \
+        '-r[search in revision rev]:revision:($tags)' \
+        '-u[print user who made change]' \
+        '*:search pattern, then files:_files'
+    ;;
+
+    (status)
+        _arguments \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '-0[end filenames with NUL]' \
+        '-m[show only modified files]' \
+        '-a[show only added files]' \
+        '-r[show only removed files]' \
+        '-u[show only unknown files]' \
+        '-n[hide status prefix]' \
+        '*:search pattern, then files:_files'
+    ;;
+
+    (locate)
+        _arguments \
+        '-r[search in revision rev]:revision:($tags)' \
+        '-0[end fields with NUL]' \
+        '-f[print complete paths]' \
+        '-I[include path in search]:dir:_files -W $(hg root) -/' \
+        '-X[exclude path in search]:dir:_files -W $(hg root) -/' \
+        '*:search pattern:'
+    ;;
+
+    (help)
+        _wanted commands expl 'hg command' compadd -a subcmds
+    ;;
+
+    (root|undo|view|verify|version)
+        # no arguments for these commands
+    ;;
+
+    (*)
+        _message "unknown hg command completion: $service"
+    ;;
+esac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hgext/__init__.py	Mon Oct 03 12:52:45 2005 -0700
@@ -0,0 +1,1 @@
+# placeholder
--- a/mercurial/changelog.py	Wed Sep 28 19:42:03 2005 +0200
+++ b/mercurial/changelog.py	Mon Oct 03 12:52:45 2005 -0700
@@ -15,7 +15,7 @@
 
     def extract(self, text):
         if not text:
-            return (nullid, "", "0", [], "")
+            return (nullid, "", (0, 0), [], "")
         last = text.index("\n\n")
         desc = text[last + 2:]
         l = text[:last].splitlines()
--- a/mercurial/commands.py	Wed Sep 28 19:42:03 2005 +0200
+++ b/mercurial/commands.py	Mon Oct 03 12:52:45 2005 -0700
@@ -568,6 +568,7 @@
         f.write(z.flush())
     except:
         os.unlink(fname)
+        raise
 
 def cat(ui, repo, file1, *pats, **opts):
     """output the latest or given revisions of files"""
--- a/mercurial/hgweb.py	Wed Sep 28 19:42:03 2005 +0200
+++ b/mercurial/hgweb.py	Mon Oct 03 12:52:45 2005 -0700
@@ -386,8 +386,9 @@
                      entries=changelist)
 
     def changeset(self, nodeid):
-        n = bin(nodeid)
         cl = self.repo.changelog
+        n = self.repo.lookup(nodeid)
+        nodeid = hex(n)
         changes = cl.read(n)
         p1 = cl.parents(n)[0]
 
@@ -422,6 +423,7 @@
     def filelog(self, f, filenode):
         cl = self.repo.changelog
         fl = self.repo.file(f)
+        filenode = hex(fl.lookup(filenode))
         count = fl.count()
 
         def entries(**map):
@@ -454,7 +456,8 @@
 
     def filerevision(self, f, node):
         fl = self.repo.file(f)
-        n = bin(node)
+        n = fl.lookup(node)
+        node = hex(n)
         text = fl.read(n)
         changerev = fl.linkrev(n)
         cl = self.repo.changelog
@@ -486,7 +489,8 @@
         bcache = {}
         ncache = {}
         fl = self.repo.file(f)
-        n = bin(node)
+        n = fl.lookup(node)
+        node = hex(n)
         changerev = fl.linkrev(n)
 
         cl = self.repo.changelog
@@ -535,10 +539,13 @@
                      permissions=self.repo.manifest.readflags(mfn)[f])
 
     def manifest(self, mnode, path):
-        mf = self.repo.manifest.read(bin(mnode))
-        rev = self.repo.manifest.rev(bin(mnode))
+        man = self.repo.manifest
+        mn = man.lookup(mnode)
+        mnode = hex(mn)
+        mf = man.read(mn)
+        rev = man.rev(mn)
         node = self.repo.changelog.node(rev)
-        mff=self.repo.manifest.readflags(bin(mnode))
+        mff = man.readflags(mn)
 
         files = {}
 
@@ -617,8 +624,9 @@
                      entries=entries)
 
     def filediff(self, file, changeset):
-        n = bin(changeset)
         cl = self.repo.changelog
+        n = self.repo.lookup(changeset)
+        changeset = hex(n)
         p1 = cl.parents(n)[0]
         cs = cl.read(n)
         mf = self.repo.manifest.read(cs[0])
@@ -805,7 +813,7 @@
             req.write(z.flush())
 
         elif req.form['cmd'][0] == 'archive':
-            changeset = bin(req.form['node'][0])
+            changeset = self.repo.lookup(req.form['node'][0])
             type = req.form['type'][0]
             if (type in self.archives and
                 self.repo.ui.configbool("web", "allow" + type, False)):
--- a/templates/changeset.tmpl	Wed Sep 28 19:42:03 2005 +0200
+++ b/templates/changeset.tmpl	Mon Oct 03 12:52:45 2005 -0700
@@ -21,10 +21,6 @@
 #parent#
 #changesettag#
 <tr>
- <th class="manifest">manifest:</th>
- <td class="manifest"><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest|short#</a></td>
-</tr>
-<tr>
  <th class="author">author:</th>
  <td class="author">#author|obfuscate#</td>
 </tr>
--- a/templates/fileannotate.tmpl	Wed Sep 28 19:42:03 2005 +0200
+++ b/templates/fileannotate.tmpl	Mon Oct 03 12:52:45 2005 -0700
@@ -12,7 +12,7 @@
 <a href="?cmd=filelog;file=#file#;filenode=#filenode#">revisions</a>
 </div>
 
-<h2>Annotate #file# (#filenode|short#)</h2>
+<h2>Annotate #file#</h2>
 
 <table>
 <tr>
@@ -20,9 +20,6 @@
  <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent#
 <tr>
- <td class="metatag">manifest:</td>
- <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest|short#</a></td></tr>
-<tr>
  <td class="metatag">author:</td>
  <td>#author|obfuscate#</td></tr>
 <tr>
--- a/templates/filerevision.tmpl	Wed Sep 28 19:42:03 2005 +0200
+++ b/templates/filerevision.tmpl	Mon Oct 03 12:52:45 2005 -0700
@@ -13,7 +13,7 @@
 <a href="?cmd=file;file=#file#;filenode=#filenode#;style=raw">raw</a>
 </div>
 
-<h2>#file# (revision #filenode|short#)</h2>
+<h2>#file#</h2>
 
 <table>
 <tr>
@@ -21,9 +21,6 @@
  <td><a href="?cmd=changeset;node=#node#">#node|short#</a></td></tr>
 #parent#
 <tr>
- <td class="metatag">manifest:</td>
- <td><a href="?cmd=manifest;manifest=#manifest#;path=/">#manifest|short#</a></td></tr>
-<tr>
  <td class="metatag">author:</td>
  <td>#author|obfuscate#</td></tr>
 <tr>
--- a/templates/manifest.tmpl	Wed Sep 28 19:42:03 2005 +0200
+++ b/templates/manifest.tmpl	Mon Oct 03 12:52:45 2005 -0700
@@ -9,7 +9,7 @@
 <a href="?cmd=changeset;node=#node#">changeset</a>
 </div>
 
-<h2>manifest #manifest|short#: #path#</h2>
+<h2>manifest for changeset #node|short#: #path#</h2>
 
 <table cellpadding="0" cellspacing="0">
 <tr class="parity1">