1.5 code freeze: merge default into stable stable
authorMatt Mackall <mpm@selenic.com>
Sat, 13 Feb 2010 23:50:38 -0600
branchstable
changeset 10456 64a6a896e5fb
parent 10428 e553a425751d (current diff)
parent 10455 40dfd46d098f (diff)
child 10457 4f38d03d4975
1.5 code freeze: merge default into stable
contrib/bash_completion
contrib/zsh_completion
help/config.txt
help/dates.txt
help/diffs.txt
help/environment.txt
help/extensions.txt
help/multirevs.txt
help/patterns.txt
help/revisions.txt
help/templates.txt
help/urls.txt
templates/atom/changelog.tmpl
templates/atom/changelogentry.tmpl
templates/atom/error.tmpl
templates/atom/filelog.tmpl
templates/atom/header.tmpl
templates/atom/map
templates/atom/tagentry.tmpl
templates/atom/tags.tmpl
templates/coal/header.tmpl
templates/coal/map
templates/gitweb/branches.tmpl
templates/gitweb/changelog.tmpl
templates/gitweb/changelogentry.tmpl
templates/gitweb/changeset.tmpl
templates/gitweb/error.tmpl
templates/gitweb/fileannotate.tmpl
templates/gitweb/filediff.tmpl
templates/gitweb/filelog.tmpl
templates/gitweb/filerevision.tmpl
templates/gitweb/footer.tmpl
templates/gitweb/graph.tmpl
templates/gitweb/header.tmpl
templates/gitweb/index.tmpl
templates/gitweb/manifest.tmpl
templates/gitweb/map
templates/gitweb/notfound.tmpl
templates/gitweb/search.tmpl
templates/gitweb/shortlog.tmpl
templates/gitweb/summary.tmpl
templates/gitweb/tags.tmpl
templates/map-cmdline.changelog
templates/map-cmdline.compact
templates/map-cmdline.default
templates/monoblue/branches.tmpl
templates/monoblue/changelog.tmpl
templates/monoblue/changelogentry.tmpl
templates/monoblue/changeset.tmpl
templates/monoblue/error.tmpl
templates/monoblue/fileannotate.tmpl
templates/monoblue/filediff.tmpl
templates/monoblue/filelog.tmpl
templates/monoblue/filerevision.tmpl
templates/monoblue/footer.tmpl
templates/monoblue/graph.tmpl
templates/monoblue/header.tmpl
templates/monoblue/index.tmpl
templates/monoblue/manifest.tmpl
templates/monoblue/map
templates/monoblue/notfound.tmpl
templates/monoblue/search.tmpl
templates/monoblue/shortlog.tmpl
templates/monoblue/summary.tmpl
templates/monoblue/tags.tmpl
templates/paper/branches.tmpl
templates/paper/changeset.tmpl
templates/paper/error.tmpl
templates/paper/fileannotate.tmpl
templates/paper/filediff.tmpl
templates/paper/filelog.tmpl
templates/paper/filelogentry.tmpl
templates/paper/filerevision.tmpl
templates/paper/footer.tmpl
templates/paper/graph.tmpl
templates/paper/header.tmpl
templates/paper/index.tmpl
templates/paper/manifest.tmpl
templates/paper/map
templates/paper/notfound.tmpl
templates/paper/search.tmpl
templates/paper/shortlog.tmpl
templates/paper/shortlogentry.tmpl
templates/paper/tags.tmpl
templates/raw/changeset.tmpl
templates/raw/error.tmpl
templates/raw/fileannotate.tmpl
templates/raw/filediff.tmpl
templates/raw/index.tmpl
templates/raw/manifest.tmpl
templates/raw/map
templates/raw/notfound.tmpl
templates/rss/changelog.tmpl
templates/rss/changelogentry.tmpl
templates/rss/error.tmpl
templates/rss/filelog.tmpl
templates/rss/filelogentry.tmpl
templates/rss/header.tmpl
templates/rss/map
templates/rss/tagentry.tmpl
templates/rss/tags.tmpl
templates/spartan/branches.tmpl
templates/spartan/changelog.tmpl
templates/spartan/changelogentry.tmpl
templates/spartan/changeset.tmpl
templates/spartan/error.tmpl
templates/spartan/fileannotate.tmpl
templates/spartan/filediff.tmpl
templates/spartan/filelog.tmpl
templates/spartan/filelogentry.tmpl
templates/spartan/filerevision.tmpl
templates/spartan/footer.tmpl
templates/spartan/graph.tmpl
templates/spartan/header.tmpl
templates/spartan/index.tmpl
templates/spartan/manifest.tmpl
templates/spartan/map
templates/spartan/notfound.tmpl
templates/spartan/search.tmpl
templates/spartan/shortlog.tmpl
templates/spartan/shortlogentry.tmpl
templates/spartan/tags.tmpl
templates/static/background.png
templates/static/coal-file.png
templates/static/coal-folder.png
templates/static/excanvas.js
templates/static/graph.js
templates/static/hgicon.png
templates/static/hglogo.png
templates/static/style-coal.css
templates/static/style-gitweb.css
templates/static/style-monoblue.css
templates/static/style-paper.css
templates/static/style.css
templates/template-vars.txt
--- a/Makefile	Thu Feb 11 23:15:42 2010 +0200
+++ b/Makefile	Sat Feb 13 23:50:38 2010 -0600
@@ -1,3 +1,9 @@
+# If you want to change PREFIX, do not just edit it below. The changed
+# value wont get passed on to recursive make calls. You should instead
+# override the variable on the command like:
+#
+# % make PREFIX=/opt/ install
+
 PREFIX=/usr/local
 export PREFIX
 PYTHON=python
@@ -39,7 +45,7 @@
 	-$(PYTHON) setup.py clean --all # ignore errors from this command
 	find . -name '*.py[cdo]' -exec rm -f '{}' ';'
 	rm -f MANIFEST mercurial/__version__.py mercurial/*.so tests/*.err
-	rm -rf locale
+	rm -rf mercurial/locale
 	$(MAKE) -C doc clean
 
 install: install-bin install-doc
@@ -79,9 +85,9 @@
 
 update-pot: i18n/hg.pot
 
-i18n/hg.pot: $(PYTHON_FILES) help/*.txt
+i18n/hg.pot: $(PYTHON_FILES) mercurial/help/*.txt
 	$(PYTHON) i18n/hggettext mercurial/commands.py \
-	  hgext/*.py hgext/*/__init__.py help/*.txt > i18n/hg.pot
+	  hgext/*.py hgext/*/__init__.py mercurial/help/*.txt > i18n/hg.pot
         # All strings marked for translation in Mercurial contain
         # ASCII characters only. But some files contain string
         # literals like this '\037\213'. xgettext thinks it has to
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/check-code.py	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,167 @@
+#!/usr/bin/env python
+#
+# check-code - a style and portability checker for Mercurial
+#
+# Copyright 2010 Matt Mackall <mpm@selenic.com>
+#
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2 or any later version.
+
+import sys, re, glob
+
+def repquote(m):
+    t = re.sub(r"\w", "x", m.group(2))
+    t = re.sub(r"[^\sx]", "o", t)
+    return m.group(1) + t + m.group(1)
+
+def repcomment(m):
+    return m.group(1) + "#" * len(m.group(2))
+
+def repccomment(m):
+    t = re.sub(r"((?<=\n) )|\S", "x", m.group(2))
+    return m.group(1) + t + "*/"
+
+def repcallspaces(m):
+    t = re.sub(r"\n\s+", "\n", m.group(2))
+    return m.group(1) + t
+
+def repinclude(m):
+    return m.group(1) + "<foo>"
+
+def rephere(m):
+    t = re.sub(r"\S", "x", m.group(2))
+    return m.group(1) + t
+
+
+testpats = [
+    (r'(pushd|popd)', "don't use 'pushd' or 'popd', use 'cd'"),
+    (r'\W\$?\(\([^\)]*\)\)', "don't use (()) or $(()), use 'expr'"),
+    (r'^function', "don't use 'function', use old style"),
+    (r'grep.*-q', "don't use 'grep -q', redirect to /dev/null"),
+    (r'echo.*\\n', "don't use 'echo \\n', use printf"),
+    (r'^diff.*-\w*N', "don't use 'diff -N'"),
+    (r'(^| )wc[^|]*$', "filter wc output"),
+    (r'head -c', "don't use 'head -c', use 'dd'"),
+    (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"),
+    (r'printf.*\\\d\d\d', "don't use 'printf \NNN', use Python"),
+    (r'printf.*\\x', "don't use printf \\x, use Python"),
+    (r'\$\(.*\)', "don't use $(expr), use `expr`"),
+    (r'rm -rf \*', "don't use naked rm -rf, target a directory"),
+    (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w',
+     "use egrep for extended grep syntax"),
+    (r'/bin/', "don't use explicit paths for tools"),
+    (r'\$PWD', "don't use $PWD, use `pwd`"),
+    (r'[^\n]\Z', "no trailing newline"),
+]
+
+testfilters = [
+    (r"( *)(#([^\n]*\S)?)", repcomment),
+    (r"<<(\S+)((.|\n)*?\n\1)", rephere),
+]
+
+pypats = [
+    (r'^\s*\t', "don't use tabs"),
+    (r'\S;\s*\n', "semicolon"),
+    (r'\w,\w', "missing whitespace after ,"),
+    (r'\w[+/*\-<>]\w', "missing whitespace in expression"),
+    (r'^\s+\w+=\w+[^,)]$', "missing whitespace in assignment"),
+    (r'.{85}', "line too long"),
+    (r'[^\n]\Z', "no trailing newline"),
+#    (r'^\s+[^_ ][^_. ]+_[^_]+\s*=', "don't use underbars in identifiers"),
+#    (r'\w*[a-z][A-Z]\w*\s*=', "don't use camelcase in identifiers"),
+    (r'^\s*(if|while|def|class|except|try)\s[^[]*:\s*[^\]#\s]+',
+     "linebreak after :"),
+    (r'class\s[^(]:', "old-style class, use class foo(object)"),
+    (r'^\s+del\(', "del isn't a function"),
+    (r'^\s+except\(', "except isn't a function"),
+    (r',]', "unneeded trailing ',' in list"),
+#    (r'class\s[A-Z][^\(]*\((?!Exception)',
+#     "don't capitalize non-exception classes"),
+#    (r'in range\(', "use xrange"),
+#    (r'^\s*print\s+', "avoid using print in core and extensions"),
+    (r'[\x80-\xff]', "non-ASCII character literal"),
+    (r'("\')\.format\(', "str.format() not available in Python 2.4"),
+    (r'^\s*with\s+', "with not available in Python 2.4"),
+    (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
+    (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"),
+#    (r'\s\s=', "gratuitous whitespace before ="),
+    (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', "missing whitespace around operator"),
+    (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\s', "missing whitespace around operator"),
+    (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', "missing whitespace around operator"),
+    (r'[^+=*!<>&| -](\s=|=\s)[^= ]', "wrong whitespace around ="),
+    (r'raise Exception', "don't raise generic exceptions"),
+    (r'ui\.(status|progress|write|note)\([\'\"]x', "unwrapped ui message"),
+]
+
+pyfilters = [
+    (r"""(''')(([^']|\\'|'{1,2}(?!'))*)'''""", repquote),
+    (r'''(""")(([^"]|\\"|"{1,2}(?!"))*)"""''', repquote),
+    (r'''(?<!")(")(([^"\n]|\\")+)"(?!")''', repquote),
+    (r"""(?<!')(')(([^'\n]|\\')+)'(?!')""", repquote),
+    (r"( *)(#([^\n]*\S)?)", repcomment),
+]
+
+cpats = [
+    (r'//', "don't use //-style comments"),
+    (r'^  ', "don't use spaces to indent"),
+    (r'\S\t', "don't use tabs except for indent"),
+    (r'(\S\s+|^\s+)\n', "trailing whitespace"),
+    (r'.{85}', "line too long"),
+    (r'(while|if|do|for)\(', "use space after while/if/do/for"),
+    (r'return\(', "return is not a function"),
+    (r' ;', "no space before ;"),
+    (r'\w+\* \w+', "use int *foo, not int* foo"),
+    (r'\([^\)]+\) \w+', "use (int)foo, not (int) foo"),
+    (r'\S+ (\+\+|--)', "use foo++, not foo ++"),
+    (r'\w,\w', "missing whitespace after ,"),
+    (r'\w[+/*]\w', "missing whitespace in expression"),
+    (r'^#\s+\w', "use #foo, not # foo"),
+    (r'[^\n]\Z', "no trailing newline"),
+]
+
+cfilters = [
+    (r'(/\*)(((\*(?!/))|[^*])*)\*/', repccomment),
+    (r'''(?<!")(")(([^"]|\\")+"(?!"))''', repquote),
+    (r'''(#\s*include\s+<)([^>]+)>''', repinclude),
+    (r'(\()([^)]+\))', repcallspaces),
+]
+
+checks = [
+    ('python', r'.*\.(py|cgi)$', pyfilters, pypats),
+    ('test script', r'(.*/)?test-[^.~]*$', testfilters, testpats),
+    ('c', r'.*\.c$', cfilters, cpats),
+]
+
+if len(sys.argv) == 1:
+    check = glob.glob("*")
+else:
+    check = sys.argv[1:]
+
+for f in check:
+    for name, match, filters, pats in checks:
+        fc = 0
+        if not re.match(match, f):
+            continue
+        pre = post = open(f).read()
+        if "no-" + "check-code" in pre:
+            break
+        for p, r in filters:
+            post = re.sub(p, r, post)
+        # print post # uncomment to show filtered version
+        z = enumerate(zip(pre.splitlines(), post.splitlines(True)))
+        for n, l in z:
+            if "check-code" + "-ignore" in l[0]:
+                continue
+            lc = 0
+            for p, msg in pats:
+                if re.search(p, l[1]):
+                    if not lc:
+                        print "%s:%d:" % (f, n + 1)
+                        print " > %s" % l[0]
+                    print " %s" % msg
+                    lc += 1
+                    fc += 1
+            if fc == 15:
+                print " (too many errors, giving up)"
+                break
+        break
--- a/contrib/hgsh/hgsh.c	Thu Feb 11 23:15:42 2010 +0200
+++ b/contrib/hgsh/hgsh.c	Sat Feb 13 23:50:38 2010 -0600
@@ -89,7 +89,7 @@
  */
 #ifndef HG_SHELL
 #define HG_SHELL        NULL
-// #define HG_SHELL        "/bin/bash"
+/* #define HG_SHELL        "/bin/bash" */
 #endif
 
 /*
@@ -118,40 +118,40 @@
 
 static void print_cmdline(int argc, char **argv)
 {
-    FILE *fp = stderr;
-    int i;
+	FILE *fp = stderr;
+	int i;
 
-    fputs("command: ", fp);
+	fputs("command: ", fp);
 
-    for (i = 0; i < argc; i++) {
-        char *spc = strpbrk(argv[i], " \t\r\n");
-        if (spc) {
-            fputc('\'', fp);
-        }
-        fputs(argv[i], fp);
-        if (spc) {
-            fputc('\'', fp);
-        }
-        if (i < argc - 1) {
-            fputc(' ', fp);
-        }
-    }
-    fputc('\n', fp);
-    fflush(fp);
+	for (i = 0; i < argc; i++) {
+		char *spc = strpbrk(argv[i], " \t\r\n");
+		if (spc) {
+			fputc('\'', fp);
+		}
+		fputs(argv[i], fp);
+		if (spc) {
+			fputc('\'', fp);
+		}
+		if (i < argc - 1) {
+			fputc(' ', fp);
+		}
+	}
+	fputc('\n', fp);
+	fflush(fp);
 }
 
 static void usage(const char *reason, int exitcode)
 {
-    char *hg_help = HG_HELP;
+	char *hg_help = HG_HELP;
 
-    if (reason) {
-        fprintf(stderr, "*** Error: %s.\n", reason);
-    }
-    fprintf(stderr, "*** This program has been invoked incorrectly.\n");
-    if (hg_help) {
-        fprintf(stderr, "*** %s\n", hg_help);
-    }
-    exit(exitcode ? exitcode : EX_USAGE);
+	if (reason) {
+		fprintf(stderr, "*** Error: %s.\n", reason);
+	}
+	fprintf(stderr, "*** This program has been invoked incorrectly.\n");
+	if (hg_help) {
+		fprintf(stderr, "*** %s\n", hg_help);
+	}
+	exit(exitcode ? exitcode : EX_USAGE);
 }
 
 /*
@@ -162,43 +162,43 @@
  */
 static void forward_through_gateway(int argc, char **argv)
 {
-    char *ssh = SSH;
-    char *hg_host = HG_HOST;
-    char *hg_user = HG_USER;
-    char **nargv = alloca((10 + argc) * sizeof(char *));
-    int i = 0, j;
+	char *ssh = SSH;
+	char *hg_host = HG_HOST;
+	char *hg_user = HG_USER;
+	char **nargv = alloca((10 + argc) * sizeof(char *));
+	int i = 0, j;
 
-    nargv[i++] = ssh;
-    nargv[i++] = "-q";
-    nargv[i++] = "-T";
-    nargv[i++] = "-x";
-    if (hg_user) {
-        nargv[i++] = "-l";
-        nargv[i++] = hg_user;
-    }
-    nargv[i++] = hg_host;
+	nargv[i++] = ssh;
+	nargv[i++] = "-q";
+	nargv[i++] = "-T";
+	nargv[i++] = "-x";
+	if (hg_user) {
+		nargv[i++] = "-l";
+		nargv[i++] = hg_user;
+	}
+	nargv[i++] = hg_host;
 
-    /*
-     * sshd called us with added "-c", because it thinks we are a shell.
-     * drop it if we find it.
-     */
-    j = 1;
-    if (j < argc && strcmp(argv[j], "-c") == 0) {
-        j++;
-    }
+	/*
+	 * sshd called us with added "-c", because it thinks we are a shell.
+	 * drop it if we find it.
+	 */
+	j = 1;
+	if (j < argc && strcmp(argv[j], "-c") == 0) {
+		j++;
+	}
 
-    for (; j < argc; i++, j++) {
-        nargv[i] = argv[j];
-    }
-    nargv[i] = NULL;
+	for (; j < argc; i++, j++) {
+		nargv[i] = argv[j];
+	}
+	nargv[i] = NULL;
 
-    if (debug) {
-        print_cmdline(i, nargv);
-    }
+	if (debug) {
+		print_cmdline(i, nargv);
+	}
 
-    execv(ssh, nargv);
-    perror(ssh);
-    exit(EX_UNAVAILABLE);
+	execv(ssh, nargv);
+	perror(ssh);
+	exit(EX_UNAVAILABLE);
 }
 
 /*
@@ -209,44 +209,44 @@
  */
 static void run_shell(int argc, char **argv)
 {
-    char *hg_shell = HG_SHELL;
-    char **nargv;
-    char *c;
-    int i;
+	char *hg_shell = HG_SHELL;
+	char **nargv;
+	char *c;
+	int i;
 
-    nargv = alloca((argc + 3) * sizeof(char *));
-    c = strrchr(hg_shell, '/');
+	nargv = alloca((argc + 3) * sizeof(char *));
+	c = strrchr(hg_shell, '/');
 
-    /* tell "real" shell it is login shell, if needed. */
+	/* tell "real" shell it is login shell, if needed. */
 
-    if (argv[0][0] == '-' && c) {
-        nargv[0] = strdup(c);
-        if (nargv[0] == NULL) {
-            perror("malloc");
-            exit(EX_OSERR);
-        }
-        nargv[0][0] = '-';
-    } else {
-        nargv[0] = hg_shell;
-    }
+	if (argv[0][0] == '-' && c) {
+		nargv[0] = strdup(c);
+		if (nargv[0] == NULL) {
+			perror("malloc");
+			exit(EX_OSERR);
+		}
+		nargv[0][0] = '-';
+	} else {
+		nargv[0] = hg_shell;
+	}
 
-    for (i = 1; i < argc; i++) {
-        nargv[i] = argv[i];
-    }
-    nargv[i] = NULL;
+	for (i = 1; i < argc; i++) {
+		nargv[i] = argv[i];
+	}
+	nargv[i] = NULL;
 
-    if (debug) {
-        print_cmdline(i, nargv);
-    }
+	if (debug) {
+		print_cmdline(i, nargv);
+	}
 
-    execv(hg_shell, nargv);
-    perror(hg_shell);
-    exit(EX_OSFILE);
+	execv(hg_shell, nargv);
+	perror(hg_shell);
+	exit(EX_OSFILE);
 }
 
 enum cmdline {
-    hg_init,
-    hg_serve,
+	hg_init,
+	hg_serve,
 };
 
 
@@ -256,25 +256,25 @@
  */
 static int validate_repo(const char *repo_root, const char *subdir)
 {
-    char *abs_path;
-    struct stat st;
-    int ret;
+	char *abs_path;
+	struct stat st;
+	int ret;
 
-    if (asprintf(&abs_path, "%s.hg/%s", repo_root, subdir) == -1) {
-	ret = -1;
-	goto bail;
-    }
+	if (asprintf(&abs_path, "%s.hg/%s", repo_root, subdir) == -1) {
+		ret = -1;
+		goto bail;
+	}
 
-    /* verify that we really are looking at valid repo. */
+	/* verify that we really are looking at valid repo. */
 
-    if (stat(abs_path, &st) == -1) {
-	ret = 0;
-    } else {
-	ret = 1;
-    }
+	if (stat(abs_path, &st) == -1) {
+		ret = 0;
+	} else {
+		ret = 1;
+	}
 
 bail:
-    return ret;
+	return ret;
 }
 
 /*
@@ -282,158 +282,159 @@
  */
 static void serve_data(int argc, char **argv)
 {
-    char *hg_root = HG_ROOT;
-    char *repo, *repo_root;
-    enum cmdline cmd;
-    char *nargv[6];
-    size_t repolen;
-    int i;
-
-    /*
-     * check argv for looking okay. we should be invoked with argv
-     * resembling like this:
-     *
-     *   hgsh
-     *   -c
-     *   hg -R some/path serve --stdio
-     *
-     * the "-c" is added by sshd, because it thinks we are login shell.
-     */
+	char *hg_root = HG_ROOT;
+	char *repo, *repo_root;
+	enum cmdline cmd;
+	char *nargv[6];
+	size_t repolen;
+	int i;
 
-    if (argc != 3) {
-        goto badargs;
-    }
-
-    if (strcmp(argv[1], "-c") != 0) {
-        goto badargs;
-    }
-
-    if (sscanf(argv[2], "hg init %as", &repo) == 1) {
-	cmd = hg_init;
-    }
-    else if (sscanf(argv[2], "hg -R %as serve --stdio", &repo) == 1) {
-	cmd = hg_serve;
-    } else {
-        goto badargs;
-    }
-
-    repolen = repo ? strlen(repo) : 0;
+	/*
+	 * check argv for looking okay. we should be invoked with argv
+	 * resembling like this:
+	 *
+	 *   hgsh
+	 *   -c
+	 *   hg -R some/path serve --stdio
+	 *
+	 * the "-c" is added by sshd, because it thinks we are login shell.
+	 */
 
-    if (repolen == 0) {
-        goto badargs;
-    }
-
-    if (hg_root) {
-        if (asprintf(&repo_root, "%s/%s/", hg_root, repo) == -1) {
-            goto badargs;
-        }
+	if (argc != 3) {
+		goto badargs;
+	}
 
-        /*
-         * attempt to stop break out from inside the repository tree. could
-         * do something more clever here, because e.g. we could traverse a
-         * symlink that looks safe, but really breaks us out of tree.
-         */
-
-        if (strstr(repo_root, "/../") != NULL) {
-            goto badargs;
-        }
-
-	/* only hg init expects no repo. */
+	if (strcmp(argv[1], "-c") != 0) {
+		goto badargs;
+	}
 
-	if (cmd != hg_init) {
-	    int valid;
-
-	    valid = validate_repo(repo_root, "data");
-
-	    if (valid == -1) {
+	if (sscanf(argv[2], "hg init %as", &repo) == 1) {
+		cmd = hg_init;
+	}
+	else if (sscanf(argv[2], "hg -R %as serve --stdio", &repo) == 1) {
+		cmd = hg_serve;
+	} else {
 		goto badargs;
-	    }
+	}
 
-	    if (valid == 0) {
-		valid = validate_repo(repo_root, "store");
+	repolen = repo ? strlen(repo) : 0;
 
-		if (valid == -1) {
-		    goto badargs;
-		}
-	    }
-
-	    if (valid == 0) {
-		perror(repo);
-		exit(EX_DATAERR);
-	    }
+	if (repolen == 0) {
+		goto badargs;
 	}
 
-        if (chdir(hg_root) == -1) {
-            perror(hg_root);
-            exit(EX_SOFTWARE);
-        }
-    }
+	if (hg_root) {
+		if (asprintf(&repo_root, "%s/%s/", hg_root, repo) == -1) {
+			goto badargs;
+		}
+
+		/*
+		 * attempt to stop break out from inside the
+		 * repository tree. could do something more clever
+		 * here, because e.g. we could traverse a symlink that
+		 * looks safe, but really breaks us out of tree.
+		 */
+
+		if (strstr(repo_root, "/../") != NULL) {
+			goto badargs;
+		}
 
-    i = 0;
+		/* only hg init expects no repo. */
+
+		if (cmd != hg_init) {
+			int valid;
+
+			valid = validate_repo(repo_root, "data");
+
+			if (valid == -1) {
+				goto badargs;
+			}
+
+			if (valid == 0) {
+				valid = validate_repo(repo_root, "store");
+
+				if (valid == -1) {
+					goto badargs;
+				}
+			}
 
-    switch (cmd) {
-    case hg_serve:
-	nargv[i++] = HG;
-	nargv[i++] = "-R";
-	nargv[i++] = repo;
-	nargv[i++] = "serve";
-	nargv[i++] = "--stdio";
-	break;
-    case hg_init:
-	nargv[i++] = HG;
-	nargv[i++] = "init";
-	nargv[i++] = repo;
-	break;
-    }
+			if (valid == 0) {
+				perror(repo);
+				exit(EX_DATAERR);
+			}
+		}
+
+		if (chdir(hg_root) == -1) {
+			perror(hg_root);
+			exit(EX_SOFTWARE);
+		}
+	}
+
+	i = 0;
 
-    nargv[i] = NULL;
+	switch (cmd) {
+	case hg_serve:
+		nargv[i++] = HG;
+		nargv[i++] = "-R";
+		nargv[i++] = repo;
+		nargv[i++] = "serve";
+		nargv[i++] = "--stdio";
+		break;
+	case hg_init:
+		nargv[i++] = HG;
+		nargv[i++] = "init";
+		nargv[i++] = repo;
+		break;
+	}
 
-    if (debug) {
-        print_cmdline(i, nargv);
-    }
+	nargv[i] = NULL;
 
-    execv(HG, nargv);
-    perror(HG);
-    exit(EX_UNAVAILABLE);
+	if (debug) {
+		print_cmdline(i, nargv);
+	}
+
+	execv(HG, nargv);
+	perror(HG);
+	exit(EX_UNAVAILABLE);
 
 badargs:
-    /* print useless error message. */
+	/* print useless error message. */
 
-    usage("invalid arguments", EX_DATAERR);
+	usage("invalid arguments", EX_DATAERR);
 }
 
 int main(int argc, char **argv)
 {
-    char host[1024];
-    char *c;
+	char host[1024];
+	char *c;
 
-    if (gethostname(host, sizeof(host)) == -1) {
-        perror("gethostname");
-        exit(EX_OSERR);
-    }
+	if (gethostname(host, sizeof(host)) == -1) {
+		perror("gethostname");
+		exit(EX_OSERR);
+	}
 
-    if ((c = strchr(host, '.')) != NULL) {
-        *c = '\0';
-    }
+	if ((c = strchr(host, '.')) != NULL) {
+		*c = '\0';
+	}
 
-    if (getenv("SSH_CLIENT")) {
-        char *hg_gateway = HG_GATEWAY;
-        char *hg_host = HG_HOST;
+	if (getenv("SSH_CLIENT")) {
+		char *hg_gateway = HG_GATEWAY;
+		char *hg_host = HG_HOST;
 
-        if (hg_gateway && strcmp(host, hg_gateway) == 0) {
-            forward_through_gateway(argc, argv);
-        }
+		if (hg_gateway && strcmp(host, hg_gateway) == 0) {
+			forward_through_gateway(argc, argv);
+		}
 
-        if (hg_host && strcmp(host, hg_host) != 0) {
-            usage("invoked on unexpected host", EX_USAGE);
-        }
+		if (hg_host && strcmp(host, hg_host) != 0) {
+			usage("invoked on unexpected host", EX_USAGE);
+		}
 
-        serve_data(argc, argv);
-    } else if (HG_SHELL) {
-        run_shell(argc, argv);
-    } else {
-        usage("invalid arguments", EX_DATAERR);
-    }
+		serve_data(argc, argv);
+	} else if (HG_SHELL) {
+		run_shell(argc, argv);
+	} else {
+		usage("invalid arguments", EX_DATAERR);
+	}
 
-    return 0;
+	return 0;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/memory.py	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,36 @@
+# memory.py - track memory usage
+#
+# Copyright 2009 Matt Mackall <mpm@selenic.com> and others
+#
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2 or any later version.
+
+'''helper extension to measure memory usage
+
+Reads current and peak memory usage from ``/proc/self/status`` and
+prints it to ``stderr`` on exit.
+'''
+
+import atexit
+
+def memusage(ui):
+    """Report memory usage of the current process."""
+    status = None
+    result = {'peak': 0, 'rss': 0}
+    try:
+        # This will only work on systems with a /proc file system
+        # (like Linux).
+        status = open('/proc/self/status', 'r')
+        for line in status:
+            parts = line.split()
+            key = parts[0][2:-1].lower()
+            if key in result:
+                result[key] = int(parts[1])
+    finally:
+        if status is not None:
+            status.close()
+    ui.write_err(", ".join(["%s: %.1f MiB" % (key, value / 1024.0)
+                            for key, value in result.iteritems()]) + "\n")
+
+def extsetup(ui):
+    atexit.register(memusage, ui)
--- a/contrib/perf.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/contrib/perf.py	Sat Feb 13 23:50:38 2010 -0600
@@ -32,11 +32,11 @@
 def perfwalk(ui, repo, *pats):
     try:
         m = cmdutil.match(repo, pats, {})
-        timer(lambda: len(list(repo.dirstate.walk(m, True, False))))
+        timer(lambda: len(list(repo.dirstate.walk(m, [], True, False))))
     except:
         try:
             m = cmdutil.match(repo, pats, {})
-            timer(lambda: len([b for a,b,c in repo.dirstate.statwalk([], m)]))
+            timer(lambda: len([b for a, b, c in repo.dirstate.statwalk([], m)]))
         except:
             timer(lambda: len(list(cmdutil.walk(repo, pats, {}))))
 
@@ -103,9 +103,10 @@
 def perflookup(ui, repo, rev):
     timer(lambda: len(repo.lookup(rev)))
 
-def perflog(ui, repo):
+def perflog(ui, repo, **opts):
     ui.pushbuffer()
-    timer(lambda: commands.log(ui, repo, rev=[], date='', user=''))
+    timer(lambda: commands.log(ui, repo, rev=[], date='', user='',
+                               copies=opts.get('rename')))
     ui.popbuffer()
 
 def perftemplating(ui, repo):
@@ -144,8 +145,8 @@
     'perftags': (perftags, []),
     'perfdirstate': (perfdirstate, []),
     'perfdirstatedirs': (perfdirstate, []),
-    'perflog': (perflog, []),
+    'perflog': (perflog,
+                [('', 'rename', False, 'ask log to follow renames')]),
     'perftemplating': (perftemplating, []),
     'perfdiffwd': (perfdiffwd, []),
 }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/pylintrc	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,313 @@
+# lint Python modules using external checkers.
+# 
+# This is the main checker controlling the other ones and the reports
+# generation. It is itself both a raw checker and an astng checker in order
+# to:
+# * handle message activation / deactivation at the module level
+# * handle some basic but necessary stats'data (number of classes, methods...)
+# 
+[MASTER]
+
+# Specify a configuration file.
+#rcfile=
+
+# Python code to execute, usually for sys.path manipulation such as
+# pygtk.require().
+#init-hook=
+
+# Profiled execution.
+profile=no
+
+# Add <file or directory> to the black list. It should be a base name, not a
+# path. You may set this option multiple times.
+ignore=CVS
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# Set the cache size for astng objects.
+cache-size=500
+
+# List of plugins (as comma separated values of python modules names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+
+[MESSAGES CONTROL]
+
+# Enable only checker(s) with the given id(s). This option conflicts with the
+# disable-checker option
+#enable-checker=
+
+# Enable all checker(s) except those with the given id(s). This option
+# conflicts with the enable-checker option
+#disable-checker=
+
+# Enable all messages in the listed categories (IRCWEF).
+#enable-msg-cat=
+
+# Disable all messages in the listed categories (IRCWEF).
+disable-msg-cat=I
+
+# Enable the message(s) with the given id(s).
+#enable-msg=
+
+# Disable the message(s) with the given id(s).
+# W0704: except: pass
+# C0111: missing docstring
+# W0403: for the time being absolute imports don't play nice with demandimport
+disable-msg=W0704,C0111,W0403
+
+
+[REPORTS]
+
+# Set the output format. Available formats are text, parseable, colorized, msvs
+# (visual studio) and html
+output-format=text
+
+# Include message's id in output
+include-ids=yes
+
+# Put messages in a separate file for each module / package specified on the
+# command line instead of printing them on stdout. Reports (if any) will be
+# written in a file name "pylint_global.[txt|html]".
+files-output=no
+
+# Tells whether to display a full report or only the messages
+reports=yes
+
+# Python expression which should return a note less than 10 (10 is the highest
+# note). You have access to the variables errors warning, statement which
+# respectively contain the number of errors / warnings messages and the total
+# number of statements analyzed. This is used by the global evaluation report
+# (R0004).
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
+
+# Add a comment according to your evaluation note. This is used by the global
+# evaluation report (R0004).
+comment=no
+
+# Enable the report(s) with the given id(s).
+#enable-report=
+
+# Disable the report(s) with the given id(s).
+#disable-report=
+
+
+# try to find bugs in the code using type inference
+# 
+[TYPECHECK]
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+ignore-mixin-members=yes
+
+# List of classes names for which member attributes should not be checked
+# (useful for classes with attributes dynamically set).
+ignored-classes=SQLObject
+
+# When zope mode is activated, add a predefined set of Zope acquired attributes
+# to generated-members.
+zope=no
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E0201 when accessed.
+generated-members=REQUEST,acl_users,aq_parent
+
+
+# checks for
+# * unused variables / imports
+# * undefined variables
+# * redefinition of variable from builtins or from an outer scope
+# * use of variable before assignment
+# 
+[VARIABLES]
+
+# Tells whether we should check for unused import in __init__ files.
+init-import=yes
+
+# A regular expression matching names used for dummy variables (i.e. not used).
+dummy-variables-rgx=dummy
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=
+
+
+# checks for :
+# * doc strings
+# * modules / classes / functions / methods / arguments / variables name
+# * number of arguments, local variables, branches, returns and statements in
+# functions, methods
+# * required module attributes
+# * dangerous default values as arguments
+# * redefinition of function / method / class
+# * uses of the global statement
+# 
+[BASIC]
+
+# Required attributes for module, separated by a comma
+required-attributes=
+
+# Regular expression which should only match functions or classes name which do
+# not require a docstring
+no-docstring-rgx=__.*__
+
+# Regular expression which should only match correct module names
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Regular expression which should only match correct module level names
+const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$
+
+# Regular expression which should only match correct class names
+class-rgx=[a-zA-Z_][a-zA-Z0-9]+$
+
+# Regular expression which should only match correct function names
+function-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct method names
+method-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct instance attribute names
+attr-rgx=[a-z_][a-z0-9_]{1,30}$
+
+# Regular expression which should only match correct argument names
+argument-rgx=[a-z_][a-z0-9_]{0,30}$
+
+# Regular expression which should only match correct variable names
+variable-rgx=[a-z_][a-z0-9_]{0,30}$
+
+# Regular expression which should only match correct list comprehension /
+# generator expression variable names
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
+
+# Good variable names which should always be accepted, separated by a comma
+good-names=i,j,k,ex,Run,_,ui,c,fn,f,fd,l
+
+# Bad variable names which should always be refused, separated by a comma
+bad-names=foo,bar,baz,toto,tutu,tata
+
+# List of builtins function names that should not be used, separated by a comma
+#bad-functions=map,filter,apply,input
+bad-functions=map,filter,apply,input
+
+
+# checks for
+# * external modules dependencies
+# * relative / wildcard imports
+# * cyclic imports
+# * uses of deprecated modules
+# 
+[IMPORTS]
+
+# Deprecated modules which should not be used, separated by a comma
+deprecated-modules=regsub,TERMIOS,Bastion,rexec
+
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report R0402 must not be disabled)
+import-graph=
+
+# Create a graph of external dependencies in the given file (report R0402 must
+# not be disabled)
+ext-import-graph=
+
+# Create a graph of internal dependencies in the given file (report R0402 must
+# not be disabled)
+int-import-graph=
+
+
+# checks for sign of poor/misdesign:
+# * number of methods, attributes, local variables...
+# * size, complexity of functions, methods
+# 
+[DESIGN]
+
+# Maximum number of arguments for function / method
+max-args=5
+
+# Maximum number of locals for function / method body
+max-locals=15
+
+# Maximum number of return / yield for function / method body
+max-returns=6
+
+# Maximum number of branch for function / method body
+max-branchs=12
+
+# Maximum number of statements in function / method body
+max-statements=50
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=7
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=2
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20
+
+
+# checks for :
+# * methods without self as first argument
+# * overridden methods signature
+# * access only to existent members via self
+# * attributes not defined in the __init__ method
+# * supported interfaces implementation
+# * unreachable code
+# 
+[CLASSES]
+
+# List of interface methods to ignore, separated by a comma. This is used for
+# instance to not check methods defines in Zope's Interface base class.
+ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,__new__,setUp
+
+
+# checks for :
+# * unauthorized constructions
+# * strict indentation
+# * line length
+# * use of <> instead of !=
+# 
+[FORMAT]
+
+# Maximum number of characters on a single line.
+max-line-length=80
+
+# Maximum number of lines in a module
+max-module-lines=1000
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+indent-string='    '
+
+
+# checks for:
+# * warning notes in the code like FIXME, XXX
+# * PEP 263: source code with non ascii character but no encoding declaration
+# 
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,XXX,TODO
+
+
+# checks for similarities and duplicated code. This computation may be
+# memory / CPU intensive, so you should disable it if you experiments some
+# problems.
+# 
+[SIMILARITIES]
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+# Ignore comments when computing similarities.
+ignore-comments=yes
+
+# Ignore docstrings when computing similarities.
+ignore-docstrings=yes
--- a/contrib/shrink-revlog.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/contrib/shrink-revlog.py	Sat Feb 13 23:50:38 2010 -0600
@@ -1,16 +1,18 @@
 #!/usr/bin/env python
 
 """\
-Reorder a revlog (by default the the manifest file in the current
-repository) to save space.  Specifically, this topologically sorts the
-revisions in the revlog so that revisions on the same branch are adjacent
-as much as possible.  This is a workaround for the fact that Mercurial
-computes deltas relative to the previous revision rather than relative to a
-parent revision.  This is *not* safe to run on a changelog.
+reorder a revlog (the manifest by default) to save space
+
+Specifically, this topologically sorts the revisions in the revlog so that
+revisions on the same branch are adjacent as much as possible. This is a
+workaround for the fact that Mercurial computes deltas relative to the
+previous revision rather than relative to a parent revision.
+
+This is *not* safe to run on a changelog.
 """
 
 # Originally written by Benoit Boissinot <benoit.boissinot at ens-lyon.org>
-# as a patch to rewrite-log.  Cleaned up, refactored, documented, and
+# as a patch to rewrite-log. Cleaned up, refactored, documented, and
 # renamed by Greg Ward <greg at gerg.ca>.
 
 # XXX would be nice to have a way to verify the repository after shrinking,
@@ -20,16 +22,17 @@
 import sys, os, tempfile
 import optparse
 from mercurial import ui as ui_, hg, revlog, transaction, node, util
+from mercurial import changegroup
 
-def toposort(rl):
-    write = sys.stdout.write
+def toposort(ui, rl):
 
     children = {}
     root = []
     # build children and roots
-    write('reading %d revs ' % len(rl))
+    ui.status('reading revs\n')
     try:
         for i in rl:
+            ui.progress('reading', i, total=len(rl))
             children[i] = []
             parents = [p for p in rl.parentrevs(i) if p != node.nullrev]
             # in case of duplicate parents
@@ -41,16 +44,13 @@
 
             if len(parents) == 0:
                 root.append(i)
-
-            if i % 1000 == 0:
-                write('.')
     finally:
-        write('\n')
+        ui.progress('reading', None, total=len(rl))
 
     # XXX this is a reimplementation of the 'branchsort' topo sort
     # algorithm in hgext.convert.convcmd... would be nice not to duplicate
     # the algorithm
-    write('sorting ...')
+    ui.status('sorting revs\n')
     visit = root
     ret = []
     while visit:
@@ -67,102 +67,91 @@
             if len(parents_unseen) == 0:
                 next.append(c)
         visit = next + visit
-    write('\n')
     return ret
 
-def writerevs(r1, r2, order, tr):
-    write = sys.stdout.write
-    write('writing %d revs ' % len(order))
+def writerevs(ui, r1, r2, order, tr):
+
+    ui.status('writing revs\n')
+
+    count = [0]
+    def progress(*args):
+        ui.progress('writing', count[0], total=len(order))
+        count[0] += 1
+
+    order = [r1.node(r) for r in order]
+
+    # this is a bit ugly, but it works
+    lookup = lambda x: "%020d" % r1.linkrev(r1.rev(x))
+    unlookup = lambda x: int(x, 10)
+
     try:
-        count = 0
-        for rev in order:
-            n = r1.node(rev)
-            p1, p2 = r1.parents(n)
-            l = r1.linkrev(rev)
-            t = r1.revision(n)
-            n2 = r2.addrevision(t, tr, l, p1, p2)
+        group = util.chunkbuffer(r1.group(order, lookup, progress))
+        chunkiter = changegroup.chunkiter(group)
+        r2.addgroup(chunkiter, unlookup, tr)
+    finally:
+        ui.progress('writing', None, len(order))
 
-            if count % 1000 == 0:
-                write('.')
-            count += 1
-    finally:
-        write('\n')
-
-def report(olddatafn, newdatafn):
+def report(ui, olddatafn, newdatafn):
     oldsize = float(os.stat(olddatafn).st_size)
     newsize = float(os.stat(newdatafn).st_size)
 
     # argh: have to pass an int to %d, because a float >= 2^32
     # blows up under Python 2.5 or earlier
-    sys.stdout.write('old file size: %12d bytes (%6.1f MiB)\n'
-                     % (int(oldsize), oldsize/1024/1024))
-    sys.stdout.write('new file size: %12d bytes (%6.1f MiB)\n'
-                     % (int(newsize), newsize/1024/1024))
+    ui.write('old file size: %12d bytes (%6.1f MiB)\n'
+             % (int(oldsize), oldsize / 1024 / 1024))
+    ui.write('new file size: %12d bytes (%6.1f MiB)\n'
+             % (int(newsize), newsize / 1024 / 1024))
 
     shrink_percent = (oldsize - newsize) / oldsize * 100
     shrink_factor = oldsize / newsize
-    sys.stdout.write('shrinkage: %.1f%% (%.1fx)\n'
-                     % (shrink_percent, shrink_factor))
+    ui.write('shrinkage: %.1f%% (%.1fx)\n' % (shrink_percent, shrink_factor))
 
-def main():
+def shrink(ui, repo, **opts):
+    """
+    Shrink revlog by re-ordering revisions. Will operate on manifest for
+    the given repository if no other revlog is specified."""
 
     # Unbuffer stdout for nice progress output.
     sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
-    write = sys.stdout.write
 
-    parser = optparse.OptionParser(description=__doc__)
-    parser.add_option('-R', '--repository',
-                      default=os.path.curdir,
-                      metavar='REPO',
-                      help='repository root directory [default: current dir]')
-    parser.add_option('--revlog',
-                      metavar='FILE',
-                      help='shrink FILE [default: REPO/hg/store/00manifest.i]')
-    (options, args) = parser.parse_args()
-    if args:
-        parser.error('too many arguments')
+    if not repo.local():
+        raise util.Abort('not a local repository: %s' % repo.root)
 
-    # Open the specified repository.
-    ui = ui_.ui()
-    repo = hg.repository(ui, options.repository)
-    if not repo.local():
-        parser.error('not a local repository: %s' % options.repository)
-
-    if options.revlog is None:
+    fn = opts.get('revlog')
+    if not fn:
         indexfn = repo.sjoin('00manifest.i')
     else:
-        if not options.revlog.endswith('.i'):
-            parser.error('--revlog option must specify the revlog index file '
-                         '(*.i), not %s' % options.revlog)
+        if not fn.endswith('.i'):
+            raise util.Abort('--revlog option must specify the revlog index '
+                             'file (*.i), not %s' % opts.get('revlog'))
 
-        indexfn = os.path.realpath(options.revlog)
+        indexfn = os.path.realpath(fn)
         store = repo.sjoin('')
         if not indexfn.startswith(store):
-            parser.error('--revlog option must specify a revlog in %s, not %s'
-                         % (store, indexfn))
+            raise util.Abort('--revlog option must specify a revlog in %s, '
+                             'not %s' % (store, indexfn))
 
     datafn = indexfn[:-2] + '.d'
     if not os.path.exists(indexfn):
-        parser.error('no such file: %s' % indexfn)
+        raise util.Abort('no such file: %s' % indexfn)
     if '00changelog' in indexfn:
-        parser.error('shrinking the changelog will corrupt your repository')
+        raise util.Abort('shrinking the changelog will corrupt your repository')
     if not os.path.exists(datafn):
         # This is just a lazy shortcut because I can't be bothered to
         # handle all the special cases that entail from no .d file.
-        parser.error('%s does not exist: revlog not big enough '
-                     'to be worth shrinking' % datafn)
+        raise util.Abort('%s does not exist: revlog not big enough '
+                         'to be worth shrinking' % datafn)
 
     oldindexfn = indexfn + '.old'
     olddatafn = datafn + '.old'
     if os.path.exists(oldindexfn) or os.path.exists(olddatafn):
-        parser.error('one or both of\n'
-                     '  %s\n'
-                     '  %s\n'
-                     'exists from a previous run; please clean up before '
-                     'running again'
-                     % (oldindexfn, olddatafn))
+        raise util.Abort('one or both of\n'
+                         '  %s\n'
+                         '  %s\n'
+                         'exists from a previous run; please clean up before '
+                         'running again' % (oldindexfn, olddatafn))
 
-    write('shrinking %s\n' % indexfn)
+    ui.write('shrinking %s\n' % indexfn)
     prefix = os.path.basename(indexfn)[:-1]
     (tmpfd, tmpindexfn) = tempfile.mkstemp(dir=os.path.dirname(indexfn),
                                            prefix=prefix,
@@ -175,18 +164,18 @@
 
     # Don't use repo.transaction(), because then things get hairy with
     # paths: some need to be relative to .hg, and some need to be
-    # absolute.  Doing it this way keeps things simple: everything is an
+    # absolute. Doing it this way keeps things simple: everything is an
     # absolute path.
     lock = repo.lock(wait=False)
-    tr = transaction.transaction(sys.stderr.write,
+    tr = transaction.transaction(ui.warn,
                                  open,
                                  repo.sjoin('journal'))
 
     try:
         try:
-            order = toposort(r1)
-            writerevs(r1, r2, order, tr)
-            report(datafn, tmpdatafn)
+            order = toposort(ui, r1)
+            writerevs(ui, r1, r2, order, tr)
+            report(ui, datafn, tmpdatafn)
             tr.close()
         except:
             # Abort transaction first, so we truncate the files before
@@ -197,23 +186,34 @@
             if os.path.exists(tmpdatafn):
                 os.unlink(tmpdatafn)
             raise
+        if not opts.get('dry_run'):
+            # Racy since both files cannot be renamed atomically
+            util.os_link(indexfn, oldindexfn)
+            util.os_link(datafn, olddatafn)
+            util.rename(tmpindexfn, indexfn)
+            util.rename(tmpdatafn, datafn)
+        else:
+            os.unlink(tmpindexfn)
+            os.unlink(tmpdatafn)
     finally:
         lock.release()
 
-    os.link(indexfn, oldindexfn)
-    os.link(datafn, olddatafn)
-    os.rename(tmpindexfn, indexfn)
-    os.rename(tmpdatafn, datafn)
-    write('note: old revlog saved in:\n'
-          '  %s\n'
-          '  %s\n'
-          '(You can delete those files when you are satisfied that your\n'
-          'repository is still sane.  '
-          'Running \'hg verify\' is strongly recommended.)\n'
-          % (oldindexfn, olddatafn))
+    if not opts.get('dry_run'):
+        ui.write('note: old revlog saved in:\n'
+                 '  %s\n'
+                 '  %s\n'
+                 '(You can delete those files when you are satisfied that your\n'
+                 'repository is still sane.  '
+                 'Running \'hg verify\' is strongly recommended.)\n'
+                 % (oldindexfn, olddatafn))
+
+cmdtable = {
+    'shrink': (shrink,
+               [('', 'revlog', '', 'index (.i) file of the revlog to shrink'),
+                ('n', 'dry-run', None, 'do not shrink, simulate only'),
+                ],
+               'hg shrink [--revlog PATH]')
+}
 
 if __name__ == "__main__":
-    try:
-        main()
-    except KeyboardInterrupt:
-        sys.exit("interrupted")
+    print "shrink-revlog.py is now an extension (see hg help extensions)"
--- a/contrib/win32/mercurial.iss	Thu Feb 11 23:15:42 2010 +0200
+++ b/contrib/win32/mercurial.iss	Sat Feb 13 23:50:38 2010 -0600
@@ -46,7 +46,12 @@
 Source: contrib\mercurial.el; DestDir: {app}/Contrib
 Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim
 Source: contrib\zsh_completion; DestDir: {app}/Contrib
+Source: contrib\bash_completion; DestDir: {app}/Contrib
+Source: contrib\tcsh_completion; DestDir: {app}/Contrib
+Source: contrib\tcsh_completion_build.sh; DestDir: {app}/Contrib
 Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl
+Source: contrib\xml.rnc; DestDir: {app}/Contrib
+Source: contrib\shrink-revlog.py; DestDir: {app}/Contrib
 Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme
 Source: contrib\mergetools.hgrc; DestDir: {tmp};
 Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles;
@@ -62,9 +67,9 @@
 Source: dist\add_path.exe; DestDir: {app}
 Source: doc\*.html; DestDir: {app}\Docs
 Source: doc\style.css; DestDir: {app}\Docs
-Source: help\*.txt; DestDir: {app}\help
-Source: locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs
-Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
+Source: mercurial\help\*.txt; DestDir: {app}\help
+Source: mercurial\locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs
+Source: mercurial\templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
 Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt
 Source: COPYING; DestDir: {app}; DestName: Copying.txt
 
@@ -73,6 +78,7 @@
 
 [UninstallDelete]
 Type: files; Name: {app}\Mercurial.url
+Type: files; Name: {app}\Contrib\shrink-revlog.pyc
 
 [Icons]
 Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/xml.rnc	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,41 @@
+# RelaxNG schema for "xml" log style
+# Inspired by Subversion's XML log format.
+
+start = log
+node.type = xsd:string  {minLength = "40" maxLength = "40"}
+
+log = element log { logentry+ }
+logentry = element logentry {
+    logentry.attlist,
+    branch*, tag*, hgparent*,
+    author, date,
+    msg, paths?, copies?, extra*
+}
+logentry.attlist =
+    attribute revision {xsd:nonNegativeInteger}
+  & attribute node {node.type}
+branch = element branch { text }
+tag = element tag { text }
+hgparent = element parent {hgparent.attlist, text}
+hgparent.attlist =
+    attribute revision {xsd:integer {minInclusive = "-1"} }
+  & attribute node {node.type}
+author = element author { author.attlist, text }
+author.attlist =
+    attribute email {text}
+date = element date {xsd:dateTime}
+msg = element msg {msg.attlist, text}
+msg.attlist =
+    attribute xml:space {"preserve"}
+paths = element paths { path* }
+path = element path { path.attlist, text }
+path.attlist =
+    # Action: (A)dd, (M)odify, (R)emove
+    attribute action {"A"|"M"|"R"}
+copies = element copies { copy+ }
+copy = element copy { copy.attlist, text }
+copy.attlist =
+    attribute source {text}
+extra = element extra {extra.attlist, text}
+extra.attlist =
+    attribute key {text}
--- a/contrib/zsh_completion	Thu Feb 11 23:15:42 2010 +0200
+++ b/contrib/zsh_completion	Sat Feb 13 23:50:38 2010 -0600
@@ -358,7 +358,7 @@
 _hg_diff_opts=(
   '(--text -a)'{-a,--text}'[treat all files as text]'
   '(--git -g)'{-g,--git}'[use git extended diff format]'
-  "--nodates[don't include dates in diff headers]")
+  "--nodates[omit dates from diff headers]")
 
 _hg_dryrun_opts=(
   '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
@@ -734,6 +734,11 @@
   '*:files:_files'
 }
 
+_hg_cmd_summary() {
+  _arguments -s -w : $_hg_global_opts \
+  '--remote[check for push and pull]'
+}
+
 _hg_cmd_tag() {
   _arguments -s -w : $_hg_global_opts \
   '(--local -l)'{-l,--local}'[make the tag local]' \
--- a/doc/Makefile	Thu Feb 11 23:15:42 2010 +0200
+++ b/doc/Makefile	Sat Feb 13 23:50:38 2010 -0600
@@ -1,7 +1,7 @@
 SOURCES=$(wildcard *.[0-9].txt)
 MAN=$(SOURCES:%.txt=%)
 HTML=$(SOURCES:%.txt=%.html)
-GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py ../help/*.txt
+GENDOC=gendoc.py ../mercurial/commands.py ../mercurial/help.py ../mercurial/help/*.txt
 PREFIX=/usr/local
 MANDIR=$(PREFIX)/share/man
 INSTALL=install -c -m 644
--- a/doc/gendoc.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/doc/gendoc.py	Sat Feb 13 23:50:38 2010 -0600
@@ -19,7 +19,7 @@
 
     i = docstr.find("\n")
     if i != -1:
-        desc = docstr[i+2:]
+        desc = docstr[i + 2:]
     else:
         desc = "    %s" % shortdesc
     return (shortdesc, desc)
@@ -76,7 +76,8 @@
     cmds.sort()
 
     for f in cmds:
-        if f.startswith("debug"): continue
+        if f.startswith("debug"):
+            continue
         d = get_cmd(h[f])
         # synopsis
         ui.write(".. _%s:\n\n" % d['cmd'])
--- a/doc/hgrc.5.txt	Thu Feb 11 23:15:42 2010 +0200
+++ b/doc/hgrc.5.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -72,16 +72,19 @@
     in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
     to all Mercurial commands executed by any user in any directory.
 
-| (Windows) ``C:\Mercurial\Mercurial.ini``
+| (Windows) ``<install-dir>\Mercurial.ini``
+| (Windows) ``<install-dir>\hgrc.d\*.rc``
 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
-| (Windows) ``<install-dir>\Mercurial.ini``
 
     Per-installation/system configuration files, for the system on
     which Mercurial is running. Options in these files apply to all
     Mercurial commands executed by any user in any directory. Registry
     keys contain PATH-like strings, every part of which must reference
     a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
-    be read.
+    be read.  Mercurial checks each of these locations in the specified
+    order until one or more configuration files are detected.  If the
+    pywin32 extensions are not installed, Mercurial will only look for
+    site-wide configuration in ``C:\Mercurial\Mercurial.ini``.
 
 Syntax
 ------
@@ -615,6 +618,9 @@
     Optional. Password to authenticate with at the proxy server.
 ``user``
     Optional. User name to authenticate with at the proxy server.
+``always``
+    Optional. Always use the proxy, even for localhost and any entries
+    in ``http_proxy.no``. True or False. Default: False.
 
 ``smtp``
 """"""""
@@ -647,9 +653,13 @@
 
 ``eol``
     When set to 'strict' patch content and patched files end of lines
-    are preserved. When set to ``lf`` or ``crlf``, both files end of lines
-    are ignored when patching and the result line endings are
-    normalized to either LF (Unix) or CRLF (Windows).
+    are preserved. When set to ``lf`` or ``crlf``, both files end of
+    lines are ignored when patching and the result line endings are
+    normalized to either LF (Unix) or CRLF (Windows). When set to
+    ``auto``, end of lines are again ignored while patching but line
+    endings in patched files are normalized to their original setting
+    on a per-file basis. If target file does not exist or has no end
+    of line, patch line endings are preserved.
     Default: strict.
 
 
@@ -706,8 +716,14 @@
     WAN, an uncompressed streaming clone is a lot faster (~10x) than a
     regular clone. Over most WAN connections (anything slower than
     about 6 Mbps), uncompressed streaming is slower, because of the
-    extra data transfer overhead. Default is False.
+    extra data transfer overhead. This mode will also temporarily hold
+    the write lock while determining what data to transfer.
+    Default is True.
 
+``validate``
+    Whether to validate the completeness of pushed changesets by
+    checking that all new file revisions specified in manifests are
+    present. Default is False.
 
 ``trusted``
 """""""""""
@@ -866,6 +882,26 @@
     Base URL to use when publishing URLs in other locations, so
     third-party tools like email notification hooks can construct
     URLs. Example: ``http://hgserver/repos/``.
+``cacerts``
+    Path to file containing a list of PEM encoded certificate authorities
+    that may be used to verify an SSL server's identity. The form must be
+    as follows::
+
+        -----BEGIN CERTIFICATE-----
+        ... (certificate in base64 PEM encoding) ...
+        -----END CERTIFICATE-----
+        -----BEGIN CERTIFICATE-----
+        ... (certificate in base64 PEM encoding) ...
+        -----END CERTIFICATE-----
+
+    This feature is only supported when using Python 2.6. If you wish to
+    use it with earlier versions of Python, install the backported
+    version of the ssl library that is available from
+    ``http://pypi.python.org``.
+
+    You can use OpenSSL's CA certificate file if your platform has one.
+    On most Linux systems this will be ``/etc/ssl/certs/ca-certificates.crt``.
+    Otherwise you will have to generate this file manually.
 ``contact``
     Name or email address of the person in charge of the repository.
     Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty.
--- a/doc/rst2man.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/doc/rst2man.py	Sat Feb 13 23:50:38 2010 -0600
@@ -112,7 +112,7 @@
 class Table:
     def __init__(self):
         self._rows = []
-        self._options = ['center', ]
+        self._options = ['center']
         self._tab_char = '\t'
         self._coldefs = []
     def new_row(self):
@@ -123,7 +123,7 @@
     def append_cell(self, cell_lines):
         """cell_lines is an array of lines"""
         start = 0
-        if len(cell_lines)>0 and cell_lines[0] == '.sp\n':
+        if len(cell_lines) > 0 and cell_lines[0] == '.sp\n':
             start = 1
         self._rows[-1].append(cell_lines[start:])
         if len(self._coldefs) < len(self._rows[-1]):
@@ -223,12 +223,12 @@
                 'term' : ('\n.B ', '\n'),
                 'title_reference' : ('\\fI', '\\fP'),
 
-                'topic-title' : ('.SS ', ),
-                'sidebar-title' : ('.SS ', ),
+                'topic-title' : ('.SS ',),
+                'sidebar-title' : ('.SS ',),
 
                 'problematic' : ('\n.nf\n', '\n.fi\n'),
                     }
-        # NOTE dont specify the newline before a dot-command, but ensure
+        # NOTE don't specify the newline before a dot-command, but ensure
         # it is there.
 
     def comment_begin(self, text):
@@ -255,18 +255,18 @@
             # ensure we get a ".TH" as viewers require it.
             self.head.append(self.header())
         # filter body
-        for i in xrange(len(self.body)-1,0,-1):
+        for i in xrange(len(self.body)-1, 0, -1):
             # remove superfluous vertical gaps.
             if self.body[i] == '.sp\n':
-                if self.body[i-1][:4] in ('.BI ','.IP '):
+                if self.body[i - 1][:4] in ('.BI ','.IP '):
                     self.body[i] = '.\n'
-                elif (self.body[i-1][:3] == '.B ' and
-                    self.body[i-2][:4] == '.TP\n'):
+                elif (self.body[i - 1][:3] == '.B ' and
+                    self.body[i - 2][:4] == '.TP\n'):
                     self.body[i] = '.\n'
-                elif (self.body[i-1] == '\n' and
-                    self.body[i-2][0] != '.' and
-                    (self.body[i-3][:7] == '.TP\n.B '
-                        or self.body[i-3][:4] == '\n.B ')
+                elif (self.body[i - 1] == '\n' and
+                    self.body[i - 2][0] != '.' and
+                    (self.body[i - 3][:7] == '.TP\n.B '
+                        or self.body[i - 3][:4] == '\n.B ')
                      ):
                     self.body[i] = '.\n'
         return ''.join(self.head + self.body + self.foot)
@@ -451,7 +451,7 @@
     depart_caution = depart_admonition
 
     def visit_citation(self, node):
-        num,text = node.astext().split(None,1)
+        num, text = node.astext().split(None, 1)
         num = num.strip()
         self.body.append('.IP [%s] 5\n' % num)
 
@@ -578,19 +578,18 @@
                                     self.defs['indent'][0] % BLOCKQOUTE_INDENT,
                                     self._docinfo[name],
                                     self.defs['indent'][1],
-                                    self.defs['indent'][1],
-                                    ) )
+                                    self.defs['indent'][1]))
             elif not name in skip:
                 if name in self._docinfo_names:
                     label = self._docinfo_names[name]
                 else:
                     label = self.language.labels.get(name, name)
-                self.body.append("\n%s: %s\n" % (label, self._docinfo[name]) )
+                self.body.append("\n%s: %s\n" % (label, self._docinfo[name]))
         if self._docinfo['copyright']:
             self.body.append('.SH COPYRIGHT\n%s\n'
                     % self._docinfo['copyright'])
-        self.body.append( self.comment(
-                        'Generated by docutils manpage writer.\n' ) )
+        self.body.append(self.comment(
+                        'Generated by docutils manpage writer.\n'))
 
     def visit_emphasis(self, node):
         self.body.append(self.defs['emphasis'][0])
@@ -672,7 +671,7 @@
         pass
 
     def visit_footnote(self, node):
-        num,text = node.astext().split(None,1)
+        num, text = node.astext().split(None, 1)
         num = num.strip()
         self.body.append('.IP [%s] 5\n' % self.deunicode(num))
 
@@ -763,6 +762,7 @@
     def visit_line_block(self, node):
         self._line_block += 1
         if self._line_block == 1:
+            self.body.append('.sp\n')
             self.body.append('.nf\n')
         else:
             self.body.append('.in +2\n')
@@ -785,7 +785,7 @@
         # man 7 man argues to use ".IP" instead of ".TP"
         self.body.append('.IP %s %d\n' % (
                 self._list_char[-1].next(),
-                self._list_char[-1].get_width(),) )
+                self._list_char[-1].get_width(),))
 
     def depart_list_item(self, node):
         pass
@@ -857,7 +857,7 @@
 
     def visit_option(self, node):
         # each form of the option will be presented separately
-        if self.context[-1]>0:
+        if self.context[-1] > 0:
             self.body.append(', ')
         if self.context[-3] == '.BI':
             self.body.append('\\')
@@ -876,7 +876,7 @@
     def visit_option_argument(self, node):
         self.context[-3] = '.BI' # bold/italic alternate
         if node['delimiter'] != ' ':
-            self.body.append('\\fB%s ' % node['delimiter'] )
+            self.body.append('\\fB%s ' % node['delimiter'])
         elif self.body[len(self.body)-1].endswith('='):
             # a blank only means no blank in output, just changing font
             self.body.append(' ')
--- a/help/config.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-Mercurial reads configuration data from several files, if they exist.
-Below we list the most specific file first.
-
-On Windows, these configuration files are read:
-
-- ``<repo>\.hg\hgrc``
-- ``%USERPROFILE%\.hgrc``
-- ``%USERPROFILE%\Mercurial.ini``
-- ``%HOME%\.hgrc``
-- ``%HOME%\Mercurial.ini``
-- ``C:\Mercurial\Mercurial.ini``
-- ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
-- ``<install-dir>\Mercurial.ini``
-
-On Unix, these files are read:
-
-- ``<repo>/.hg/hgrc``
-- ``$HOME/.hgrc``
-- ``/etc/mercurial/hgrc``
-- ``/etc/mercurial/hgrc.d/*.rc``
-- ``<install-root>/etc/mercurial/hgrc``
-- ``<install-root>/etc/mercurial/hgrc.d/*.rc``
-
-The configuration files for Mercurial use a simple ini-file format. A
-configuration file consists of sections, led by a ``[section]`` header
-and followed by ``name = value`` entries::
-
-  [ui]
-  username = Firstname Lastname <firstname.lastname@example.net>
-  verbose = True
-
-This above entries will be referred to as ``ui.username`` and
-``ui.verbose``, respectively. Please see the hgrc man page for a full
-description of the possible configuration values:
-
-- on Unix-like systems: ``man hgrc``
-- online: http://www.selenic.com/mercurial/hgrc.5.html
--- a/help/dates.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-Some commands allow the user to specify a date, e.g.:
-
-- backout, commit, import, tag: Specify the commit date.
-- log, revert, update: Select revision(s) by date.
-
-Many date formats are valid. Here are some examples:
-
-- ``Wed Dec 6 13:18:29 2006`` (local timezone assumed)
-- ``Dec 6 13:18 -0600`` (year assumed, time offset provided)
-- ``Dec 6 13:18 UTC`` (UTC and GMT are aliases for +0000)
-- ``Dec 6`` (midnight)
-- ``13:18`` (today assumed)
-- ``3:39`` (3:39AM assumed)
-- ``3:39pm`` (15:39)
-- ``2006-12-06 13:18:29`` (ISO 8601 format)
-- ``2006-12-6 13:18``
-- ``2006-12-6``
-- ``12-6``
-- ``12/6``
-- ``12/6/6`` (Dec 6 2006)
-
-Lastly, there is Mercurial's internal format:
-
-- ``1165432709 0`` (Wed Dec 6 13:18:29 2006 UTC)
-
-This is the internal representation format for dates. unixtime is the
-number of seconds since the epoch (1970-01-01 00:00 UTC). offset is
-the offset of the local timezone, in seconds west of UTC (negative if
-the timezone is east of UTC).
-
-The log command also accepts date ranges:
-
-- ``<{datetime}`` - at or before a given date/time
-- ``>{datetime}`` - on or after a given date/time
-- ``{datetime} to {datetime}`` - a date range, inclusive
-- ``-{days}`` - within a given number of days of today
--- a/help/diffs.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-Mercurial's default format for showing changes between two versions of
-a file is compatible with the unified format of GNU diff, which can be
-used by GNU patch and many other standard tools.
-
-While this standard format is often enough, it does not encode the
-following information:
-
-- executable status and other permission bits
-- copy or rename information
-- changes in binary files
-- creation or deletion of empty files
-
-Mercurial also supports the extended diff format from the git VCS
-which addresses these limitations. The git diff format is not produced
-by default because a few widespread tools still do not understand this
-format.
-
-This means that when generating diffs from a Mercurial repository
-(e.g. with "hg export"), you should be careful about things like file
-copies and renames or other things mentioned above, because when
-applying a standard diff to a different repository, this extra
-information is lost. Mercurial's internal operations (like push and
-pull) are not affected by this, because they use an internal binary
-format for communicating changes.
-
-To make Mercurial produce the git extended diff format, use the --git
-option available for many commands, or set 'git = True' in the [diff]
-section of your hgrc. You do not need to set this option when
-importing diffs in this format or using them in the mq extension.
--- a/help/environment.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-HG
-    Path to the 'hg' executable, automatically passed when running
-    hooks, extensions or external tools. If unset or empty, this is
-    the hg executable's name if it's frozen, or an executable named
-    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on
-    Windows) is searched.
-
-HGEDITOR
-    This is the name of the editor to run when committing. See EDITOR.
-
-    (deprecated, use .hgrc)
-
-HGENCODING
-    This overrides the default locale setting detected by Mercurial.
-    This setting is used to convert data including usernames,
-    changeset descriptions, tag names, and branches. This setting can
-    be overridden with the --encoding command-line option.
-
-HGENCODINGMODE
-    This sets Mercurial's behavior for handling unknown characters
-    while transcoding user input. The default is "strict", which
-    causes Mercurial to abort if it can't map a character. Other
-    settings include "replace", which replaces unknown characters, and
-    "ignore", which drops them. This setting can be overridden with
-    the --encodingmode command-line option.
-
-HGMERGE
-    An executable to use for resolving merge conflicts. The program
-    will be executed with three arguments: local file, remote file,
-    ancestor file.
-
-    (deprecated, use .hgrc)
-
-HGRCPATH
-    A list of files or directories to search for hgrc files. Item
-    separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
-    platform default search path is used. If empty, only the .hg/hgrc
-    from the current repository is read.
-
-    For each element in HGRCPATH:
-
-    - if it's a directory, all files ending with .rc are added
-    - otherwise, the file itself will be added
-
-HGUSER
-    This is the string used as the author of a commit. If not set,
-    available values will be considered in this order:
-
-    - HGUSER (deprecated)
-    - hgrc files from the HGRCPATH
-    - EMAIL
-    - interactive prompt
-    - LOGNAME (with ``@hostname`` appended)
-
-    (deprecated, use .hgrc)
-
-EMAIL
-    May be used as the author of a commit; see HGUSER.
-
-LOGNAME
-    May be used as the author of a commit; see HGUSER.
-
-VISUAL
-    This is the name of the editor to use when committing. See EDITOR.
-
-EDITOR
-    Sometimes Mercurial needs to open a text file in an editor for a
-    user to modify, for example when writing commit messages. The
-    editor it uses is determined by looking at the environment
-    variables HGEDITOR, VISUAL and EDITOR, in that order. The first
-    non-empty one is chosen. If all of them are empty, the editor
-    defaults to 'vi'.
-
-PYTHONPATH
-    This is used by Python to find imported modules and may need to be
-    set appropriately if this Mercurial is not installed system-wide.
--- a/help/extensions.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-Mercurial has the ability to add new features through the use of
-extensions. Extensions may add new commands, add options to
-existing commands, change the default behavior of commands, or
-implement hooks.
-
-Extensions are not loaded by default for a variety of reasons:
-they can increase startup overhead; they may be meant for advanced
-usage only; they may provide potentially dangerous abilities (such
-as letting you destroy or modify history); they might not be ready
-for prime time; or they may alter some usual behaviors of stock
-Mercurial. It is thus up to the user to activate extensions as
-needed.
-
-To enable the "foo" extension, either shipped with Mercurial or in
-the Python search path, create an entry for it in your hgrc, like
-this::
-
-  [extensions]
-  foo =
-
-You may also specify the full path to an extension::
-
-  [extensions]
-  myfeature = ~/.hgext/myfeature.py
-
-To explicitly disable an extension enabled in an hgrc of broader
-scope, prepend its path with !::
-
-  [extensions]
-  # disabling extension bar residing in /path/to/extension/bar.py
-  bar = !/path/to/extension/bar.py
-  # ditto, but no path was supplied for extension baz
-  baz = !
--- a/help/multirevs.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-When Mercurial accepts more than one revision, they may be specified
-individually, or provided as a topologically continuous range,
-separated by the ":" character.
-
-The syntax of range notation is [BEGIN]:[END], where BEGIN and END are
-revision identifiers. Both BEGIN and END are optional. If BEGIN is not
-specified, it defaults to revision number 0. If END is not specified,
-it defaults to the tip. The range ":" thus means "all revisions".
-
-If BEGIN is greater than END, revisions are treated in reverse order.
-
-A range acts as a closed interval. This means that a range of 3:5
-gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.
--- a/help/patterns.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-Mercurial accepts several notations for identifying one or more files
-at a time.
-
-By default, Mercurial treats filenames as shell-style extended glob
-patterns.
-
-Alternate pattern notations must be specified explicitly.
-
-To use a plain path name without any pattern matching, start it with
-``path:``. These path names must completely match starting at the
-current repository root.
-
-To use an extended glob, start a name with ``glob:``. Globs are rooted
-at the current directory; a glob such as ``*.c`` will only match files
-in the current directory ending with ``.c``.
-
-The supported glob syntax extensions are ``**`` to match any string
-across path separators and ``{a,b}`` to mean "a or b".
-
-To use a Perl/Python regular expression, start a name with ``re:``.
-Regexp pattern matching is anchored at the root of the repository.
-
-Plain examples::
-
-  path:foo/bar   a name bar in a directory named foo in the root
-                 of the repository
-  path:path:name a file or directory named "path:name"
-
-Glob examples::
-
-  glob:*.c       any name ending in ".c" in the current directory
-  *.c            any name ending in ".c" in the current directory
-  **.c           any name ending in ".c" in any subdirectory of the
-                 current directory including itself.
-  foo/*.c        any name ending in ".c" in the directory foo
-  foo/**.c       any name ending in ".c" in any subdirectory of foo
-                 including itself.
-
-Regexp examples::
-
-  re:.*\.c$      any name ending in ".c", anywhere in the repository
--- a/help/revisions.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-Mercurial supports several ways to specify individual revisions.
-
-A plain integer is treated as a revision number. Negative integers are
-treated as sequential offsets from the tip, with -1 denoting the tip,
--2 denoting the revision prior to the tip, and so forth.
-
-A 40-digit hexadecimal string is treated as a unique revision
-identifier.
-
-A hexadecimal string less than 40 characters long is treated as a
-unique revision identifier and is referred to as a short-form
-identifier. A short-form identifier is only valid if it is the prefix
-of exactly one full-length identifier.
-
-Any other string is treated as a tag or branch name. A tag name is a
-symbolic name associated with a revision identifier. A branch name
-denotes the tipmost revision of that branch. Tag and branch names must
-not contain the ":" character.
-
-The reserved name "tip" is a special tag that always identifies the
-most recent revision.
-
-The reserved name "null" indicates the null revision. This is the
-revision of an empty repository, and the parent of revision 0.
-
-The reserved name "." indicates the working directory parent. If no
-working directory is checked out, it is equivalent to null. If an
-uncommitted merge is in progress, "." is the revision of the first
-parent.
--- a/help/templates.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-Mercurial allows you to customize output of commands through
-templates. You can either pass in a template from the command
-line, via the --template option, or select an existing
-template-style (--style).
-
-You can customize output for any "log-like" command: log,
-outgoing, incoming, tip, parents, heads and glog.
-
-Three styles are packaged with Mercurial: default (the style used
-when no explicit preference is passed), compact and changelog.
-Usage::
-
-    $ hg log -r1 --style changelog
-
-A template is a piece of text, with markup to invoke variable
-expansion::
-
-    $ hg log -r1 --template "{node}\n"
-    b56ce7b07c52de7d5fd79fb89701ea538af65746
-
-Strings in curly braces are called keywords. The availability of
-keywords depends on the exact context of the templater. These
-keywords are usually available for templating a log-like command:
-
-:author:    String. The unmodified author of the changeset.
-:branches:  String. The name of the branch on which the changeset
-            was committed. Will be empty if the branch name was
-            default.
-:date:      Date information. The date when the changeset was
-            committed.
-:desc:      String. The text of the changeset description.
-:diffstat:  String. Statistics of changes with the following
-            format: "modified files: +added/-removed lines"
-:files:     List of strings. All files modified, added, or removed
-            by this changeset.
-:file_adds: List of strings. Files added by this changeset.
-:file_mods: List of strings. Files modified by this changeset.
-:file_dels: List of strings. Files removed by this changeset.
-:node:      String. The changeset identification hash, as a
-            40-character hexadecimal string.
-:parents:   List of strings. The parents of the changeset.
-:rev:       Integer. The repository-local changeset revision
-            number.
-:tags:      List of strings. Any tags associated with the
-            changeset.
-:latesttag: String. Most recent global tag in the ancestors of this
-            changeset.
-:latesttagdistance: Integer. Longest path to the latest tag.
-
-The "date" keyword does not produce human-readable output. If you
-want to use a date in your output, you can use a filter to process
-it. Filters are functions which return a string based on the input
-variable. You can also use a chain of filters to get the desired
-output::
-
-   $ hg tip --template "{date|isodate}\n"
-   2008-08-21 18:22 +0000
-
-List of filters:
-
-:addbreaks:   Any text. Add an XHTML "<br />" tag before the end of
-              every line except the last.
-:age:         Date. Returns a human-readable date/time difference
-              between the given date/time and the current
-              date/time.
-:basename:    Any text. Treats the text as a path, and returns the
-              last component of the path after splitting by the
-              path separator (ignoring trailing separators). For
-              example, "foo/bar/baz" becomes "baz" and "foo/bar//"
-              becomes "bar".
-:stripdir:    Treat the text as path and strip a directory level,
-              if possible. For example, "foo" and "foo/bar" becomes
-              "foo".
-:date:        Date. Returns a date in a Unix date format, including
-              the timezone: "Mon Sep 04 15:13:13 2006 0700".
-:domain:      Any text. Finds the first string that looks like an
-              email address, and extracts just the domain
-              component. Example: ``User <user@example.com>`` becomes
-              ``example.com``.
-:email:       Any text. Extracts the first string that looks like
-              an email address. Example: ``User <user@example.com>``
-              becomes ``user@example.com``.
-:escape:      Any text. Replaces the special XML/XHTML characters
-              "&", "<" and ">" with XML entities.
-:fill68:      Any text. Wraps the text to fit in 68 columns.
-:fill76:      Any text. Wraps the text to fit in 76 columns.
-:firstline:   Any text. Returns the first line of text.
-:nonempty:    Any text. Returns '(none)' if the string is empty.
-:hgdate:      Date. Returns the date as a pair of numbers:
-              "1157407993 25200" (Unix timestamp, timezone offset).
-:isodate:     Date. Returns the date in ISO 8601 format:
-              "2009-08-18 13:00 +0200".
-:isodatesec:  Date. Returns the date in ISO 8601 format, including
-              seconds: "2009-08-18 13:00:13 +0200". See also the
-              rfc3339date filter.
-:localdate:   Date. Converts a date to local date.
-:obfuscate:   Any text. Returns the input text rendered as a
-              sequence of XML entities.
-:person:      Any text. Returns the text before an email address.
-:rfc822date:  Date. Returns a date using the same format used in
-              email headers: "Tue, 18 Aug 2009 13:00:13 +0200".
-:rfc3339date: Date. Returns a date using the Internet date format
-              specified in RFC 3339: "2009-08-18T13:00:13+02:00".
-:short:       Changeset hash. Returns the short form of a changeset
-              hash, i.e. a 12-byte hexadecimal string.
-:shortdate:   Date. Returns a date like "2006-09-18".
-:strip:       Any text. Strips all leading and trailing whitespace.
-:tabindent:   Any text. Returns the text, with every line except
-              the first starting with a tab character.
-:urlescape:   Any text. Escapes all "special" characters. For
-              example, "foo bar" becomes "foo%20bar".
-:user:        Any text. Returns the user portion of an email
-              address.
--- a/help/urls.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-Valid URLs are of the form::
-
-  local/filesystem/path[#revision]
-  file://local/filesystem/path[#revision]
-  http://[user[:pass]@]host[:port]/[path][#revision]
-  https://[user[:pass]@]host[:port]/[path][#revision]
-  ssh://[user[:pass]@]host[:port]/[path][#revision]
-
-Paths in the local filesystem can either point to Mercurial
-repositories or to bundle files (as created by 'hg bundle' or 'hg
-incoming --bundle').
-
-An optional identifier after # indicates a particular branch, tag, or
-changeset to use from the remote repository. See also 'hg help
-revisions'.
-
-Some features, such as pushing to http:// and https:// URLs are only
-possible if the feature is explicitly enabled on the remote Mercurial
-server.
-
-Some notes about using SSH with Mercurial:
-
-- SSH requires an accessible shell account on the destination machine
-  and a copy of hg in the remote path or specified with as remotecmd.
-- path is relative to the remote user's home directory by default. Use
-  an extra slash at the start of a path to specify an absolute path::
-
-    ssh://example.com//tmp/repository
-
-- Mercurial doesn't use its own compression via SSH; the right thing
-  to do is to configure it in your ~/.ssh/config, e.g.::
-
-    Host *.mylocalnetwork.example.com
-      Compression no
-    Host *
-      Compression yes
-
-  Alternatively specify "ssh -C" as your ssh command in your hgrc or
-  with the --ssh command line option.
-
-These URLs can all be stored in your hgrc with path aliases under the
-[paths] section like so::
-
-  [paths]
-  alias1 = URL1
-  alias2 = URL2
-  ...
-
-You can then use the alias for any command that uses a URL (for
-example 'hg pull alias1' will be treated as 'hg pull URL1').
-
-Two path aliases are special because they are used as defaults when
-you do not provide the URL to a command:
-
-default:
-  When you create a repository with hg clone, the clone command saves
-  the location of the source repository as the new repository's
-  'default' path. This is then used when you omit path from push- and
-  pull-like commands (including incoming and outgoing).
-
-default-push:
-  The push command will look for a path named 'default-push', and
-  prefer it over 'default' if both are defined.
--- a/hgext/bookmarks.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/bookmarks.py	Sat Feb 13 23:50:38 2010 -0600
@@ -33,27 +33,7 @@
 from mercurial import util, commands, localrepo, repair, extensions
 import os
 
-def parse(repo):
-    '''Parse .hg/bookmarks file and return a dictionary
-
-    Bookmarks are stored as {HASH}\\s{NAME}\\n (localtags format) values
-    in the .hg/bookmarks file. They are read by the parse() method and
-    returned as a dictionary with name => hash values.
-
-    The parsed dictionary is cached until a write() operation is done.
-    '''
-    try:
-        if repo._bookmarks:
-            return repo._bookmarks
-        repo._bookmarks = {}
-        for line in repo.opener('bookmarks'):
-            sha, refspec = line.strip().split(' ', 1)
-            repo._bookmarks[refspec] = repo.lookup(sha)
-    except:
-        pass
-    return repo._bookmarks
-
-def write(repo, refs):
+def write(repo):
     '''Write bookmarks
 
     Write the given bookmark => hash dictionary to the .hg/bookmarks file
@@ -62,9 +42,10 @@
     We also store a backup of the previous state in undo.bookmarks that
     can be copied back on rollback.
     '''
+    refs = repo._bookmarks
     if os.path.exists(repo.join('bookmarks')):
         util.copyfile(repo.join('bookmarks'), repo.join('undo.bookmarks'))
-    if current(repo) not in refs:
+    if repo._bookmarkcurrent not in refs:
         setcurrent(repo, None)
     wlock = repo.wlock()
     try:
@@ -75,40 +56,21 @@
     finally:
         wlock.release()
 
-def current(repo):
-    '''Get the current bookmark
-
-    If we use gittishsh branches we have a current bookmark that
-    we are on. This function returns the name of the bookmark. It
-    is stored in .hg/bookmarks.current
-    '''
-    if repo._bookmarkcurrent:
-        return repo._bookmarkcurrent
-    mark = None
-    if os.path.exists(repo.join('bookmarks.current')):
-        file = repo.opener('bookmarks.current')
-        # No readline() in posixfile_nt, reading everything is cheap
-        mark = (file.readlines() or [''])[0]
-        if mark == '':
-            mark = None
-        file.close()
-    repo._bookmarkcurrent = mark
-    return mark
-
 def setcurrent(repo, mark):
     '''Set the name of the bookmark that we are currently on
 
     Set the name of the bookmark that we are on (hg update <bookmark>).
     The name is recorded in .hg/bookmarks.current
     '''
-    if current(repo) == mark:
+    current = repo._bookmarkcurrent
+    if current == mark:
         return
 
-    refs = parse(repo)
+    refs = repo._bookmarks
 
     # do not update if we do update to a rev equal to the current bookmark
     if (mark and mark not in refs and
-        current(repo) and refs[current(repo)] == repo.changectx('.').node()):
+        current and refs[current] == repo.changectx('.').node()):
         return
     if mark not in refs:
         mark = ''
@@ -135,7 +97,7 @@
     the bookmark is assigned to that revision.
     '''
     hexfn = ui.debugflag and hex or short
-    marks = parse(repo)
+    marks = repo._bookmarks
     cur   = repo.changectx('.').node()
 
     if rename:
@@ -147,9 +109,9 @@
             raise util.Abort(_("new bookmark name required"))
         marks[mark] = marks[rename]
         del marks[rename]
-        if current(repo) == rename:
+        if repo._bookmarkcurrent == rename:
             setcurrent(repo, mark)
-        write(repo, marks)
+        write(repo)
         return
 
     if delete:
@@ -157,10 +119,10 @@
             raise util.Abort(_("bookmark name required"))
         if mark not in marks:
             raise util.Abort(_("a bookmark of this name does not exist"))
-        if mark == current(repo):
+        if mark == repo._bookmarkcurrent:
             setcurrent(repo, None)
         del marks[mark]
-        write(repo, marks)
+        write(repo)
         return
 
     if mark != None:
@@ -178,7 +140,7 @@
         else:
             marks[mark] = repo.changectx('.').node()
             setcurrent(repo, mark)
-        write(repo, marks)
+        write(repo)
         return
 
     if mark is None:
@@ -189,7 +151,8 @@
         else:
             for bmark, n in marks.iteritems():
                 if ui.configbool('bookmarks', 'track.current'):
-                    prefix = (bmark == current(repo) and n == cur) and '*' or ' '
+                    current = repo._bookmarkcurrent
+                    prefix = (bmark == current and n == cur) and '*' or ' '
                 else:
                     prefix = (n == cur) and '*' or ' '
 
@@ -219,7 +182,7 @@
     the mercurial.strip method. This usually happens during
     qpush and qpop"""
     revisions = _revstostrip(repo.changelog, node)
-    marks = parse(repo)
+    marks = repo._bookmarks
     update = []
     for mark, n in marks.iteritems():
         if repo.changelog.rev(n) in revisions:
@@ -228,30 +191,75 @@
     if len(update) > 0:
         for m in update:
             marks[m] = repo.changectx('.').node()
-        write(repo, marks)
+        write(repo)
 
 def reposetup(ui, repo):
     if not repo.local():
         return
 
-    # init a bookmark cache as otherwise we would get a infinite reading
-    # in lookup()
-    repo._bookmarks = None
-    repo._bookmarkcurrent = None
+    class bookmark_repo(repo.__class__):
+
+        @util.propertycache
+        def _bookmarks(self):
+            '''Parse .hg/bookmarks file and return a dictionary
+
+            Bookmarks are stored as {HASH}\\s{NAME}\\n (localtags format) values
+            in the .hg/bookmarks file. They are read returned as a dictionary
+            with name => hash values.
+            '''
+            try:
+                bookmarks = {}
+                for line in self.opener('bookmarks'):
+                    sha, refspec = line.strip().split(' ', 1)
+                    bookmarks[refspec] = super(bookmark_repo, self).lookup(sha)
+            except:
+                pass
+            return bookmarks
 
-    class bookmark_repo(repo.__class__):
+        @util.propertycache
+        def _bookmarkcurrent(self):
+            '''Get the current bookmark
+
+            If we use gittishsh branches we have a current bookmark that
+            we are on. This function returns the name of the bookmark. It
+            is stored in .hg/bookmarks.current
+            '''
+            mark = None
+            if os.path.exists(self.join('bookmarks.current')):
+                file = self.opener('bookmarks.current')
+                # No readline() in posixfile_nt, reading everything is cheap
+                mark = (file.readlines() or [''])[0]
+                if mark == '':
+                    mark = None
+                file.close()
+            return mark
+
         def rollback(self):
             if os.path.exists(self.join('undo.bookmarks')):
                 util.rename(self.join('undo.bookmarks'), self.join('bookmarks'))
             return super(bookmark_repo, self).rollback()
 
         def lookup(self, key):
-            if self._bookmarks is None:
-                self._bookmarks = parse(self)
             if key in self._bookmarks:
                 key = self._bookmarks[key]
             return super(bookmark_repo, self).lookup(key)
 
+        def _bookmarksupdate(self, parents, node):
+            marks = self._bookmarks
+            update = False
+            if ui.configbool('bookmarks', 'track.current'):
+                mark = self._bookmarkcurrent
+                if mark and marks[mark] in parents:
+                    marks[mark] = node
+                    update = True
+            else:
+                for mark, n in marks.items():
+                    if n in parents:
+                        marks[mark] = node
+                        update = True
+            if update:
+                write(self)
+
         def commitctx(self, ctx, error=False):
             """Add a revision to the repository and
             move the bookmark"""
@@ -263,20 +271,8 @@
                 parents = self.changelog.parents(node)
                 if parents[1] == nullid:
                     parents = (parents[0],)
-                marks = parse(self)
-                update = False
-                if ui.configbool('bookmarks', 'track.current'):
-                    mark = current(self)
-                    if mark and marks[mark] in parents:
-                        marks[mark] = node
-                        update = True
-                else:
-                    for mark, n in marks.items():
-                        if n in parents:
-                            marks[mark] = node
-                            update = True
-                if update:
-                    write(self, marks)
+
+                self._bookmarksupdate(parents, node)
                 return node
             finally:
                 wlock.release()
@@ -290,26 +286,14 @@
                 # We have more heads than before
                 return result
             node = self.changelog.tip()
-            marks = parse(self)
-            update = False
-            if ui.configbool('bookmarks', 'track.current'):
-                mark = current(self)
-                if mark and marks[mark] in parents:
-                    marks[mark] = node
-                    update = True
-            else:
-                for mark, n in marks.items():
-                    if n in parents:
-                        marks[mark] = node
-                        update = True
-            if update:
-                write(self, marks)
+
+            self._bookmarksupdate(parents, node)
             return result
 
         def _findtags(self):
             """Merge bookmarks with normal tags"""
             (tags, tagtypes) = super(bookmark_repo, self)._findtags()
-            tags.update(parse(self))
+            tags.update(self._bookmarks)
             return (tags, tagtypes)
 
     repo.__class__ = bookmark_repo
--- a/hgext/bugzilla.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/bugzilla.py	Sat Feb 13 23:50:38 2010 -0600
@@ -145,7 +145,7 @@
 from mercurial import cmdutil, templater, util
 import re, time
 
-MySQLdb = None
+mysqldb = None
 
 def buglist(ids):
     return '(' + ','.join(map(str, ids)) + ')'
@@ -165,7 +165,7 @@
             self.ui.readconfig(usermap, sections=['usermap'])
         self.ui.note(_('connecting to %s:%s as %s, password %s\n') %
                      (host, db, user, '*' * len(passwd)))
-        self.conn = MySQLdb.connect(host=host, user=user, passwd=passwd,
+        self.conn = mysqldb.connect(host=host, user=user, passwd=passwd,
                                     db=db, connect_timeout=timeout)
         self.cursor = self.conn.cursor()
         self.longdesc_id = self.get_longdesc_id()
@@ -177,7 +177,7 @@
         self.ui.note(_('query: %s %s\n') % (args, kwargs))
         try:
             self.cursor.execute(*args, **kwargs)
-        except MySQLdb.MySQLError:
+        except mysqldb.MySQLError:
             self.ui.note(_('failed query: %s %s\n') % (args, kwargs))
             raise
 
@@ -297,7 +297,8 @@
 
     def __init__(self, ui):
         bugzilla_2_16.__init__(self, ui)
-        self.default_notify = "cd %(bzdir)s && perl -T contrib/sendbugmail.pl %(id)s %(user)s"
+        self.default_notify = \
+            "cd %(bzdir)s && perl -T contrib/sendbugmail.pl %(id)s %(user)s"
 
 class bugzilla_3_0(bugzilla_2_18):
     '''support for bugzilla 3.0 series.'''
@@ -369,7 +370,8 @@
                 break
             start = m.end()
             for id in bugzilla._split_re.split(m.group(1)):
-                if not id: continue
+                if not id:
+                    continue
                 ids.add(int(id))
         if ids:
             ids = self.filter_real_bug_ids(ids)
@@ -389,7 +391,7 @@
                 c = root.find('/')
                 if c == -1:
                     break
-                root = root[c+1:]
+                root = root[c + 1:]
                 count -= 1
             return root
 
@@ -417,9 +419,9 @@
     bugzilla bug id. only add a comment once per bug, so same change
     seen multiple times does not fill bug with duplicate data.'''
     try:
-        import MySQLdb as mysql
-        global MySQLdb
-        MySQLdb = mysql
+        import mysqldb as mysql
+        global mysqldb
+        mysqldb = mysql
     except ImportError, err:
         raise util.Abort(_('python mysql support not available: %s') % err)
 
@@ -434,6 +436,6 @@
             for id in ids:
                 bz.update(id, ctx)
             bz.notify(ids, util.email(ctx.user()))
-    except MySQLdb.MySQLError, err:
+    except mysqldb.MySQLError, err:
         raise util.Abort(_('database error: %s') % err[1])
 
--- a/hgext/children.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/children.py	Sat Feb 13 23:50:38 2010 -0600
@@ -33,7 +33,7 @@
     displayer = cmdutil.show_changeset(ui, repo, opts)
     for cctx in ctx.children():
         displayer.show(cctx)
-
+    displayer.close()
 
 cmdtable = {
     "children":
--- a/hgext/churn.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/churn.py	Sat Feb 13 23:50:38 2010 -0600
@@ -169,7 +169,7 @@
                                     '*' * charnum(sum(count)))
 
     def charnum(count):
-        return int(round(count*width/maxcount))
+        return int(round(count * width / maxcount))
 
     for name, count in rate:
         ui.write(format(name, count))
@@ -180,7 +180,8 @@
         (churn,
          [('r', 'rev', [], _('count rate for the specified revision or range')),
           ('d', 'date', '', _('count rate for revisions matching date spec')),
-          ('t', 'template', '{author|email}', _('template to group changesets')),
+          ('t', 'template', '{author|email}',
+           _('template to group changesets')),
           ('f', 'dateformat', '',
               _('strftime-compatible format for grouping by date')),
           ('c', 'changesets', False, _('count rate by number of changesets')),
--- a/hgext/color.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/color.py	Sat Feb 13 23:50:38 2010 -0600
@@ -18,8 +18,8 @@
 
 '''colorize output from some commands
 
-This extension modifies the status command to add color to its output
-to reflect file status, the qseries command to add color to reflect
+This extension modifies the status and resolve commands to add color to their
+output to reflect file status, the qseries command to add color to reflect
 patch status (applied, unapplied, missing), and to diff-related
 commands to highlight additions, removals, diff headers, and trailing
 whitespace.
@@ -56,6 +56,11 @@
   diff.inserted = green
   diff.changed = white
   diff.trailingwhitespace = bold red_background
+
+  resolve.unresolved = red bold
+  resolve.resolved = green bold
+
+  bookmarks.current = green
 '''
 
 import os, sys
@@ -93,18 +98,17 @@
     stop = '\033[' + str(_effect_params['none']) + 'm'
     return ''.join([start, text, stop])
 
-def colorstatus(orig, ui, repo, *pats, **opts):
-    '''run the status command with colored output'''
-
-    delimiter = opts['print0'] and '\0' or '\n'
+def _colorstatuslike(abbreviations, effectdefs, orig, ui, repo, *pats, **opts):
+    '''run a status-like command with colorized output'''
+    delimiter = opts.get('print0') and '\0' or '\n'
 
     nostatus = opts.get('no_status')
     opts['no_status'] = False
-    # run status and capture its output
+    # run original command and capture its output
     ui.pushbuffer()
     retval = orig(ui, repo, *pats, **opts)
     # filter out empty strings
-    lines_with_status = [ line for line in ui.popbuffer().split(delimiter) if line ]
+    lines_with_status = [line for line in ui.popbuffer().split(delimiter) if line]
 
     if nostatus:
         lines = [l[2:] for l in lines_with_status]
@@ -113,13 +117,14 @@
 
     # apply color to output and display it
     for i in xrange(len(lines)):
-        status = _status_abbreviations[lines_with_status[i][0]]
-        effects = _status_effects[status]
+        status = abbreviations[lines_with_status[i][0]]
+        effects = effectdefs[status]
         if effects:
             lines[i] = render_effects(lines[i], effects)
         ui.write(lines[i] + delimiter)
     return retval
 
+
 _status_abbreviations = { 'M': 'modified',
                           'A': 'added',
                           'R': 'removed',
@@ -138,6 +143,42 @@
                     'clean': ['none'],
                     'copied': ['none'], }
 
+def colorstatus(orig, ui, repo, *pats, **opts):
+    '''run the status command with colored output'''
+    return _colorstatuslike(_status_abbreviations, _status_effects,
+                            orig, ui, repo, *pats, **opts)
+
+
+_resolve_abbreviations = { 'U': 'unresolved',
+                           'R': 'resolved', }
+
+_resolve_effects = { 'unresolved': ['red', 'bold'],
+                     'resolved': ['green', 'bold'], }
+
+def colorresolve(orig, ui, repo, *pats, **opts):
+    '''run the resolve command with colored output'''
+    if not opts.get('list'):
+        # only colorize for resolve -l
+        return orig(ui, repo, *pats, **opts)
+    return _colorstatuslike(_resolve_abbreviations, _resolve_effects,
+                            orig, ui, repo, *pats, **opts)
+
+
+_bookmark_effects = { 'current': ['green'] }
+
+def colorbookmarks(orig, ui, repo, *pats, **opts):
+    def colorize(orig, s):
+        lines = s.split('\n')
+        for i, line in enumerate(lines):
+            if line.startswith(" *"):
+                lines[i] = render_effects(line, _bookmark_effects['current'])
+        orig('\n'.join(lines))
+    oldwrite = extensions.wrapfunction(ui, 'write', colorize)
+    try:
+        orig(ui, repo, *pats, **opts)
+    finally:
+        ui.write = oldwrite
+
 def colorqseries(orig, ui, repo, *dummy, **opts):
     '''run the qseries command with colored output'''
     ui.pushbuffer()
@@ -149,8 +190,8 @@
         if opts['missing']:
             effects = _patch_effects['missing']
         # Determine if patch is applied.
-        elif [ applied for applied in repo.mq.applied
-               if patchname == applied.name ]:
+        elif [applied for applied in repo.mq.applied
+               if patchname == applied.name]:
             effects = _patch_effects['applied']
         else:
             effects = _patch_effects['unapplied']
@@ -213,6 +254,16 @@
     finally:
         ui.write = oldwrite
 
+def colorchurn(orig, ui, repo, *pats, **opts):
+    '''run the churn command with colored output'''
+    if not opts.get('diffstat'):
+        return orig(ui, repo, *pats, **opts)
+    oldwrite = extensions.wrapfunction(ui, 'write', colordiffstat)
+    try:
+        orig(ui, repo, *pats, **opts)
+    finally:
+        ui.write = oldwrite
+
 _diff_prefixes = [('diff', 'diffline'),
                   ('copy', 'extended'),
                   ('rename', 'extended'),
@@ -243,6 +294,7 @@
     _setupcmd(ui, 'outgoing', commands.table, None, _diff_effects)
     _setupcmd(ui, 'tip', commands.table, None, _diff_effects)
     _setupcmd(ui, 'status', commands.table, colorstatus, _status_effects)
+    _setupcmd(ui, 'resolve', commands.table, colorresolve, _resolve_effects)
 
     try:
         mq = extensions.find('mq')
@@ -259,7 +311,19 @@
 
     if mq and rec:
         _setupcmd(ui, 'qrecord', rec.cmdtable, colordiff, _diff_effects)
+    try:
+        churn = extensions.find('churn')
+        _setupcmd(ui, 'churn', churn.cmdtable, colorchurn, _diff_effects)
+    except KeyError:
+        churn = None
 
+    try:
+        bookmarks = extensions.find('bookmarks')
+        _setupcmd(ui, 'bookmarks', bookmarks.cmdtable, colorbookmarks,
+                  _bookmark_effects)
+    except KeyError:
+        # The bookmarks extension is not enabled
+        pass
 
 def _setupcmd(ui, cmd, table, func, effectsmap):
     '''patch in command to command table and load effect map'''
@@ -268,10 +332,14 @@
         if (opts['no_color'] or opts['color'] == 'never' or
             (opts['color'] == 'auto' and (os.environ.get('TERM') == 'dumb'
                                           or not sys.__stdout__.isatty()))):
+            del opts['no_color']
+            del opts['color']
             return orig(*args, **opts)
 
         oldshowpatch = extensions.wrapfunction(cmdutil.changeset_printer,
                                                'showpatch', colorshowpatch)
+        del opts['no_color']
+        del opts['color']
         try:
             if func is not None:
                 return func(orig, *args, **opts)
--- a/hgext/convert/__init__.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/__init__.py	Sat Feb 13 23:50:38 2010 -0600
@@ -165,6 +165,15 @@
         matched. If a match occurs, then the conversion process will
         add the most recent revision on the branch indicated in the
         regex as the second parent of the changeset.
+    --config hook.cvslog
+        Specify a Python function to be called at the end of gathering
+        the CVS log. The function is passed a list with the log entries,
+        and can modify the entries in-place, or add or delete them.
+    --config hook.cvschangesets
+        Specify a Python function to be called after the changesets
+        are calculated from the the CVS log. The function is passed
+        a list with the changeset entries, and can modify the changesets
+        in-place, or add or delete them.
 
     An additional "debugcvsps" Mercurial command allows the builtin
     changeset merging code to be run without doing a conversion. Its
@@ -270,7 +279,8 @@
           # Main options shared with cvsps-2.1
           ('b', 'branches', [], _('only return changes on specified branches')),
           ('p', 'prefix', '', _('prefix to remove from file names')),
-          ('r', 'revisions', [], _('only return changes after or between specified tags')),
+          ('r', 'revisions', [],
+           _('only return changes after or between specified tags')),
           ('u', 'update-cache', None, _("update cvs log cache")),
           ('x', 'new-cache', None, _("create new cvs log cache")),
           ('z', 'fuzz', 60, _('set commit time fuzz in seconds')),
--- a/hgext/convert/bzr.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/bzr.py	Sat Feb 13 23:50:38 2010 -0600
@@ -170,7 +170,7 @@
         return changes
 
     def _gettreechanges(self, current, origin):
-        revid = current._revision_id;
+        revid = current._revision_id
         changes = []
         renames = {}
         for (fileid, paths, changed_content, versioned, parent, name,
@@ -203,7 +203,8 @@
                         changes.append((frompath, revid))
                         changes.append((topath, revid))
                         # add to mode cache
-                        mode = ((entry.executable and 'x') or (entry.kind == 'symlink' and 's')
+                        mode = ((entry.executable and 'x')
+                                or (entry.kind == 'symlink' and 's')
                                 or '')
                         self._modecache[(topath, revid)] = mode
                         # register the change as move
--- a/hgext/convert/common.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/common.py	Sat Feb 13 23:50:38 2010 -0600
@@ -24,7 +24,8 @@
     s = base64.decodestring(s)
     return pickle.loads(s)
 
-class MissingTool(Exception): pass
+class MissingTool(Exception):
+    pass
 
 def checktool(exe, name=None, abort=True):
     name = name or exe
@@ -32,7 +33,8 @@
         exc = abort and util.Abort or MissingTool
         raise exc(_('cannot find required "%s" tool') % name)
 
-class NoRepo(Exception): pass
+class NoRepo(Exception):
+    pass
 
 SKIPREV = 'SKIP'
 
@@ -322,7 +324,7 @@
         # Since ARG_MAX is for command line _and_ environment, lower our limit
         # (and make happy Windows shells while doing this).
 
-        self._argmax = self._argmax/2 - 1
+        self._argmax = self._argmax / 2 - 1
         return self._argmax
 
     def limit_arglist(self, arglist, cmd, *args, **kwargs):
@@ -367,8 +369,9 @@
             try:
                 key, value = line.splitlines()[0].rsplit(' ', 1)
             except ValueError:
-                raise util.Abort(_('syntax error in %s(%d): key/value pair expected')
-                                 % (self.path, i+1))
+                raise util.Abort(
+                    _('syntax error in %s(%d): key/value pair expected')
+                    % (self.path, i + 1))
             if key not in self:
                 self.order.append(key)
             super(mapfile, self).__setitem__(key, value)
--- a/hgext/convert/convcmd.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/convcmd.py	Sat Feb 13 23:50:38 2010 -0600
@@ -48,6 +48,8 @@
 
 def convertsource(ui, path, type, rev):
     exceptions = []
+    if type and type not in [s[0] for s in source_converters]:
+        raise util.Abort(_('%s: invalid source repository type') % type)
     for name, source, sortmode in source_converters:
         try:
             if not type or name == type:
@@ -60,6 +62,8 @@
     raise util.Abort(_('%s: missing or unsupported repository') % path)
 
 def convertsink(ui, path, type):
+    if type and type not in [s[0] for s in sink_converters]:
+        raise util.Abort(_('%s: invalid destination repository type') % type)
     for name, sink in sink_converters:
         try:
             if not type or name == type:
@@ -104,7 +108,8 @@
         parents = {}
         while visit:
             n = visit.pop(0)
-            if n in known or n in self.map: continue
+            if n in known or n in self.map:
+                continue
             known.add(n)
             commit = self.cachecommit(n)
             parents[n] = []
--- a/hgext/convert/cvs.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/cvs.py	Sat Feb 13 23:50:38 2010 -0600
@@ -46,7 +46,8 @@
                 # patchset number?
                 maxrev = int(self.rev)
             except ValueError:
-                raise util.Abort(_('revision %s is not a patchset number') % self.rev)
+                raise util.Abort(_('revision %s is not a patchset number')
+                                 % self.rev)
 
         d = os.getcwd()
         try:
@@ -65,7 +66,7 @@
                 mergefrom=self.ui.config('convert', 'cvsps.mergefrom', None))
 
             for cs in db:
-                if maxrev and cs.id>maxrev:
+                if maxrev and cs.id > maxrev:
                     break
                 id = str(cs.id)
                 cs.author = self.recode(cs.author)
@@ -76,7 +77,8 @@
 
                 files = {}
                 for f in cs.entries:
-                    files[f.file] = "%s%s" % ('.'.join([str(x) for x in f.revision]),
+                    files[f.file] = "%s%s" % ('.'.join([str(x)
+                                                        for x in f.revision]),
                                               ['', '(DEAD)'][f.dead])
 
                 # add current commit to set
@@ -186,8 +188,8 @@
         self.writep.flush()
         r = self.readp.readline()
         if not r.startswith("Valid-requests"):
-            raise util.Abort(_("unexpected response from CVS server "
-                               "(expected \"Valid-requests\", but got %r)")
+            raise util.Abort(_('unexpected response from CVS server '
+                               '(expected "Valid-requests", but got %r)')
                              % r)
         if "UseUnchanged" in r:
             self.writep.write("UseUnchanged\n")
@@ -208,7 +210,8 @@
             while count > 0:
                 data = fp.read(min(count, chunksize))
                 if not data:
-                    raise util.Abort(_("%d bytes missing from remote file") % count)
+                    raise util.Abort(_("%d bytes missing from remote file")
+                                     % count)
                 count -= len(data)
                 output.write(data)
             return output.getvalue()
--- a/hgext/convert/cvsps.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/cvsps.py	Sat Feb 13 23:50:38 2010 -0600
@@ -10,6 +10,7 @@
 import cPickle as pickle
 from mercurial import util
 from mercurial.i18n import _
+from mercurial import hook
 
 class logentry(object):
     '''Class logentry has the following attributes:
@@ -401,7 +402,7 @@
                     # normal branch
                     if revparts[:-2] == e.revision:
                         branchpoints.add(branch)
-                elif revparts == (1,1,1): # vendor branch
+                elif revparts == (1, 1, 1): # vendor branch
                     if revparts in e.branches:
                         branchpoints.add(branch)
             e.branchpoints = branchpoints
@@ -443,6 +444,8 @@
 
     ui.status(_('%d log entries\n') % len(log))
 
+    hook.hook(ui, None, "cvslog", True, log=log)
+
     return log
 
 
@@ -629,7 +632,7 @@
     branches = {}    # changeset index where we saw a branch
     n = len(changesets)
     i = 0
-    while i<n:
+    while i < n:
         c = changesets[i]
 
         for f in c.entries:
@@ -699,9 +702,12 @@
                     m = None   # if no group found then merge to HEAD
                 if m in branches and c.branch != m:
                     # insert empty changeset for merge
-                    cc = changeset(author=c.author, branch=m, date=c.date,
-                            comment='convert-repo: CVS merge from branch %s' % c.branch,
-                            entries=[], tags=[], parents=[changesets[branches[m]], c])
+                    cc = changeset(
+                        author=c.author, branch=m, date=c.date,
+                        comment='convert-repo: CVS merge from branch %s'
+                        % c.branch,
+                        entries=[], tags=[],
+                        parents=[changesets[branches[m]], c])
                     changesets.insert(i + 1, cc)
                     branches[m] = i + 1
 
@@ -729,6 +735,8 @@
 
     ui.status(_('%d changeset entries\n') % len(changesets))
 
+    hook.hook(ui, None, "cvschangesets", True, changesets=changesets)
+
     return changesets
 
 
@@ -769,7 +777,7 @@
 
         if opts["ancestors"]:
             if cs.branch not in branches and cs.parents and cs.parents[0].id:
-                ancestors[cs.branch] = (changesets[cs.parents[0].id-1].branch,
+                ancestors[cs.branch] = (changesets[cs.parents[0].id - 1].branch,
                                         cs.parents[0].id)
             branches[cs.branch] = cs.id
 
@@ -786,14 +794,15 @@
                                                  '%Y/%m/%d %H:%M:%S %1%2'))
             ui.write('Author: %s\n' % cs.author)
             ui.write('Branch: %s\n' % (cs.branch or 'HEAD'))
-            ui.write('Tag%s: %s \n' % (['', 's'][len(cs.tags)>1],
+            ui.write('Tag%s: %s \n' % (['', 's'][len(cs.tags) > 1],
                                   ','.join(cs.tags) or '(none)'))
             branchpoints = getattr(cs, 'branchpoints', None)
             if branchpoints:
                 ui.write('Branchpoints: %s \n' % ', '.join(branchpoints))
             if opts["parents"] and cs.parents:
-                if len(cs.parents)>1:
-                    ui.write('Parents: %s\n' % (','.join([str(p.id) for p in cs.parents])))
+                if len(cs.parents) > 1:
+                    ui.write('Parents: %s\n' %
+                             (','.join([str(p.id) for p in cs.parents])))
                 else:
                     ui.write('Parent: %d\n' % cs.parents[0].id)
 
@@ -813,8 +822,10 @@
                 fn = f.file
                 if fn.startswith(opts["prefix"]):
                     fn = fn[len(opts["prefix"]):]
-                ui.write('\t%s:%s->%s%s \n' % (fn, '.'.join([str(x) for x in f.parent]) or 'INITIAL',
-                                          '.'.join([str(x) for x in f.revision]), ['', '(DEAD)'][f.dead]))
+                ui.write('\t%s:%s->%s%s \n' % (
+                        fn, '.'.join([str(x) for x in f.parent]) or 'INITIAL',
+                        '.'.join([str(x) for x in f.revision]),
+                        ['', '(DEAD)'][f.dead]))
             ui.write('\n')
 
         # have we seen the start tag?
@@ -824,7 +835,7 @@
                 off = False
 
         # see if we reached the end tag
-        if len(revisions)>1 and not off:
+        if len(revisions) > 1 and not off:
             if revisions[1] == str(cs.id) or \
                 revisions[1] in cs.tags:
                 break
--- a/hgext/convert/darcs.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/darcs.py	Sat Feb 13 23:50:38 2010 -0600
@@ -12,15 +12,19 @@
 
 # The naming drift of ElementTree is fun!
 
-try: from xml.etree.cElementTree import ElementTree
+try:
+    from xml.etree.cElementTree import ElementTree
 except ImportError:
-    try: from xml.etree.ElementTree import ElementTree
+    try:
+        from xml.etree.ElementTree import ElementTree
     except ImportError:
-        try: from elementtree.cElementTree import ElementTree
+        try:
+            from elementtree.cElementTree import ElementTree
         except ImportError:
-            try: from elementtree.ElementTree import ElementTree
-            except ImportError: ElementTree = None
-
+            try:
+                from elementtree.ElementTree import ElementTree
+            except ImportError:
+                ElementTree = None
 
 class darcs_source(converter_source, commandline):
     def __init__(self, ui, path, rev=None):
--- a/hgext/convert/filemap.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/filemap.py	Sat Feb 13 23:50:38 2010 -0600
@@ -10,11 +10,11 @@
 from common import SKIPREV, converter_source
 
 def rpairs(name):
-    yield '.', name
     e = len(name)
     while e != -1:
-        yield name[:e], name[e+1:]
+        yield name[:e], name[e + 1:]
         e = name.rfind('/', 0, e)
+    yield '.', name
 
 class filemapper(object):
     '''Map and filter filenames when importing.
@@ -82,7 +82,7 @@
             exc = self.lookup(name, self.exclude)[0]
         else:
             exc = ''
-        if not inc or exc:
+        if (not self.include and exc) or (len(inc) <= len(exc)):
             return None
         newpre, pre, suf = self.lookup(name, self.rename)
         if newpre:
--- a/hgext/convert/git.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/git.py	Sat Feb 13 23:50:38 2010 -0600
@@ -43,13 +43,15 @@
 
     def getheads(self):
         if not self.rev:
-            return self.gitcmd('git rev-parse --branches --remotes').read().splitlines()
+            fh = self.gitcmd('git rev-parse --branches --remotes')
+            return fh.read().splitlines()
         else:
             fh = self.gitcmd("git rev-parse --verify %s" % self.rev)
             return [fh.read()[:-1]]
 
     def catfile(self, rev, type):
-        if rev == "0" * 40: raise IOError()
+        if rev == "0" * 40:
+            raise IOError()
         fh = self.gitcmd("git cat-file %s %s" % (type, rev))
         return fh.read()
 
@@ -86,7 +88,7 @@
     def getcommit(self, version):
         c = self.catfile(version, "commit") # read the commit hash
         end = c.find("\n\n")
-        message = c[end+2:]
+        message = c[end + 2:]
         message = self.recode(message)
         l = c[:end].splitlines()
         parents = []
@@ -105,7 +107,8 @@
                 committer = " ".join(p[:-2])
                 if committer[0] == "<": committer = committer[1:-1]
                 committer = self.recode(committer)
-            if n == "parent": parents.append(v)
+            if n == "parent":
+                parents.append(v)
 
         if committer and committer != author:
             message += "\ncommitter: %s\n" % committer
@@ -145,7 +148,7 @@
             fh.close()
         else:
             fh = self.gitcmd('git diff-tree --name-only --root -r %s "%s^%s" --'
-                             % (version, version, i+1))
+                             % (version, version, i + 1))
             changes = [f.rstrip('\n') for f in fh]
             fh.close()
 
--- a/hgext/convert/gnuarch.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/gnuarch.py	Sat Feb 13 23:50:38 2010 -0600
@@ -89,7 +89,8 @@
 
             # Get the complete list of revisions for that tree version
             output, status = self.runlines('revisions', '-r', '-f', treeversion)
-            self.checkexit(status, 'failed retrieveing revisions for %s' % treeversion)
+            self.checkexit(status, 'failed retrieveing revisions for %s'
+                           % treeversion)
 
             # No new iteration unless a revision has a continuation-of header
             treeversion = None
@@ -116,7 +117,8 @@
                 # or if we have to 'jump' to a different treeversion given
                 # by the continuation-of header.
                 if self.changes[rev].continuationof:
-                    treeversion = '--'.join(self.changes[rev].continuationof.split('--')[:-1])
+                    treeversion = '--'.join(
+                        self.changes[rev].continuationof.split('--')[:-1])
                     break
 
                 # If we reached a base-0 revision w/o any continuation-of
@@ -170,7 +172,7 @@
 
         for src in self.changes[rev].ren_dirs:
             to = self.changes[rev].ren_dirs[src]
-            chgs, cps = self._rendirchanges(src, to);
+            chgs, cps = self._rendirchanges(src, to)
             changes += [(f, rev) for f in chgs]
             copies.update(cps)
 
@@ -220,7 +222,7 @@
         return data, mode
 
     def _exclude(self, name):
-        exclude = [ '{arch}', '.arch-ids', '.arch-inventory' ]
+        exclude = ['{arch}', '.arch-ids', '.arch-inventory']
         for exc in exclude:
             if name.find(exc) != -1:
                 return True
@@ -285,7 +287,8 @@
 
             # Commit revision origin when dealing with a branch or tag
             if 'Continuation-of' in catlog:
-                self.changes[rev].continuationof = self.recode(catlog['Continuation-of'])
+                self.changes[rev].continuationof = self.recode(
+                    catlog['Continuation-of'])
         except Exception:
             raise util.Abort(_('could not parse cat-log of %s') % rev)
 
--- a/hgext/convert/hg.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/hg.py	Sat Feb 13 23:50:38 2010 -0600
@@ -74,7 +74,7 @@
 
     def getheads(self):
         h = self.repo.changelog.heads()
-        return [ hex(x) for x in h ]
+        return [hex(x) for x in h]
 
     def setbranch(self, branch, pbranches):
         if not self.clonebranches:
@@ -147,8 +147,10 @@
             m1node = self.repo.changelog.read(bin(parents[0]))[0]
             parent = parents[0]
 
-        if len(parents) < 2: parents.append(nullid)
-        if len(parents) < 2: parents.append(nullid)
+        if len(parents) < 2:
+            parents.append(nullid)
+        if len(parents) < 2:
+            parents.append(nullid)
         p2 = parents.pop(0)
 
         text = commit.desc
@@ -161,8 +163,8 @@
         while parents:
             p1 = p2
             p2 = parents.pop(0)
-            ctx = context.memctx(self.repo, (p1, p2), text, files.keys(), getfilectx,
-                                 commit.author, commit.date, extra)
+            ctx = context.memctx(self.repo, (p1, p2), text, files.keys(),
+                                 getfilectx, commit.author, commit.date, extra)
             self.repo.commitctx(ctx)
             text = "(octopus merge fixup)\n"
             p2 = hex(self.repo.changelog.tip())
--- a/hgext/convert/monotone.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/monotone.py	Sat Feb 13 23:50:38 2010 -0600
@@ -38,16 +38,22 @@
         lines    = r'(?:.|\n)+'
 
         self.dir_re      = re.compile(space + "dir" + name)
-        self.file_re     = re.compile(space + "file" + name + "content" + revision)
-        self.add_file_re = re.compile(space + "add_file" + name + "content" + revision)
-        self.patch_re    = re.compile(space + "patch" + name + "from" + revision + "to" + revision)
+        self.file_re     = re.compile(space + "file" + name +
+                                      "content" + revision)
+        self.add_file_re = re.compile(space + "add_file" + name +
+                                      "content" + revision)
+        self.patch_re    = re.compile(space + "patch" + name +
+                                      "from" + revision + "to" + revision)
         self.rename_re   = re.compile(space + "rename" + name + "to" + name)
         self.delete_re   = re.compile(space + "delete" + name)
-        self.tag_re      = re.compile(space + "tag" + name + "revision" + revision)
-        self.cert_re     = re.compile(lines + space + "name" + name + "value" + value)
+        self.tag_re      = re.compile(space + "tag" + name + "revision" +
+                                      revision)
+        self.cert_re     = re.compile(lines + space + "name" + name +
+                                      "value" + value)
 
         attr = space + "file" + lines + space + "attr" + space
-        self.attr_execute_re = re.compile(attr  + '"mtn:execute"' + space + '"true"')
+        self.attr_execute_re = re.compile(attr  + '"mtn:execute"' +
+                                          space + '"true"')
 
         # cached data
         self.manifest_rev = None
--- a/hgext/convert/p4.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/p4.py	Sat Feb 13 23:50:38 2010 -0600
@@ -42,8 +42,12 @@
         self.encoding = "latin_1"
         self.depotname = {}           # mapping from local name to depot name
         self.modecache = {}
-        self.re_type = re.compile("([a-z]+)?(text|binary|symlink|apple|resource|unicode|utf\d+)(\+\w+)?$")
-        self.re_keywords = re.compile(r"\$(Id|Header|Date|DateTime|Change|File|Revision|Author):[^$\n]*\$")
+        self.re_type = re.compile(
+            "([a-z]+)?(text|binary|symlink|apple|resource|unicode|utf\d+)"
+            "(\+\w+)?$")
+        self.re_keywords = re.compile(
+            r"\$(Id|Header|Date|DateTime|Change|File|Revision|Author)"
+            r":[^$\n]*\$")
         self.re_keywords_old = re.compile("\$(Id|Header):[^$\n]*\$")
 
         self._parse(ui, path)
@@ -118,7 +122,8 @@
 
             date = (int(d["time"]), 0)     # timezone not set
             c = commit(author=self.recode(d["user"]), date=util.datestr(date),
-                        parents=parents, desc=desc, branch='', extra={"p4": change})
+                       parents=parents, desc=desc, branch='',
+                       extra={"p4": change})
 
             files = []
             i = 0
--- a/hgext/convert/subversion.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/subversion.py	Sat Feb 13 23:50:38 2010 -0600
@@ -138,7 +138,7 @@
 # looking for several svn-specific files and directories in the given
 # directory.
 def filecheck(ui, path, proto):
-    for x in ('locks', 'hooks', 'format', 'db', ):
+    for x in ('locks', 'hooks', 'format', 'db'):
         if not os.path.exists(os.path.join(path, x)):
             return False
     return True
@@ -150,7 +150,7 @@
     try:
         opener = urllib2.build_opener()
         rsp = opener.open('%s://%s/!svn/ver/0/.svn' % (proto, path))
-        data = rsp.read()        
+        data = rsp.read()
     except urllib2.HTTPError, inst:
         if inst.code != 404:
             # Except for 404 we cannot know for sure this is not an svn repo
@@ -231,7 +231,7 @@
             # deleted branches.
             at = url.rfind('@')
             if at >= 0:
-                latest = int(url[at+1:])
+                latest = int(url[at + 1:])
                 url = url[:at]
         except ValueError:
             pass
@@ -363,7 +363,8 @@
                                    'with more than one branch'))
             revnum = self.revnum(self.heads[0])
             if revnum < self.startrev:
-                raise util.Abort(_('svn: no revision found after start revision %d')
+                raise util.Abort(
+                    _('svn: no revision found after start revision %d')
                                  % self.startrev)
 
         return self.heads
@@ -389,7 +390,7 @@
             uuid, module, revnum = self.revsplit(rev)
             entries = svn.client.ls(self.baseurl + urllib.quote(module),
                                     optrev(revnum), True, self.ctx)
-            files = [n for n,e in entries.iteritems()
+            files = [n for n, e in entries.iteritems()
                      if e.kind == svn.core.svn_node_file]
             copies = {}
 
@@ -564,7 +565,8 @@
         except SubversionException:
             dirent = None
         if not dirent:
-            raise SvnPathNotFound(_('%s not found up to revision %d') % (path, stop))
+            raise SvnPathNotFound(_('%s not found up to revision %d')
+                                  % (path, stop))
 
         # stat() gives us the previous revision on this line of
         # development, but it might be in *another module*. Fetch the
@@ -645,7 +647,8 @@
                 # We can avoid the reparent calls if the module has
                 # not changed but it probably does not worth the pain.
                 prevmodule = self.reparent('')
-                fromkind = svn.ra.check_path(self.ra, parentpath.strip('/'), prevnum)
+                fromkind = svn.ra.check_path(self.ra, parentpath.strip('/'),
+                                             prevnum)
                 self.reparent(prevmodule)
 
                 if fromkind == svn.core.svn_node_file:
@@ -657,7 +660,7 @@
                         oroot = parentpath.strip('/')
                         nroot = path.strip('/')
                         children = self._find_children(oroot, prevnum)
-                        children = [s.replace(oroot,nroot) for s in children]
+                        children = [s.replace(oroot, nroot) for s in children]
 
                     for child in children:
                         childpath = self.getrelpath("/" + child, pmodule)
@@ -738,7 +741,8 @@
             # check whether this revision is the start of a branch or part
             # of a branch renaming
             orig_paths = sorted(orig_paths.iteritems())
-            root_paths = [(p,e) for p,e in orig_paths if self.module.startswith(p)]
+            root_paths = [(p, e) for p, e in orig_paths
+                          if self.module.startswith(p)]
             if root_paths:
                 path, ent = root_paths[-1]
                 if ent.copyfrom_path:
@@ -750,8 +754,9 @@
                         prevmodule, prevnum = self.revsplit(previd)[1:]
                         if prevnum >= self.startrev:
                             parents = [previd]
-                            self.ui.note(_('found parent of branch %s at %d: %s\n') %
-                                         (self.module, prevnum, prevmodule))
+                            self.ui.note(
+                                _('found parent of branch %s at %d: %s\n') %
+                                (self.module, prevnum, prevmodule))
                 else:
                     self.ui.debug("no copyfrom path, don't know what to do.\n")
 
--- a/hgext/convert/transport.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/convert/transport.py	Sat Feb 13 23:50:38 2010 -0600
@@ -125,4 +125,5 @@
                     self._baton, pool)
 
     def do_update(self, revnum, path, *args, **kwargs):
-        return self.Reporter(svn.ra.do_update(self.ra, revnum, path, *args, **kwargs))
+        return self.Reporter(svn.ra.do_update(self.ra, revnum, path,
+                                              *args, **kwargs))
--- a/hgext/extdiff.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/extdiff.py	Sat Feb 13 23:50:38 2010 -0600
@@ -126,7 +126,7 @@
     modadd = mod_a | add_a | mod_b | add_b
     common = modadd | rem_a | rem_b
     if not common:
-       return 0
+        return 0
 
     tmproot = tempfile.mkdtemp(prefix='extdiff.')
     try:
@@ -146,10 +146,10 @@
         if node2:
             dir2 = snapshot(ui, repo, modadd, node2, tmproot)[0]
         elif len(common) > 1:
-            #we only actually need to get the files to copy back to the working
-            #dir in this case (because the other cases are: diffing 2 revisions
-            #or single file -- in which case the file is already directly passed
-            #to the diff tool).
+            #we only actually need to get the files to copy back to
+            #the working dir in this case (because the other cases
+            #are: diffing 2 revisions or single file -- in which case
+            #the file is already directly passed to the diff tool).
             dir2, fns_and_mtime = snapshot(ui, repo, modadd, None, tmproot)
         else:
             # This lets the diff tool open the changed file directly
@@ -169,8 +169,9 @@
                     dir1b = os.devnull
             dir2 = os.path.join(dir2root, dir2, common_file)
 
-        # Function to quote file/dir names in the argument string
-        # When not operating in 3-way mode, an empty string is returned for parent2
+        # Function to quote file/dir names in the argument string.
+        # When not operating in 3-way mode, an empty string is
+        # returned for parent2
         replace = dict(parent=dir1a, parent1=dir1a, parent2=dir1b, child=dir2)
         def quote(match):
             key = match.group()[1:]
@@ -238,7 +239,8 @@
     for cmd, path in ui.configitems('extdiff'):
         if cmd.startswith('cmd.'):
             cmd = cmd[4:]
-            if not path: path = cmd
+            if not path:
+                path = cmd
             diffopts = ui.config('extdiff', 'opts.' + cmd, '')
             diffopts = diffopts and [diffopts] or []
         elif cmd.startswith('opts.'):
@@ -258,13 +260,14 @@
             doc = _('''\
 use %(path)s to diff repository (or selected files)
 
-    Show differences between revisions for the specified files, using the
-    %(path)s program.
+    Show differences between revisions for the specified files, using
+    the %(path)s program.
 
-    When two revision arguments are given, then changes are shown between
-    those revisions. If only one revision is specified then that revision is
-    compared to the working directory, and, when no revisions are specified,
-    the working directory files are compared to its parent.\
+    When two revision arguments are given, then changes are shown
+    between those revisions. If only one revision is specified then
+    that revision is compared to the working directory, and, when no
+    revisions are specified, the working directory files are compared
+    to its parent.\
 ''') % dict(path=util.uirepr(path))
 
             # We must translate the docstring right away since it is
--- a/hgext/gpg.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/gpg.py	Sat Feb 13 23:50:38 2010 -0600
@@ -38,8 +38,10 @@
         finally:
             for f in (sigfile, datafile):
                 try:
-                    if f: os.unlink(f)
-                except: pass
+                    if f:
+                        os.unlink(f)
+                except:
+                    pass
         keys = []
         key, fingerprint = None, None
         err = ""
@@ -88,7 +90,7 @@
             if not l:
                 continue
             yield (l.split(" ", 2), (context, ln))
-            ln +=1
+            ln += 1
 
     # read the heads
     fl = repo.file(".hgsigs")
--- a/hgext/graphlog.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/graphlog.py	Sat Feb 13 23:50:38 2010 -0600
@@ -12,7 +12,7 @@
 revision graph is also shown.
 '''
 
-import os, sys
+import os
 from mercurial.cmdutil import revrange, show_changeset
 from mercurial.commands import templateopts
 from mercurial.i18n import _
@@ -250,7 +250,8 @@
     if path: # could be reset in canonpath
         revdag = graphmod.filerevs(repo, path, start, stop, limit)
     else:
-        stop = max(stop, start - limit + 1)
+        if limit is not None:
+            stop = max(stop, start - limit + 1)
         revdag = graphmod.revisions(repo, start, stop)
 
     displayer = show_changeset(ui, repo, opts, buffered=True)
@@ -260,7 +261,7 @@
 def graphrevs(repo, nodes, opts):
     limit = cmdutil.loglimit(opts)
     nodes.reverse()
-    if limit < sys.maxint:
+    if limit is not None:
         nodes = nodes[:limit]
     return graphmod.nodes(repo, nodes)
 
@@ -275,12 +276,12 @@
     """
 
     check_unsupported_flags(opts)
-    dest, revs, checkout = hg.parseurl(
-        ui.expandpath(dest or 'default-push', dest or 'default'),
-        opts.get('rev'))
+    dest = ui.expandpath(dest or 'default-push', dest or 'default')
+    dest, branches = hg.parseurl(dest, opts.get('branch'))
+    revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
+    other = hg.repository(cmdutil.remoteui(ui, opts), dest)
     if revs:
         revs = [repo.lookup(rev) for rev in revs]
-    other = hg.repository(cmdutil.remoteui(ui, opts), dest)
     ui.status(_('comparing with %s\n') % url.hidepassword(dest))
     o = repo.findoutgoing(other, force=opts.get('force'))
     if not o:
@@ -304,8 +305,9 @@
     """
 
     check_unsupported_flags(opts)
-    source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
+    source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
     other = hg.repository(cmdutil.remoteui(repo, opts), source)
+    revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
     ui.status(_('comparing with %s\n') % url.hidepassword(source))
     if revs:
         revs = [other.lookup(rev) for rev in revs]
--- a/hgext/hgk.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/hgk.py	Sat Feb 13 23:50:38 2010 -0600
@@ -92,7 +92,7 @@
             break
 
 def catcommit(ui, repo, n, prefix, ctx=None):
-    nlprefix = '\n' + prefix;
+    nlprefix = '\n' + prefix
     if ctx is None:
         ctx = repo[n]
     ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ??
@@ -135,7 +135,7 @@
     prefix = ""
     if opts['stdin']:
         try:
-            (type, r) = raw_input().split(' ');
+            (type, r) = raw_input().split(' ')
             prefix = "    "
         except EOFError:
             return
@@ -148,12 +148,12 @@
     while r:
         if type != "commit":
             ui.warn(_("aborting hg cat-file only understands commits\n"))
-            return 1;
+            return 1
         n = repo.lookup(r)
         catcommit(ui, repo, n, prefix)
         if opts['stdin']:
             try:
-                (type, r) = raw_input().split(' ');
+                (type, r) = raw_input().split(' ')
             except EOFError:
                 break
         else:
@@ -186,7 +186,7 @@
                     l[x].changeset() # force reading
                 else:
                     l[x] = 1
-            for x in xrange(chunk-1, -1, -1):
+            for x in xrange(chunk - 1, -1, -1):
                 if l[x] != 0:
                     yield (i + x, full != None and l[x] or None)
             if i == 0:
@@ -220,8 +220,8 @@
 
     # calculate the graph for the supplied commits
     for i, n in enumerate(want_sha1):
-        reachable.append(set());
-        visit = [n];
+        reachable.append(set())
+        visit = [n]
         reachable[i].add(n)
         while visit:
             n = visit.pop(0)
--- a/hgext/highlight/highlight.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/highlight/highlight.py	Sat Feb 13 23:50:38 2010 -0600
@@ -9,7 +9,7 @@
 # file to defer pygments loading and speedup extension setup.
 
 from mercurial import demandimport
-demandimport.ignore.extend(['pkgutil', 'pkg_resources', '__main__',])
+demandimport.ignore.extend(['pkgutil', 'pkg_resources', '__main__'])
 from mercurial import util, encoding
 
 from pygments import highlight
--- a/hgext/inotify/__init__.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/inotify/__init__.py	Sat Feb 13 23:50:38 2010 -0600
@@ -42,11 +42,11 @@
         # to start an inotify server if it won't start.
         _inotifyon = True
 
-        def status(self, match, ignored, clean, unknown=True):
+        def status(self, match, subrepos, ignored, clean, unknown=True):
             files = match.files()
             if '.' in files:
                 files = []
-            if self._inotifyon and not ignored and not self._dirty:
+            if self._inotifyon and not ignored and not subrepos and not self._dirty:
                 cli = client(ui, repo)
                 try:
                     result = cli.statusquery(files, match, False,
@@ -60,7 +60,7 @@
                     if ui.config('inotify', 'debug'):
                         r2 = super(inotifydirstate, self).status(
                             match, False, clean, unknown)
-                        for c,a,b in zip('LMARDUIC', result, r2):
+                        for c, a, b in zip('LMARDUIC', result, r2):
                             for f in a:
                                 if f not in b:
                                     ui.warn('*** inotify: %s +%s\n' % (c, f))
@@ -70,7 +70,7 @@
                         result = r2
                     return result
             return super(inotifydirstate, self).status(
-                match, ignored, clean, unknown)
+                match, subrepos, ignored, clean, unknown)
 
     repo.dirstate.__class__ = inotifydirstate
 
--- a/hgext/inotify/client.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/inotify/client.py	Sat Feb 13 23:50:38 2010 -0600
@@ -11,7 +11,8 @@
 import common, server
 import errno, os, socket, struct
 
-class QueryFailed(Exception): pass
+class QueryFailed(Exception):
+    pass
 
 def start_server(function):
     """
@@ -137,8 +138,10 @@
             states = 'almrx!'
             if ignored:
                 raise ValueError('this is insanity')
-            if clean: states += 'c'
-            if unknown: states += '?'
+            if clean:
+                states += 'c'
+            if unknown:
+                states += '?'
             yield states
 
         req = '\0'.join(genquery())
--- a/hgext/inotify/linux/_inotify.c	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/inotify/linux/_inotify.c	Sat Feb 13 23:50:38 2010 -0600
@@ -17,298 +17,298 @@
 
 static PyObject *init(PyObject *self, PyObject *args)
 {
-    PyObject *ret = NULL;
-    int fd = -1;
+	PyObject *ret = NULL;
+	int fd = -1;
 
-     if (!PyArg_ParseTuple(args, ":init"))
-	goto bail;
+	if (!PyArg_ParseTuple(args, ":init"))
+		goto bail;
 
-    Py_BEGIN_ALLOW_THREADS
-    fd = inotify_init();
-    Py_END_ALLOW_THREADS
+	Py_BEGIN_ALLOW_THREADS;
+	fd = inotify_init();
+	Py_END_ALLOW_THREADS;
 
-    if (fd == -1) {
-	PyErr_SetFromErrno(PyExc_OSError);
-	goto bail;
-    }
+	if (fd == -1) {
+		PyErr_SetFromErrno(PyExc_OSError);
+		goto bail;
+	}
 
-    ret = PyInt_FromLong(fd);
-    if (ret == NULL)
-	goto bail;
+	ret = PyInt_FromLong(fd);
+	if (ret == NULL)
+		goto bail;
 
-    goto done;
+	goto done;
 
 bail:
-    if (fd != -1)
-	close(fd);
+	if (fd != -1)
+		close(fd);
 
-    Py_CLEAR(ret);
+	Py_CLEAR(ret);
 
 done:
-    return ret;
+	return ret;
 }
 
 PyDoc_STRVAR(
-    init_doc,
-    "init() -> fd\n"
-    "\n"
-    "Initialise an inotify instance.\n"
-    "Return a file descriptor associated with a new inotify event queue.");
+	init_doc,
+	"init() -> fd\n"
+	"\n"
+	"Initialise an inotify instance.\n"
+	"Return a file descriptor associated with a new inotify event queue.");
 
 static PyObject *add_watch(PyObject *self, PyObject *args)
 {
-    PyObject *ret = NULL;
-    uint32_t mask;
-    int wd = -1;
-    char *path;
-    int fd;
+	PyObject *ret = NULL;
+	uint32_t mask;
+	int wd = -1;
+	char *path;
+	int fd;
 
-    if (!PyArg_ParseTuple(args, "isI:add_watch", &fd, &path, &mask))
-	goto bail;
+	if (!PyArg_ParseTuple(args, "isI:add_watch", &fd, &path, &mask))
+		goto bail;
 
-    Py_BEGIN_ALLOW_THREADS
-    wd = inotify_add_watch(fd, path, mask);
-    Py_END_ALLOW_THREADS
+	Py_BEGIN_ALLOW_THREADS;
+	wd = inotify_add_watch(fd, path, mask);
+	Py_END_ALLOW_THREADS;
 
-    if (wd == -1) {
-	PyErr_SetFromErrnoWithFilename(PyExc_OSError, path);
-	goto bail;
-    }
+	if (wd == -1) {
+		PyErr_SetFromErrnoWithFilename(PyExc_OSError, path);
+		goto bail;
+	}
 
-    ret = PyInt_FromLong(wd);
-    if (ret == NULL)
-	goto bail;
+	ret = PyInt_FromLong(wd);
+	if (ret == NULL)
+		goto bail;
 
-    goto done;
+	goto done;
 
 bail:
-    if (wd != -1)
-	inotify_rm_watch(fd, wd);
+	if (wd != -1)
+		inotify_rm_watch(fd, wd);
 
-    Py_CLEAR(ret);
+	Py_CLEAR(ret);
 
 done:
-    return ret;
+	return ret;
 }
 
 PyDoc_STRVAR(
-    add_watch_doc,
-    "add_watch(fd, path, mask) -> wd\n"
-    "\n"
-    "Add a watch to an inotify instance, or modify an existing watch.\n"
-    "\n"
-    "        fd: file descriptor returned by init()\n"
-    "        path: path to watch\n"
-    "        mask: mask of events to watch for\n"
-    "\n"
-    "Return a unique numeric watch descriptor for the inotify instance\n"
-    "mapped by the file descriptor.");
+	add_watch_doc,
+	"add_watch(fd, path, mask) -> wd\n"
+	"\n"
+	"Add a watch to an inotify instance, or modify an existing watch.\n"
+	"\n"
+	"        fd: file descriptor returned by init()\n"
+	"        path: path to watch\n"
+	"        mask: mask of events to watch for\n"
+	"\n"
+	"Return a unique numeric watch descriptor for the inotify instance\n"
+	"mapped by the file descriptor.");
 
 static PyObject *remove_watch(PyObject *self, PyObject *args)
 {
-    uint32_t wd;
-    int fd;
-    int r;
+	uint32_t wd;
+	int fd;
+	int r;
 
-    if (!PyArg_ParseTuple(args, "iI:remove_watch", &fd, &wd))
-	return NULL;
+	if (!PyArg_ParseTuple(args, "iI:remove_watch", &fd, &wd))
+		return NULL;
 
-    Py_BEGIN_ALLOW_THREADS
-    r = inotify_rm_watch(fd, wd);
-    Py_END_ALLOW_THREADS
+	Py_BEGIN_ALLOW_THREADS;
+	r = inotify_rm_watch(fd, wd);
+	Py_END_ALLOW_THREADS;
 
-    if (r == -1) {
-	PyErr_SetFromErrno(PyExc_OSError);
-	return NULL;
-    }
+	if (r == -1) {
+		PyErr_SetFromErrno(PyExc_OSError);
+		return NULL;
+	}
 
-    Py_INCREF(Py_None);
-    return Py_None;
+	Py_INCREF(Py_None);
+	return Py_None;
 }
 
 PyDoc_STRVAR(
-    remove_watch_doc,
-    "remove_watch(fd, wd)\n"
-    "\n"
-    "        fd: file descriptor returned by init()\n"
-    "        wd: watch descriptor returned by add_watch()\n"
-    "\n"
-    "Remove a watch associated with the watch descriptor wd from the\n"
-    "inotify instance associated with the file descriptor fd.\n"
-    "\n"
-    "Removing a watch causes an IN_IGNORED event to be generated for this\n"
-    "watch descriptor.");
+	remove_watch_doc,
+	"remove_watch(fd, wd)\n"
+	"\n"
+	"        fd: file descriptor returned by init()\n"
+	"        wd: watch descriptor returned by add_watch()\n"
+	"\n"
+	"Remove a watch associated with the watch descriptor wd from the\n"
+	"inotify instance associated with the file descriptor fd.\n"
+	"\n"
+	"Removing a watch causes an IN_IGNORED event to be generated for this\n"
+	"watch descriptor.");
 
 #define bit_name(x) {x, #x}
 
 static struct {
-    int bit;
-    const char *name;
-    PyObject *pyname;
+	int bit;
+	const char *name;
+	PyObject *pyname;
 } bit_names[] = {
-    bit_name(IN_ACCESS),
-    bit_name(IN_MODIFY),
-    bit_name(IN_ATTRIB),
-    bit_name(IN_CLOSE_WRITE),
-    bit_name(IN_CLOSE_NOWRITE),
-    bit_name(IN_OPEN),
-    bit_name(IN_MOVED_FROM),
-    bit_name(IN_MOVED_TO),
-    bit_name(IN_CREATE),
-    bit_name(IN_DELETE),
-    bit_name(IN_DELETE_SELF),
-    bit_name(IN_MOVE_SELF),
-    bit_name(IN_UNMOUNT),
-    bit_name(IN_Q_OVERFLOW),
-    bit_name(IN_IGNORED),
-    bit_name(IN_ONLYDIR),
-    bit_name(IN_DONT_FOLLOW),
-    bit_name(IN_MASK_ADD),
-    bit_name(IN_ISDIR),
-    bit_name(IN_ONESHOT),
-    {0}
+	bit_name(IN_ACCESS),
+	bit_name(IN_MODIFY),
+	bit_name(IN_ATTRIB),
+	bit_name(IN_CLOSE_WRITE),
+	bit_name(IN_CLOSE_NOWRITE),
+	bit_name(IN_OPEN),
+	bit_name(IN_MOVED_FROM),
+	bit_name(IN_MOVED_TO),
+	bit_name(IN_CREATE),
+	bit_name(IN_DELETE),
+	bit_name(IN_DELETE_SELF),
+	bit_name(IN_MOVE_SELF),
+	bit_name(IN_UNMOUNT),
+	bit_name(IN_Q_OVERFLOW),
+	bit_name(IN_IGNORED),
+	bit_name(IN_ONLYDIR),
+	bit_name(IN_DONT_FOLLOW),
+	bit_name(IN_MASK_ADD),
+	bit_name(IN_ISDIR),
+	bit_name(IN_ONESHOT),
+	{0}
 };
 
 static PyObject *decode_mask(int mask)
 {
-    PyObject *ret = PyList_New(0);
-    int i;
+	PyObject *ret = PyList_New(0);
+	int i;
 
-    if (ret == NULL)
-	goto bail;
+	if (ret == NULL)
+		goto bail;
 
-    for (i = 0; bit_names[i].bit; i++) {
-	if (mask & bit_names[i].bit) {
-	    if (bit_names[i].pyname == NULL) {
-		bit_names[i].pyname = PyString_FromString(bit_names[i].name);
-		if (bit_names[i].pyname == NULL)
-		    goto bail;
-	    }
-	    Py_INCREF(bit_names[i].pyname);
-	    if (PyList_Append(ret, bit_names[i].pyname) == -1)
-		goto bail;
+	for (i = 0; bit_names[i].bit; i++) {
+		if (mask & bit_names[i].bit) {
+			if (bit_names[i].pyname == NULL) {
+				bit_names[i].pyname = PyString_FromString(bit_names[i].name);
+				if (bit_names[i].pyname == NULL)
+					goto bail;
+			}
+			Py_INCREF(bit_names[i].pyname);
+			if (PyList_Append(ret, bit_names[i].pyname) == -1)
+				goto bail;
+		}
 	}
-    }
 
-    goto done;
+	goto done;
 
 bail:
-    Py_CLEAR(ret);
+	Py_CLEAR(ret);
 
 done:
-    return ret;
+	return ret;
 }
 
 static PyObject *pydecode_mask(PyObject *self, PyObject *args)
 {
-    int mask;
+	int mask;
 
-    if (!PyArg_ParseTuple(args, "i:decode_mask", &mask))
-	return NULL;
+	if (!PyArg_ParseTuple(args, "i:decode_mask", &mask))
+		return NULL;
 
-    return decode_mask(mask);
+	return decode_mask(mask);
 }
 
 PyDoc_STRVAR(
-    decode_mask_doc,
-    "decode_mask(mask) -> list_of_strings\n"
-    "\n"
-    "Decode an inotify mask value into a list of strings that give the\n"
-    "name of each bit set in the mask.");
+	decode_mask_doc,
+	"decode_mask(mask) -> list_of_strings\n"
+	"\n"
+	"Decode an inotify mask value into a list of strings that give the\n"
+	"name of each bit set in the mask.");
 
 static char doc[] = "Low-level inotify interface wrappers.";
 
 static void define_const(PyObject *dict, const char *name, uint32_t val)
 {
-    PyObject *pyval = PyInt_FromLong(val);
-    PyObject *pyname = PyString_FromString(name);
+	PyObject *pyval = PyInt_FromLong(val);
+	PyObject *pyname = PyString_FromString(name);
 
-    if (!pyname || !pyval)
-	goto bail;
+	if (!pyname || !pyval)
+		goto bail;
 
-    PyDict_SetItem(dict, pyname, pyval);
+	PyDict_SetItem(dict, pyname, pyval);
 
 bail:
-    Py_XDECREF(pyname);
-    Py_XDECREF(pyval);
+	Py_XDECREF(pyname);
+	Py_XDECREF(pyval);
 }
 
 static void define_consts(PyObject *dict)
 {
-    define_const(dict, "IN_ACCESS", IN_ACCESS);
-    define_const(dict, "IN_MODIFY", IN_MODIFY);
-    define_const(dict, "IN_ATTRIB", IN_ATTRIB);
-    define_const(dict, "IN_CLOSE_WRITE", IN_CLOSE_WRITE);
-    define_const(dict, "IN_CLOSE_NOWRITE", IN_CLOSE_NOWRITE);
-    define_const(dict, "IN_OPEN", IN_OPEN);
-    define_const(dict, "IN_MOVED_FROM", IN_MOVED_FROM);
-    define_const(dict, "IN_MOVED_TO", IN_MOVED_TO);
+	define_const(dict, "IN_ACCESS", IN_ACCESS);
+	define_const(dict, "IN_MODIFY", IN_MODIFY);
+	define_const(dict, "IN_ATTRIB", IN_ATTRIB);
+	define_const(dict, "IN_CLOSE_WRITE", IN_CLOSE_WRITE);
+	define_const(dict, "IN_CLOSE_NOWRITE", IN_CLOSE_NOWRITE);
+	define_const(dict, "IN_OPEN", IN_OPEN);
+	define_const(dict, "IN_MOVED_FROM", IN_MOVED_FROM);
+	define_const(dict, "IN_MOVED_TO", IN_MOVED_TO);
 
-    define_const(dict, "IN_CLOSE", IN_CLOSE);
-    define_const(dict, "IN_MOVE", IN_MOVE);
+	define_const(dict, "IN_CLOSE", IN_CLOSE);
+	define_const(dict, "IN_MOVE", IN_MOVE);
 
-    define_const(dict, "IN_CREATE", IN_CREATE);
-    define_const(dict, "IN_DELETE", IN_DELETE);
-    define_const(dict, "IN_DELETE_SELF", IN_DELETE_SELF);
-    define_const(dict, "IN_MOVE_SELF", IN_MOVE_SELF);
-    define_const(dict, "IN_UNMOUNT", IN_UNMOUNT);
-    define_const(dict, "IN_Q_OVERFLOW", IN_Q_OVERFLOW);
-    define_const(dict, "IN_IGNORED", IN_IGNORED);
+	define_const(dict, "IN_CREATE", IN_CREATE);
+	define_const(dict, "IN_DELETE", IN_DELETE);
+	define_const(dict, "IN_DELETE_SELF", IN_DELETE_SELF);
+	define_const(dict, "IN_MOVE_SELF", IN_MOVE_SELF);
+	define_const(dict, "IN_UNMOUNT", IN_UNMOUNT);
+	define_const(dict, "IN_Q_OVERFLOW", IN_Q_OVERFLOW);
+	define_const(dict, "IN_IGNORED", IN_IGNORED);
 
-    define_const(dict, "IN_ONLYDIR", IN_ONLYDIR);
-    define_const(dict, "IN_DONT_FOLLOW", IN_DONT_FOLLOW);
-    define_const(dict, "IN_MASK_ADD", IN_MASK_ADD);
-    define_const(dict, "IN_ISDIR", IN_ISDIR);
-    define_const(dict, "IN_ONESHOT", IN_ONESHOT);
-    define_const(dict, "IN_ALL_EVENTS", IN_ALL_EVENTS);
+	define_const(dict, "IN_ONLYDIR", IN_ONLYDIR);
+	define_const(dict, "IN_DONT_FOLLOW", IN_DONT_FOLLOW);
+	define_const(dict, "IN_MASK_ADD", IN_MASK_ADD);
+	define_const(dict, "IN_ISDIR", IN_ISDIR);
+	define_const(dict, "IN_ONESHOT", IN_ONESHOT);
+	define_const(dict, "IN_ALL_EVENTS", IN_ALL_EVENTS);
 }
 
 struct event {
-    PyObject_HEAD
-    PyObject *wd;
-    PyObject *mask;
-    PyObject *cookie;
-    PyObject *name;
+	PyObject_HEAD
+	PyObject *wd;
+	PyObject *mask;
+	PyObject *cookie;
+	PyObject *name;
 };
 
 static PyObject *event_wd(PyObject *self, void *x)
 {
-    struct event *evt = (struct event *) self;
-    Py_INCREF(evt->wd);
-    return evt->wd;
+	struct event *evt = (struct event *)self;
+	Py_INCREF(evt->wd);
+	return evt->wd;
 }
 
 static PyObject *event_mask(PyObject *self, void *x)
 {
-    struct event *evt = (struct event *) self;
-    Py_INCREF(evt->mask);
-    return evt->mask;
+	struct event *evt = (struct event *)self;
+	Py_INCREF(evt->mask);
+	return evt->mask;
 }
 
 static PyObject *event_cookie(PyObject *self, void *x)
 {
-    struct event *evt = (struct event *) self;
-    Py_INCREF(evt->cookie);
-    return evt->cookie;
+	struct event *evt = (struct event *)self;
+	Py_INCREF(evt->cookie);
+	return evt->cookie;
 }
 
 static PyObject *event_name(PyObject *self, void *x)
 {
-    struct event *evt = (struct event *) self;
-    Py_INCREF(evt->name);
-    return evt->name;
+	struct event *evt = (struct event *)self;
+	Py_INCREF(evt->name);
+	return evt->name;
 }
 
 static struct PyGetSetDef event_getsets[] = {
-    {"wd", event_wd, NULL,
-     "watch descriptor"},
-    {"mask", event_mask, NULL,
-     "event mask"},
-    {"cookie", event_cookie, NULL,
-     "rename cookie, if rename-related event"},
-    {"name", event_name, NULL,
-     "file name"},
-    {NULL}
+	{"wd", event_wd, NULL,
+	 "watch descriptor"},
+	{"mask", event_mask, NULL,
+	 "event mask"},
+	{"cookie", event_cookie, NULL,
+	 "rename cookie, if rename-related event"},
+	{"name", event_name, NULL,
+	 "file name"},
+	{NULL}
 };
 
 PyDoc_STRVAR(
@@ -317,284 +317,285 @@
 
 static PyObject *event_new(PyTypeObject *t, PyObject *a, PyObject *k)
 {
-    return (*t->tp_alloc)(t, 0);
+	return (*t->tp_alloc)(t, 0);
 }
 
 static void event_dealloc(struct event *evt)
 {
-    Py_XDECREF(evt->wd);
-    Py_XDECREF(evt->mask);
-    Py_XDECREF(evt->cookie);
-    Py_XDECREF(evt->name);
+	Py_XDECREF(evt->wd);
+	Py_XDECREF(evt->mask);
+	Py_XDECREF(evt->cookie);
+	Py_XDECREF(evt->name);
 
-    (*evt->ob_type->tp_free)(evt);
+	(*evt->ob_type->tp_free)(evt);
 }
 
 static PyObject *event_repr(struct event *evt)
 {
-    int wd = PyInt_AsLong(evt->wd);
-    int cookie = evt->cookie == Py_None ? -1 : PyInt_AsLong(evt->cookie);
-    PyObject *ret = NULL, *pymasks = NULL, *pymask = NULL;
-    PyObject *join = NULL;
-    char *maskstr;
+	int wd = PyInt_AsLong(evt->wd);
+	int cookie = evt->cookie == Py_None ? -1 : PyInt_AsLong(evt->cookie);
+	PyObject *ret = NULL, *pymasks = NULL, *pymask = NULL;
+	PyObject *join = NULL;
+	char *maskstr;
 
-    join = PyString_FromString("|");
-    if (join == NULL)
-	goto bail;
+	join = PyString_FromString("|");
+	if (join == NULL)
+		goto bail;
 
-    pymasks = decode_mask(PyInt_AsLong(evt->mask));
-    if (pymasks == NULL)
-	goto bail;
+	pymasks = decode_mask(PyInt_AsLong(evt->mask));
+	if (pymasks == NULL)
+		goto bail;
 
-    pymask = _PyString_Join(join, pymasks);
-    if (pymask == NULL)
-	goto bail;
+	pymask = _PyString_Join(join, pymasks);
+	if (pymask == NULL)
+		goto bail;
 
-    maskstr = PyString_AsString(pymask);
+	maskstr = PyString_AsString(pymask);
+
+	if (evt->name != Py_None) {
+		PyObject *pyname = PyString_Repr(evt->name, 1);
+		char *name = pyname ? PyString_AsString(pyname) : "???";
 
-    if (evt->name != Py_None) {
-	PyObject *pyname = PyString_Repr(evt->name, 1);
-	char *name = pyname ? PyString_AsString(pyname) : "???";
-
-	if (cookie == -1)
-	    ret = PyString_FromFormat("event(wd=%d, mask=%s, name=%s)",
-				      wd, maskstr, name);
-	else
-	    ret = PyString_FromFormat("event(wd=%d, mask=%s, "
-				      "cookie=0x%x, name=%s)",
-				      wd, maskstr, cookie, name);
+		if (cookie == -1)
+			ret = PyString_FromFormat(
+				"event(wd=%d, mask=%s, name=%s)",
+				wd, maskstr, name);
+		else
+			ret = PyString_FromFormat("event(wd=%d, mask=%s, "
+						  "cookie=0x%x, name=%s)",
+						  wd, maskstr, cookie, name);
 
-	Py_XDECREF(pyname);
-    } else {
-	if (cookie == -1)
-	    ret = PyString_FromFormat("event(wd=%d, mask=%s)",
-				      wd, maskstr);
-	else {
-	    ret = PyString_FromFormat("event(wd=%d, mask=%s, cookie=0x%x)",
-				      wd, maskstr, cookie);
+		Py_XDECREF(pyname);
+	} else {
+		if (cookie == -1)
+			ret = PyString_FromFormat("event(wd=%d, mask=%s)",
+						  wd, maskstr);
+		else {
+			ret = PyString_FromFormat(
+				"event(wd=%d, mask=%s, cookie=0x%x)",
+				wd, maskstr, cookie);
+		}
 	}
-    }
 
-    goto done;
+	goto done;
 bail:
-    Py_CLEAR(ret);
+	Py_CLEAR(ret);
 
 done:
-    Py_XDECREF(pymask);
-    Py_XDECREF(pymasks);
-    Py_XDECREF(join);
+	Py_XDECREF(pymask);
+	Py_XDECREF(pymasks);
+	Py_XDECREF(join);
 
-    return ret;
+	return ret;
 }
 
 static PyTypeObject event_type = {
-    PyObject_HEAD_INIT(NULL)
-    0,                         /*ob_size*/
-    "_inotify.event",             /*tp_name*/
-    sizeof(struct event), /*tp_basicsize*/
-    0,                         /*tp_itemsize*/
-    (destructor)event_dealloc, /*tp_dealloc*/
-    0,                         /*tp_print*/
-    0,                         /*tp_getattr*/
-    0,                         /*tp_setattr*/
-    0,                         /*tp_compare*/
-    (reprfunc)event_repr,      /*tp_repr*/
-    0,                         /*tp_as_number*/
-    0,                         /*tp_as_sequence*/
-    0,                         /*tp_as_mapping*/
-    0,                         /*tp_hash */
-    0,                         /*tp_call*/
-    0,                         /*tp_str*/
-    0,                         /*tp_getattro*/
-    0,                         /*tp_setattro*/
-    0,                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    event_doc,           /* tp_doc */
-    0,                         /* tp_traverse */
-    0,                         /* tp_clear */
-    0,                         /* tp_richcompare */
-    0,                         /* tp_weaklistoffset */
-    0,                         /* tp_iter */
-    0,                         /* tp_iternext */
-    0,                         /* tp_methods */
-    0,                         /* tp_members */
-    event_getsets,      /* tp_getset */
-    0,                         /* tp_base */
-    0,                         /* tp_dict */
-    0,                         /* tp_descr_get */
-    0,                         /* tp_descr_set */
-    0,                         /* tp_dictoffset */
-    0,                         /* tp_init */
-    0,                         /* tp_alloc */
-    event_new,          /* tp_new */
+	PyObject_HEAD_INIT(NULL)
+	0,                         /*ob_size*/
+	"_inotify.event",             /*tp_name*/
+	sizeof(struct event), /*tp_basicsize*/
+	0,                         /*tp_itemsize*/
+	(destructor)event_dealloc, /*tp_dealloc*/
+	0,                         /*tp_print*/
+	0,                         /*tp_getattr*/
+	0,                         /*tp_setattr*/
+	0,                         /*tp_compare*/
+	(reprfunc)event_repr,      /*tp_repr*/
+	0,                         /*tp_as_number*/
+	0,                         /*tp_as_sequence*/
+	0,                         /*tp_as_mapping*/
+	0,                         /*tp_hash */
+	0,                         /*tp_call*/
+	0,                         /*tp_str*/
+	0,                         /*tp_getattro*/
+	0,                         /*tp_setattro*/
+	0,                         /*tp_as_buffer*/
+	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
+	event_doc,           /* tp_doc */
+	0,                         /* tp_traverse */
+	0,                         /* tp_clear */
+	0,                         /* tp_richcompare */
+	0,                         /* tp_weaklistoffset */
+	0,                         /* tp_iter */
+	0,                         /* tp_iternext */
+	0,                         /* tp_methods */
+	0,                         /* tp_members */
+	event_getsets,      /* tp_getset */
+	0,                         /* tp_base */
+	0,                         /* tp_dict */
+	0,                         /* tp_descr_get */
+	0,                         /* tp_descr_set */
+	0,                         /* tp_dictoffset */
+	0,                         /* tp_init */
+	0,                         /* tp_alloc */
+	event_new,          /* tp_new */
 };
 
 PyObject *read_events(PyObject *self, PyObject *args)
 {
-    PyObject *ctor_args = NULL;
-    PyObject *pybufsize = NULL;
-    PyObject *ret = NULL;
-    int bufsize = 65536;
-    char *buf = NULL;
-    int nread, pos;
-    int fd;
+	PyObject *ctor_args = NULL;
+	PyObject *pybufsize = NULL;
+	PyObject *ret = NULL;
+	int bufsize = 65536;
+	char *buf = NULL;
+	int nread, pos;
+	int fd;
+
+	if (!PyArg_ParseTuple(args, "i|O:read", &fd, &pybufsize))
+		goto bail;
 
-    if (!PyArg_ParseTuple(args, "i|O:read", &fd, &pybufsize))
-	goto bail;
+	if (pybufsize && pybufsize != Py_None)
+		bufsize = PyInt_AsLong(pybufsize);
 
-    if (pybufsize && pybufsize != Py_None)
-	bufsize = PyInt_AsLong(pybufsize);
+	ret = PyList_New(0);
+	if (ret == NULL)
+		goto bail;
 
-    ret = PyList_New(0);
-    if (ret == NULL)
-	goto bail;
+	if (bufsize <= 0) {
+		int r;
 
-    if (bufsize <= 0) {
-	int r;
+		Py_BEGIN_ALLOW_THREADS;
+		r = ioctl(fd, FIONREAD, &bufsize);
+		Py_END_ALLOW_THREADS;
 
-	Py_BEGIN_ALLOW_THREADS
-	r = ioctl(fd, FIONREAD, &bufsize);
-	Py_END_ALLOW_THREADS
-
-	if (r == -1) {
-	    PyErr_SetFromErrno(PyExc_OSError);
-	    goto bail;
+		if (r == -1) {
+			PyErr_SetFromErrno(PyExc_OSError);
+			goto bail;
+		}
+		if (bufsize == 0)
+			goto done;
 	}
-	if (bufsize == 0)
-	    goto done;
-    }
-    else {
-	static long name_max;
-	static long name_fd = -1;
-	long min;
+	else {
+		static long name_max;
+		static long name_fd = -1;
+		long min;
 
-	if (name_fd != fd) {
-	    name_fd = fd;
-	    Py_BEGIN_ALLOW_THREADS
-	    name_max = fpathconf(fd, _PC_NAME_MAX);
-	    Py_END_ALLOW_THREADS
+		if (name_fd != fd) {
+			name_fd = fd;
+			Py_BEGIN_ALLOW_THREADS;
+			name_max = fpathconf(fd, _PC_NAME_MAX);
+			Py_END_ALLOW_THREADS;
+		}
+
+		min = sizeof(struct inotify_event) + name_max + 1;
+
+		if (bufsize < min) {
+			PyErr_Format(PyExc_ValueError,
+				     "bufsize must be at least %d", (int)min);
+			goto bail;
+		}
 	}
 
-	min = sizeof(struct inotify_event) + name_max + 1;
-
-	if (bufsize < min) {
-	    PyErr_Format(PyExc_ValueError, "bufsize must be at least %d",
-			 (int) min);
-	    goto bail;
-	}
-    }
-
-    buf = alloca(bufsize);
-
-    Py_BEGIN_ALLOW_THREADS
-    nread = read(fd, buf, bufsize);
-    Py_END_ALLOW_THREADS
-
-    if (nread == -1) {
-	PyErr_SetFromErrno(PyExc_OSError);
-	goto bail;
-    }
-
-    ctor_args = PyTuple_New(0);
-
-    if (ctor_args == NULL)
-	goto bail;
+	buf = alloca(bufsize);
 
-    pos = 0;
-
-    while (pos < nread) {
-	struct inotify_event *in = (struct inotify_event *) (buf + pos);
-	struct event *evt;
-	PyObject *obj;
-
-	obj = PyObject_CallObject((PyObject *) &event_type, ctor_args);
-
-	if (obj == NULL)
-	    goto bail;
-
-	evt = (struct event *) obj;
+	Py_BEGIN_ALLOW_THREADS;
+	nread = read(fd, buf, bufsize);
+	Py_END_ALLOW_THREADS;
 
-	evt->wd = PyInt_FromLong(in->wd);
-	evt->mask = PyInt_FromLong(in->mask);
-	if (in->mask & IN_MOVE)
-	    evt->cookie = PyInt_FromLong(in->cookie);
-	else {
-	    Py_INCREF(Py_None);
-	    evt->cookie = Py_None;
-	}
-	if (in->len)
-	    evt->name = PyString_FromString(in->name);
-	else {
-	    Py_INCREF(Py_None);
-	    evt->name = Py_None;
+	if (nread == -1) {
+		PyErr_SetFromErrno(PyExc_OSError);
+		goto bail;
 	}
 
-	if (!evt->wd || !evt->mask || !evt->cookie || !evt->name)
-	    goto mybail;
+	ctor_args = PyTuple_New(0);
+
+	if (ctor_args == NULL)
+		goto bail;
+
+	pos = 0;
 
-	if (PyList_Append(ret, obj) == -1)
-	    goto mybail;
+	while (pos < nread) {
+		struct inotify_event *in = (struct inotify_event *)(buf + pos);
+		struct event *evt;
+		PyObject *obj;
 
-	pos += sizeof(struct inotify_event) + in->len;
-	continue;
+		obj = PyObject_CallObject((PyObject *)&event_type, ctor_args);
+
+		if (obj == NULL)
+			goto bail;
+
+		evt = (struct event *)obj;
 
-    mybail:
-	Py_CLEAR(evt->wd);
-	Py_CLEAR(evt->mask);
-	Py_CLEAR(evt->cookie);
-	Py_CLEAR(evt->name);
-	Py_DECREF(obj);
+		evt->wd = PyInt_FromLong(in->wd);
+		evt->mask = PyInt_FromLong(in->mask);
+		if (in->mask & IN_MOVE)
+			evt->cookie = PyInt_FromLong(in->cookie);
+		else {
+			Py_INCREF(Py_None);
+			evt->cookie = Py_None;
+		}
+		if (in->len)
+			evt->name = PyString_FromString(in->name);
+		else {
+			Py_INCREF(Py_None);
+			evt->name = Py_None;
+		}
+
+		if (!evt->wd || !evt->mask || !evt->cookie || !evt->name)
+			goto mybail;
 
-	goto bail;
-    }
+		if (PyList_Append(ret, obj) == -1)
+			goto mybail;
+
+		pos += sizeof(struct inotify_event) + in->len;
+		continue;
 
-    goto done;
+	mybail:
+		Py_CLEAR(evt->wd);
+		Py_CLEAR(evt->mask);
+		Py_CLEAR(evt->cookie);
+		Py_CLEAR(evt->name);
+		Py_DECREF(obj);
+
+		goto bail;
+	}
+
+	goto done;
 
 bail:
-    Py_CLEAR(ret);
+	Py_CLEAR(ret);
 
 done:
-    Py_XDECREF(ctor_args);
+	Py_XDECREF(ctor_args);
 
-    return ret;
+	return ret;
 }
 
 PyDoc_STRVAR(
-    read_doc,
-    "read(fd, bufsize[=65536]) -> list_of_events\n"
-    "\n"
-    "\nRead inotify events from a file descriptor.\n"
-    "\n"
-    "        fd: file descriptor returned by init()\n"
-    "        bufsize: size of buffer to read into, in bytes\n"
-    "\n"
-    "Return a list of event objects.\n"
-    "\n"
-    "If bufsize is > 0, block until events are available to be read.\n"
-    "Otherwise, immediately return all events that can be read without\n"
-    "blocking.");
-
+	read_doc,
+	"read(fd, bufsize[=65536]) -> list_of_events\n"
+	"\n"
+	"\nRead inotify events from a file descriptor.\n"
+	"\n"
+	"        fd: file descriptor returned by init()\n"
+	"        bufsize: size of buffer to read into, in bytes\n"
+	"\n"
+	"Return a list of event objects.\n"
+	"\n"
+	"If bufsize is > 0, block until events are available to be read.\n"
+	"Otherwise, immediately return all events that can be read without\n"
+	"blocking.");
 
 static PyMethodDef methods[] = {
-    {"init", init, METH_VARARGS, init_doc},
-    {"add_watch", add_watch, METH_VARARGS, add_watch_doc},
-    {"remove_watch", remove_watch, METH_VARARGS, remove_watch_doc},
-    {"read", read_events, METH_VARARGS, read_doc},
-    {"decode_mask", pydecode_mask, METH_VARARGS, decode_mask_doc},
-    {NULL},
+	{"init", init, METH_VARARGS, init_doc},
+	{"add_watch", add_watch, METH_VARARGS, add_watch_doc},
+	{"remove_watch", remove_watch, METH_VARARGS, remove_watch_doc},
+	{"read", read_events, METH_VARARGS, read_doc},
+	{"decode_mask", pydecode_mask, METH_VARARGS, decode_mask_doc},
+	{NULL},
 };
 
 void init_inotify(void)
 {
-    PyObject *mod, *dict;
+	PyObject *mod, *dict;
 
-    if (PyType_Ready(&event_type) == -1)
-	return;
+	if (PyType_Ready(&event_type) == -1)
+		return;
 
-    mod = Py_InitModule3("_inotify", methods, doc);
+	mod = Py_InitModule3("_inotify", methods, doc);
 
-    dict = PyModule_GetDict(mod);
+	dict = PyModule_GetDict(mod);
 
-    if (dict)
-	define_consts(dict);
+	if (dict)
+		define_consts(dict);
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hgext/inotify/linuxserver.py	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,442 @@
+# linuxserver.py - inotify status server for linux
+#
+# Copyright 2006, 2007, 2008 Bryan O'Sullivan <bos@serpentine.com>
+# Copyright 2007, 2008 Brendan Cully <brendan@kublai.com>
+#
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2 or any later version.
+
+from mercurial.i18n import _
+from mercurial import osutil, util
+import common
+import server
+import errno, os, select, stat, sys, time
+
+try:
+    import linux as inotify
+    from linux import watcher
+except ImportError:
+    raise
+
+def walkrepodirs(dirstate, absroot):
+    '''Iterate over all subdirectories of this repo.
+    Exclude the .hg directory, any nested repos, and ignored dirs.'''
+    def walkit(dirname, top):
+        fullpath = server.join(absroot, dirname)
+        try:
+            for name, kind in osutil.listdir(fullpath):
+                if kind == stat.S_IFDIR:
+                    if name == '.hg':
+                        if not top:
+                            return
+                    else:
+                        d = server.join(dirname, name)
+                        if dirstate._ignore(d):
+                            continue
+                        for subdir in walkit(d, False):
+                            yield subdir
+        except OSError, err:
+            if err.errno not in server.walk_ignored_errors:
+                raise
+        yield fullpath
+
+    return walkit('', True)
+
+def _explain_watch_limit(ui, dirstate, rootabs):
+    path = '/proc/sys/fs/inotify/max_user_watches'
+    try:
+        limit = int(file(path).read())
+    except IOError, err:
+        if err.errno != errno.ENOENT:
+            raise
+        raise util.Abort(_('this system does not seem to '
+                           'support inotify'))
+    ui.warn(_('*** the current per-user limit on the number '
+              'of inotify watches is %s\n') % limit)
+    ui.warn(_('*** this limit is too low to watch every '
+              'directory in this repository\n'))
+    ui.warn(_('*** counting directories: '))
+    ndirs = len(list(walkrepodirs(dirstate, rootabs)))
+    ui.warn(_('found %d\n') % ndirs)
+    newlimit = min(limit, 1024)
+    while newlimit < ((limit + ndirs) * 1.1):
+        newlimit *= 2
+    ui.warn(_('*** to raise the limit from %d to %d (run as root):\n') %
+            (limit, newlimit))
+    ui.warn(_('***  echo %d > %s\n') % (newlimit, path))
+    raise util.Abort(_('cannot watch %s until inotify watch limit is raised')
+                     % rootabs)
+
+class pollable(object):
+    """
+    Interface to support polling.
+    The file descriptor returned by fileno() is registered to a polling
+    object.
+    Usage:
+        Every tick, check if an event has happened since the last tick:
+        * If yes, call handle_events
+        * If no, call handle_timeout
+    """
+    poll_events = select.POLLIN
+    instances = {}
+    poll = select.poll()
+
+    def fileno(self):
+        raise NotImplementedError
+
+    def handle_events(self, events):
+        raise NotImplementedError
+
+    def handle_timeout(self):
+        raise NotImplementedError
+
+    def shutdown(self):
+        raise NotImplementedError
+
+    def register(self, timeout):
+        fd = self.fileno()
+
+        pollable.poll.register(fd, pollable.poll_events)
+        pollable.instances[fd] = self
+
+        self.registered = True
+        self.timeout = timeout
+
+    def unregister(self):
+        pollable.poll.unregister(self)
+        self.registered = False
+
+    @classmethod
+    def run(cls):
+        while True:
+            timeout = None
+            timeobj = None
+            for obj in cls.instances.itervalues():
+                if obj.timeout is not None and (timeout is None
+                                                or obj.timeout < timeout):
+                    timeout, timeobj = obj.timeout, obj
+            try:
+                events = cls.poll.poll(timeout)
+            except select.error, err:
+                if err[0] == errno.EINTR:
+                    continue
+                raise
+            if events:
+                by_fd = {}
+                for fd, event in events:
+                    by_fd.setdefault(fd, []).append(event)
+
+                for fd, events in by_fd.iteritems():
+                    cls.instances[fd].handle_pollevents(events)
+
+            elif timeobj:
+                timeobj.handle_timeout()
+
+def eventaction(code):
+    """
+    Decorator to help handle events in repowatcher
+    """
+    def decorator(f):
+        def wrapper(self, wpath):
+            if code == 'm' and wpath in self.lastevent and \
+                self.lastevent[wpath] in 'cm':
+                return
+            self.lastevent[wpath] = code
+            self.timeout = 250
+
+            f(self, wpath)
+
+        wrapper.func_name = f.func_name
+        return wrapper
+    return decorator
+
+class repowatcher(server.repowatcher, pollable):
+    """
+    Watches inotify events
+    """
+    mask = (
+        inotify.IN_ATTRIB |
+        inotify.IN_CREATE |
+        inotify.IN_DELETE |
+        inotify.IN_DELETE_SELF |
+        inotify.IN_MODIFY |
+        inotify.IN_MOVED_FROM |
+        inotify.IN_MOVED_TO |
+        inotify.IN_MOVE_SELF |
+        inotify.IN_ONLYDIR |
+        inotify.IN_UNMOUNT |
+        0)
+
+    def __init__(self, ui, dirstate, root):
+        server.repowatcher.__init__(self, ui, dirstate, root)
+
+        self.lastevent = {}
+        self.dirty = False
+        try:
+            self.watcher = watcher.watcher()
+        except OSError, err:
+            raise util.Abort(_('inotify service not available: %s') %
+                             err.strerror)
+        self.threshold = watcher.threshold(self.watcher)
+        self.fileno = self.watcher.fileno
+        self.register(timeout=None)
+
+        self.handle_timeout()
+        self.scan()
+
+    def event_time(self):
+        last = self.last_event
+        now = time.time()
+        self.last_event = now
+
+        if last is None:
+            return 'start'
+        delta = now - last
+        if delta < 5:
+            return '+%.3f' % delta
+        if delta < 50:
+            return '+%.2f' % delta
+        return '+%.1f' % delta
+
+    def add_watch(self, path, mask):
+        if not path:
+            return
+        if self.watcher.path(path) is None:
+            if self.ui.debugflag:
+                self.ui.note(_('watching %r\n') % path[self.prefixlen:])
+            try:
+                self.watcher.add(path, mask)
+            except OSError, err:
+                if err.errno in (errno.ENOENT, errno.ENOTDIR):
+                    return
+                if err.errno != errno.ENOSPC:
+                    raise
+                _explain_watch_limit(self.ui, self.dirstate, self.wprefix)
+
+    def setup(self):
+        self.ui.note(_('watching directories under %r\n') % self.wprefix)
+        self.add_watch(self.wprefix + '.hg', inotify.IN_DELETE)
+
+    def scan(self, topdir=''):
+        ds = self.dirstate._map.copy()
+        self.add_watch(server.join(self.wprefix, topdir), self.mask)
+        for root, dirs, files in server.walk(self.dirstate, self.wprefix,
+                                             topdir):
+            for d in dirs:
+                self.add_watch(server.join(root, d), self.mask)
+            wroot = root[self.prefixlen:]
+            for fn in files:
+                wfn = server.join(wroot, fn)
+                self.updatefile(wfn, self.getstat(wfn))
+                ds.pop(wfn, None)
+        wtopdir = topdir
+        if wtopdir and wtopdir[-1] != '/':
+            wtopdir += '/'
+        for wfn, state in ds.iteritems():
+            if not wfn.startswith(wtopdir):
+                continue
+            try:
+                st = self.stat(wfn)
+            except OSError:
+                status = state[0]
+                self.deletefile(wfn, status)
+            else:
+                self.updatefile(wfn, st)
+        self.check_deleted('!')
+        self.check_deleted('r')
+
+    @eventaction('c')
+    def created(self, wpath):
+        if wpath == '.hgignore':
+            self.update_hgignore()
+        try:
+            st = self.stat(wpath)
+            if stat.S_ISREG(st[0]) or stat.S_ISLNK(st[0]):
+                self.updatefile(wpath, st)
+        except OSError:
+            pass
+
+    @eventaction('m')
+    def modified(self, wpath):
+        if wpath == '.hgignore':
+            self.update_hgignore()
+        try:
+            st = self.stat(wpath)
+            if stat.S_ISREG(st[0]):
+                if self.dirstate[wpath] in 'lmn':
+                    self.updatefile(wpath, st)
+        except OSError:
+            pass
+
+    @eventaction('d')
+    def deleted(self, wpath):
+        if wpath == '.hgignore':
+            self.update_hgignore()
+        elif wpath.startswith('.hg/'):
+            return
+
+        self.deletefile(wpath, self.dirstate[wpath])
+
+    def process_create(self, wpath, evt):
+        if self.ui.debugflag:
+            self.ui.note(_('%s event: created %s\n') %
+                         (self.event_time(), wpath))
+
+        if evt.mask & inotify.IN_ISDIR:
+            self.scan(wpath)
+        else:
+            self.created(wpath)
+
+    def process_delete(self, wpath, evt):
+        if self.ui.debugflag:
+            self.ui.note(_('%s event: deleted %s\n') %
+                         (self.event_time(), wpath))
+
+        if evt.mask & inotify.IN_ISDIR:
+            tree = self.tree.dir(wpath)
+            todelete = [wfn for wfn, ignore in tree.walk('?')]
+            for fn in todelete:
+                self.deletefile(fn, '?')
+            self.scan(wpath)
+        else:
+            self.deleted(wpath)
+
+    def process_modify(self, wpath, evt):
+        if self.ui.debugflag:
+            self.ui.note(_('%s event: modified %s\n') %
+                         (self.event_time(), wpath))
+
+        if not (evt.mask & inotify.IN_ISDIR):
+            self.modified(wpath)
+
+    def process_unmount(self, evt):
+        self.ui.warn(_('filesystem containing %s was unmounted\n') %
+                     evt.fullpath)
+        sys.exit(0)
+
+    def handle_pollevents(self, events):
+        if self.ui.debugflag:
+            self.ui.note(_('%s readable: %d bytes\n') %
+                         (self.event_time(), self.threshold.readable()))
+        if not self.threshold():
+            if self.registered:
+                if self.ui.debugflag:
+                    self.ui.note(_('%s below threshold - unhooking\n') %
+                                 (self.event_time()))
+                self.unregister()
+                self.timeout = 250
+        else:
+            self.read_events()
+
+    def read_events(self, bufsize=None):
+        events = self.watcher.read(bufsize)
+        if self.ui.debugflag:
+            self.ui.note(_('%s reading %d events\n') %
+                         (self.event_time(), len(events)))
+        for evt in events:
+            if evt.fullpath == self.wprefix[:-1]:
+                # events on the root of the repository
+                # itself, e.g. permission changes or repository move
+                continue
+            assert evt.fullpath.startswith(self.wprefix)
+            wpath = evt.fullpath[self.prefixlen:]
+
+            # paths have been normalized, wpath never ends with a '/'
+
+            if wpath.startswith('.hg/') and evt.mask & inotify.IN_ISDIR:
+                # ignore subdirectories of .hg/ (merge, patches...)
+                continue
+            if wpath == ".hg/wlock":
+                if evt.mask & inotify.IN_DELETE:
+                    self.dirstate.invalidate()
+                    self.dirty = False
+                    self.scan()
+                elif evt.mask & inotify.IN_CREATE:
+                    self.dirty = True
+            else:
+                if self.dirty:
+                    continue
+
+                if evt.mask & inotify.IN_UNMOUNT:
+                    self.process_unmount(wpath, evt)
+                elif evt.mask & (inotify.IN_MODIFY | inotify.IN_ATTRIB):
+                    self.process_modify(wpath, evt)
+                elif evt.mask & (inotify.IN_DELETE | inotify.IN_DELETE_SELF |
+                                 inotify.IN_MOVED_FROM):
+                    self.process_delete(wpath, evt)
+                elif evt.mask & (inotify.IN_CREATE | inotify.IN_MOVED_TO):
+                    self.process_create(wpath, evt)
+
+        self.lastevent.clear()
+
+    def handle_timeout(self):
+        if not self.registered:
+            if self.ui.debugflag:
+                self.ui.note(_('%s hooking back up with %d bytes readable\n') %
+                             (self.event_time(), self.threshold.readable()))
+            self.read_events(0)
+            self.register(timeout=None)
+
+        self.timeout = None
+
+    def shutdown(self):
+        self.watcher.close()
+
+    def debug(self):
+        """
+        Returns a sorted list of relatives paths currently watched,
+        for debugging purposes.
+        """
+        return sorted(tuple[0][self.prefixlen:] for tuple in self.watcher)
+
+class socketlistener(server.socketlistener, pollable):
+    """
+    Listens for client queries on unix socket inotify.sock
+    """
+    def __init__(self, ui, root, repowatcher, timeout):
+        server.socketlistener.__init__(self, ui, root, repowatcher, timeout)
+        self.register(timeout=timeout)
+
+    def handle_timeout(self):
+        pass
+
+    def handle_pollevents(self, events):
+        for e in events:
+            self.accept_connection()
+
+    def shutdown(self):
+        self.sock.close()
+        try:
+            os.unlink(self.sockpath)
+            if self.realsockpath:
+                os.unlink(self.realsockpath)
+                os.rmdir(os.path.dirname(self.realsockpath))
+        except OSError, err:
+            if err.errno != errno.ENOENT:
+                raise
+
+    def answer_stat_query(self, cs):
+        if self.repowatcher.timeout:
+            # We got a query while a rescan is pending.  Make sure we
+            # rescan before responding, or we could give back a wrong
+            # answer.
+            self.repowatcher.handle_timeout()
+        return server.socketlistener.answer_stat_query(self, cs)
+
+class master(object):
+    def __init__(self, ui, dirstate, root, timeout=None):
+        self.ui = ui
+        self.repowatcher = repowatcher(ui, dirstate, root)
+        self.socketlistener = socketlistener(ui, root, self.repowatcher,
+                                             timeout)
+
+    def shutdown(self):
+        for obj in pollable.instances.itervalues():
+            obj.shutdown()
+
+    def run(self):
+        self.repowatcher.setup()
+        self.ui.note(_('finished setup\n'))
+        if os.getenv('TIME_STARTUP'):
+            sys.exit(0)
+        pollable.run()
--- a/hgext/inotify/server.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/inotify/server.py	Sat Feb 13 23:50:38 2010 -0600
@@ -1,7 +1,6 @@
-# server.py - inotify status server
+# server.py - common entry point for inotify status server
 #
-# Copyright 2006, 2007, 2008 Bryan O'Sullivan <bos@serpentine.com>
-# Copyright 2007, 2008 Brendan Cully <brendan@kublai.com>
+# Copyright 2009 Nicolas Dumazet <nicdumz@gmail.com>
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
@@ -9,15 +8,17 @@
 from mercurial.i18n import _
 from mercurial import cmdutil, osutil, util
 import common
-import errno, os, select, socket, stat, struct, sys, tempfile, time
 
-try:
-    import linux as inotify
-    from linux import watcher
-except ImportError:
-    raise
+import errno
+import os
+import socket
+import stat
+import struct
+import sys
+import tempfile
 
-class AlreadyStartedException(Exception): pass
+class AlreadyStartedException(Exception):
+    pass
 
 def join(a, b):
     if a:
@@ -30,34 +31,10 @@
     c = path.rfind('/')
     if c == -1:
         return '', path
-    return path[:c], path[c+1:]
+    return path[:c], path[c + 1:]
 
 walk_ignored_errors = (errno.ENOENT, errno.ENAMETOOLONG)
 
-def walkrepodirs(dirstate, absroot):
-    '''Iterate over all subdirectories of this repo.
-    Exclude the .hg directory, any nested repos, and ignored dirs.'''
-    def walkit(dirname, top):
-        fullpath = join(absroot, dirname)
-        try:
-            for name, kind in osutil.listdir(fullpath):
-                if kind == stat.S_IFDIR:
-                    if name == '.hg':
-                        if not top:
-                            return
-                    else:
-                        d = join(dirname, name)
-                        if dirstate._ignore(d):
-                            continue
-                        for subdir in walkit(d, False):
-                            yield subdir
-        except OSError, err:
-            if err.errno not in walk_ignored_errors:
-                raise
-        yield fullpath
-
-    return walkit('', True)
-
 def walk(dirstate, absroot, root):
     '''Like os.walk, but only yields regular files.'''
 
@@ -94,113 +71,6 @@
 
     return walkit(root, root == '')
 
-def _explain_watch_limit(ui, dirstate, rootabs):
-    path = '/proc/sys/fs/inotify/max_user_watches'
-    try:
-        limit = int(file(path).read())
-    except IOError, err:
-        if err.errno != errno.ENOENT:
-            raise
-        raise util.Abort(_('this system does not seem to '
-                           'support inotify'))
-    ui.warn(_('*** the current per-user limit on the number '
-              'of inotify watches is %s\n') % limit)
-    ui.warn(_('*** this limit is too low to watch every '
-              'directory in this repository\n'))
-    ui.warn(_('*** counting directories: '))
-    ndirs = len(list(walkrepodirs(dirstate, rootabs)))
-    ui.warn(_('found %d\n') % ndirs)
-    newlimit = min(limit, 1024)
-    while newlimit < ((limit + ndirs) * 1.1):
-        newlimit *= 2
-    ui.warn(_('*** to raise the limit from %d to %d (run as root):\n') %
-            (limit, newlimit))
-    ui.warn(_('***  echo %d > %s\n') % (newlimit, path))
-    raise util.Abort(_('cannot watch %s until inotify watch limit is raised')
-                     % rootabs)
-
-class pollable(object):
-    """
-    Interface to support polling.
-    The file descriptor returned by fileno() is registered to a polling
-    object.
-    Usage:
-        Every tick, check if an event has happened since the last tick:
-        * If yes, call handle_events
-        * If no, call handle_timeout
-    """
-    poll_events = select.POLLIN
-    instances = {}
-    poll = select.poll()
-
-    def fileno(self):
-        raise NotImplementedError
-
-    def handle_events(self, events):
-        raise NotImplementedError
-
-    def handle_timeout(self):
-        raise NotImplementedError
-
-    def shutdown(self):
-        raise NotImplementedError
-
-    def register(self, timeout):
-        fd = self.fileno()
-
-        pollable.poll.register(fd, pollable.poll_events)
-        pollable.instances[fd] = self
-
-        self.registered = True
-        self.timeout = timeout
-
-    def unregister(self):
-        pollable.poll.unregister(self)
-        self.registered = False
-
-    @classmethod
-    def run(cls):
-        while True:
-            timeout = None
-            timeobj = None
-            for obj in cls.instances.itervalues():
-                if obj.timeout is not None and (timeout is None or obj.timeout < timeout):
-                    timeout, timeobj = obj.timeout, obj
-            try:
-                events = cls.poll.poll(timeout)
-            except select.error, err:
-                if err[0] == errno.EINTR:
-                    continue
-                raise
-            if events:
-                by_fd = {}
-                for fd, event in events:
-                    by_fd.setdefault(fd, []).append(event)
-
-                for fd, events in by_fd.iteritems():
-                    cls.instances[fd].handle_pollevents(events)
-
-            elif timeobj:
-                timeobj.handle_timeout()
-
-def eventaction(code):
-    """
-    Decorator to help handle events in repowatcher
-    """
-    def decorator(f):
-        def wrapper(self, wpath):
-            if code == 'm' and wpath in self.lastevent and \
-                self.lastevent[wpath] in 'cm':
-                return
-            self.lastevent[wpath] = code
-            self.timeout = 250
-
-            f(self, wpath)
-
-        wrapper.func_name = f.func_name
-        return wrapper
-    return decorator
-
 class directory(object):
     """
     Representing a directory
@@ -293,23 +163,11 @@
                 # path is not tracked
                 pass
 
-class repowatcher(pollable):
+class repowatcher(object):
     """
     Watches inotify events
     """
     statuskeys = 'almr!?'
-    mask = (
-        inotify.IN_ATTRIB |
-        inotify.IN_CREATE |
-        inotify.IN_DELETE |
-        inotify.IN_DELETE_SELF |
-        inotify.IN_MODIFY |
-        inotify.IN_MOVED_FROM |
-        inotify.IN_MOVED_TO |
-        inotify.IN_MOVE_SELF |
-        inotify.IN_ONLYDIR |
-        inotify.IN_UNMOUNT |
-        0)
 
     def __init__(self, ui, dirstate, root):
         self.ui = ui
@@ -317,41 +175,18 @@
 
         self.wprefix = join(root, '')
         self.prefixlen = len(self.wprefix)
-        try:
-            self.watcher = watcher.watcher()
-        except OSError, err:
-            raise util.Abort(_('inotify service not available: %s') %
-                             err.strerror)
-        self.threshold = watcher.threshold(self.watcher)
-        self.fileno = self.watcher.fileno
 
         self.tree = directory()
         self.statcache = {}
         self.statustrees = dict([(s, directory()) for s in self.statuskeys])
 
+        self.ds_info = self.dirstate_info()
+
         self.last_event = None
 
-        self.lastevent = {}
 
-        self.register(timeout=None)
-
-        self.ds_info = self.dirstate_info()
-        self.handle_timeout()
-        self.scan()
-
-    def event_time(self):
-        last = self.last_event
-        now = time.time()
-        self.last_event = now
-
-        if last is None:
-            return 'start'
-        delta = now - last
-        if delta < 5:
-            return '+%.3f' % delta
-        if delta < 50:
-            return '+%.2f' % delta
-        return '+%.1f' % delta
+    def handle_timeout(self):
+        pass
 
     def dirstate_info(self):
         try:
@@ -362,26 +197,6 @@
                 raise
             return 0, 0
 
-    def add_watch(self, path, mask):
-        if not path:
-            return
-        if self.watcher.path(path) is None:
-            if self.ui.debugflag:
-                self.ui.note(_('watching %r\n') % path[self.prefixlen:])
-            try:
-                self.watcher.add(path, mask)
-            except OSError, err:
-                if err.errno in (errno.ENOENT, errno.ENOTDIR):
-                    return
-                if err.errno != errno.ENOSPC:
-                    raise
-                _explain_watch_limit(self.ui, self.dirstate, self.wprefix)
-
-    def setup(self):
-        self.ui.note(_('watching directories under %r\n') % self.wprefix)
-        self.add_watch(self.wprefix + '.hg', inotify.IN_DELETE)
-        self.check_dirstate()
-
     def filestatus(self, fn, st):
         try:
             type_, mode, size, time = self.dirstate._map[fn][:4]
@@ -455,7 +270,6 @@
             if newstatus != 'n':
                 self.statustrees[newstatus].dir(root).files[fn] = newstatus
 
-
     def check_deleted(self, key):
         # Files that had been deleted but were present in the dirstate
         # may have vanished from the dirstate; we must clean them up.
@@ -468,46 +282,6 @@
             del self.statustrees[key].dir(root).files[fn]
             del self.tree.dir(root).files[fn]
 
-    def scan(self, topdir=''):
-        ds = self.dirstate._map.copy()
-        self.add_watch(join(self.wprefix, topdir), self.mask)
-        for root, dirs, files in walk(self.dirstate, self.wprefix, topdir):
-            for d in dirs:
-                self.add_watch(join(root, d), self.mask)
-            wroot = root[self.prefixlen:]
-            for fn in files:
-                wfn = join(wroot, fn)
-                self.updatefile(wfn, self.getstat(wfn))
-                ds.pop(wfn, None)
-        wtopdir = topdir
-        if wtopdir and wtopdir[-1] != '/':
-            wtopdir += '/'
-        for wfn, state in ds.iteritems():
-            if not wfn.startswith(wtopdir):
-                continue
-            try:
-                st = self.stat(wfn)
-            except OSError:
-                status = state[0]
-                self.deletefile(wfn, status)
-            else:
-                self.updatefile(wfn, st)
-        self.check_deleted('!')
-        self.check_deleted('r')
-
-    def check_dirstate(self):
-        ds_info = self.dirstate_info()
-        if ds_info == self.ds_info:
-            return
-        self.ds_info = ds_info
-        if not self.ui.debugflag:
-            self.last_event = None
-        self.ui.note(_('%s dirstate reload\n') % self.event_time())
-        self.dirstate.invalidate()
-        self.handle_timeout()
-        self.scan()
-        self.ui.note(_('%s end dirstate reload\n') % self.event_time())
-
     def update_hgignore(self):
         # An update of the ignore file can potentially change the
         # states of all unknown and ignored files.
@@ -545,139 +319,7 @@
             self.statcache.pop(wpath, None)
             raise
 
-    @eventaction('c')
-    def created(self, wpath):
-        if wpath == '.hgignore':
-            self.update_hgignore()
-        try:
-            st = self.stat(wpath)
-            if stat.S_ISREG(st[0]):
-                self.updatefile(wpath, st)
-        except OSError:
-            pass
-
-    @eventaction('m')
-    def modified(self, wpath):
-        if wpath == '.hgignore':
-            self.update_hgignore()
-        try:
-            st = self.stat(wpath)
-            if stat.S_ISREG(st[0]):
-                if self.dirstate[wpath] in 'lmn':
-                    self.updatefile(wpath, st)
-        except OSError:
-            pass
-
-    @eventaction('d')
-    def deleted(self, wpath):
-        if wpath == '.hgignore':
-            self.update_hgignore()
-        elif wpath.startswith('.hg/'):
-            if wpath == '.hg/wlock':
-                self.check_dirstate()
-            return
-
-        self.deletefile(wpath, self.dirstate[wpath])
-
-    def process_create(self, wpath, evt):
-        if self.ui.debugflag:
-            self.ui.note(_('%s event: created %s\n') %
-                         (self.event_time(), wpath))
-
-        if evt.mask & inotify.IN_ISDIR:
-            self.scan(wpath)
-        else:
-            self.created(wpath)
-
-    def process_delete(self, wpath, evt):
-        if self.ui.debugflag:
-            self.ui.note(_('%s event: deleted %s\n') %
-                         (self.event_time(), wpath))
-
-        if evt.mask & inotify.IN_ISDIR:
-            tree = self.tree.dir(wpath)
-            todelete = [wfn for wfn, ignore in tree.walk('?')]
-            for fn in todelete:
-                self.deletefile(fn, '?')
-            self.scan(wpath)
-        else:
-            self.deleted(wpath)
-
-    def process_modify(self, wpath, evt):
-        if self.ui.debugflag:
-            self.ui.note(_('%s event: modified %s\n') %
-                         (self.event_time(), wpath))
-
-        if not (evt.mask & inotify.IN_ISDIR):
-            self.modified(wpath)
-
-    def process_unmount(self, evt):
-        self.ui.warn(_('filesystem containing %s was unmounted\n') %
-                     evt.fullpath)
-        sys.exit(0)
-
-    def handle_pollevents(self, events):
-        if self.ui.debugflag:
-            self.ui.note(_('%s readable: %d bytes\n') %
-                         (self.event_time(), self.threshold.readable()))
-        if not self.threshold():
-            if self.registered:
-                if self.ui.debugflag:
-                    self.ui.note(_('%s below threshold - unhooking\n') %
-                                 (self.event_time()))
-                self.unregister()
-                self.timeout = 250
-        else:
-            self.read_events()
-
-    def read_events(self, bufsize=None):
-        events = self.watcher.read(bufsize)
-        if self.ui.debugflag:
-            self.ui.note(_('%s reading %d events\n') %
-                         (self.event_time(), len(events)))
-        for evt in events:
-            assert evt.fullpath.startswith(self.wprefix)
-            wpath = evt.fullpath[self.prefixlen:]
-
-            # paths have been normalized, wpath never ends with a '/'
-
-            if wpath.startswith('.hg/') and evt.mask & inotify.IN_ISDIR:
-                # ignore subdirectories of .hg/ (merge, patches...)
-                continue
-
-            if evt.mask & inotify.IN_UNMOUNT:
-                self.process_unmount(wpath, evt)
-            elif evt.mask & (inotify.IN_MODIFY | inotify.IN_ATTRIB):
-                self.process_modify(wpath, evt)
-            elif evt.mask & (inotify.IN_DELETE | inotify.IN_DELETE_SELF |
-                             inotify.IN_MOVED_FROM):
-                self.process_delete(wpath, evt)
-            elif evt.mask & (inotify.IN_CREATE | inotify.IN_MOVED_TO):
-                self.process_create(wpath, evt)
-
-        self.lastevent.clear()
-
-    def handle_timeout(self):
-        if not self.registered:
-            if self.ui.debugflag:
-                self.ui.note(_('%s hooking back up with %d bytes readable\n') %
-                             (self.event_time(), self.threshold.readable()))
-            self.read_events(0)
-            self.register(timeout=None)
-
-        self.timeout = None
-
-    def shutdown(self):
-        self.watcher.close()
-
-    def debug(self):
-        """
-        Returns a sorted list of relatives paths currently watched,
-        for debugging purposes.
-        """
-        return sorted(tuple[0][self.prefixlen:] for tuple in self.watcher)
-
-class server(pollable):
+class socketlistener(object):
     """
     Listens for client queries on unix socket inotify.sock
     """
@@ -691,8 +333,8 @@
             self.sock.bind(self.sockpath)
         except socket.error, err:
             if err[0] == errno.EADDRINUSE:
-                raise AlreadyStartedException( _('cannot start: socket is '
-                                                 'already bound'))
+                raise AlreadyStartedException(_('cannot start: socket is '
+                                                'already bound'))
             if err[0] == "AF_UNIX path too long":
                 if os.path.islink(self.sockpath) and \
                         not os.path.exists(self.sockpath):
@@ -718,10 +360,6 @@
                 raise
         self.sock.listen(5)
         self.fileno = self.sock.fileno
-        self.register(timeout=timeout)
-
-    def handle_timeout(self):
-        pass
 
     def answer_stat_query(self, cs):
         names = cs.read().split('\0')
@@ -730,12 +368,6 @@
 
         self.ui.note(_('answering query for %r\n') % states)
 
-        if self.repowatcher.timeout:
-            # We got a query while a rescan is pending.  Make sure we
-            # rescan before responding, or we could give back a wrong
-            # answer.
-            self.repowatcher.handle_timeout()
-
         visited = set()
         if not names:
             def genresult(states, tree):
@@ -764,11 +396,7 @@
     def answer_dbug_query(self):
         return ['\0'.join(self.repowatcher.debug())]
 
-    def handle_pollevents(self, events):
-        for e in events:
-            self.handle_pollevent()
-
-    def handle_pollevent(self):
+    def accept_connection(self):
         sock, addr = self.sock.accept()
 
         cs = common.recvcs(sock)
@@ -808,33 +436,12 @@
             if err[0] != errno.EPIPE:
                 raise
 
-    def shutdown(self):
-        self.sock.close()
-        try:
-            os.unlink(self.sockpath)
-            if self.realsockpath:
-                os.unlink(self.realsockpath)
-                os.rmdir(os.path.dirname(self.realsockpath))
-        except OSError, err:
-            if err.errno != errno.ENOENT:
-                raise
+if sys.platform == 'linux2':
+    import linuxserver as _server
+else:
+    raise ImportError
 
-class master(object):
-    def __init__(self, ui, dirstate, root, timeout=None):
-        self.ui = ui
-        self.repowatcher = repowatcher(ui, dirstate, root)
-        self.server = server(ui, root, self.repowatcher, timeout)
-
-    def shutdown(self):
-        for obj in pollable.instances.itervalues():
-            obj.shutdown()
-
-    def run(self):
-        self.repowatcher.setup()
-        self.ui.note(_('finished setup\n'))
-        if os.getenv('TIME_STARTUP'):
-            sys.exit(0)
-        pollable.run()
+master = _server.master
 
 def start(ui, dirstate, root, opts):
     timeout = opts.get('timeout')
@@ -855,9 +462,9 @@
                 self.master.shutdown()
 
     if 'inserve' not in sys.argv:
-        runargs = [sys.argv[0], 'inserve', '-R', root]
+        runargs = util.hgcmd() + ['inserve', '-R', root]
     else:
-        runargs = sys.argv[:]
+        runargs = util.hgcmd() + sys.argv[1:]
 
     pidfile = ui.config('inotify', 'pidfile')
     if opts['daemon'] and pidfile is not None and 'pid-file' not in runargs:
@@ -865,5 +472,8 @@
 
     service = service()
     logfile = ui.config('inotify', 'log')
+
+    appendpid = ui.configbool('inotify', 'appendpid', False)
+
     cmdutil.service(opts, initfn=service.init, runfn=service.run,
-                    logfile=logfile, runargs=runargs)
+                    logfile=logfile, runargs=runargs, appendpid=appendpid)
--- a/hgext/keyword.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/keyword.py	Sat Feb 13 23:50:38 2010 -0600
@@ -97,7 +97,7 @@
               ' transplant')
 
 # provide cvs-like UTC date filter
-utcdate = lambda x: util.datestr(x, '%Y/%m/%d %H:%M:%S')
+utcdate = lambda x: util.datestr((x[0], 0), '%Y/%m/%d %H:%M:%S')
 
 # make keyword tools accessible
 kwtools = {'templater': None, 'hgcmd': '', 'inc': [], 'exc': ['.hg*']}
@@ -113,7 +113,8 @@
         'Author': '{author|user}',
         'Date': '{date|utcdate}',
         'RCSfile': '{file|basename},v',
-        'RCSFile': '{file|basename},v', # kept only for backwards compatibility
+        'RCSFile': '{file|basename},v', # kept for backwards compatibility
+                                        # with hg-keyword
         'Source': '{root}/{file},v',
         'Id': '{file|basename},v {node|short} {date|utcdate} {author|user}',
         'Header': '{root}/{file},v {node|short} {date|utcdate} {author|user}',
--- a/hgext/mq.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/mq.py	Sat Feb 13 23:50:38 2010 -0600
@@ -26,6 +26,18 @@
   add known patch to applied stack          qpush
   remove patch from applied stack           qpop
   refresh contents of top applied patch     qrefresh
+
+By default, mq will automatically use git patches when required to
+avoid losing file mode changes, copy records, binary files or empty
+files creations or deletions. This behaviour can be configured with::
+
+  [mq]
+  git = auto/keep/yes/no
+
+If set to 'keep', mq will obey the [diff] section configuration while
+preserving existing git patches upon qrefresh. If set to 'yes' or
+'no', mq will override the [diff] section and always generate git or
+regular patches, possibly losing data in the second case.
 '''
 
 from mercurial.i18n import _
@@ -56,7 +68,7 @@
         return self.rev + ':' + self.name
 
 class patchheader(object):
-    def __init__(self, pf):
+    def __init__(self, pf, plainmode=False):
         def eatdiff(lines):
             while lines:
                 l = lines[-1]
@@ -78,6 +90,7 @@
         comments = []
         user = None
         date = None
+        parent = None
         format = None
         subject = None
         diffstart = 0
@@ -100,6 +113,8 @@
                     user = line[7:]
                 elif line.startswith("# Date "):
                     date = line[7:]
+                elif line.startswith("# Parent "):
+                    parent = line[9:]
                 elif not line.startswith("# ") and line:
                     message.append(line)
                     format = None
@@ -114,6 +129,10 @@
                                            line.startswith("from: "))):
                 user = line[6:]
                 format = "tag"
+            elif (format != "tagdone" and (line.startswith("Date: ") or
+                                           line.startswith("date: "))):
+                date = line[6:]
+                format = "tag"
             elif format == "tag" and line == "":
                 # when looking for tags (subject: from: etc) they
                 # end once you find a blank line in the source
@@ -136,7 +155,9 @@
         self.comments = comments
         self.user = user
         self.date = date
+        self.parent = parent
         self.haspatch = diffstart > 1
+        self.plainmode = plainmode
 
     def setuser(self, user):
         if not self.updateheader(['From: ', '# User '], user):
@@ -144,7 +165,7 @@
                 patchheaderat = self.comments.index('# HG changeset patch')
                 self.comments.insert(patchheaderat + 1, '# User ' + user)
             except ValueError:
-                if self._hasheader(['Date: ']):
+                if self.plainmode or self._hasheader(['Date: ']):
                     self.comments = ['From: ' + user] + self.comments
                 else:
                     tmp = ['# HG changeset patch', '# User ' + user, '']
@@ -157,13 +178,22 @@
                 patchheaderat = self.comments.index('# HG changeset patch')
                 self.comments.insert(patchheaderat + 1, '# Date ' + date)
             except ValueError:
-                if self._hasheader(['From: ']):
+                if self.plainmode or self._hasheader(['From: ']):
                     self.comments = ['Date: ' + date] + self.comments
                 else:
                     tmp = ['# HG changeset patch', '# Date ' + date, '']
                     self.comments = tmp + self.comments
         self.date = date
 
+    def setparent(self, parent):
+        if not self.updateheader(['# Parent '], parent):
+            try:
+                patchheaderat = self.comments.index('# HG changeset patch')
+                self.comments.insert(patchheaderat + 1, '# Parent ' + parent)
+            except ValueError:
+                pass
+        self.parent = parent
+
     def setmessage(self, message):
         if self.comments:
             self._delmsg()
@@ -225,6 +255,15 @@
         self.guards_path = "guards"
         self.active_guards = None
         self.guards_dirty = False
+        # Handle mq.git as a bool with extended values
+        try:
+            gitmode = ui.configbool('mq', 'git', None)
+            if gitmode is None:
+                raise error.ConfigError()
+            self.gitmode = gitmode and 'yes' or 'no'
+        except error.ConfigError:
+            self.gitmode = ui.config('mq', 'git', 'auto').lower()
+        self.plainmode = ui.configbool('mq', 'plain', False)
 
     @util.propertycache
     def applied(self):
@@ -260,23 +299,33 @@
 
     def diffopts(self, opts={}, patchfn=None):
         diffopts = patch.diffopts(self.ui, opts)
+        if self.gitmode == 'auto':
+            diffopts.upgrade = True
+        elif self.gitmode == 'keep':
+            pass
+        elif self.gitmode in ('yes', 'no'):
+            diffopts.git = self.gitmode == 'yes'
+        else:
+            raise util.Abort(_('mq.git option can be auto/keep/yes/no'
+                               ' got %s') % self.gitmode)
         if patchfn:
             diffopts = self.patchopts(diffopts, patchfn)
         return diffopts
 
     def patchopts(self, diffopts, *patches):
         """Return a copy of input diff options with git set to true if
-        referenced patch is a git patch.
+        referenced patch is a git patch and should be preserved as such.
         """
         diffopts = diffopts.copy()
-        for patchfn in patches:
-            patchf = self.opener(patchfn, 'r')
-            # if the patch was a git patch, refresh it as a git patch
-            for line in patchf:
-                if line.startswith('diff --git'):
-                    diffopts.git = True
-                    break
-            patchf.close()
+        if not diffopts.git and self.gitmode == 'keep':
+            for patchfn in patches:
+                patchf = self.opener(patchfn, 'r')
+                # if the patch was a git patch, refresh it as a git patch
+                for line in patchf:
+                    if line.startswith('diff --git'):
+                        diffopts.git = True
+                        break
+                patchf.close()
         return diffopts
 
     def join(self, *p):
@@ -346,7 +395,8 @@
             try:
                 guards = self.opener(self.guards_path).read().split()
             except IOError, err:
-                if err.errno != errno.ENOENT: raise
+                if err.errno != errno.ENOENT:
+                    raise
                 guards = []
             for i, guard in enumerate(guards):
                 bad = self.check_guard(guard)
@@ -420,9 +470,12 @@
             for i in items:
                 fp.write("%s\n" % i)
             fp.close()
-        if self.applied_dirty: write_list(map(str, self.applied), self.status_path)
-        if self.series_dirty: write_list(self.full_series, self.series_path)
-        if self.guards_dirty: write_list(self.active_guards, self.guards_path)
+        if self.applied_dirty:
+            write_list(map(str, self.applied), self.status_path)
+        if self.series_dirty:
+            write_list(self.full_series, self.series_path)
+        if self.guards_dirty:
+            write_list(self.active_guards, self.guards_path)
 
     def removeundo(self, repo):
         undo = repo.sjoin('undo')
@@ -452,7 +505,7 @@
 
     def mergeone(self, repo, mergeq, head, patch, rev, diffopts):
         # first try just applying the patch
-        (err, n) = self.apply(repo, [ patch ], update_status=False,
+        (err, n) = self.apply(repo, [patch], update_status=False,
                               strict=True, merge=rev)
 
         if err == 0:
@@ -475,7 +528,7 @@
         if n is None:
             raise util.Abort(_("repo commit failed"))
         try:
-            ph = patchheader(mergeq.join(patch))
+            ph = patchheader(mergeq.join(patch), self.plainmode)
         except:
             raise util.Abort(_("unable to read %s") % patch)
 
@@ -499,7 +552,7 @@
             return bin(self.applied[-1].rev)
         pp = repo.changelog.parents(rev)
         if pp[1] != nullid:
-            arevs = [ x.rev for x in self.applied ]
+            arevs = [x.rev for x in self.applied]
             p0 = hex(pp[0])
             p1 = hex(pp[1])
             if p0 in arevs:
@@ -605,7 +658,7 @@
             pf = os.path.join(patchdir, patchname)
 
             try:
-                ph = patchheader(self.join(patchname))
+                ph = patchheader(self.join(patchname), self.plainmode)
             except:
                 self.ui.warn(_("unable to read %s\n") % patchname)
                 err = 1
@@ -741,19 +794,20 @@
     def check_toppatch(self, repo):
         if len(self.applied) > 0:
             top = bin(self.applied[-1].rev)
+            patch = self.applied[-1].name
             pp = repo.dirstate.parents()
             if top not in pp:
                 raise util.Abort(_("working directory revision is not qtip"))
-            return top
-        return None
+            return top, patch
+        return None, None
+
     def check_localchanges(self, repo, force=False, refresh=True):
         m, a, r, d = repo.status()[:4]
-        if m or a or r or d:
-            if not force:
-                if refresh:
-                    raise util.Abort(_("local changes found, refresh first"))
-                else:
-                    raise util.Abort(_("local changes found"))
+        if (m or a or r or d) and not force:
+            if refresh:
+                raise util.Abort(_("local changes found, refresh first"))
+            else:
+                raise util.Abort(_("local changes found"))
         return m, a, r, d
 
     _reserved = ('series', 'status', 'guards')
@@ -768,7 +822,6 @@
            msg: a string or a no-argument function returning a string
         """
         msg = opts.get('msg')
-        force = opts.get('force')
         user = opts.get('user')
         date = opts.get('date')
         if date:
@@ -785,12 +838,10 @@
             match.bad = badfn
             m, a, r, d = repo.status(match=match)[:4]
         else:
-            m, a, r, d = self.check_localchanges(repo, force)
+            m, a, r, d = self.check_localchanges(repo, force=True)
             match = cmdutil.matchfiles(repo, m + a + r)
-        if force:
-            p = repo[None].parents()
-            if len(p) > 1:
-                raise util.Abort(_('cannot manage merge changesets'))
+        if len(repo[None].parents()) > 1:
+            raise util.Abort(_('cannot manage merge changesets'))
         commitfiles = m + a + r
         self.check_toppatch(repo)
         insert = self.full_series_end()
@@ -799,14 +850,21 @@
             # if patch file write fails, abort early
             p = self.opener(patchfn, "w")
             try:
-                if date:
+                if self.plainmode:
+                    if user:
+                        p.write("From: " + user + "\n")
+                        if not date:
+                            p.write("\n")
+                    if date:
+                        p.write("Date: %d %d\n\n" % date)
+                else:
                     p.write("# HG changeset patch\n")
+                    p.write("# Parent "
+                            + hex(repo[None].parents()[0].node()) + "\n")
                     if user:
                         p.write("# User " + user + "\n")
-                    p.write("# Date %d %d\n\n" % date)
-                elif user:
-                    p.write("From: " + user + "\n\n")
-
+                    if date:
+                        p.write("# Date %s %s\n\n" % date)
                 if hasattr(msg, '__call__'):
                     msg = msg()
                 commitmsg = msg and msg or ("[mq]: %s" % patchfn)
@@ -832,7 +890,8 @@
                     wlock.release()
                     wlock = None
                     r = self.qrepo()
-                    if r: r.add([patchfn])
+                    if r:
+                        r.add([patchfn])
                 except:
                     repo.rollback()
                     raise
@@ -909,7 +968,7 @@
         if not os.path.isfile(self.join(patch)):
             try:
                 sno = int(patch)
-            except(ValueError, OverflowError):
+            except (ValueError, OverflowError):
                 pass
             else:
                 if -len(self.series) <= sno < len(self.series):
@@ -925,8 +984,8 @@
                     if res:
                         i = self.series.index(res)
                         try:
-                            off = int(patch[minus+1:] or 1)
-                        except(ValueError, OverflowError):
+                            off = int(patch[minus + 1:] or 1)
+                        except (ValueError, OverflowError):
                             pass
                         else:
                             if i - off >= 0:
@@ -937,8 +996,8 @@
                     if res:
                         i = self.series.index(res)
                         try:
-                            off = int(patch[plus+1:] or 1)
-                        except(ValueError, OverflowError):
+                            off = int(patch[plus + 1:] or 1)
+                        except (ValueError, OverflowError):
                             pass
                         else:
                             if i + off < len(self.series):
@@ -950,7 +1009,12 @@
         diffopts = self.diffopts()
         wlock = repo.wlock()
         try:
-            if repo.dirstate.parents()[0] not in repo.heads():
+            heads = []
+            for b, ls in repo.branchmap().iteritems():
+                heads += ls
+            if not heads:
+                heads = [nullid]
+            if repo.dirstate.parents()[0] not in heads:
                 self.ui.status(_("(working directory not at a head)\n"))
 
             if not self.series:
@@ -1074,7 +1138,7 @@
 
             if not update:
                 parents = repo.dirstate.parents()
-                rr = [ bin(x.rev) for x in self.applied ]
+                rr = [bin(x.rev) for x in self.applied]
                 for p in parents:
                     if p in rr:
                         self.ui.warn(_("qpop: forcing dirstate update\n"))
@@ -1095,7 +1159,7 @@
             end = len(self.applied)
             rev = bin(self.applied[start].rev)
             if update:
-                top = self.check_toppatch(repo)
+                top = self.check_toppatch(repo)[0]
 
             try:
                 heads = repo.changelog.heads(rev)
@@ -1144,7 +1208,7 @@
             wlock.release()
 
     def diff(self, repo, pats, opts):
-        top = self.check_toppatch(repo)
+        top, patch = self.check_toppatch(repo)
         if not top:
             self.ui.write(_("no patches applied\n"))
             return
@@ -1153,7 +1217,7 @@
             node1, node2 = None, qp
         else:
             node1, node2 = qp, None
-        diffopts = self.diffopts(opts)
+        diffopts = self.diffopts(opts, patch)
         self.printdiff(repo, diffopts, node1, node2, files=pats, opts=opts)
 
     def refresh(self, repo, pats=None, **opts):
@@ -1176,7 +1240,7 @@
 
             cparents = repo.changelog.parents(top)
             patchparent = self.qparents(repo, top)
-            ph = patchheader(self.join(patchfn))
+            ph = patchheader(self.join(patchfn), self.plainmode)
             diffopts = self.diffopts({'git': opts.get('git')}, patchfn)
             if msg:
                 ph.setmessage(msg)
@@ -1184,6 +1248,7 @@
                 ph.setuser(newuser)
             if newdate:
                 ph.setdate(newdate)
+            ph.setparent(hex(patchparent))
 
             # only commit new patch when write is complete
             patchf = self.opener(patchfn, 'w', atomictemp=True)
@@ -1255,7 +1320,7 @@
                 patchf.write(chunk)
 
             try:
-                if diffopts.git:
+                if diffopts.git or diffopts.upgrade:
                     copies = {}
                     for dst in a:
                         src = repo.dirstate.copied(dst)
@@ -1269,7 +1334,8 @@
                         f = repo.file(dst)
                         src = f.renamed(man[dst])
                         if src:
-                            copies.setdefault(src[0], []).extend(copies.get(dst, []))
+                            copies.setdefault(src[0], []).extend(
+                                copies.get(dst, []))
                             if dst in a:
                                 copies[src[0]].append(dst)
                         # we can't copy a file created by the patch itself
@@ -1367,7 +1433,7 @@
                 summary=False):
         def displayname(pfx, patchname):
             if summary:
-                ph = patchheader(self.join(patchname))
+                ph = patchheader(self.join(patchname), self.plainmode)
                 msg = ph.message and ph.message[0] or ''
                 if self.ui.interactive():
                     width = util.termwidth() - len(pfx) - len(patchname) - 2
@@ -1385,8 +1451,8 @@
             length = len(self.series) - start
         if not missing:
             if self.ui.verbose:
-                idxwidth = len(str(start+length - 1))
-            for i in xrange(start, start+length):
+                idxwidth = len(str(start + length - 1))
+            for i in xrange(start, start + length):
                 patch = self.series[i]
                 if patch in applied:
                     stat = 'A'
@@ -1438,7 +1504,7 @@
             elif line.startswith('Dirstate:'):
                 l = line.rstrip()
                 l = l[10:].split(' ')
-                qpp = [ bin(x) for x in l ]
+                qpp = [bin(x) for x in l]
             elif datastart != None:
                 l = line.rstrip()
                 se = statusentry(l)
@@ -1487,7 +1553,7 @@
             self.ui.warn(_("status is already saved\n"))
             return 1
 
-        ar = [ ':' + x for x in self.full_series ]
+        ar = [':' + x for x in self.full_series]
         if not msg:
             msg = _("hg patches saved state")
         else:
@@ -1639,7 +1705,8 @@
                 try:
                     if filename == '-':
                         if not patchname:
-                            raise util.Abort(_('need --name to import a patch from -'))
+                            raise util.Abort(
+                                _('need --name to import a patch from -'))
                         text = sys.stdin.read()
                     else:
                         text = url.open(self.ui, filename).read()
@@ -1764,13 +1831,16 @@
     return 0
 
 def init(ui, repo, **opts):
-    """init a new queue repository
+    """init a new queue repository (DEPRECATED)
 
     The queue repository is unversioned by default. If
     -c/--create-repo is specified, qinit will create a separate nested
     repository for patches (qinit -c may also be run later to convert
     an unversioned patch repository into a versioned one). You can use
-    qcommit to commit changes to this queue repository."""
+    qcommit to commit changes to this queue repository.
+
+    This command is deprecated. Without -c, it's implied by other relevant
+    commands. With -c, use hg init -Q instead."""
     q = repo.mq
     r = q.init(repo, create=opts['create_repo'])
     q.save_dirty()
@@ -1854,10 +1924,13 @@
             hg.update(dr, dr.changelog.tip())
 
 def commit(ui, repo, *pats, **opts):
-    """commit changes in the queue repository"""
+    """commit changes in the queue repository (DEPRECATED)
+
+    This command is deprecated; use hg -Q commit instead."""
     q = repo.mq
     r = q.qrepo()
-    if not r: raise util.Abort('no queue repository')
+    if not r:
+        raise util.Abort('no queue repository')
     commands.commit(r.ui, r, *pats, **opts)
 
 def series(ui, repo, **opts):
@@ -1870,7 +1943,7 @@
     q = repo.mq
     t = q.applied and q.series_end(True) or 0
     if t:
-        return q.qseries(repo, start=t-1, length=1, status='A',
+        return q.qseries(repo, start=t - 1, length=1, status='A',
                          summary=opts.get('summary'))
     else:
         ui.write(_("no patches applied\n"))
@@ -1895,7 +1968,7 @@
     if not l:
         ui.write(_("no patches applied\n"))
         return 1
-    return q.qseries(repo, start=l-2, length=1, status='A',
+    return q.qseries(repo, start=l - 2, length=1, status='A',
                      summary=opts.get('summary'))
 
 def setupheaderopts(ui, opts):
@@ -1929,7 +2002,8 @@
     information.
     """
     msg = cmdutil.logmessage(opts)
-    def getmsg(): return ui.edit(msg, ui.username())
+    def getmsg():
+        return ui.edit(msg, ui.username())
     q = repo.mq
     opts['msg'] = msg
     if opts.get('edit'):
@@ -1965,7 +2039,7 @@
         if message:
             raise util.Abort(_('option "-e" incompatible with "-m" or "-l"'))
         patch = q.applied[-1].name
-        ph = patchheader(q.join(patch))
+        ph = patchheader(q.join(patch), q.plainmode)
         message = ui.edit('\n'.join(ph.message), ph.user or ui.username())
     setupheaderopts(ui, opts)
     ret = q.refresh(repo, pats, msg=message, **opts)
@@ -2005,7 +2079,7 @@
 
     if not files:
         raise util.Abort(_('qfold requires at least one patch name'))
-    if not q.check_toppatch(repo):
+    if not q.check_toppatch(repo)[0]:
         raise util.Abort(_('No patches applied'))
     q.check_localchanges(repo)
 
@@ -2027,7 +2101,7 @@
 
     for p in patches:
         if not message:
-            ph = patchheader(q.join(p))
+            ph = patchheader(q.join(p), q.plainmode)
             if ph.message:
                 messages.append(ph.message)
         pf = q.join(p)
@@ -2037,7 +2111,7 @@
         patch.updatedir(ui, repo, files)
 
     if not message:
-        ph = patchheader(q.join(parent))
+        ph = patchheader(q.join(parent), q.plainmode)
         message, user = ph.message, ph.user
         for msg in messages:
             message.append('* * *')
@@ -2120,7 +2194,7 @@
             ui.write('no patches applied\n')
             return 1
         patch = q.lookup('qtip')
-    ph = patchheader(repo.mq.join(patch))
+    ph = patchheader(q.join(patch), q.plainmode)
 
     ui.write('\n'.join(ph.message) + '\n')
 
@@ -2217,7 +2291,8 @@
         raise util.Abort(_('%s already exists') % absdest)
 
     if name in q.series:
-        raise util.Abort(_('A patch named %s already exists in the series file') % name)
+        raise util.Abort(
+            _('A patch named %s already exists in the series file') % name)
 
     if ui.verbose:
         ui.write('renaming %s to %s\n' % (patch, name))
@@ -2251,7 +2326,9 @@
     q.save_dirty()
 
 def restore(ui, repo, rev, **opts):
-    """restore the queue state saved by a revision"""
+    """restore the queue state saved by a revision (DEPRECATED)
+
+    This command is deprecated, use rebase --mq instead."""
     rev = repo.lookup(rev)
     q = repo.mq
     q.restore(repo, rev, delete=opts['delete'],
@@ -2260,7 +2337,9 @@
     return 0
 
 def save(ui, repo, **opts):
-    """save current queue state"""
+    """save current queue state (DEPRECATED)
+
+    This command is deprecated, use rebase --mq instead."""
     q = repo.mq
     message = cmdutil.logmessage(opts)
     ret = q.save(repo, msg=message)
@@ -2409,7 +2488,7 @@
                 if i == 0:
                     q.pop(repo, all=True)
                 else:
-                    q.pop(repo, i-1)
+                    q.pop(repo, i - 1)
                 break
     if popped:
         try:
@@ -2520,8 +2599,8 @@
             start = lrev + 1
             if start < qbase:
                 # update the cache (excluding the patches) and save it
-                self._updatebranchcache(partial, lrev+1, qbase)
-                self._writebranchcache(partial, cl.node(qbase-1), qbase-1)
+                self._updatebranchcache(partial, lrev + 1, qbase)
+                self._writebranchcache(partial, cl.node(qbase - 1), qbase - 1)
                 start = qbase
             # if start = qbase, the cache is as updated as it should be.
             # if start > qbase, the cache includes (part of) the patches.
@@ -2536,14 +2615,69 @@
         repo.__class__ = mqrepo
 
 def mqimport(orig, ui, repo, *args, **kwargs):
-    if hasattr(repo, 'abort_if_wdir_patched') and not kwargs.get('no_commit', False):
+    if (hasattr(repo, 'abort_if_wdir_patched')
+        and not kwargs.get('no_commit', False)):
         repo.abort_if_wdir_patched(_('cannot import over an applied patch'),
                                    kwargs.get('force'))
     return orig(ui, repo, *args, **kwargs)
 
+def mqinit(orig, ui, *args, **kwargs):
+    mq = kwargs['mq']
+    del kwargs['mq']
+
+    if not mq:
+        return orig(ui, *args, **kwargs)
+
+    repopath = cmdutil.findrepo(os.getcwd())
+    repo = hg.repository(ui, repopath)
+    q = repo.mq
+    r = q.init(repo, create=True)
+    q.save_dirty()
+
+    if not os.path.exists(r.wjoin('.hgignore')):
+        fp = r.wopener('.hgignore', 'w')
+        fp.write('^\\.hg\n')
+        fp.write('^\\.mq\n')
+        fp.write('syntax: glob\n')
+        fp.write('status\n')
+        fp.write('guards\n')
+        fp.close()
+    if not os.path.exists(r.wjoin('series')):
+        r.wopener('series', 'w').close()
+    r.add(['.hgignore', 'series'])
+    commands.add(ui, r)
+
+def mqcommand(orig, ui, repo, *args, **kwargs):
+    """Add --mq option to operate on patch repository instead of main"""
+
+    # some commands do not like getting unknown options
+    mq = kwargs['mq']
+    del kwargs['mq']
+
+    if not mq:
+        return orig(ui, repo, *args, **kwargs)
+
+    q = repo.mq
+    r = q.qrepo()
+    if not r:
+        raise util.Abort('no queue repository')
+    return orig(r.ui, r, *args, **kwargs)
+
 def uisetup(ui):
+    mqopt = [('Q', 'mq', None, _("operate on patch repository"))]
+
     extensions.wrapcommand(commands.table, 'import', mqimport)
 
+    entry = extensions.wrapcommand(commands.table, 'init', mqinit)
+    entry[1].extend(mqopt)
+
+    for cmd in commands.table:
+        cmd = cmdutil.parsealiases(cmd)[0]
+        if cmd in commands.norepo:
+            continue
+        entry = extensions.wrapcommand(commands.table, cmd, mqcommand)
+        entry[1].extend(mqopt)
+
 seriesopts = [('s', 'summary', None, _('print first line of patch header'))]
 
 cmdtable = {
@@ -2605,7 +2739,7 @@
     "qnew":
         (new,
          [('e', 'edit', None, _('edit commit message')),
-          ('f', 'force', None, _('import uncommitted changes into patch')),
+          ('f', 'force', None, _('import uncommitted changes (DEPRECATED)')),
           ('g', 'git', None, _('use git extended diff format')),
           ('U', 'currentuser', None, _('add "From: <current user>" to patch')),
           ('u', 'user', '', _('add "From: <given user>" to patch')),
@@ -2618,7 +2752,7 @@
     "^qpop":
         (pop,
          [('a', 'all', None, _('pop all patches')),
-          ('n', 'name', '', _('queue name to pop')),
+          ('n', 'name', '', _('queue name to pop (DEPRECATED)')),
           ('f', 'force', None, _('forget any local changes to patched files'))],
          _('hg qpop [-a] [-n NAME] [-f] [PATCH | INDEX]')),
     "^qpush":
@@ -2626,18 +2760,23 @@
          [('f', 'force', None, _('apply if the patch has rejects')),
           ('l', 'list', None, _('list patch name in commit text')),
           ('a', 'all', None, _('apply all patches')),
-          ('m', 'merge', None, _('merge from another queue')),
-          ('n', 'name', '', _('merge queue name'))],
+          ('m', 'merge', None, _('merge from another queue (DEPRECATED)')),
+          ('n', 'name', '', _('merge queue name (DEPRECATED)'))],
          _('hg qpush [-f] [-l] [-a] [-m] [-n NAME] [PATCH | INDEX]')),
     "^qrefresh":
         (refresh,
          [('e', 'edit', None, _('edit commit message')),
           ('g', 'git', None, _('use git extended diff format')),
-          ('s', 'short', None, _('refresh only files already in the patch and specified files')),
-          ('U', 'currentuser', None, _('add/update author field in patch with current user')),
-          ('u', 'user', '', _('add/update author field in patch with given user')),
-          ('D', 'currentdate', None, _('add/update date field in patch with current date')),
-          ('d', 'date', '', _('add/update date field in patch with given date'))
+          ('s', 'short', None,
+           _('refresh only files already in the patch and specified files')),
+          ('U', 'currentuser', None,
+           _('add/update author field in patch with current user')),
+          ('u', 'user', '',
+           _('add/update author field in patch with given user')),
+          ('D', 'currentdate', None,
+           _('add/update date field in patch with current date')),
+          ('d', 'date', '',
+           _('add/update date field in patch with given date'))
           ] + commands.walkopts + commands.commitopts,
          _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...')),
     'qrename|qmv':
--- a/hgext/notify.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/notify.py	Sat Feb 13 23:50:38 2010 -0600
@@ -134,7 +134,7 @@
             c = path.find('/')
             if c == -1:
                 break
-            path = path[c+1:]
+            path = path[c + 1:]
             count -= 1
         return path
 
@@ -216,7 +216,7 @@
                 subject = '%s: %s' % (self.root, s)
         maxsubject = int(self.ui.config('notify', 'maxsubject', 67))
         if maxsubject and len(subject) > maxsubject:
-            subject = subject[:maxsubject-3] + '...'
+            subject = subject[:maxsubject - 3] + '...'
         msg['Subject'] = mail.headencode(self.ui, subject,
                                          self.charsets, self.test)
 
--- a/hgext/parentrevspec.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/parentrevspec.py	Sat Feb 13 23:50:38 2010 -0600
@@ -67,7 +67,7 @@
                     p = cl.parentrevs(rev)
                     if j < len(suffix) and suffix[j].isdigit():
                         j += 1
-                        n = int(suffix[i+1:j])
+                        n = int(suffix[i + 1:j])
                         if n > 2 or n == 2 and p[1] == -1:
                             raise
                     else:
@@ -85,7 +85,7 @@
                         j += 1
                     if j == i + 1:
                         raise
-                    n = int(suffix[i+1:j])
+                    n = int(suffix[i + 1:j])
                     for k in xrange(n):
                         rev = cl.parentrevs(rev)[0]
                     i = j
--- a/hgext/patchbomb.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/patchbomb.py	Sat Feb 13 23:50:38 2010 -0600
@@ -83,7 +83,7 @@
     if not ui.interactive():
         if default is not None:
             return default
-        raise util.Abort(_("%s Please enter a valid value" % (prompt+rest)))
+        raise util.Abort(_("%s Please enter a valid value" % (prompt + rest)))
     if default:
         prompt += ' [%s]' % default
     prompt += rest
@@ -233,7 +233,8 @@
     def outgoing(dest, revs):
         '''Return the revisions present locally but not in dest'''
         dest = ui.expandpath(dest or 'default-push', dest or 'default')
-        dest, revs, checkout = hg.parseurl(dest, revs)
+        dest, branches = hg.parseurl(dest)
+        revs, checkout = hg.addbranchrevs(repo, repo, branches, revs)
         if revs:
             revs = [repo.lookup(rev) for rev in revs]
         other = hg.repository(cmdutil.remoteui(repo, opts), dest)
@@ -384,20 +385,21 @@
     else:
         msgs = getpatchmsgs(list(getpatches(revs)))
 
-    def getaddrs(opt, prpt, default = None):
-        addrs = opts.get(opt) or (ui.config('email', opt) or
-                                  ui.config('patchbomb', opt) or
-                                  prompt(ui, prpt, default)).split(',')
-        return [mail.addressencode(ui, a.strip(), _charsets, opts.get('test'))
-                for a in addrs if a.strip()]
+    def getaddrs(opt, prpt=None, default=None):
+        if opts.get(opt):
+            return mail.addrlistencode(ui, opts.get(opt), _charsets,
+                                       opts.get('test'))
+
+        addrs = (ui.config('email', opt) or
+                 ui.config('patchbomb', opt) or '')
+        if not addrs and prpt:
+            addrs = prompt(ui, prpt, default)
+
+        return mail.addrlistencode(ui, [addrs], _charsets, opts.get('test'))
 
     to = getaddrs('to', 'To')
     cc = getaddrs('cc', 'Cc', '')
-
-    bcc = opts.get('bcc') or (ui.config('email', 'bcc') or
-                          ui.config('patchbomb', 'bcc') or '').split(',')
-    bcc = [mail.addressencode(ui, a.strip(), _charsets, opts.get('test'))
-           for a in bcc if a.strip()]
+    bcc = getaddrs('bcc')
 
     ui.write('\n')
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hgext/progress.py	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,183 @@
+# progress.py show progress bars for some actions
+#
+# Copyright (C) 2010 Augie Fackler <durin42@gmail.com>
+#
+# This program 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.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+"""show progress bars for some actions
+
+This extension uses the progress information logged by hg commands
+to draw progress bars that are as informative as possible. Some progress
+bars only offer indeterminate information, while others have a definite
+end point.
+
+The following settings are available::
+
+  [progress]
+  delay = 3 # number of seconds (float) before showing the progress bar
+  refresh = 0.1 # time in seconds between refreshes of the progress bar
+  format = topic bar number # format of the progress bar
+  width = <none> # if set, the maximum width of the progress information
+                 # (that is, min(width, term width) will be used)
+  clear-complete = True # clear the progress bar after it's done
+
+Valid entries for the format field are topic, bar, number, unit, and item.
+item defaults to the last 20 characters of the item, but this can be
+changed by adding either -<num> which would take the last num characters,
+or +<num> for the first num characters.
+"""
+
+import math
+import sys
+import time
+
+from mercurial import extensions
+from mercurial import util
+
+def spacejoin(*args):
+    return ' '.join(s for s in args if s)
+
+class progbar(object):
+    def __init__(self, ui):
+        self.ui = ui
+        self.resetstate()
+
+    def resetstate(self):
+        self.topics = []
+        self.printed = False
+        self.lastprint = time.time() + float(self.ui.config(
+            'progress', 'delay', default=3))
+        self.indetcount = 0
+        self.refresh = float(self.ui.config(
+            'progress', 'refresh', default=0.1))
+        self.order = self.ui.configlist(
+            'progress', 'format',
+            default=['topic', 'bar', 'number'])
+
+    def show(self, topic, pos, item, unit, total):
+        termwidth = self.width()
+        self.printed = True
+        head = ''
+        needprogress = False
+        tail = ''
+        for indicator in self.order:
+            add = ''
+            if indicator == 'topic':
+                add = topic
+            elif indicator == 'number':
+                if total:
+                    add = ('% ' + str(len(str(total))) +
+                           's/%s') % (pos, total)
+                else:
+                    add = str(pos)
+            elif indicator.startswith('item') and item:
+                slice = 'end'
+                if '-' in indicator:
+                    wid = int(indicator.split('-')[1])
+                elif '+' in indicator:
+                    slice = 'beginning'
+                    wid = int(indicator.split('+')[1])
+                else:
+                    wid = 20
+                if slice == 'end':
+                    add = item[-wid:]
+                else:
+                    add = item[:wid]
+                add += (wid - len(add)) * ' '
+            elif indicator == 'bar':
+                add = ''
+                needprogress = True
+            elif indicator == 'unit' and unit:
+                add = unit
+            if not needprogress:
+                head = spacejoin(head, add)
+            else:
+                tail = spacejoin(add, tail)
+        if needprogress:
+            used = 0
+            if head:
+                used += len(head) + 1
+            if tail:
+                used += len(tail) + 1
+            progwidth = termwidth - used - 3
+            if total:
+                amt = pos * progwidth // total
+                bar = '=' * (amt - 1)
+                if amt > 0:
+                    bar += '>'
+                bar += ' ' * (progwidth - amt)
+            else:
+                progwidth -= 3
+                self.indetcount += 1
+                # mod the count by twice the width so we can make the
+                # cursor bounce between the right and left sides
+                amt = self.indetcount % (2 * progwidth)
+                amt -= progwidth
+                bar = (' ' * int(progwidth - abs(amt)) + '<=>' +
+                       ' ' * int(abs(amt)))
+            prog = ''.join(('[', bar , ']'))
+            out = spacejoin(head, prog, tail)
+        else:
+            out = spacejoin(head, tail)
+        sys.stdout.write('\r' + out[:termwidth])
+        sys.stdout.flush()
+
+    def clear(self):
+        sys.stdout.write('\r%s\r' % (' ' * self.width()))
+
+    def complete(self):
+        if self.ui.configbool('progress', 'clear-complete', default=True):
+            self.clear()
+        else:
+            sys.stdout.write('\n')
+        sys.stdout.flush()
+
+    def width(self):
+        tw = util.termwidth()
+        return min(int(self.ui.config('progress', 'width', default=tw)), tw)
+
+    def progress(self, orig, topic, pos, item='', unit='', total=None):
+        if pos is None:
+            if self.topics and self.topics[-1] == topic and self.printed:
+                self.complete()
+                self.resetstate()
+        else:
+            if topic not in self.topics:
+                self.topics.append(topic)
+            now = time.time()
+            if now - self.lastprint > 0.1 and topic == self.topics[-1]:
+                self.lastprint = now
+                self.show(topic, pos, item, unit, total)
+        return orig(topic, pos, item=item, unit=unit, total=total)
+
+    def write(self, orig, *args):
+        if self.printed:
+            self.clear()
+        return orig(*args)
+
+sharedprog = None
+
+def uisetup(ui):
+    if ui.interactive() and not ui.debugflag:
+        # we instantiate one globally shared progress bar to avoid
+        # competing progress bars when multiple UI objects get created
+        global sharedprog
+        if not sharedprog:
+            sharedprog = progbar(ui)
+        extensions.wrapfunction(ui, 'progress', sharedprog.progress)
+        extensions.wrapfunction(ui, 'write', sharedprog.write)
+
+def reposetup(ui, repo):
+    uisetup(repo.ui)
--- a/hgext/rebase.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/rebase.py	Sat Feb 13 23:50:38 2010 -0600
@@ -22,6 +22,167 @@
 from mercurial.i18n import _
 import os, errno
 
+nullmerge = -2
+
+def rebase(ui, repo, **opts):
+    """move changeset (and descendants) to a different branch
+
+    Rebase uses repeated merging to graft changesets from one part of
+    history onto another. This can be useful for linearizing local
+    changes relative to a master development tree.
+
+    If a rebase is interrupted to manually resolve a merge, it can be
+    continued with --continue/-c or aborted with --abort/-a.
+    """
+    originalwd = target = None
+    external = nullrev
+    state = {}
+    skipped = set()
+    targetancestors = set()
+
+    lock = wlock = None
+    try:
+        lock = repo.lock()
+        wlock = repo.wlock()
+
+        # Validate input and define rebasing points
+        destf = opts.get('dest', None)
+        srcf = opts.get('source', None)
+        basef = opts.get('base', None)
+        contf = opts.get('continue')
+        abortf = opts.get('abort')
+        collapsef = opts.get('collapse', False)
+        extrafn = opts.get('extrafn')
+        keepf = opts.get('keep', False)
+        keepbranchesf = opts.get('keepbranches', False)
+        detachf = opts.get('detach', False)
+
+        if contf or abortf:
+            if contf and abortf:
+                raise error.ParseError('rebase',
+                                       _('cannot use both abort and continue'))
+            if collapsef:
+                raise error.ParseError(
+                    'rebase', _('cannot use collapse with continue or abort'))
+
+            if detachf:
+                raise error.ParseError(
+                    'rebase', _('cannot use detach with continue or abort'))
+
+            if srcf or basef or destf:
+                raise error.ParseError('rebase',
+                    _('abort and continue do not allow specifying revisions'))
+
+            (originalwd, target, state, collapsef, keepf,
+                                keepbranchesf, external) = restorestatus(repo)
+            if abortf:
+                abort(repo, originalwd, target, state)
+                return
+        else:
+            if srcf and basef:
+                raise error.ParseError('rebase', _('cannot specify both a '
+                                                   'revision and a base'))
+            if detachf:
+                if not srcf:
+                    raise error.ParseError(
+                      'rebase', _('detach requires a revision to be specified'))
+                if basef:
+                    raise error.ParseError(
+                        'rebase', _('cannot specify a base with detach'))
+
+            cmdutil.bail_if_changed(repo)
+            result = buildstate(repo, destf, srcf, basef, detachf)
+            if not result:
+                # Empty state built, nothing to rebase
+                ui.status(_('nothing to rebase\n'))
+                return
+            else:
+                originalwd, target, state = result
+                if collapsef:
+                    targetancestors = set(repo.changelog.ancestors(target))
+                    external = checkexternal(repo, state, targetancestors)
+
+        if keepbranchesf:
+            if extrafn:
+                raise error.ParseError(
+                    'rebase', _('cannot use both keepbranches and extrafn'))
+            def extrafn(ctx, extra):
+                extra['branch'] = ctx.branch()
+
+        # Rebase
+        if not targetancestors:
+            targetancestors = set(repo.changelog.ancestors(target))
+            targetancestors.add(target)
+
+        for rev in sorted(state):
+            if state[rev] == -1:
+                ui.debug("rebasing %d:%s\n" % (rev, repo[rev]))
+                storestatus(repo, originalwd, target, state, collapsef, keepf,
+                                                    keepbranchesf, external)
+                p1, p2 = defineparents(repo, rev, target, state,
+                                                        targetancestors)
+                if len(repo.parents()) == 2:
+                    repo.ui.debug('resuming interrupted rebase\n')
+                else:
+                    stats = rebasenode(repo, rev, p1, p2, state)
+                    if stats and stats[3] > 0:
+                        raise util.Abort(_('fix unresolved conflicts with hg '
+                                    'resolve then run hg rebase --continue'))
+                updatedirstate(repo, rev, target, p2)
+                if not collapsef:
+                    extra = {'rebase_source': repo[rev].hex()}
+                    if extrafn:
+                        extrafn(repo[rev], extra)
+                    newrev = concludenode(repo, rev, p1, p2, extra=extra)
+                else:
+                    # Skip commit if we are collapsing
+                    repo.dirstate.setparents(repo[p1].node())
+                    newrev = None
+                # Update the state
+                if newrev is not None:
+                    state[rev] = repo[newrev].rev()
+                else:
+                    if not collapsef:
+                        ui.note(_('no changes, revision %d skipped\n') % rev)
+                        ui.debug('next revision set to %s\n' % p1)
+                        skipped.add(rev)
+                    state[rev] = p1
+
+        ui.note(_('rebase merging completed\n'))
+
+        if collapsef:
+            p1, p2 = defineparents(repo, min(state), target,
+                                                        state, targetancestors)
+            commitmsg = 'Collapsed revision'
+            for rebased in state:
+                if rebased not in skipped and state[rebased] != nullmerge:
+                    commitmsg += '\n* %s' % repo[rebased].description()
+            commitmsg = ui.edit(commitmsg, repo.ui.username())
+            newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg,
+                                                    extra=extrafn)
+
+        if 'qtip' in repo.tags():
+            updatemq(repo, state, skipped, **opts)
+
+        if not keepf:
+            # Remove no more useful revisions
+            rebased = [rev for rev in state if state[rev] != nullmerge]
+            if rebased:
+                if set(repo.changelog.descendants(min(rebased))) - set(state):
+                    ui.warn(_("warning: new changesets detected "
+                              "on source branch, not stripping\n"))
+                else:
+                    repair.strip(ui, repo, repo[min(rebased)].node(), "strip")
+
+        clearstatus(repo)
+        ui.status(_("rebase completed\n"))
+        if os.path.exists(repo.sjoin('undo')):
+            util.unlink(repo.sjoin('undo'))
+        if skipped:
+            ui.note(_("%d revisions have been skipped\n") % len(skipped))
+    finally:
+        release(lock, wlock)
+
 def rebasemerge(repo, rev, first=False):
     'return the correct ancestor'
     oldancestor = ancestor.ancestor
@@ -41,142 +202,48 @@
     finally:
         ancestor.ancestor = oldancestor
 
-def rebase(ui, repo, **opts):
-    """move changeset (and descendants) to a different branch
-
-    Rebase uses repeated merging to graft changesets from one part of
-    history onto another. This can be useful for linearizing local
-    changes relative to a master development tree.
-
-    If a rebase is interrupted to manually resolve a merge, it can be
-    continued with --continue/-c or aborted with --abort/-a.
+def checkexternal(repo, state, targetancestors):
+    """Check whether one or more external revisions need to be taken in
+    consideration. In the latter case, abort.
     """
-    originalwd = target = None
     external = nullrev
-    state = {}
-    skipped = set()
-
-    lock = wlock = None
-    try:
-        lock = repo.lock()
-        wlock = repo.wlock()
-
-        # Validate input and define rebasing points
-        destf = opts.get('dest', None)
-        srcf = opts.get('source', None)
-        basef = opts.get('base', None)
-        contf = opts.get('continue')
-        abortf = opts.get('abort')
-        collapsef = opts.get('collapse', False)
-        extrafn = opts.get('extrafn')
-        keepf = opts.get('keep', False)
-        keepbranchesf = opts.get('keepbranches', False)
-
-        if contf or abortf:
-            if contf and abortf:
-                raise error.ParseError('rebase',
-                                       _('cannot use both abort and continue'))
-            if collapsef:
-                raise error.ParseError(
-                    'rebase', _('cannot use collapse with continue or abort'))
-
-            if srcf or basef or destf:
-                raise error.ParseError('rebase',
-                    _('abort and continue do not allow specifying revisions'))
-
-            (originalwd, target, state, collapsef, keepf,
-                                keepbranchesf, external) = restorestatus(repo)
-            if abortf:
-                abort(repo, originalwd, target, state)
-                return
-        else:
-            if srcf and basef:
-                raise error.ParseError('rebase', _('cannot specify both a '
-                                                   'revision and a base'))
-            cmdutil.bail_if_changed(repo)
-            result = buildstate(repo, destf, srcf, basef, collapsef)
-            if result:
-                originalwd, target, state, external = result
-            else: # Empty state built, nothing to rebase
-                ui.status(_('nothing to rebase\n'))
-                return
-
-        if keepbranchesf:
-            if extrafn:
-                raise error.ParseError(
-                    'rebase', _('cannot use both keepbranches and extrafn'))
-            def extrafn(ctx, extra):
-                extra['branch'] = ctx.branch()
+    source = min(state)
+    for rev in state:
+        if rev == source:
+            continue
+        # Check externals and fail if there are more than one
+        for p in repo[rev].parents():
+            if (p.rev() not in state
+                        and p.rev() not in targetancestors):
+                if external != nullrev:
+                    raise util.Abort(_('unable to collapse, there is more '
+                            'than one external parent'))
+                external = p.rev()
+    return external
 
-        # Rebase
-        targetancestors = list(repo.changelog.ancestors(target))
-        targetancestors.append(target)
-
-        for rev in sorted(state):
-            if state[rev] == -1:
-                storestatus(repo, originalwd, target, state, collapsef, keepf,
-                                                    keepbranchesf, external)
-                rebasenode(repo, rev, target, state, skipped, targetancestors,
-                                                       collapsef, extrafn)
-        ui.note(_('rebase merging completed\n'))
-
-        if collapsef:
-            p1, p2 = defineparents(repo, min(state), target,
-                                                        state, targetancestors)
-            concludenode(repo, rev, p1, external, state, collapsef,
-                         last=True, skipped=skipped, extrafn=extrafn)
-
-        if 'qtip' in repo.tags():
-            updatemq(repo, state, skipped, **opts)
-
-        if not keepf:
-            # Remove no more useful revisions
-            if set(repo.changelog.descendants(min(state))) - set(state):
-                ui.warn(_("warning: new changesets detected on source branch, "
-                                                        "not stripping\n"))
-            else:
-                repair.strip(ui, repo, repo[min(state)].node(), "strip")
+def updatedirstate(repo, rev, p1, p2):
+    """Keep track of renamed files in the revision that is going to be rebased
+    """
+    # Here we simulate the copies and renames in the source changeset
+    cop, diver = copies.copies(repo, repo[rev], repo[p1], repo[p2], True)
+    m1 = repo[rev].manifest()
+    m2 = repo[p1].manifest()
+    for k, v in cop.iteritems():
+        if k in m1:
+            if v in m1 or v in m2:
+                repo.dirstate.copy(v, k)
+                if v in m2 and v not in m1:
+                    repo.dirstate.remove(v)
 
-        clearstatus(repo)
-        ui.status(_("rebase completed\n"))
-        if os.path.exists(repo.sjoin('undo')):
-            util.unlink(repo.sjoin('undo'))
-        if skipped:
-            ui.note(_("%d revisions have been skipped\n") % len(skipped))
-    finally:
-        release(lock, wlock)
-
-def concludenode(repo, rev, p1, p2, state, collapse, last=False, skipped=None,
-                 extrafn=None):
-    """Skip commit if collapsing has been required and rev is not the last
-    revision, commit otherwise
-    """
-    repo.ui.debug(" set parents\n")
-    if collapse and not last:
-        repo.dirstate.setparents(repo[p1].node())
-        return None
-
-    repo.dirstate.setparents(repo[p1].node(), repo[p2].node())
-
-    if skipped is None:
-        skipped = set()
-
-    # Commit, record the old nodeid
-    newrev = nullrev
+def concludenode(repo, rev, p1, p2, commitmsg=None, extra=None):
+    'Commit the changes and store useful information in extra'
     try:
-        if last:
-            # we don't translate commit messages
-            commitmsg = 'Collapsed revision'
-            for rebased in state:
-                if rebased not in skipped:
-                    commitmsg += '\n* %s' % repo[rebased].description()
-            commitmsg = repo.ui.edit(commitmsg, repo.ui.username())
-        else:
+        repo.dirstate.setparents(repo[p1].node(), repo[p2].node())
+        if commitmsg is None:
             commitmsg = repo[rev].description()
+        if extra is None:
+            extra = {}
         # Commit might fail if unresolved files exist
-        extra = {'rebase_source': repo[rev].hex()}
-        if extrafn:
-            extrafn(repo[rev], extra)
         newrev = repo.commit(text=commitmsg, user=repo[rev].user(),
                              date=repo[rev].date(), extra=extra)
         repo.dirstate.setbranch(repo[newrev].branch())
@@ -186,59 +253,20 @@
         repo.dirstate.invalidate()
         raise
 
-def rebasenode(repo, rev, target, state, skipped, targetancestors, collapse,
-               extrafn):
+def rebasenode(repo, rev, p1, p2, state):
     'Rebase a single revision'
-    repo.ui.debug("rebasing %d:%s\n" % (rev, repo[rev]))
-
-    p1, p2 = defineparents(repo, rev, target, state, targetancestors)
-
-    repo.ui.debug(" future parents are %d and %d\n" % (repo[p1].rev(),
-                                                            repo[p2].rev()))
-
     # Merge phase
-    if len(repo.parents()) != 2:
-        # Update to target and merge it with local
-        if repo['.'].rev() != repo[p1].rev():
-            repo.ui.debug(" update to %d:%s\n" % (repo[p1].rev(), repo[p1]))
-            merge.update(repo, p1, False, True, False)
-        else:
-            repo.ui.debug(" already in target\n")
-        repo.dirstate.write()
-        repo.ui.debug(" merge against %d:%s\n" % (repo[rev].rev(), repo[rev]))
-        first = repo[rev].rev() == repo[min(state)].rev()
-        stats = rebasemerge(repo, rev, first)
-
-        if stats[3] > 0:
-            raise util.Abort(_('fix unresolved conflicts with hg resolve then '
-                                                'run hg rebase --continue'))
-    else: # we have an interrupted rebase
-        repo.ui.debug('resuming interrupted rebase\n')
-
-    # Keep track of renamed files in the revision that is going to be rebased
-    # Here we simulate the copies and renames in the source changeset
-    cop, diver = copies.copies(repo, repo[rev], repo[target], repo[p2], True)
-    m1 = repo[rev].manifest()
-    m2 = repo[target].manifest()
-    for k, v in cop.iteritems():
-        if k in m1:
-            if v in m1 or v in m2:
-                repo.dirstate.copy(v, k)
-                if v in m2 and v not in m1:
-                    repo.dirstate.remove(v)
-
-    newrev = concludenode(repo, rev, p1, p2, state, collapse,
-                          extrafn=extrafn)
-
-    # Update the state
-    if newrev is not None:
-        state[rev] = repo[newrev].rev()
+    # Update to target and merge it with local
+    if repo['.'].rev() != repo[p1].rev():
+        repo.ui.debug(" update to %d:%s\n" % (repo[p1].rev(), repo[p1]))
+        merge.update(repo, p1, False, True, False)
     else:
-        if not collapse:
-            repo.ui.note(_('no changes, revision %d skipped\n') % rev)
-            repo.ui.debug('next revision set to %s\n' % p1)
-            skipped.add(rev)
-        state[rev] = p1
+        repo.ui.debug(" already in target\n")
+    repo.dirstate.write()
+    repo.ui.debug(" merge against %d:%s\n" % (repo[rev].rev(), repo[rev]))
+    first = repo[rev].rev() == repo[min(state)].rev()
+    stats = rebasemerge(repo, rev, first)
+    return stats
 
 def defineparents(repo, rev, target, state, targetancestors):
     'Return the new parent relationship of the revision that will be rebased'
@@ -249,7 +277,10 @@
     if P1n in targetancestors:
         p1 = target
     elif P1n in state:
-        p1 = state[P1n]
+        if state[P1n] == nullmerge:
+            p1 = target
+        else:
+            p1 = state[P1n]
     else: # P1n external
         p1 = target
         p2 = P1n
@@ -267,6 +298,8 @@
                 raise util.Abort(_('cannot use revision %d as base, result '
                         'would have 3 parents') % rev)
             p2 = P2n
+    repo.ui.debug(" future parents are %d and %d\n" %
+                            (repo[p1].rev(), repo[p2].rev()))
     return p1, p2
 
 def isagitpatch(repo, patchname):
@@ -366,9 +399,10 @@
         clearstatus(repo)
         repo.ui.status(_('rebase aborted\n'))
 
-def buildstate(repo, dest, src, base, collapse):
+def buildstate(repo, dest, src, base, detach):
     'Define which revisions are going to be rebased and where'
     targetancestors = set()
+    detachset = set()
 
     if not dest:
         # Destination defaults to the latest revision in the current branch
@@ -387,6 +421,12 @@
         if commonbase == repo[dest]:
             raise util.Abort(_('source is descendant of destination'))
         source = repo[src].rev()
+        if detach:
+            # We need to keep track of source's ancestors up to the common base
+            srcancestors = set(repo.changelog.ancestors(source))
+            baseancestors = set(repo.changelog.ancestors(commonbase.rev()))
+            detachset = srcancestors - baseancestors
+            detachset.remove(commonbase.rev())
     else:
         if base:
             cwd = repo[base].rev()
@@ -413,22 +453,9 @@
 
     repo.ui.debug('rebase onto %d starting from %d\n' % (dest, source))
     state = dict.fromkeys(repo.changelog.descendants(source), nullrev)
-    external = nullrev
-    if collapse:
-        if not targetancestors:
-            targetancestors = set(repo.changelog.ancestors(dest))
-        for rev in state:
-            # Check externals and fail if there are more than one
-            for p in repo[rev].parents():
-                if (p.rev() not in state and p.rev() != source
-                            and p.rev() not in targetancestors):
-                    if external != nullrev:
-                        raise util.Abort(_('unable to collapse, there is more '
-                                'than one external parent'))
-                    external = p.rev()
-
+    state.update(dict.fromkeys(detachset, nullmerge))
     state[source] = nullrev
-    return repo['.'].rev(), repo[dest].rev(), state, external
+    return repo['.'].rev(), repo[dest].rev(), state
 
 def pullrebase(orig, ui, repo, *args, **opts):
     'Call rebase after pull if the latter has been invoked with --rebase'
@@ -469,9 +496,11 @@
         ('', 'collapse', False, _('collapse the rebased changesets')),
         ('', 'keep', False, _('keep original changesets')),
         ('', 'keepbranches', False, _('keep original branch names')),
+        ('', 'detach', False, _('force detaching of source from its original '
+                                'branch')),
         ('c', 'continue', False, _('continue an interrupted rebase')),
-        ('a', 'abort', False, _('abort an interrupted rebase')),] +
+        ('a', 'abort', False, _('abort an interrupted rebase'))] +
          templateopts,
-        _('hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--keep] '
-                            '[--keepbranches] | [-c] | [-a]')),
+        _('hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--detach] '
+                        '[--keep] [--keepbranches] | [-c] | [-a]')),
 }
--- a/hgext/record.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/record.py	Sat Feb 13 23:50:38 2010 -0600
@@ -297,7 +297,8 @@
                 doc = gettext(record.__doc__)
                 c = doc.find(_('y - record this change'))
                 for l in doc[c:].splitlines():
-                    if l: ui.write(l.strip(), '\n')
+                    if l:
+                        ui.write(l.strip(), '\n')
                 continue
             elif r == 0: # yes
                 ret = True
@@ -380,10 +381,7 @@
 
       ? - display help'''
 
-    def record_committer(ui, repo, pats, opts):
-        commands.commit(ui, repo, *pats, **opts)
-
-    dorecord(ui, repo, record_committer, *pats, **opts)
+    dorecord(ui, repo, commands.commit, *pats, **opts)
 
 
 def qrecord(ui, repo, patch, *pats, **opts):
@@ -398,15 +396,15 @@
     except KeyError:
         raise util.Abort(_("'mq' extension not loaded"))
 
-    def qrecord_committer(ui, repo, pats, opts):
+    def committomq(ui, repo, *pats, **opts):
         mq.new(ui, repo, patch, *pats, **opts)
 
     opts = opts.copy()
     opts['force'] = True    # always 'qnew -f'
-    dorecord(ui, repo, qrecord_committer, *pats, **opts)
+    dorecord(ui, repo, committomq, *pats, **opts)
 
 
-def dorecord(ui, repo, committer, *pats, **opts):
+def dorecord(ui, repo, commitfunc, *pats, **opts):
     if not ui.interactive():
         raise util.Abort(_('running non-interactively, use commit instead'))
 
@@ -437,8 +435,10 @@
 
         contenders = set()
         for h in chunks:
-            try: contenders.update(set(h.files()))
-            except AttributeError: pass
+            try:
+                contenders.update(set(h.files()))
+            except AttributeError:
+                pass
 
         changed = changes[0] + changes[1] + changes[2]
         newfiles = [f for f in changed if f in contenders]
@@ -504,7 +504,7 @@
             cwd = os.getcwd()
             os.chdir(repo.root)
             try:
-                committer(ui, repo, newfiles, opts)
+                commitfunc(ui, repo, *newfiles, **opts)
             finally:
                 os.chdir(cwd)
 
--- a/hgext/relink.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/relink.py	Sat Feb 13 23:50:38 2010 -0600
@@ -14,25 +14,27 @@
 def relink(ui, repo, origin=None, **opts):
     """recreate hardlinks between two repositories
 
-    When repositories are cloned locally, their data files will be hardlinked
-    so that they only use the space of a single repository.
+    When repositories are cloned locally, their data files will be
+    hardlinked so that they only use the space of a single repository.
 
-    Unfortunately, subsequent pulls into either repository will break hardlinks
-    for any files touched by the new changesets, even if both repositories end
-    up pulling the same changes.
+    Unfortunately, subsequent pulls into either repository will break
+    hardlinks for any files touched by the new changesets, even if
+    both repositories end up pulling the same changes.
 
-    Similarly, passing --rev to "hg clone" will fail to use
-    any hardlinks, falling back to a complete copy of the source repository.
+    Similarly, passing --rev to "hg clone" will fail to use any
+    hardlinks, falling back to a complete copy of the source
+    repository.
 
-    This command lets you recreate those hardlinks and reclaim that wasted
-    space.
+    This command lets you recreate those hardlinks and reclaim that
+    wasted space.
 
-    This repository will be relinked to share space with ORIGIN, which must be
-    on the same local disk. If ORIGIN is omitted, looks for "default-relink",
-    then "default", in [paths].
+    This repository will be relinked to share space with ORIGIN, which
+    must be on the same local disk. If ORIGIN is omitted, looks for
+    "default-relink", then "default", in [paths].
 
-    Do not attempt any read operations on this repository while the command is
-    running. (Both repositories will be locked against writes.)
+    Do not attempt any read operations on this repository while the
+    command is running. (Both repositories will be locked against
+    writes.)
     """
     if not hasattr(util, 'samefile') or not hasattr(util, 'samedevice'):
         raise util.Abort(_('hardlinks are not supported on this system'))
@@ -143,6 +145,8 @@
         except OSError, inst:
             ui.warn('%s: %s\n' % (tgt, str(inst)))
 
+    ui.progress(_('relink'), None, f, _(' files'), total)
+
     ui.status(_('relinked %d files (%d bytes reclaimed)\n') %
               (relinked, savedbytes))
 
--- a/hgext/schemes.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/schemes.py	Sat Feb 13 23:50:38 2010 -0600
@@ -64,7 +64,7 @@
             parts = parts[:-1]
         else:
             tail = ''
-        context = dict((str(i+1), v) for i, v in enumerate(parts))
+        context = dict((str(i + 1), v) for i, v in enumerate(parts))
         url = ''.join(self.templater.process(self.url, context)) + tail
         return hg._lookup(url).instance(ui, url, create)
 
--- a/hgext/transplant.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/transplant.py	Sat Feb 13 23:50:38 2010 -0600
@@ -430,6 +430,7 @@
             transplants = ()
             merges = ()
             break
+    displayer.close()
     return (transplants, merges)
 
 def transplant(ui, repo, *revs, **opts):
@@ -488,7 +489,7 @@
 
     def incwalk(repo, incoming, branches, match=util.always):
         if not branches:
-            branches=None
+            branches = None
         for node in repo.changelog.nodesbetween(incoming, branches)[0]:
             if match(node):
                 yield node
@@ -505,7 +506,7 @@
 
     def checkopts(opts, revs):
         if opts.get('continue'):
-            if filter(lambda opt: opts.get(opt), ('branch', 'all', 'merge')):
+            if opts.get('branch') or opts.get('all') or opts.get('merge'):
                 raise util.Abort(_('--continue is incompatible with '
                                    'branch, all or merge'))
             return
@@ -551,7 +552,7 @@
             tp.resume(repo, source, opts)
             return
 
-        tf=tp.transplantfilter(repo, source, p1)
+        tf = tp.transplantfilter(repo, source, p1)
         if opts.get('prune'):
             prune = [source.lookup(r)
                      for r in cmdutil.revrange(source, opts.get('prune'))]
--- a/hgext/win32mbcs.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/win32mbcs.py	Sat Feb 13 23:50:38 2010 -0600
@@ -2,7 +2,7 @@
 #
 # Copyright (c) 2008 Shun-ichi Goto <shunichi.goto@gmail.com>
 #
-# Version: 0.2
+# Version: 0.3
 # Author:  Shun-ichi Goto <shunichi.goto@gmail.com>
 #
 # This software may be used and distributed according to the terms of the
@@ -33,22 +33,27 @@
 Note that there are some limitations on using this extension:
 
 - You should use single encoding in one repository.
-- You should set same encoding for the repository by locale or
-  HGENCODING.
+
+
+By default, win32mbcs uses encoding.encoding decided by Mercurial.
+You can specify the encoding by config option::
 
-Path encoding conversion are done between Unicode and
-encoding.encoding which is decided by Mercurial from current locale
-setting or HGENCODING.
+ [win32mbcs]
+ encoding = sjis
+
+It is useful for the users who want to commit with UTF-8 log message.
 '''
 
 import os, sys
 from mercurial.i18n import _
 from mercurial import util, encoding
 
+_encoding = None                                # see reposetup()
+
 def decode(arg):
     if isinstance(arg, str):
-        uarg = arg.decode(encoding.encoding)
-        if arg == uarg.encode(encoding.encoding):
+        uarg = arg.decode(_encoding)
+        if arg == uarg.encode(_encoding):
             return uarg
         raise UnicodeError("Not local encoding")
     elif isinstance(arg, tuple):
@@ -62,7 +67,7 @@
 
 def encode(arg):
     if isinstance(arg, unicode):
-        return arg.encode(encoding.encoding)
+        return arg.encode(_encoding)
     elif isinstance(arg, tuple):
         return tuple(map(encode, arg))
     elif isinstance(arg, list):
@@ -93,7 +98,7 @@
         return encode(func(*decode(args), **decode(kwds)))
     except UnicodeError:
         raise util.Abort(_("[win32mbcs] filename conversion failed with"
-                         " %s encoding\n") % (encoding.encoding))
+                         " %s encoding\n") % (_encoding))
 
 def wrapperforlistdir(func, args, kwds):
     # Ensure 'path' argument ends with os.sep to avoids
@@ -136,12 +141,14 @@
     if not os.path.supports_unicode_filenames:
         ui.warn(_("[win32mbcs] cannot activate on this platform.\n"))
         return
-
+    # determine encoding for filename
+    global _encoding
+    _encoding = ui.config('win32mbcs', 'encoding', encoding.encoding)
     # fake is only for relevant environment.
-    if encoding.encoding.lower() in problematic_encodings.split():
+    if _encoding.lower() in problematic_encodings.split():
         for f in funcs.split():
             wrapname(f, wrapper)
         wrapname("mercurial.osutil.listdir", wrapperforlistdir)
         ui.debug("[win32mbcs] activated with encoding: %s\n"
-                 % encoding.encoding)
+                 % _encoding)
 
--- a/hgext/zeroconf/Zeroconf.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/zeroconf/Zeroconf.py	Sat Feb 13 23:50:38 2010 -0600
@@ -560,7 +560,7 @@
 				#
 				#print "UNKNOWN TYPE = " + str(info[0])
 				#raise BadTypeInNameException
-				pass
+				self.offset += info[3]
 
 			if rec is not None:
 				self.answers.append(rec)
@@ -575,8 +575,7 @@
 
 	def readUTF(self, offset, len):
 		"""Reads a UTF-8 string of a given length from the packet"""
-		result = self.data[offset:offset+len].decode('utf-8')
-		return result
+		return self.data[offset:offset+len].decode('utf-8')
 
 	def readName(self):
 		"""Reads a domain name from the packet"""
@@ -1060,16 +1059,16 @@
 			for key in properties:
 				value = properties[key]
 				if value is None:
-					suffix = ''.encode('utf-8')
+					suffix = ''
 				elif isinstance(value, str):
-					suffix = value.encode('utf-8')
+					suffix = value
 				elif isinstance(value, int):
 					if value:
 						suffix = 'true'
 					else:
 						suffix = 'false'
 				else:
-					suffix = ''.encode('utf-8')
+					suffix = ''
 				list.append('='.join((key, suffix)))
 			for item in list:
 				result = ''.join((result, struct.pack('!c', chr(len(item))), item))
@@ -1571,3 +1570,5 @@
 	r.unregisterService(info)
 	print "   Unregister done."
 	r.close()
+
+# no-check-code
--- a/hgext/zeroconf/__init__.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgext/zeroconf/__init__.py	Sat Feb 13 23:50:38 2010 -0600
@@ -24,7 +24,7 @@
 '''
 
 import Zeroconf, socket, time, os
-from mercurial import ui
+from mercurial import ui, hg, encoding
 from mercurial import extensions
 from mercurial.hgweb import hgweb_mod
 from mercurial.hgweb import hgwebdir_mod
@@ -156,7 +156,14 @@
         repos += getzcpaths()
     return repos
 
+def defaultdest(orig, source):
+    for name, path in getzcpaths():
+        if path == source:
+            return name.encode(encoding.encoding)
+    return orig(source)
+
 extensions.wrapfunction(ui.ui, 'config', config)
 extensions.wrapfunction(ui.ui, 'configitems', configitems)
+extensions.wrapfunction(hg, 'defaultdest', defaultdest)
 hgweb_mod.hgweb = hgwebzc
 hgwebdir_mod.hgwebdir = hgwebdirzc
--- a/hgwebdir.cgi	Thu Feb 11 23:15:42 2010 +0200
+++ b/hgwebdir.cgi	Sat Feb 13 23:50:38 2010 -0600
@@ -37,7 +37,7 @@
 # [collections]
 # /prefix/to/strip/off = /root/of/tree/full/of/repos
 #
-# paths example: 
+# paths example:
 #
 # * First two lines mount one repository into one virtual path, like
 # '/real/path1' into 'virtual/path1'.
--- a/i18n/da.po	Thu Feb 11 23:15:42 2010 +0200
+++ b/i18n/da.po	Sat Feb 13 23:50:38 2010 -0600
@@ -17,8 +17,8 @@
 msgstr ""
 "Project-Id-Version: Mercurial\n"
 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
-"POT-Creation-Date: 2009-12-30 00:34+0100\n"
-"PO-Revision-Date: 2009-12-30 03:25+0100\n"
+"POT-Creation-Date: 2009-12-30 03:33+0100\n"
+"PO-Revision-Date: 2009-12-30 03:38+0100\n"
 "Last-Translator:  <mg@lazybytes.net>\n"
 "Language-Team: Danish\n"
 "MIME-Version: 1.0\n"
@@ -52,627 +52,6 @@
 "\n"
 
 msgid ""
-"Mercurial reads configuration data from several files, if they exist.\n"
-"Below we list the most specific file first.\n"
-"\n"
-"On Windows, these configuration files are read:\n"
-"\n"
-"- ``<repo>\\.hg\\hgrc``\n"
-"- ``%USERPROFILE%\\.hgrc``\n"
-"- ``%USERPROFILE%\\Mercurial.ini``\n"
-"- ``%HOME%\\.hgrc``\n"
-"- ``%HOME%\\Mercurial.ini``\n"
-"- ``C:\\Mercurial\\Mercurial.ini``\n"
-"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
-"- ``<install-dir>\\Mercurial.ini``\n"
-"\n"
-"On Unix, these files are read:\n"
-"\n"
-"- ``<repo>/.hg/hgrc``\n"
-"- ``$HOME/.hgrc``\n"
-"- ``/etc/mercurial/hgrc``\n"
-"- ``/etc/mercurial/hgrc.d/*.rc``\n"
-"- ``<install-root>/etc/mercurial/hgrc``\n"
-"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
-"\n"
-"The configuration files for Mercurial use a simple ini-file format. A\n"
-"configuration file consists of sections, led by a ``[section]`` header\n"
-"and followed by ``name = value`` entries::\n"
-"\n"
-"  [ui]\n"
-"  username = Firstname Lastname <firstname.lastname@example.net>\n"
-"  verbose = True\n"
-"\n"
-"This above entries will be referred to as ``ui.username`` and\n"
-"``ui.verbose``, respectively. Please see the hgrc man page for a full\n"
-"description of the possible configuration values:\n"
-"\n"
-"- on Unix-like systems: ``man hgrc``\n"
-"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
-msgstr ""
-"Mercurial læser konfigurationsdata fra flere filer, hvis de\n"
-"eksisterer. Filerne er angivet nedenfor med den mest specifikke fil\n"
-"først.\n"
-"\n"
-"På Windows læses disse konfigurationsfiler:\n"
-"\n"
-"- ``<repo>\\.hg\\hgrc``\n"
-"- ``%USERPROFILE%\\.hgrc``\n"
-"- ``%USERPROFILE%\\Mercurial.ini``\n"
-"- ``%HOME%\\.hgrc``\n"
-"- ``%HOME%\\Mercurial.ini``\n"
-"- ``C:\\Mercurial\\Mercurial.ini``\n"
-"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
-"- ``<install-dir>\\Mercurial.ini``\n"
-"\n"
-"På Unix læses disse filer:\n"
-"\n"
-"- ``<repo>/.hg/hgrc``\n"
-"- ``$HOME/.hgrc``\n"
-"- ``/etc/mercurial/hgrc``\n"
-"- ``/etc/mercurial/hgrc.d/*.rc``\n"
-"- ``<install-root>/etc/mercurial/hgrc``\n"
-"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
-"\n"
-"Konfigurationsfilerne til Mercurial bruger et simpelt ini-filformat.\n"
-"En konfigurationsfil består af sektioner, som startes af et\n"
-"``[sektion]`` hovede og efterfølges af ``navn = værdi`` indgange::\n"
-"\n"
-"  [ui]\n"
-"  username = Fornavn Efternavn <fornavn.efternavn@example.net>\n"
-"  verbose = True\n"
-"\n"
-"Indgangene ovenfor vil blive refereret til som henholdsvis\n"
-"``ui.username`` og ``ui.verbose``. Se venligst hgrc manualsiden for en\n"
-"fuld beskrivelse af de mulige konfigurationsværdier:\n"
-"\n"
-"- på Unix-agtige systemer: ``man hgrc``\n"
-"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
-
-msgid ""
-"Some commands allow the user to specify a date, e.g.:\n"
-"\n"
-"- backout, commit, import, tag: Specify the commit date.\n"
-"- log, revert, update: Select revision(s) by date.\n"
-"\n"
-"Many date formats are valid. Here are some examples:\n"
-"\n"
-"- ``Wed Dec 6 13:18:29 2006`` (local timezone assumed)\n"
-"- ``Dec 6 13:18 -0600`` (year assumed, time offset provided)\n"
-"- ``Dec 6 13:18 UTC`` (UTC and GMT are aliases for +0000)\n"
-"- ``Dec 6`` (midnight)\n"
-"- ``13:18`` (today assumed)\n"
-"- ``3:39`` (3:39AM assumed)\n"
-"- ``3:39pm`` (15:39)\n"
-"- ``2006-12-06 13:18:29`` (ISO 8601 format)\n"
-"- ``2006-12-6 13:18``\n"
-"- ``2006-12-6``\n"
-"- ``12-6``\n"
-"- ``12/6``\n"
-"- ``12/6/6`` (Dec 6 2006)\n"
-"\n"
-"Lastly, there is Mercurial's internal format:\n"
-"\n"
-"- ``1165432709 0`` (Wed Dec 6 13:18:29 2006 UTC)\n"
-"\n"
-"This is the internal representation format for dates. unixtime is the\n"
-"number of seconds since the epoch (1970-01-01 00:00 UTC). offset is\n"
-"the offset of the local timezone, in seconds west of UTC (negative if\n"
-"the timezone is east of UTC).\n"
-"\n"
-"The log command also accepts date ranges:\n"
-"\n"
-"- ``<{datetime}`` - at or before a given date/time\n"
-"- ``>{datetime}`` - on or after a given date/time\n"
-"- ``{datetime} to {datetime}`` - a date range, inclusive\n"
-"- ``-{days}`` - within a given number of days of today\n"
-msgstr ""
-"Nogle kommandoer tillader brugeren at specificere en dato, f.eks.:\n"
-"\n"
-"- backout, commit, import, tag: specificer commit-datoen.\n"
-"- log, revert, update: vælg revisioner efter dato.\n"
-"\n"
-"Der er mange gyldige datoformater. Her er nogle eksempler:\n"
-"\n"
-"- ``Wed Dec 6 13:18:29 2006`` (antager lokal tidszone)\n"
-"- ``Dec 6 13:18 -0600`` (antager år, tidszone er angivet)\n"
-"- ``Dec 6 13:18 UTC`` (UTC og GMT er aliaser for +0000)\n"
-"- ``Dec 6`` (midnat)\n"
-"- ``13:18`` (antager dags dato)\n"
-"- ``3:39``\n"
-"- ``3:39pm`` (15:39)\n"
-"- ``2006-12-06 13:18:29`` (ISO 8601 format)\n"
-"- ``2006-12-6 13:18``\n"
-"- ``2006-12-6``\n"
-"- ``12-6``\n"
-"- ``12/6``\n"
-"- ``12/6/6`` (6. dec. 2006)\n"
-"\n"
-"Endelig er der Mercurials interne format:\n"
-"\n"
-"- ``1165432709 0`` (Ons 6. dec. 13:18:29 2006 UTC)\n"
-"\n"
-"Dette er den interne repræsentation af datoer. unixtime er\n"
-"antallet af sekunder siden begyndelsen af epoken (1970-01-01 00:00\n"
-"UTC). offset er den lokale tidszone, angivet i antal sekunder vest\n"
-"for UTC (negativ hvis tidszonen er øst for UTC).\n"
-"\n"
-"Kommandoen log accepterer også datointervaller:\n"
-"\n"
-"- ``<{date}`` - på eller før den angivne dato/tidspunkt\n"
-"- ``>{date}`` - på eller efter den angivne dato/tidspunkt\n"
-"- ``{date} to {date}`` - et datointerval, inklusiv endepunkterne\n"
-"- ``-{days}`` - indenfor et angivet antal dage, fra dags dato\n"
-
-msgid ""
-"Mercurial's default format for showing changes between two versions of\n"
-"a file is compatible with the unified format of GNU diff, which can be\n"
-"used by GNU patch and many other standard tools.\n"
-"\n"
-"While this standard format is often enough, it does not encode the\n"
-"following information:\n"
-"\n"
-"- executable status and other permission bits\n"
-"- copy or rename information\n"
-"- changes in binary files\n"
-"- creation or deletion of empty files\n"
-"\n"
-"Mercurial also supports the extended diff format from the git VCS\n"
-"which addresses these limitations. The git diff format is not produced\n"
-"by default because a few widespread tools still do not understand this\n"
-"format.\n"
-"\n"
-"This means that when generating diffs from a Mercurial repository\n"
-"(e.g. with \"hg export\"), you should be careful about things like file\n"
-"copies and renames or other things mentioned above, because when\n"
-"applying a standard diff to a different repository, this extra\n"
-"information is lost. Mercurial's internal operations (like push and\n"
-"pull) are not affected by this, because they use an internal binary\n"
-"format for communicating changes.\n"
-"\n"
-"To make Mercurial produce the git extended diff format, use the --git\n"
-"option available for many commands, or set 'git = True' in the [diff]\n"
-"section of your hgrc. You do not need to set this option when\n"
-"importing diffs in this format or using them in the mq extension.\n"
-msgstr ""
-
-msgid ""
-"HG\n"
-"    Path to the 'hg' executable, automatically passed when running\n"
-"    hooks, extensions or external tools. If unset or empty, this is\n"
-"    the hg executable's name if it's frozen, or an executable named\n"
-"    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on\n"
-"    Windows) is searched.\n"
-"\n"
-"HGEDITOR\n"
-"    This is the name of the editor to run when committing. See EDITOR.\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"HGENCODING\n"
-"    This overrides the default locale setting detected by Mercurial.\n"
-"    This setting is used to convert data including usernames,\n"
-"    changeset descriptions, tag names, and branches. This setting can\n"
-"    be overridden with the --encoding command-line option.\n"
-"\n"
-"HGENCODINGMODE\n"
-"    This sets Mercurial's behavior for handling unknown characters\n"
-"    while transcoding user input. The default is \"strict\", which\n"
-"    causes Mercurial to abort if it can't map a character. Other\n"
-"    settings include \"replace\", which replaces unknown characters, and\n"
-"    \"ignore\", which drops them. This setting can be overridden with\n"
-"    the --encodingmode command-line option.\n"
-"\n"
-"HGMERGE\n"
-"    An executable to use for resolving merge conflicts. The program\n"
-"    will be executed with three arguments: local file, remote file,\n"
-"    ancestor file.\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"HGRCPATH\n"
-"    A list of files or directories to search for hgrc files. Item\n"
-"    separator is \":\" on Unix, \";\" on Windows. If HGRCPATH is not set,\n"
-"    platform default search path is used. If empty, only the .hg/hgrc\n"
-"    from the current repository is read.\n"
-"\n"
-"    For each element in HGRCPATH:\n"
-"\n"
-"    - if it's a directory, all files ending with .rc are added\n"
-"    - otherwise, the file itself will be added\n"
-"\n"
-"HGUSER\n"
-"    This is the string used as the author of a commit. If not set,\n"
-"    available values will be considered in this order:\n"
-"\n"
-"    - HGUSER (deprecated)\n"
-"    - hgrc files from the HGRCPATH\n"
-"    - EMAIL\n"
-"    - interactive prompt\n"
-"    - LOGNAME (with ``@hostname`` appended)\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"EMAIL\n"
-"    May be used as the author of a commit; see HGUSER.\n"
-"\n"
-"LOGNAME\n"
-"    May be used as the author of a commit; see HGUSER.\n"
-"\n"
-"VISUAL\n"
-"    This is the name of the editor to use when committing. See EDITOR.\n"
-"\n"
-"EDITOR\n"
-"    Sometimes Mercurial needs to open a text file in an editor for a\n"
-"    user to modify, for example when writing commit messages. The\n"
-"    editor it uses is determined by looking at the environment\n"
-"    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
-"    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'.\n"
-"\n"
-"PYTHONPATH\n"
-"    This is used by Python to find imported modules and may need to be\n"
-"    set appropriately if this Mercurial is not installed system-wide.\n"
-msgstr ""
-
-msgid ""
-"Mercurial has the ability to add new features through the use of\n"
-"extensions. Extensions may add new commands, add options to\n"
-"existing commands, change the default behavior of commands, or\n"
-"implement hooks.\n"
-"\n"
-"Extensions are not loaded by default for a variety of reasons:\n"
-"they can increase startup overhead; they may be meant for advanced\n"
-"usage only; they may provide potentially dangerous abilities (such\n"
-"as letting you destroy or modify history); they might not be ready\n"
-"for prime time; or they may alter some usual behaviors of stock\n"
-"Mercurial. It is thus up to the user to activate extensions as\n"
-"needed.\n"
-"\n"
-"To enable the \"foo\" extension, either shipped with Mercurial or in\n"
-"the Python search path, create an entry for it in your hgrc, like\n"
-"this::\n"
-"\n"
-"  [extensions]\n"
-"  foo =\n"
-"\n"
-"You may also specify the full path to an extension::\n"
-"\n"
-"  [extensions]\n"
-"  myfeature = ~/.hgext/myfeature.py\n"
-"\n"
-"To explicitly disable an extension enabled in an hgrc of broader\n"
-"scope, prepend its path with !::\n"
-"\n"
-"  [extensions]\n"
-"  # disabling extension bar residing in /path/to/extension/bar.py\n"
-"  bar = !/path/to/extension/bar.py\n"
-"  # ditto, but no path was supplied for extension baz\n"
-"  baz = !\n"
-msgstr ""
-"Det er muligt at tilføje nye funktionalitet til Mercurial ved brug af\n"
-"udvidelser. Udvidelser kan tilføje nye kommandoer, tilføje tilvalg til\n"
-"eksisterende kommandoer ændre standardopførslen for kommandoer eller\n"
-"implementere \"hooks\".\n"
-"\n"
-"Udvidelser bliver ikke indlæst som standard af flere årsager: de øger\n"
-"opstartstiden, de kan potentielt komme med farlig funktionalitet\n"
-"(såsom at lade dig ødelægge eller ændre historien), de er måske ikke\n"
-"klart til prime time, eller de ændrer måske opførslen af en standard\n"
-"Mercurial. Det er derfor op til brugeren at aktivere udvidelser efter\n"
-"behov.\n"
-"\n"
-"For at aktivere \"foo\" udvidelsen, som enten er kommet sammen med\n"
-"Mercurial eller lagt i Pythons søgesti, lav da en indgang for den i\n"
-"din hgrc::\n"
-"\n"
-"  [extensions]\n"
-"  foo =\n"
-"\n"
-"Du kan også specificere den fulde sti til en udvidelse::\n"
-"\n"
-"  [extensions]\n"
-"  myfeature = ~/.hgext/myfeature.py\n"
-"\n"
-"For eksplicit at deaktivere en udvidelse som er slået til i en mere\n"
-"bredt dækkende hgrc-fil, så skal man sætte et ! foran dens sti::\n"
-"\n"
-"  [extensions]\n"
-"  # deaktiverer udvidelse bar placeretligger i /path/to/extension/bar.py\n"
-"  bar = !/path/to/extension/bar.py\n"
-"  # ditto, men der var ikke angivet nogen sti for bar udvidelsen\n"
-"  baz = !\n"
-
-msgid ""
-"When Mercurial accepts more than one revision, they may be specified\n"
-"individually, or provided as a topologically continuous range,\n"
-"separated by the \":\" character.\n"
-"\n"
-"The syntax of range notation is [BEGIN]:[END], where BEGIN and END are\n"
-"revision identifiers. Both BEGIN and END are optional. If BEGIN is not\n"
-"specified, it defaults to revision number 0. If END is not specified,\n"
-"it defaults to the tip. The range \":\" thus means \"all revisions\".\n"
-"\n"
-"If BEGIN is greater than END, revisions are treated in reverse order.\n"
-"\n"
-"A range acts as a closed interval. This means that a range of 3:5\n"
-"gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.\n"
-msgstr ""
-"Når Mercurial accepterer mere end en revision, så kan de angives\n"
-"individuelt eller angives som et topologisk sammenhængende interval,\n"
-"adskildt af et \":\" tegn.\n"
-"\n"
-"Syntaksen for intervalnotationen er [START]:[SLUT] hvor START og SLUT\n"
-"identificerer revisioner. Både START og SLUT er valgfri. Hvis START\n"
-"ikke angivet, så bruges revision nummer 0 som standard. Hvis SLUT ikke\n"
-"angives, så bruges tip som standard. Intervallet \":\" betyder således\n"
-"\"alle revisioner\".\n"
-"\n"
-"Hvis START er større end SLUT, så behandles revisionerne i omvendt\n"
-"rækkefølge.\n"
-"\n"
-"Intervaller er lukkede. Det betyder at et interval 3:5 giver 3, 4 og\n"
-"5. Ligeledes giver intervallet 9:6 revisionerne 9, 8, 7, 6.\n"
-
-msgid ""
-"Mercurial accepts several notations for identifying one or more files\n"
-"at a time.\n"
-"\n"
-"By default, Mercurial treats filenames as shell-style extended glob\n"
-"patterns.\n"
-"\n"
-"Alternate pattern notations must be specified explicitly.\n"
-"\n"
-"To use a plain path name without any pattern matching, start it with\n"
-"``path:``. These path names must completely match starting at the\n"
-"current repository root.\n"
-"\n"
-"To use an extended glob, start a name with ``glob:``. Globs are rooted\n"
-"at the current directory; a glob such as ``*.c`` will only match files\n"
-"in the current directory ending with ``.c``.\n"
-"\n"
-"The supported glob syntax extensions are ``**`` to match any string\n"
-"across path separators and ``{a,b}`` to mean \"a or b\".\n"
-"\n"
-"To use a Perl/Python regular expression, start a name with ``re:``.\n"
-"Regexp pattern matching is anchored at the root of the repository.\n"
-"\n"
-"Plain examples::\n"
-"\n"
-"  path:foo/bar   a name bar in a directory named foo in the root\n"
-"                 of the repository\n"
-"  path:path:name a file or directory named \"path:name\"\n"
-"\n"
-"Glob examples::\n"
-"\n"
-"  glob:*.c       any name ending in \".c\" in the current directory\n"
-"  *.c            any name ending in \".c\" in the current directory\n"
-"  **.c           any name ending in \".c\" in any subdirectory of the\n"
-"                 current directory including itself.\n"
-"  foo/*.c        any name ending in \".c\" in the directory foo\n"
-"  foo/**.c       any name ending in \".c\" in any subdirectory of foo\n"
-"                 including itself.\n"
-"\n"
-"Regexp examples::\n"
-"\n"
-"  re:.*\\.c$      any name ending in \".c\", anywhere in the repository\n"
-msgstr ""
-
-msgid ""
-"Mercurial supports several ways to specify individual revisions.\n"
-"\n"
-"A plain integer is treated as a revision number. Negative integers are\n"
-"treated as sequential offsets from the tip, with -1 denoting the tip,\n"
-"-2 denoting the revision prior to the tip, and so forth.\n"
-"\n"
-"A 40-digit hexadecimal string is treated as a unique revision\n"
-"identifier.\n"
-"\n"
-"A hexadecimal string less than 40 characters long is treated as a\n"
-"unique revision identifier and is referred to as a short-form\n"
-"identifier. A short-form identifier is only valid if it is the prefix\n"
-"of exactly one full-length identifier.\n"
-"\n"
-"Any other string is treated as a tag or branch name. A tag name is a\n"
-"symbolic name associated with a revision identifier. A branch name\n"
-"denotes the tipmost revision of that branch. Tag and branch names must\n"
-"not contain the \":\" character.\n"
-"\n"
-"The reserved name \"tip\" is a special tag that always identifies the\n"
-"most recent revision.\n"
-"\n"
-"The reserved name \"null\" indicates the null revision. This is the\n"
-"revision of an empty repository, and the parent of revision 0.\n"
-"\n"
-"The reserved name \".\" indicates the working directory parent. If no\n"
-"working directory is checked out, it is equivalent to null. If an\n"
-"uncommitted merge is in progress, \".\" is the revision of the first\n"
-"parent.\n"
-msgstr ""
-
-msgid ""
-"Mercurial allows you to customize output of commands through\n"
-"templates. You can either pass in a template from the command\n"
-"line, via the --template option, or select an existing\n"
-"template-style (--style).\n"
-"\n"
-"You can customize output for any \"log-like\" command: log,\n"
-"outgoing, incoming, tip, parents, heads and glog.\n"
-"\n"
-"Three styles are packaged with Mercurial: default (the style used\n"
-"when no explicit preference is passed), compact and changelog.\n"
-"Usage::\n"
-"\n"
-"    $ hg log -r1 --style changelog\n"
-"\n"
-"A template is a piece of text, with markup to invoke variable\n"
-"expansion::\n"
-"\n"
-"    $ hg log -r1 --template \"{node}\\n\"\n"
-"    b56ce7b07c52de7d5fd79fb89701ea538af65746\n"
-"\n"
-"Strings in curly braces are called keywords. The availability of\n"
-"keywords depends on the exact context of the templater. These\n"
-"keywords are usually available for templating a log-like command:\n"
-"\n"
-":author:    String. The unmodified author of the changeset.\n"
-":branches:  String. The name of the branch on which the changeset\n"
-"            was committed. Will be empty if the branch name was\n"
-"            default.\n"
-":date:      Date information. The date when the changeset was\n"
-"            committed.\n"
-":desc:      String. The text of the changeset description.\n"
-":diffstat:  String. Statistics of changes with the following\n"
-"            format: \"modified files: +added/-removed lines\"\n"
-":files:     List of strings. All files modified, added, or removed\n"
-"            by this changeset.\n"
-":file_adds: List of strings. Files added by this changeset.\n"
-":file_mods: List of strings. Files modified by this changeset.\n"
-":file_dels: List of strings. Files removed by this changeset.\n"
-":node:      String. The changeset identification hash, as a\n"
-"            40-character hexadecimal string.\n"
-":parents:   List of strings. The parents of the changeset.\n"
-":rev:       Integer. The repository-local changeset revision\n"
-"            number.\n"
-":tags:      List of strings. Any tags associated with the\n"
-"            changeset.\n"
-":latesttag: String. Most recent global tag in the ancestors of this\n"
-"            changeset.\n"
-":latesttagdistance: Integer. Longest path to the latest tag.\n"
-"\n"
-"The \"date\" keyword does not produce human-readable output. If you\n"
-"want to use a date in your output, you can use a filter to process\n"
-"it. Filters are functions which return a string based on the input\n"
-"variable. You can also use a chain of filters to get the desired\n"
-"output::\n"
-"\n"
-"   $ hg tip --template \"{date|isodate}\\n\"\n"
-"   2008-08-21 18:22 +0000\n"
-"\n"
-"List of filters:\n"
-"\n"
-":addbreaks:   Any text. Add an XHTML \"<br />\" tag before the end of\n"
-"              every line except the last.\n"
-":age:         Date. Returns a human-readable date/time difference\n"
-"              between the given date/time and the current\n"
-"              date/time.\n"
-":basename:    Any text. Treats the text as a path, and returns the\n"
-"              last component of the path after splitting by the\n"
-"              path separator (ignoring trailing separators). For\n"
-"              example, \"foo/bar/baz\" becomes \"baz\" and \"foo/bar//\"\n"
-"              becomes \"bar\".\n"
-":stripdir:    Treat the text as path and strip a directory level,\n"
-"              if possible. For example, \"foo\" and \"foo/bar\" becomes\n"
-"              \"foo\".\n"
-":date:        Date. Returns a date in a Unix date format, including\n"
-"              the timezone: \"Mon Sep 04 15:13:13 2006 0700\".\n"
-":domain:      Any text. Finds the first string that looks like an\n"
-"              email address, and extracts just the domain\n"
-"              component. Example: ``User <user@example.com>`` becomes\n"
-"              ``example.com``.\n"
-":email:       Any text. Extracts the first string that looks like\n"
-"              an email address. Example: ``User <user@example.com>``\n"
-"              becomes ``user@example.com``.\n"
-":escape:      Any text. Replaces the special XML/XHTML characters\n"
-"              \"&\", \"<\" and \">\" with XML entities.\n"
-":fill68:      Any text. Wraps the text to fit in 68 columns.\n"
-":fill76:      Any text. Wraps the text to fit in 76 columns.\n"
-":firstline:   Any text. Returns the first line of text.\n"
-":nonempty:    Any text. Returns '(none)' if the string is empty.\n"
-":hgdate:      Date. Returns the date as a pair of numbers:\n"
-"              \"1157407993 25200\" (Unix timestamp, timezone offset).\n"
-":isodate:     Date. Returns the date in ISO 8601 format:\n"
-"              \"2009-08-18 13:00 +0200\".\n"
-":isodatesec:  Date. Returns the date in ISO 8601 format, including\n"
-"              seconds: \"2009-08-18 13:00:13 +0200\". See also the\n"
-"              rfc3339date filter.\n"
-":localdate:   Date. Converts a date to local date.\n"
-":obfuscate:   Any text. Returns the input text rendered as a\n"
-"              sequence of XML entities.\n"
-":person:      Any text. Returns the text before an email address.\n"
-":rfc822date:  Date. Returns a date using the same format used in\n"
-"              email headers: \"Tue, 18 Aug 2009 13:00:13 +0200\".\n"
-":rfc3339date: Date. Returns a date using the Internet date format\n"
-"              specified in RFC 3339: \"2009-08-18T13:00:13+02:00\".\n"
-":short:       Changeset hash. Returns the short form of a changeset\n"
-"              hash, i.e. a 12-byte hexadecimal string.\n"
-":shortdate:   Date. Returns a date like \"2006-09-18\".\n"
-":strip:       Any text. Strips all leading and trailing whitespace.\n"
-":tabindent:   Any text. Returns the text, with every line except\n"
-"              the first starting with a tab character.\n"
-":urlescape:   Any text. Escapes all \"special\" characters. For\n"
-"              example, \"foo bar\" becomes \"foo%20bar\".\n"
-":user:        Any text. Returns the user portion of an email\n"
-"              address.\n"
-msgstr ""
-
-msgid ""
-"Valid URLs are of the form::\n"
-"\n"
-"  local/filesystem/path[#revision]\n"
-"  file://local/filesystem/path[#revision]\n"
-"  http://[user[:pass]@]host[:port]/[path][#revision]\n"
-"  https://[user[:pass]@]host[:port]/[path][#revision]\n"
-"  ssh://[user[:pass]@]host[:port]/[path][#revision]\n"
-"\n"
-"Paths in the local filesystem can either point to Mercurial\n"
-"repositories or to bundle files (as created by 'hg bundle' or 'hg\n"
-"incoming --bundle').\n"
-"\n"
-"An optional identifier after # indicates a particular branch, tag, or\n"
-"changeset to use from the remote repository. See also 'hg help\n"
-"revisions'.\n"
-"\n"
-"Some features, such as pushing to http:// and https:// URLs are only\n"
-"possible if the feature is explicitly enabled on the remote Mercurial\n"
-"server.\n"
-"\n"
-"Some notes about using SSH with Mercurial:\n"
-"\n"
-"- SSH requires an accessible shell account on the destination machine\n"
-"  and a copy of hg in the remote path or specified with as remotecmd.\n"
-"- path is relative to the remote user's home directory by default. Use\n"
-"  an extra slash at the start of a path to specify an absolute path::\n"
-"\n"
-"    ssh://example.com//tmp/repository\n"
-"\n"
-"- Mercurial doesn't use its own compression via SSH; the right thing\n"
-"  to do is to configure it in your ~/.ssh/config, e.g.::\n"
-"\n"
-"    Host *.mylocalnetwork.example.com\n"
-"      Compression no\n"
-"    Host *\n"
-"      Compression yes\n"
-"\n"
-"  Alternatively specify \"ssh -C\" as your ssh command in your hgrc or\n"
-"  with the --ssh command line option.\n"
-"\n"
-"These URLs can all be stored in your hgrc with path aliases under the\n"
-"[paths] section like so::\n"
-"\n"
-"  [paths]\n"
-"  alias1 = URL1\n"
-"  alias2 = URL2\n"
-"  ...\n"
-"\n"
-"You can then use the alias for any command that uses a URL (for\n"
-"example 'hg pull alias1' will be treated as 'hg pull URL1').\n"
-"\n"
-"Two path aliases are special because they are used as defaults when\n"
-"you do not provide the URL to a command:\n"
-"\n"
-"default:\n"
-"  When you create a repository with hg clone, the clone command saves\n"
-"  the location of the source repository as the new repository's\n"
-"  'default' path. This is then used when you omit path from push- and\n"
-"  pull-like commands (including incoming and outgoing).\n"
-"\n"
-"default-push:\n"
-"  The push command will look for a path named 'default-push', and\n"
-"  prefer it over 'default' if both are defined.\n"
-msgstr ""
-
-msgid ""
 "hooks for controlling repository access\n"
 "\n"
 "This hook makes it possible to allow or deny write access to portions\n"
@@ -1189,6 +568,8 @@
 "  diff.inserted = green\n"
 "  diff.changed = white\n"
 "  diff.trailingwhitespace = bold red_background\n"
+"\n"
+"  bookmarks.current = green\n"
 msgstr ""
 "farvelæg output for nogle kommandoer\n"
 "\n"
@@ -1232,6 +613,8 @@
 "  diff.inserted = green\n"
 "  diff.changed = white\n"
 "  diff.trailingwhitespace = bold red_background\n"
+"\n"
+"  bookmarks.current = green\n"
 
 msgid "when to colorize (always, auto, or never)"
 msgstr "hvornår der skal farvelægges (altid, automatisk eller aldrig)"
@@ -1396,6 +779,15 @@
 "        matched. If a match occurs, then the conversion process will\n"
 "        add the most recent revision on the branch indicated in the\n"
 "        regex as the second parent of the changeset.\n"
+"    --config hook.cvslog\n"
+"        Specify a Python function to be called at the end of gathering\n"
+"        the CVS log. The function is passed a list with the log entries,\n"
+"        and can modify the entries in-place, or add or delete them.\n"
+"    --config hook.cvschangesets\n"
+"        Specify a Python function to be called after the changesets\n"
+"        are calculated from the the CVS log. The function is passed\n"
+"        a list with the changeset entries, and can modify the changesets\n"
+"        in-place, or add or delete them.\n"
 "\n"
 "    An additional \"debugcvsps\" Mercurial command allows the builtin\n"
 "    changeset merging code to be run without doing a conversion. Its\n"
@@ -1575,10 +967,18 @@
 msgstr "kunne ikke åbne afbildningsfil %r: %s"
 
 #, python-format
+msgid "%s: invalid source repository type"
+msgstr "%s: ugyldig kildedepotstype"
+
+#, python-format
 msgid "%s: missing or unsupported repository"
 msgstr "%s: manglende eller usupporteret depot"
 
 #, python-format
+msgid "%s: invalid destination repository type"
+msgstr "%s: ugyldig destinationsdepottype"
+
+#, python-format
 msgid "convert: %s\n"
 msgstr "convert: %s\n"
 
@@ -1986,15 +1386,14 @@
 msgid ""
 "use %(path)s to diff repository (or selected files)\n"
 "\n"
-"    Show differences between revisions for the specified files, using the\n"
-"    %(path)s program.\n"
-"\n"
-"    When two revision arguments are given, then changes are shown between\n"
-"    those revisions. If only one revision is specified then that revision "
-"is\n"
-"    compared to the working directory, and, when no revisions are "
-"specified,\n"
-"    the working directory files are compared to its parent."
+"    Show differences between revisions for the specified files, using\n"
+"    the %(path)s program.\n"
+"\n"
+"    When two revision arguments are given, then changes are shown\n"
+"    between those revisions. If only one revision is specified then\n"
+"    that revision is compared to the working directory, and, when no\n"
+"    revisions are specified, the working directory files are compared\n"
+"    to its parent."
 msgstr ""
 
 #, python-format
@@ -2526,21 +1925,6 @@
 msgstr "overvåger kataloger under %r\n"
 
 #, python-format
-msgid "status: %r %s -> %s\n"
-msgstr "status: %r %s -> %s\n"
-
-#, python-format
-msgid "%s dirstate reload\n"
-msgstr "%s genindlæsning af dirstate\n"
-
-#, python-format
-msgid "%s end dirstate reload\n"
-msgstr "%s genindlæsning af dirstate afsluttet\n"
-
-msgid "rescanning due to .hgignore change\n"
-msgstr "genskanner på grund af ændring af .hgignore\n"
-
-#, python-format
 msgid "%s event: created %s\n"
 msgstr "%s hændelse: oprettede %s\n"
 
@@ -2572,6 +1956,16 @@
 msgid "%s hooking back up with %d bytes readable\n"
 msgstr ""
 
+msgid "finished setup\n"
+msgstr "afsluttede opsætning\n"
+
+#, python-format
+msgid "status: %r %s -> %s\n"
+msgstr "status: %r %s -> %s\n"
+
+msgid "rescanning due to .hgignore change\n"
+msgstr "genskanner på grund af ændring af .hgignore\n"
+
 msgid "cannot start: socket is already bound"
 msgstr ""
 
@@ -2592,9 +1986,6 @@
 msgid "unrecognized query type: %s\n"
 msgstr "genkendte ikke forespørgselstype: %s\n"
 
-msgid "finished setup\n"
-msgstr "afsluttede opsætning\n"
-
 msgid ""
 "expand expressions into changelog and summaries\n"
 "\n"
@@ -3718,7 +3109,9 @@
 
 #, python-format
 msgid "number of unguarded, unapplied patches has changed from %d to %d\n"
-msgstr "antallet af ufiltrerede og ikke-anvendte rettelser har ændret sig fra %d til %d\n"
+msgstr ""
+"antallet af ufiltrerede og ikke-anvendte rettelser har ændret sig fra %d til "
+"%d\n"
 
 #, python-format
 msgid "number of guarded, applied patches has changed from %d to %d\n"
@@ -4755,32 +4148,27 @@
 msgid ""
 "recreate hardlinks between two repositories\n"
 "\n"
-"    When repositories are cloned locally, their data files will be "
-"hardlinked\n"
-"    so that they only use the space of a single repository.\n"
-"\n"
-"    Unfortunately, subsequent pulls into either repository will break "
-"hardlinks\n"
-"    for any files touched by the new changesets, even if both repositories "
-"end\n"
-"    up pulling the same changes.\n"
-"\n"
-"    Similarly, passing --rev to \"hg clone\" will fail to use\n"
-"    any hardlinks, falling back to a complete copy of the source "
-"repository.\n"
-"\n"
-"    This command lets you recreate those hardlinks and reclaim that wasted\n"
-"    space.\n"
-"\n"
-"    This repository will be relinked to share space with ORIGIN, which must "
-"be\n"
-"    on the same local disk. If ORIGIN is omitted, looks for \"default-relink"
-"\",\n"
-"    then \"default\", in [paths].\n"
-"\n"
-"    Do not attempt any read operations on this repository while the command "
-"is\n"
-"    running. (Both repositories will be locked against writes.)\n"
+"    When repositories are cloned locally, their data files will be\n"
+"    hardlinked so that they only use the space of a single repository.\n"
+"\n"
+"    Unfortunately, subsequent pulls into either repository will break\n"
+"    hardlinks for any files touched by the new changesets, even if\n"
+"    both repositories end up pulling the same changes.\n"
+"\n"
+"    Similarly, passing --rev to \"hg clone\" will fail to use any\n"
+"    hardlinks, falling back to a complete copy of the source\n"
+"    repository.\n"
+"\n"
+"    This command lets you recreate those hardlinks and reclaim that\n"
+"    wasted space.\n"
+"\n"
+"    This repository will be relinked to share space with ORIGIN, which\n"
+"    must be on the same local disk. If ORIGIN is omitted, looks for\n"
+"    \"default-relink\", then \"default\", in [paths].\n"
+"\n"
+"    Do not attempt any read operations on this repository while the\n"
+"    command is running. (Both repositories will be locked against\n"
+"    writes.)\n"
 "    "
 msgstr ""
 
@@ -5044,12 +4432,15 @@
 "Note that there are some limitations on using this extension:\n"
 "\n"
 "- You should use single encoding in one repository.\n"
-"- You should set same encoding for the repository by locale or\n"
-"  HGENCODING.\n"
-"\n"
-"Path encoding conversion are done between Unicode and\n"
-"encoding.encoding which is decided by Mercurial from current locale\n"
-"setting or HGENCODING.\n"
+"\n"
+"\n"
+"By default, win32mbcs uses encoding.encoding decided by Mercurial.\n"
+"You can specify the encoding by config option::\n"
+"\n"
+" [win32mbcs]\n"
+" encoding = sjis\n"
+"\n"
+"It is useful for the users who want to commit with UTF-8 log message.\n"
 msgstr ""
 
 #, python-format
@@ -7167,7 +6558,8 @@
 "\n"
 "    If one revision is given, it is used as the base revision.\n"
 "    If two revisions are given, the differences between them are\n"
-"    shown.\n"
+"    shown. The --change option can also be used as a shortcut to list\n"
+"    the changed files of a revision from its first parent.\n"
 "\n"
 "    The codes used to show the status of files are::\n"
 "\n"
@@ -7202,6 +6594,8 @@
 "\n"
 "    Hvis der angivet en revision bruges denne som en basisrevision.\n"
 "    Hvis der angives to revisioner, da vises forskellene mellem dem.\n"
+"    Brug --change tilvalget som en genvej til at vise ændrede filer\n"
+"    mellem en revision og dens første forælder.\n"
 "\n"
 "    Koderne som bruges til at vise status for filerne er::\n"
 "\n"
@@ -7828,6 +7222,9 @@
 msgid "diff against the second parent"
 msgstr "find forskelle i forhold til den anden forældre"
 
+msgid "revisions to export"
+msgstr "revision der skal eksporteres"
+
 msgid "[OPTION]... [-o OUTFILESPEC] REV..."
 msgstr "[TILVALG]... [-o UDFILSPECIFIKATION] REV..."
 
@@ -8130,6 +7527,9 @@
 msgid "show difference from revision"
 msgstr "vis forskelle fra revision"
 
+msgid "list the changed files of a revision"
+msgstr "vis de ændrede filer i en revision"
+
 msgid "replace existing tag"
 msgstr "erstat eksisterende mærkat"
 
@@ -8324,6 +7724,16 @@
 msgstr "ingen definition for alias '%s'\n"
 
 #, python-format
+msgid ""
+"alias for: hg %s\n"
+"\n"
+"%s"
+msgstr ""
+"alias for: hg %s\n"
+"\n"
+"%s"
+
+#, python-format
 msgid "alias '%s' resolves to unknown command '%s'\n"
 msgstr "alias '%s' oversætter til ukendt kommando '%s'\n"
 
@@ -8475,6 +7885,663 @@
 msgid "Using additional features"
 msgstr "Brug af yderligere funktioner"
 
+msgid ""
+"Mercurial reads configuration data from several files, if they exist.\n"
+"Below we list the most specific file first.\n"
+"\n"
+"On Windows, these configuration files are read:\n"
+"\n"
+"- ``<repo>\\.hg\\hgrc``\n"
+"- ``%USERPROFILE%\\.hgrc``\n"
+"- ``%USERPROFILE%\\Mercurial.ini``\n"
+"- ``%HOME%\\.hgrc``\n"
+"- ``%HOME%\\Mercurial.ini``\n"
+"- ``C:\\Mercurial\\Mercurial.ini``\n"
+"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
+"- ``<install-dir>\\Mercurial.ini``\n"
+"\n"
+"On Unix, these files are read:\n"
+"\n"
+"- ``<repo>/.hg/hgrc``\n"
+"- ``$HOME/.hgrc``\n"
+"- ``/etc/mercurial/hgrc``\n"
+"- ``/etc/mercurial/hgrc.d/*.rc``\n"
+"- ``<install-root>/etc/mercurial/hgrc``\n"
+"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
+"\n"
+"The configuration files for Mercurial use a simple ini-file format. A\n"
+"configuration file consists of sections, led by a ``[section]`` header\n"
+"and followed by ``name = value`` entries::\n"
+"\n"
+"  [ui]\n"
+"  username = Firstname Lastname <firstname.lastname@example.net>\n"
+"  verbose = True\n"
+"\n"
+"This above entries will be referred to as ``ui.username`` and\n"
+"``ui.verbose``, respectively. Please see the hgrc man page for a full\n"
+"description of the possible configuration values:\n"
+"\n"
+"- on Unix-like systems: ``man hgrc``\n"
+"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
+msgstr ""
+"Mercurial læser konfigurationsdata fra flere filer, hvis de\n"
+"eksisterer. Filerne er angivet nedenfor med den mest specifikke fil\n"
+"først.\n"
+"\n"
+"På Windows læses disse konfigurationsfiler:\n"
+"\n"
+"- ``<repo>\\.hg\\hgrc``\n"
+"- ``%USERPROFILE%\\.hgrc``\n"
+"- ``%USERPROFILE%\\Mercurial.ini``\n"
+"- ``%HOME%\\.hgrc``\n"
+"- ``%HOME%\\Mercurial.ini``\n"
+"- ``C:\\Mercurial\\Mercurial.ini``\n"
+"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
+"- ``<install-dir>\\Mercurial.ini``\n"
+"\n"
+"På Unix læses disse filer:\n"
+"\n"
+"- ``<repo>/.hg/hgrc``\n"
+"- ``$HOME/.hgrc``\n"
+"- ``/etc/mercurial/hgrc``\n"
+"- ``/etc/mercurial/hgrc.d/*.rc``\n"
+"- ``<install-root>/etc/mercurial/hgrc``\n"
+"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
+"\n"
+"Konfigurationsfilerne til Mercurial bruger et simpelt ini-filformat.\n"
+"En konfigurationsfil består af sektioner, som startes af et\n"
+"``[sektion]`` hovede og efterfølges af ``navn = værdi`` indgange::\n"
+"\n"
+"  [ui]\n"
+"  username = Fornavn Efternavn <fornavn.efternavn@example.net>\n"
+"  verbose = True\n"
+"\n"
+"Indgangene ovenfor vil blive refereret til som henholdsvis\n"
+"``ui.username`` og ``ui.verbose``. Se venligst hgrc manualsiden for en\n"
+"fuld beskrivelse af de mulige konfigurationsværdier:\n"
+"\n"
+"- på Unix-agtige systemer: ``man hgrc``\n"
+"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
+
+msgid ""
+"Some commands allow the user to specify a date, e.g.:\n"
+"\n"
+"- backout, commit, import, tag: Specify the commit date.\n"
+"- log, revert, update: Select revision(s) by date.\n"
+"\n"
+"Many date formats are valid. Here are some examples:\n"
+"\n"
+"- ``Wed Dec 6 13:18:29 2006`` (local timezone assumed)\n"
+"- ``Dec 6 13:18 -0600`` (year assumed, time offset provided)\n"
+"- ``Dec 6 13:18 UTC`` (UTC and GMT are aliases for +0000)\n"
+"- ``Dec 6`` (midnight)\n"
+"- ``13:18`` (today assumed)\n"
+"- ``3:39`` (3:39AM assumed)\n"
+"- ``3:39pm`` (15:39)\n"
+"- ``2006-12-06 13:18:29`` (ISO 8601 format)\n"
+"- ``2006-12-6 13:18``\n"
+"- ``2006-12-6``\n"
+"- ``12-6``\n"
+"- ``12/6``\n"
+"- ``12/6/6`` (Dec 6 2006)\n"
+"\n"
+"Lastly, there is Mercurial's internal format:\n"
+"\n"
+"- ``1165432709 0`` (Wed Dec 6 13:18:29 2006 UTC)\n"
+"\n"
+"This is the internal representation format for dates. unixtime is the\n"
+"number of seconds since the epoch (1970-01-01 00:00 UTC). offset is\n"
+"the offset of the local timezone, in seconds west of UTC (negative if\n"
+"the timezone is east of UTC).\n"
+"\n"
+"The log command also accepts date ranges:\n"
+"\n"
+"- ``<{datetime}`` - at or before a given date/time\n"
+"- ``>{datetime}`` - on or after a given date/time\n"
+"- ``{datetime} to {datetime}`` - a date range, inclusive\n"
+"- ``-{days}`` - within a given number of days of today\n"
+msgstr ""
+"Nogle kommandoer tillader brugeren at specificere en dato, f.eks.:\n"
+"\n"
+"- backout, commit, import, tag: specificer commit-datoen.\n"
+"- log, revert, update: vælg revisioner efter dato.\n"
+"\n"
+"Der er mange gyldige datoformater. Her er nogle eksempler:\n"
+"\n"
+"- ``Wed Dec 6 13:18:29 2006`` (antager lokal tidszone)\n"
+"- ``Dec 6 13:18 -0600`` (antager år, tidszone er angivet)\n"
+"- ``Dec 6 13:18 UTC`` (UTC og GMT er aliaser for +0000)\n"
+"- ``Dec 6`` (midnat)\n"
+"- ``13:18`` (antager dags dato)\n"
+"- ``3:39``\n"
+"- ``3:39pm`` (15:39)\n"
+"- ``2006-12-06 13:18:29`` (ISO 8601 format)\n"
+"- ``2006-12-6 13:18``\n"
+"- ``2006-12-6``\n"
+"- ``12-6``\n"
+"- ``12/6``\n"
+"- ``12/6/6`` (6. dec. 2006)\n"
+"\n"
+"Endelig er der Mercurials interne format:\n"
+"\n"
+"- ``1165432709 0`` (Ons 6. dec. 13:18:29 2006 UTC)\n"
+"\n"
+"Dette er den interne repræsentation af datoer. unixtime er\n"
+"antallet af sekunder siden begyndelsen af epoken (1970-01-01 00:00\n"
+"UTC). offset er den lokale tidszone, angivet i antal sekunder vest\n"
+"for UTC (negativ hvis tidszonen er øst for UTC).\n"
+"\n"
+"Kommandoen log accepterer også datointervaller:\n"
+"\n"
+"- ``<{date}`` - på eller før den angivne dato/tidspunkt\n"
+"- ``>{date}`` - på eller efter den angivne dato/tidspunkt\n"
+"- ``{date} to {date}`` - et datointerval, inklusiv endepunkterne\n"
+"- ``-{days}`` - indenfor et angivet antal dage, fra dags dato\n"
+
+msgid ""
+"Mercurial's default format for showing changes between two versions of\n"
+"a file is compatible with the unified format of GNU diff, which can be\n"
+"used by GNU patch and many other standard tools.\n"
+"\n"
+"While this standard format is often enough, it does not encode the\n"
+"following information:\n"
+"\n"
+"- executable status and other permission bits\n"
+"- copy or rename information\n"
+"- changes in binary files\n"
+"- creation or deletion of empty files\n"
+"\n"
+"Mercurial also supports the extended diff format from the git VCS\n"
+"which addresses these limitations. The git diff format is not produced\n"
+"by default because a few widespread tools still do not understand this\n"
+"format.\n"
+"\n"
+"This means that when generating diffs from a Mercurial repository\n"
+"(e.g. with \"hg export\"), you should be careful about things like file\n"
+"copies and renames or other things mentioned above, because when\n"
+"applying a standard diff to a different repository, this extra\n"
+"information is lost. Mercurial's internal operations (like push and\n"
+"pull) are not affected by this, because they use an internal binary\n"
+"format for communicating changes.\n"
+"\n"
+"To make Mercurial produce the git extended diff format, use the --git\n"
+"option available for many commands, or set 'git = True' in the [diff]\n"
+"section of your hgrc. You do not need to set this option when\n"
+"importing diffs in this format or using them in the mq extension.\n"
+msgstr ""
+
+msgid ""
+"HG\n"
+"    Path to the 'hg' executable, automatically passed when running\n"
+"    hooks, extensions or external tools. If unset or empty, this is\n"
+"    the hg executable's name if it's frozen, or an executable named\n"
+"    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on\n"
+"    Windows) is searched.\n"
+"\n"
+"HGEDITOR\n"
+"    This is the name of the editor to run when committing. See EDITOR.\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"HGENCODING\n"
+"    This overrides the default locale setting detected by Mercurial.\n"
+"    This setting is used to convert data including usernames,\n"
+"    changeset descriptions, tag names, and branches. This setting can\n"
+"    be overridden with the --encoding command-line option.\n"
+"\n"
+"HGENCODINGMODE\n"
+"    This sets Mercurial's behavior for handling unknown characters\n"
+"    while transcoding user input. The default is \"strict\", which\n"
+"    causes Mercurial to abort if it can't map a character. Other\n"
+"    settings include \"replace\", which replaces unknown characters, and\n"
+"    \"ignore\", which drops them. This setting can be overridden with\n"
+"    the --encodingmode command-line option.\n"
+"\n"
+"HGMERGE\n"
+"    An executable to use for resolving merge conflicts. The program\n"
+"    will be executed with three arguments: local file, remote file,\n"
+"    ancestor file.\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"HGRCPATH\n"
+"    A list of files or directories to search for hgrc files. Item\n"
+"    separator is \":\" on Unix, \";\" on Windows. If HGRCPATH is not set,\n"
+"    platform default search path is used. If empty, only the .hg/hgrc\n"
+"    from the current repository is read.\n"
+"\n"
+"    For each element in HGRCPATH:\n"
+"\n"
+"    - if it's a directory, all files ending with .rc are added\n"
+"    - otherwise, the file itself will be added\n"
+"\n"
+"HGUSER\n"
+"    This is the string used as the author of a commit. If not set,\n"
+"    available values will be considered in this order:\n"
+"\n"
+"    - HGUSER (deprecated)\n"
+"    - hgrc files from the HGRCPATH\n"
+"    - EMAIL\n"
+"    - interactive prompt\n"
+"    - LOGNAME (with ``@hostname`` appended)\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"EMAIL\n"
+"    May be used as the author of a commit; see HGUSER.\n"
+"\n"
+"LOGNAME\n"
+"    May be used as the author of a commit; see HGUSER.\n"
+"\n"
+"VISUAL\n"
+"    This is the name of the editor to use when committing. See EDITOR.\n"
+"\n"
+"EDITOR\n"
+"    Sometimes Mercurial needs to open a text file in an editor for a\n"
+"    user to modify, for example when writing commit messages. The\n"
+"    editor it uses is determined by looking at the environment\n"
+"    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
+"    non-empty one is chosen. If all of them are empty, the editor\n"
+"    defaults to 'vi'.\n"
+"\n"
+"PYTHONPATH\n"
+"    This is used by Python to find imported modules and may need to be\n"
+"    set appropriately if this Mercurial is not installed system-wide.\n"
+msgstr ""
+
+msgid ""
+"Mercurial has the ability to add new features through the use of\n"
+"extensions. Extensions may add new commands, add options to\n"
+"existing commands, change the default behavior of commands, or\n"
+"implement hooks.\n"
+"\n"
+"Extensions are not loaded by default for a variety of reasons:\n"
+"they can increase startup overhead; they may be meant for advanced\n"
+"usage only; they may provide potentially dangerous abilities (such\n"
+"as letting you destroy or modify history); they might not be ready\n"
+"for prime time; or they may alter some usual behaviors of stock\n"
+"Mercurial. It is thus up to the user to activate extensions as\n"
+"needed.\n"
+"\n"
+"To enable the \"foo\" extension, either shipped with Mercurial or in\n"
+"the Python search path, create an entry for it in your hgrc, like\n"
+"this::\n"
+"\n"
+"  [extensions]\n"
+"  foo =\n"
+"\n"
+"You may also specify the full path to an extension::\n"
+"\n"
+"  [extensions]\n"
+"  myfeature = ~/.hgext/myfeature.py\n"
+"\n"
+"To explicitly disable an extension enabled in an hgrc of broader\n"
+"scope, prepend its path with !::\n"
+"\n"
+"  [extensions]\n"
+"  # disabling extension bar residing in /path/to/extension/bar.py\n"
+"  bar = !/path/to/extension/bar.py\n"
+"  # ditto, but no path was supplied for extension baz\n"
+"  baz = !\n"
+msgstr ""
+"Det er muligt at tilføje nye funktionalitet til Mercurial ved brug af\n"
+"udvidelser. Udvidelser kan tilføje nye kommandoer, tilføje tilvalg til\n"
+"eksisterende kommandoer ændre standardopførslen for kommandoer eller\n"
+"implementere \"hooks\".\n"
+"\n"
+"Udvidelser bliver ikke indlæst som standard af flere årsager: de øger\n"
+"opstartstiden, de kan potentielt komme med farlig funktionalitet\n"
+"(såsom at lade dig ødelægge eller ændre historien), de er måske ikke\n"
+"klart til prime time, eller de ændrer måske opførslen af en standard\n"
+"Mercurial. Det er derfor op til brugeren at aktivere udvidelser efter\n"
+"behov.\n"
+"\n"
+"For at aktivere \"foo\" udvidelsen, som enten er kommet sammen med\n"
+"Mercurial eller lagt i Pythons søgesti, lav da en indgang for den i\n"
+"din hgrc::\n"
+"\n"
+"  [extensions]\n"
+"  foo =\n"
+"\n"
+"Du kan også specificere den fulde sti til en udvidelse::\n"
+"\n"
+"  [extensions]\n"
+"  myfeature = ~/.hgext/myfeature.py\n"
+"\n"
+"For eksplicit at deaktivere en udvidelse som er slået til i en mere\n"
+"bredt dækkende hgrc-fil, så skal man sætte et ! foran dens sti::\n"
+"\n"
+"  [extensions]\n"
+"  # deaktiverer udvidelse bar placeretligger i /path/to/extension/bar.py\n"
+"  bar = !/path/to/extension/bar.py\n"
+"  # ditto, men der var ikke angivet nogen sti for bar udvidelsen\n"
+"  baz = !\n"
+
+msgid ""
+"When Mercurial accepts more than one revision, they may be specified\n"
+"individually, or provided as a topologically continuous range,\n"
+"separated by the \":\" character.\n"
+"\n"
+"The syntax of range notation is [BEGIN]:[END], where BEGIN and END are\n"
+"revision identifiers. Both BEGIN and END are optional. If BEGIN is not\n"
+"specified, it defaults to revision number 0. If END is not specified,\n"
+"it defaults to the tip. The range \":\" thus means \"all revisions\".\n"
+"\n"
+"If BEGIN is greater than END, revisions are treated in reverse order.\n"
+"\n"
+"A range acts as a closed interval. This means that a range of 3:5\n"
+"gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.\n"
+msgstr ""
+"Når Mercurial accepterer mere end en revision, så kan de angives\n"
+"individuelt eller angives som et topologisk sammenhængende interval,\n"
+"adskildt af et \":\" tegn.\n"
+"\n"
+"Syntaksen for intervalnotationen er [START]:[SLUT] hvor START og SLUT\n"
+"identificerer revisioner. Både START og SLUT er valgfri. Hvis START\n"
+"ikke angivet, så bruges revision nummer 0 som standard. Hvis SLUT ikke\n"
+"angives, så bruges tip som standard. Intervallet \":\" betyder således\n"
+"\"alle revisioner\".\n"
+"\n"
+"Hvis START er større end SLUT, så behandles revisionerne i omvendt\n"
+"rækkefølge.\n"
+"\n"
+"Intervaller er lukkede. Det betyder at et interval 3:5 giver 3, 4 og\n"
+"5. Ligeledes giver intervallet 9:6 revisionerne 9, 8, 7, 6.\n"
+
+msgid ""
+"Mercurial accepts several notations for identifying one or more files\n"
+"at a time.\n"
+"\n"
+"By default, Mercurial treats filenames as shell-style extended glob\n"
+"patterns.\n"
+"\n"
+"Alternate pattern notations must be specified explicitly.\n"
+"\n"
+"To use a plain path name without any pattern matching, start it with\n"
+"``path:``. These path names must completely match starting at the\n"
+"current repository root.\n"
+"\n"
+"To use an extended glob, start a name with ``glob:``. Globs are rooted\n"
+"at the current directory; a glob such as ``*.c`` will only match files\n"
+"in the current directory ending with ``.c``.\n"
+"\n"
+"The supported glob syntax extensions are ``**`` to match any string\n"
+"across path separators and ``{a,b}`` to mean \"a or b\".\n"
+"\n"
+"To use a Perl/Python regular expression, start a name with ``re:``.\n"
+"Regexp pattern matching is anchored at the root of the repository.\n"
+"\n"
+"Plain examples::\n"
+"\n"
+"  path:foo/bar   a name bar in a directory named foo in the root\n"
+"                 of the repository\n"
+"  path:path:name a file or directory named \"path:name\"\n"
+"\n"
+"Glob examples::\n"
+"\n"
+"  glob:*.c       any name ending in \".c\" in the current directory\n"
+"  *.c            any name ending in \".c\" in the current directory\n"
+"  **.c           any name ending in \".c\" in any subdirectory of the\n"
+"                 current directory including itself.\n"
+"  foo/*.c        any name ending in \".c\" in the directory foo\n"
+"  foo/**.c       any name ending in \".c\" in any subdirectory of foo\n"
+"                 including itself.\n"
+"\n"
+"Regexp examples::\n"
+"\n"
+"  re:.*\\.c$      any name ending in \".c\", anywhere in the repository\n"
+msgstr ""
+
+msgid ""
+"Mercurial supports several ways to specify individual revisions.\n"
+"\n"
+"A plain integer is treated as a revision number. Negative integers are\n"
+"treated as sequential offsets from the tip, with -1 denoting the tip,\n"
+"-2 denoting the revision prior to the tip, and so forth.\n"
+"\n"
+"A 40-digit hexadecimal string is treated as a unique revision\n"
+"identifier.\n"
+"\n"
+"A hexadecimal string less than 40 characters long is treated as a\n"
+"unique revision identifier and is referred to as a short-form\n"
+"identifier. A short-form identifier is only valid if it is the prefix\n"
+"of exactly one full-length identifier.\n"
+"\n"
+"Any other string is treated as a tag or branch name. A tag name is a\n"
+"symbolic name associated with a revision identifier. A branch name\n"
+"denotes the tipmost revision of that branch. Tag and branch names must\n"
+"not contain the \":\" character.\n"
+"\n"
+"The reserved name \"tip\" is a special tag that always identifies the\n"
+"most recent revision.\n"
+"\n"
+"The reserved name \"null\" indicates the null revision. This is the\n"
+"revision of an empty repository, and the parent of revision 0.\n"
+"\n"
+"The reserved name \".\" indicates the working directory parent. If no\n"
+"working directory is checked out, it is equivalent to null. If an\n"
+"uncommitted merge is in progress, \".\" is the revision of the first\n"
+"parent.\n"
+msgstr ""
+
+msgid ""
+"Mercurial allows you to customize output of commands through\n"
+"templates. You can either pass in a template from the command\n"
+"line, via the --template option, or select an existing\n"
+"template-style (--style).\n"
+"\n"
+"You can customize output for any \"log-like\" command: log,\n"
+"outgoing, incoming, tip, parents, heads and glog.\n"
+"\n"
+"Three styles are packaged with Mercurial: default (the style used\n"
+"when no explicit preference is passed), compact and changelog.\n"
+"Usage::\n"
+"\n"
+"    $ hg log -r1 --style changelog\n"
+"\n"
+"A template is a piece of text, with markup to invoke variable\n"
+"expansion::\n"
+"\n"
+"    $ hg log -r1 --template \"{node}\\n\"\n"
+"    b56ce7b07c52de7d5fd79fb89701ea538af65746\n"
+"\n"
+"Strings in curly braces are called keywords. The availability of\n"
+"keywords depends on the exact context of the templater. These\n"
+"keywords are usually available for templating a log-like command:\n"
+"\n"
+":author: String. The unmodified author of the changeset.\n"
+"\n"
+":branches: String. The name of the branch on which the changeset was\n"
+"    committed. Will be empty if the branch name was default.\n"
+"\n"
+":date: Date information. The date when the changeset was committed.\n"
+"\n"
+":desc: String. The text of the changeset description.\n"
+"\n"
+":diffstat: String. Statistics of changes with the following format:\n"
+"    \"modified files: +added/-removed lines\"\n"
+"\n"
+":files: List of strings. All files modified, added, or removed by this\n"
+"    changeset.\n"
+"\n"
+":file_adds: List of strings. Files added by this changeset.\n"
+"\n"
+":file_copies: List of strings. Files copied in this changeset with\n"
+"    their sources.\n"
+"\n"
+":file_copies_switch: List of strings. Like \"file_copies\" but displayed\n"
+"    only if the --copied switch is set.\n"
+"\n"
+":file_mods: List of strings. Files modified by this changeset.\n"
+"\n"
+":file_dels: List of strings. Files removed by this changeset.\n"
+"\n"
+":node: String. The changeset identification hash, as a 40-character\n"
+"    hexadecimal string.\n"
+"\n"
+":parents: List of strings. The parents of the changeset.\n"
+"\n"
+":rev: Integer. The repository-local changeset revision number.\n"
+"\n"
+":tags: List of strings. Any tags associated with the changeset.\n"
+"\n"
+":latesttag: String. Most recent global tag in the ancestors of this\n"
+"    changeset.\n"
+"\n"
+":latesttagdistance: Integer. Longest path to the latest tag.\n"
+"\n"
+"The \"date\" keyword does not produce human-readable output. If you\n"
+"want to use a date in your output, you can use a filter to process\n"
+"it. Filters are functions which return a string based on the input\n"
+"variable. You can also use a chain of filters to get the desired\n"
+"output::\n"
+"\n"
+"   $ hg tip --template \"{date|isodate}\\n\"\n"
+"   2008-08-21 18:22 +0000\n"
+"\n"
+"List of filters:\n"
+"\n"
+":addbreaks: Any text. Add an XHTML \"<br />\" tag before the end of\n"
+"    every line except the last.\n"
+"\n"
+":age: Date. Returns a human-readable date/time difference between the\n"
+"    given date/time and the current date/time.\n"
+"\n"
+":basename: Any text. Treats the text as a path, and returns the last\n"
+"    component of the path after splitting by the path separator\n"
+"    (ignoring trailing separators). For example, \"foo/bar/baz\" becomes\n"
+"    \"baz\" and \"foo/bar//\" becomes \"bar\".\n"
+"\n"
+":stripdir: Treat the text as path and strip a directory level, if\n"
+"    possible. For example, \"foo\" and \"foo/bar\" becomes \"foo\".\n"
+"\n"
+":date: Date. Returns a date in a Unix date format, including the\n"
+"    timezone: \"Mon Sep 04 15:13:13 2006 0700\".\n"
+"\n"
+":domain: Any text. Finds the first string that looks like an email\n"
+"    address, and extracts just the domain component. Example: ``User\n"
+"    <user@example.com>`` becomes ``example.com``.\n"
+"\n"
+":email: Any text. Extracts the first string that looks like an email\n"
+"    address. Example: ``User <user@example.com>`` becomes\n"
+"    ``user@example.com``.\n"
+"\n"
+":escape: Any text. Replaces the special XML/XHTML characters \"&\", \"<\"\n"
+"    and \">\" with XML entities.\n"
+"\n"
+":fill68: Any text. Wraps the text to fit in 68 columns.\n"
+"\n"
+":fill76: Any text. Wraps the text to fit in 76 columns.\n"
+"\n"
+":firstline: Any text. Returns the first line of text.\n"
+"\n"
+":nonempty: Any text. Returns '(none)' if the string is empty.\n"
+"\n"
+":hgdate: Date. Returns the date as a pair of numbers: \"1157407993\n"
+"    25200\" (Unix timestamp, timezone offset).\n"
+"\n"
+":isodate: Date. Returns the date in ISO 8601 format: \"2009-08-18 13:00\n"
+"    +0200\".\n"
+"\n"
+":isodatesec: Date. Returns the date in ISO 8601 format, including\n"
+"    seconds: \"2009-08-18 13:00:13 +0200\". See also the rfc3339date\n"
+"    filter.\n"
+"\n"
+":localdate: Date. Converts a date to local date.\n"
+"\n"
+":obfuscate: Any text. Returns the input text rendered as a sequence of\n"
+"    XML entities.\n"
+"\n"
+":person: Any text. Returns the text before an email address.\n"
+"\n"
+":rfc822date: Date. Returns a date using the same format used in email\n"
+"    headers: \"Tue, 18 Aug 2009 13:00:13 +0200\".\n"
+"\n"
+":rfc3339date: Date. Returns a date using the Internet date format\n"
+"    specified in RFC 3339: \"2009-08-18T13:00:13+02:00\".\n"
+"\n"
+":short: Changeset hash. Returns the short form of a changeset hash,\n"
+"    i.e. a 12-byte hexadecimal string.\n"
+"\n"
+":shortdate: Date. Returns a date like \"2006-09-18\".\n"
+"\n"
+":strip: Any text. Strips all leading and trailing whitespace.\n"
+"\n"
+":tabindent: Any text. Returns the text, with every line except the\n"
+"     first starting with a tab character.\n"
+"\n"
+":urlescape: Any text. Escapes all \"special\" characters. For example,\n"
+"    \"foo bar\" becomes \"foo%20bar\".\n"
+"\n"
+":user: Any text. Returns the user portion of an email address.\n"
+msgstr ""
+
+msgid ""
+"Valid URLs are of the form::\n"
+"\n"
+"  local/filesystem/path[#revision]\n"
+"  file://local/filesystem/path[#revision]\n"
+"  http://[user[:pass]@]host[:port]/[path][#revision]\n"
+"  https://[user[:pass]@]host[:port]/[path][#revision]\n"
+"  ssh://[user[:pass]@]host[:port]/[path][#revision]\n"
+"\n"
+"Paths in the local filesystem can either point to Mercurial\n"
+"repositories or to bundle files (as created by 'hg bundle' or 'hg\n"
+"incoming --bundle').\n"
+"\n"
+"An optional identifier after # indicates a particular branch, tag, or\n"
+"changeset to use from the remote repository. See also 'hg help\n"
+"revisions'.\n"
+"\n"
+"Some features, such as pushing to http:// and https:// URLs are only\n"
+"possible if the feature is explicitly enabled on the remote Mercurial\n"
+"server.\n"
+"\n"
+"Some notes about using SSH with Mercurial:\n"
+"\n"
+"- SSH requires an accessible shell account on the destination machine\n"
+"  and a copy of hg in the remote path or specified with as remotecmd.\n"
+"- path is relative to the remote user's home directory by default. Use\n"
+"  an extra slash at the start of a path to specify an absolute path::\n"
+"\n"
+"    ssh://example.com//tmp/repository\n"
+"\n"
+"- Mercurial doesn't use its own compression via SSH; the right thing\n"
+"  to do is to configure it in your ~/.ssh/config, e.g.::\n"
+"\n"
+"    Host *.mylocalnetwork.example.com\n"
+"      Compression no\n"
+"    Host *\n"
+"      Compression yes\n"
+"\n"
+"  Alternatively specify \"ssh -C\" as your ssh command in your hgrc or\n"
+"  with the --ssh command line option.\n"
+"\n"
+"These URLs can all be stored in your hgrc with path aliases under the\n"
+"[paths] section like so::\n"
+"\n"
+"  [paths]\n"
+"  alias1 = URL1\n"
+"  alias2 = URL2\n"
+"  ...\n"
+"\n"
+"You can then use the alias for any command that uses a URL (for\n"
+"example 'hg pull alias1' will be treated as 'hg pull URL1').\n"
+"\n"
+"Two path aliases are special because they are used as defaults when\n"
+"you do not provide the URL to a command:\n"
+"\n"
+"default:\n"
+"  When you create a repository with hg clone, the clone command saves\n"
+"  the location of the source repository as the new repository's\n"
+"  'default' path. This is then used when you omit path from push- and\n"
+"  pull-like commands (including incoming and outgoing).\n"
+"\n"
+"default-push:\n"
+"  The push command will look for a path named 'default-push', and\n"
+"  prefer it over 'default' if both are defined.\n"
+msgstr ""
+
 msgid "can only share local repositories"
 msgstr "kan kun dele lokale depoter"
 
@@ -8749,6 +8816,10 @@
 msgstr "deponerer underdepot %s\n"
 
 #, python-format
+msgid "note: commit message saved in %s\n"
+msgstr "bemærk: deponeringsbeskeden er gemt i %s\n"
+
+#, python-format
 msgid "trouble committing %s!\n"
 msgstr "problem ved deponering %s!\n"
 
--- a/i18n/el.po	Thu Feb 11 23:15:42 2010 +0200
+++ b/i18n/el.po	Sat Feb 13 23:50:38 2010 -0600
@@ -8,7 +8,7 @@
 "Project-Id-Version: Mercurial\n"
 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
 "POT-Creation-Date: 2009-10-25 12:38+0100\n"
-"PO-Revision-Date: 2009-10-25 12:42+0100\n"
+"PO-Revision-Date: 2009-12-02 03:23+0200\n"
 "Last-Translator: <keramida@ceid.upatras.gr>\n"
 "Language-Team: Greek\n"
 "MIME-Version: 1.0\n"
@@ -21,17 +21,18 @@
 msgid " (default: %s)"
 msgstr " (προκαθορισμένο: %s)"
 
-msgid "OPTIONS"
-msgstr "ΕΠΙΛΟΓΕΣ"
-
-msgid "COMMANDS"
-msgstr "ΕΝΤΟΛΕΣ"
-
-#, fuzzy
+msgid "Options"
+msgstr "Επιλογές"
+
+msgid "Commands"
+msgstr "Εντολές"
+
 msgid ""
 "    options:\n"
 "\n"
-msgstr "    επιλογές:\n"
+msgstr ""
+"    επιλογές:\n"
+"\n"
 
 #, python-format
 msgid ""
@@ -41,82 +42,84 @@
 "    ψευδώνυμα: %s\n"
 "\n"
 
-#, fuzzy
+msgid ""
+"Mercurial reads configuration data from several files, if they exist.\n"
+"Below we list the most specific file first.\n"
+"\n"
+"On Windows, these configuration files are read:\n"
+"\n"
+"- ``<repo>\\.hg\\hgrc``\n"
+"- ``%USERPROFILE%\\.hgrc``\n"
+"- ``%USERPROFILE%\\Mercurial.ini``\n"
+"- ``%HOME%\\.hgrc``\n"
+"- ``%HOME%\\Mercurial.ini``\n"
+"- ``C:\\Mercurial\\Mercurial.ini``\n"
+"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
+"- ``<install-dir>\\Mercurial.ini``\n"
+"\n"
+"On Unix, these files are read:\n"
+"\n"
+"- ``<repo>/.hg/hgrc``\n"
+"- ``$HOME/.hgrc``\n"
+"- ``/etc/mercurial/hgrc``\n"
+"- ``/etc/mercurial/hgrc.d/*.rc``\n"
+"- ``<install-root>/etc/mercurial/hgrc``\n"
+"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
+"\n"
+"The configuration files for Mercurial use a simple ini-file format. A\n"
+"configuration file consists of sections, led by a ``[section]`` header\n"
+"and followed by ``name = value`` entries::\n"
+"\n"
+"  [ui]\n"
+"  username = Firstname Lastname <firstname.lastname@example.net>\n"
+"  verbose = True\n"
+"\n"
+"This above entries will be referred to as ``ui.username`` and\n"
+"``ui.verbose``, respectively. Please see the hgrc man page for a full\n"
+"description of the possible configuration values:\n"
+"\n"
+"- on Unix-like systems: ``man hgrc``\n"
+"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
+msgstr ""
+
 msgid ""
 "Some commands allow the user to specify a date, e.g.:\n"
 "\n"
 "- backout, commit, import, tag: Specify the commit date.\n"
 "- log, revert, update: Select revision(s) by date.\n"
 "\n"
-"Many date formats are valid. Here are some examples::\n"
-"\n"
-"  \"Wed Dec 6 13:18:29 2006\" (local timezone assumed)\n"
-"  \"Dec 6 13:18 -0600\" (year assumed, time offset provided)\n"
-"  \"Dec 6 13:18 UTC\" (UTC and GMT are aliases for +0000)\n"
-"  \"Dec 6\" (midnight)\n"
-"  \"13:18\" (today assumed)\n"
-"  \"3:39\" (3:39AM assumed)\n"
-"  \"3:39pm\" (15:39)\n"
-"  \"2006-12-06 13:18:29\" (ISO 8601 format)\n"
-"  \"2006-12-6 13:18\"\n"
-"  \"2006-12-6\"\n"
-"  \"12-6\"\n"
-"  \"12/6\"\n"
-"  \"12/6/6\" (Dec 6 2006)\n"
-"\n"
-"Lastly, there is Mercurial's internal format::\n"
-"\n"
-"  \"1165432709 0\" (Wed Dec 6 13:18:29 2006 UTC)\n"
+"Many date formats are valid. Here are some examples:\n"
+"\n"
+"- ``Wed Dec 6 13:18:29 2006`` (local timezone assumed)\n"
+"- ``Dec 6 13:18 -0600`` (year assumed, time offset provided)\n"
+"- ``Dec 6 13:18 UTC`` (UTC and GMT are aliases for +0000)\n"
+"- ``Dec 6`` (midnight)\n"
+"- ``13:18`` (today assumed)\n"
+"- ``3:39`` (3:39AM assumed)\n"
+"- ``3:39pm`` (15:39)\n"
+"- ``2006-12-06 13:18:29`` (ISO 8601 format)\n"
+"- ``2006-12-6 13:18``\n"
+"- ``2006-12-6``\n"
+"- ``12-6``\n"
+"- ``12/6``\n"
+"- ``12/6/6`` (Dec 6 2006)\n"
+"\n"
+"Lastly, there is Mercurial's internal format:\n"
+"\n"
+"- ``1165432709 0`` (Wed Dec 6 13:18:29 2006 UTC)\n"
 "\n"
 "This is the internal representation format for dates. unixtime is the\n"
 "number of seconds since the epoch (1970-01-01 00:00 UTC). offset is\n"
 "the offset of the local timezone, in seconds west of UTC (negative if\n"
 "the timezone is east of UTC).\n"
 "\n"
-"The log command also accepts date ranges::\n"
-"\n"
-"  \"<{datetime}\" - at or before a given date/time\n"
-"  \">{datetime}\" - on or after a given date/time\n"
-"  \"{datetime} to {datetime}\" - a date range, inclusive\n"
-"  \"-{days}\" - within a given number of days of today\n"
-msgstr ""
-"\n"
-"    Nogle kommandoer tillader brugeren at specificere en dato:\n"
-"    backout, commit, import, tag: specificer commit-datøn.\n"
-"    log, revert, update: vælg revisioner eftre dato.\n"
-"\n"
-"    Der er mange gyldige datoformater. Her er nogle eksempler:\n"
-"\n"
-"    \"Wed Dec 6 13:18:29 2006\" (antager lokal tidszone)\n"
-"    \"Dec 6 13:18 -0600\" (antager år, tidszone er angivet)\n"
-"    \"Dec 6 13:18 UTC\" (UTC og GMT er aliaser for +0000)\n"
-"    \"Dec 6\" (midnat)\n"
-"    \"13:18\" (antager dags dato)\n"
-"    \"3:39\"\n"
-"    \"3:39pm\" (15:39)\n"
-"    \"2006-12-06 13:18:29\" (ISO 8601 format)\n"
-"    \"2006-12-6 13:18\"\n"
-"    \"2006-12-6\"\n"
-"    \"12-6\"\n"
-"    \"12/6\"\n"
-"    \"12/6/6\" (6. dec. 2006)\n"
-"\n"
-"    Endelig er der Mercurials interne format:\n"
-"\n"
-"    \"1165432709 0\" (Ons 6. dec. 13:18:29 2006 UTC)\n"
-"\n"
-"    Dette er den interne representation af datoer. unixtime er\n"
-"    antallet af sekunder siden begyndelsen af epoken (1970-01-01 00:00\n"
-"    UTC). offset er den lokale tidszone, angivet i antal sekunder vest\n"
-"    for UTC (negativ hvis tidszonen er øst for UTC).\n"
-"\n"
-"    Kommandoen log accepterer også datointervaller:\n"
-"\n"
-"    \"<{date}\" - på eller før den angivne dato\n"
-"    \">{date}\" - på eller efter den angivne dato\n"
-"    \"{date} to {date}\" - et datointerval, inklusiv endepunkterne\n"
-"    \"-{days}\" - indenfor et angivet antal date, fra dags dato\n"
-"    "
+"The log command also accepts date ranges:\n"
+"\n"
+"- ``<{datetime}`` - at or before a given date/time\n"
+"- ``>{datetime}`` - on or after a given date/time\n"
+"- ``{datetime} to {datetime}`` - a date range, inclusive\n"
+"- ``-{days}`` - within a given number of days of today\n"
+msgstr ""
 
 msgid ""
 "Mercurial's default format for showing changes between two versions of\n"
@@ -203,7 +206,7 @@
 "    - hgrc files from the HGRCPATH\n"
 "    - EMAIL\n"
 "    - interactive prompt\n"
-"    - LOGNAME (with '@hostname' appended)\n"
+"    - LOGNAME (with ``@hostname`` appended)\n"
 "\n"
 "    (deprecated, use .hgrc)\n"
 "\n"
@@ -435,11 +438,11 @@
 "              the timezone: \"Mon Sep 04 15:13:13 2006 0700\".\n"
 ":domain:      Any text. Finds the first string that looks like an\n"
 "              email address, and extracts just the domain\n"
-"              component. Example: 'User <user@example.com>' becomes\n"
-"              'example.com'.\n"
+"              component. Example: ``User <user@example.com>`` becomes\n"
+"              ``example.com``.\n"
 ":email:       Any text. Extracts the first string that looks like\n"
-"              an email address. Example: 'User <user@example.com>'\n"
-"              becomes 'user@example.com'.\n"
+"              an email address. Example: ``User <user@example.com>``\n"
+"              becomes ``user@example.com``.\n"
 ":escape:      Any text. Replaces the special XML/XHTML characters\n"
 "              \"&\", \"<\" and \">\" with XML entities.\n"
 ":fill68:      Any text. Wraps the text to fit in 68 columns.\n"
@@ -523,7 +526,7 @@
 "  ...\n"
 "\n"
 "You can then use the alias for any command that uses a URL (for\n"
-"example 'hg pull alias1' would pull from the 'alias1' path).\n"
+"example 'hg pull alias1' will be treated as 'hg pull URL1').\n"
 "\n"
 "Two path aliases are special because they are used as defaults when\n"
 "you do not provide the URL to a command:\n"
@@ -586,6 +589,60 @@
 "  glob pattern = user4, user5\n"
 "   ** = user6\n"
 msgstr ""
+"hooks για έλεγχο της πρόσβασης σε ένα αποθετήριο\n"
+"\n"
+"Τα hooks της επέκτασης acl σας δίνουν τη δυνατότητα να επιτρέψετε ή να\n"
+"απαγορεύσετε την πρόσβαση για αλλαγές σε μέρη ενός αποθετηρίου κατά τη\n"
+"διάρκεια της λήψης εισερχόμενων αλλαγών.\n"
+"\n"
+"Η πρόσβαση ελέγχεται με βάση το τοπικό όνομα χρήστη στο σύστημα το οποίο\n"
+"εκτελεί τον κώδικα της επέκτασης κι όχι με βάση το όνομα του συγγραφέα\n"
+"μιας αλλαγής (αφού το δεύτερο υπάρχει μόνο για πληροφοριακούς σκοπούς).\n"
+"\n"
+"Η επέκταση acl είναι πιο χρήσιμη όταν συνδυάζεται με ένα περιορισμένο\n"
+"φλοιό όπως το hgsh, αφού έτσι οι απομακρυσμένοι χρήστες έχουν πρόσβαση\n"
+"μόνο για λειτουργίες pull ή push.  Η επέκταση δε μπορεί να σας\n"
+"εξασφαλίσει ότι δε θα την απενεργοποιήσουν οι τοπικοί χρήστες όταν\n"
+"έχουν απευθείας πρόσβαση να εκτελέσουν οποιαδήποτε εντολή στο\n"
+"εξυπηρετητή του αποθετηρίου.  Δεν είναι ασφαλής, επίσης, όταν πολλοί\n"
+"απομακρυσμένοι χρήστες μοιράζονται τον ίδιο τοπικό λογαριασμό, αφού δεν\n"
+"υπάρχει τρόπος να ξεχωρίσει ο ένας χρήστης από τον άλλο.\n"
+"\n"
+"Για να χρησιμοποιήσετε το hook της επέκτασης ενεργοποιήστε την στο\n"
+"αρχείο hgrc ως εξής::\n"
+"\n"
+"  [extensions]\n"
+"  acl =\n"
+"\n"
+"  [hooks]\n"
+"  pretxnchangegroup.acl = python:hgext.acl.hook\n"
+"\n"
+"  [acl]\n"
+"  # Ελέγξτε αν η πηγή των εισερχόμενων αλλαγών είναι κάποια από τις\n"
+"  # (\\\"serve\\\" == ssh ή http, \\\"push\\\", \\\"pull\\\", \\\"bundle\\"
+"\")\n"
+"  sources = serve\n"
+"\n"
+"Τα τμήματα του αρχείου ρυθμίσεων τα οποία επιτρέπουν ή απαγορεύουν την\n"
+"πρόσβαση μπορούν να αναφέρονται σε υποκαταλόγους του αποθετηρίου (με\n"
+"σύνταξη glob για τα ονόματα αρχείων ή υποκαταλόγων).  Σε κάθε πρότυπο\n"
+"ονόματος μπορείτε να ορίσετε ένα ή περισσότερους χρήστες χωρίζοντας τα\n"
+"ονόματά τους με κόμμα.  Η λίστα προτύπων που απαγορεύει την πρόσβαση\n"
+"ελέγχεται πρώτη. ::\n"
+"\n"
+"  [acl.allow]\n"
+"  # Όταν δεν υπάρχει το τμήμα acl.allow επιτρέπεται η πρόσβαση σε\n"
+"  # όλους τους χρήστες.  Όταν το τμήμα acl.allow είναι κενό δεν\n"
+"  # επιτρέπεται η πρόσβαση σε κανέναν χρήστη.\n"
+"  docs/** = doc_writer\n"
+"  .hgtags = release_engineer\n"
+"\n"
+"  [acl.deny]\n"
+"  # Όταν δεν υπάρχει το τμήμα acl.deny επιτρέπεται η πρόσβαση σε\n"
+"  # όλους τους χρήστες.  Όταν είναι κενό επίσης επιτρέπεται η\n"
+"  # πρόσβαση σε όλους.\n"
+"  glob pattern = user4, user5\n"
+"   ** = user6\n"
 
 #, python-format
 msgid "config error - hook type \"%s\" cannot stop incoming changesets"
@@ -620,6 +677,28 @@
 "using, and only update it. This is similar to git's approach to\n"
 "branching.\n"
 msgstr ""
+"παρακολούθηση μιας γραμμής ανάπτυξης με κινητές ετικέτες\n"
+"\n"
+"Τα bookmarks είναι κινητές ετικέτες για αλλαγές.  Κάθε ετικέτα δείχνει\n"
+"σε μια αλλαγή, με βάση το hash της αλλαγής.  Αν δημιουργήσετε μια νέα\n"
+"αλλαγή με βάση μια αλλαγή στην οποία δείχνει μια ετικέτα, η ετικέτα\n"
+"μετακινείται στην καινούρια αλλαγή.\n"
+"\n"
+"Οι ετικέτες μπορούν να χρησιμοποιηθούν οπουδήποτε έχει νόημα το\n"
+"αναγνωριστικό μιας έκδοσης (π.χ. ως ορίσματα των hg merge ή hg update).\n"
+"\n"
+"Η προκαθορισμένη συμπεριφορά της επέκτασης είναι να μετακινεί όλες τις\n"
+"ετικέτες μιας γονικής αλλαγής.  Αυτή η συμπεριφορά μπορεί να αλλάξει,\n"
+"για να μοιάζει περισσότερο με το git, προσθέτοντας την παρακάτω επιλογή\n"
+"στο αρχείο .hgrc::\n"
+"\n"
+"  [bookmarks]\n"
+"  track.current = True\n"
+"\n"
+"Με αυτή την επιλογή το Mercurial θα ελέγχει αν έχετε ενεργοποιήσει\n"
+"κάποια ετικέτα και θα μετακινεί μόνο αυτή την ετικέτα.  Αυτή η\n"
+"συμπεριφορά μοιάζει με τον τρόπο που λειτουργούν οι κλάδοι ανάπτυξης στο\n"
+"git.\n"
 
 msgid ""
 "track a line of development with movable markers\n"
@@ -635,6 +714,20 @@
 "    the bookmark is assigned to that revision.\n"
 "    "
 msgstr ""
+"παρακολούθηση μιας γραμμής ανάπτυξης με κινητές ετικέτες\n"
+"\n"
+"    Οι ετικέτες είναι δείκτες προς συγκεκριμένες αλλαγές, οι οποίοι\n"
+"    μετακινούνται όταν κάνετε commit.  Οι ετικέτες αποθηκεύονται μόνο\n"
+"    τοπικά.  Μπορούν να μετονομαστούν, να αντιγραφούν, και να σβηστούν.\n"
+"    Η χρήση τους επιτρέπεται τόσο με την εντολή 'hg merge όσο και με την\n"
+"    'hg update', για συγχώνευση ή ενημέρωση, αντίστοιχα, του χώρου\n"
+"    εργασίας με την έκδοση μιας ετικέτας.\n"
+"\n"
+"    Μπορείτε να δώσετε 'hg bookmark ΟΝΟΜΑ' για να ορίσετε μια ετικέτα η\n"
+"    οποία δείχνει στη γονική αλλαγή του χώρου εργασίας.  Με την επιλογή\n"
+"    '-r REV' (όπου REV μπορεί να είναι και μια υπάρχουσα ετικέτα)\n"
+"    μπορείτε να ορίσετε μια νέα ετικέτα για οποιαδήποτε έκδοση.\n"
+"    "
 
 msgid "a bookmark of this name does not exist"
 msgstr "δεν υπάρχει σελιδοδείκτης με αυτό το όνομα"
@@ -650,7 +743,7 @@
 
 msgid "bookmark name cannot contain newlines"
 msgstr ""
-"το όνομα ενός σελιδοδείκτη δεν επιτρέπεται να περιέχει χαρακτήρεςαλλαγής "
+"το όνομα ενός σελιδοδείκτη δεν επιτρέπεται να περιέχει χαρακτήρες αλλαγής "
 "γραμμής"
 
 msgid "a bookmark cannot have the name of an existing branch"
@@ -658,7 +751,7 @@
 "οι σελιδοδείκτες δεν επιτρέπεται να έχουν το όνομα ενός υπάρχοντος κλάδου"
 
 msgid "force"
-msgstr ""
+msgstr "force"
 
 msgid "revision"
 msgstr "αλλαγή"
@@ -669,9 +762,8 @@
 msgid "rename a given bookmark"
 msgstr "μετονομασία ενός σελιδοδείκτη"
 
-#, fuzzy
 msgid "hg bookmarks [-f] [-d] [-m NAME] [-r REV] [NAME]"
-msgstr "hg bookmarks [-d] [-m ΟΝΟΜΑ] [-r ΟΝΟΜΑ] [ΟΝΟΜΑ]"
+msgstr "hg bookmarks [-f] [-d] [-m ΟΝΟΜΑ] [-r REV] [REV]"
 
 msgid ""
 "hooks for integrating with the Bugzilla bug tracker\n"
@@ -808,6 +900,157 @@
 "\n"
 "    Changeset commit comment. Bug 1234.\n"
 msgstr ""
+"διασύνδεση με το bug tracker Bugzilla\n"
+"\n"
+"Αυτή η επέκταση προσθέτει σχόλια σε bugs στο Bugzilla όταν δει κάποια\n"
+"αλλαγή να αναφέρεται σε ανοιχτά bugs. Το hook της επέκτασης δεν αλλάζει\n"
+"την κατάσταση του bug.\n"
+"\n"
+"Το hook ενημερώνει απευθείας τη βάση δεδομένων του Bugzilla.  Αυτή η\n"
+"έκδοση υποστηρίζει μόνο εγκαταστάσεις του Bugzilla που χρησιμοποιούν τη\n"
+"βάση δεδομένων MySQL.\n"
+"\n"
+"Το hook καλεί εσωτερικά το script του Bugzilla για ειδοποιήσεις μέσω\n"
+"email. Το script έχει διαφορετικό όνομα σε μερικές εκδόσεις του\n"
+"Bugzilla. Μέχρι την έκδοση 2.18 λέγεται 'processmail'. Από την έκδοση\n"
+"2.18 και μετά αντικαταστάθηκε από το 'config/sendbugmail.pl'. Το script\n"
+"εκτελείται με τα δικαιώματα του χρήστη που στέλνει τις αλλαγές μέσω\n"
+"Mercurial· μπορεί να χρειαστεί να ρυθμίσετε τις άδειες χρήστη στην\n"
+"εγκατάσταση του Bugzilla για να λειτουργήσει σωστά.\n"
+"\n"
+"Η επέκταση bugzilla ρυθμίζεται μέσω τριών διαφορετικών τμημάτων του\n"
+"αρχείου εκκίνησης του Mercurial.  Οι παρακω επιλογές αναγνωρίζονται στο\n"
+"τμήμα [bugzilla]:\n"
+"\n"
+"host\n"
+"  Το όνομα του εξυπηρετητή MySQL για τη βάση δεδομένων του Bugzilla.\n"
+"\n"
+"db\n"
+"  Το όνομα της βάσης δεδομένων MySQL του Bugzilla.  Προκαθορισμένο όνομα\n"
+"  'bugs'.\n"
+"\n"
+"user\n"
+"  Το όνομα χρήστη για πρόσβαση στον εξυπηρετητή MySQL.  Προκαθορισμένο\n"
+"  όνομα 'bugs'.\n"
+"\n"
+"password\n"
+"  Κωδικός χρήστη για πρόσβαση στον εξυπηρετητή MySQL.\n"
+"\n"
+"timeout\n"
+"  Χρονικό όριο πρόσβασης στη βάση δεδομένων (δευτερόλεπτα).\n"
+"  Προκαθορισμένος χρόνος 5.\n"
+"\n"
+"version\n"
+"  Έκδοση Bugzilla.  Ορίστε '3.0' για την έκδοση 3.0 ή νεώτερες, '2.18'\n"
+"  για εκδόσεις από 2.18 έως και 3.0, και '2.16' για εκδόσεις πιο παλιές\n"
+"  από την 2.18.\n"
+"\n"
+"bzuser\n"
+"  Εναλλακτικό όνομα χρήστη Bugzilla.  Το όνομα του χρήστη Bugzilla που\n"
+"  θα χρησιμοποιείται όταν ο αρχικός συγγραφέας μιας αλλαγής δε μπορεί να\n"
+"  βρεθεί ως χρήστης στο Bugzilla.\n"
+"\n"
+"bzdir\n"
+"   Ο κατάλογος εγκατάστασης του Bugzilla.  Χρησιμοποιείται από τον\n"
+"   προκαθορισμένο μηχανισμό ειδοποιήσεων.  Προκαθορισμένος κατάλογος\n"
+"   '/var/www/html/bugzilla'.\n"
+"\n"
+"notify\n"
+"  Η εντολή που χρησιμοποιείται για την αποστολή ειδοποιήσεων μέσω\n"
+"  Bugzilla.  Η επέκταση υποστηρίζει τρία κλειδιά στην τιμή αυτής της\n"
+"  εντολής: 'bzdir', 'id' (bug id) και 'user' (το όνομα χρήστη στο\n"
+"  bugzilla).  Η προκαθορισμένη τιμή εξαρτάται από την έκδοση του\n"
+"  Bugzilla.  Για την έκδοση 2.18 και νεότερες είναι \\\"cd %(bzdir)s &&\n"
+"  perl -T contrib/sendbugmail.pl %(id)s %(user)s\\\".\n"
+"\n"
+"regexp\n"
+"  Regular expression to match bug IDs in changeset commit message.\n"
+"  Must contain one \\\"()\\\" group. The default expression matches 'Bug\n"
+"  1234', 'Bug no. 1234', 'Bug number 1234', 'Bugs 1234,5678', 'Bug\n"
+"  1234 and 5678' and variations thereof. Matching is case insensitive.\n"
+"\n"
+"style\n"
+"  Το αρχείο στυλ που θα χρησιμοποιείται για την μορφοποίηση των σχολίων.\n"
+"\n"
+"template\n"
+"  Πρότυπο μορφοποίησης σχολίων.  Όταν ορίζεται έχει προτεραιότητα σε\n"
+"  σχέση με το αρχείο στυλ.  Υποστηρίζονται όλες οι συνηθισμένες λέξεις\n"
+"  κλειδιά των προτύπων του Mercurial, κι επιπλέον οι εξής ειδικές λέξεις\n"
+"  κλειδιά::\n"
+"\n"
+"    {bug}       Το ID ενός bug στο Bugzilla.\n"
+"    {root}      Ο πλήρης κατάλογος ενός αποθετηρίου Mercurial.\n"
+"    {webroot}   Σύντομη μορφή του καταλόγου ενός αποθετηρίου.\n"
+"    {hgweb}     Αρχικό URL για προβολή των αποθετηρίων Mercurial.\n"
+"\n"
+"  Προκαθορισμένη τιμή: 'changeset {node|short} in repo {root} refers '\n"
+"                       'to bug {bug}.\\\\ndetails:\\\\n\\\\t{desc|"
+"tabindent}'\n"
+"\n"
+"strip\n"
+"  The number of slashes to strip from the front of {root} to produce\n"
+"  {webroot}. Default 0.\n"
+"\n"
+"usermap\n"
+"\n"
+"  Η διαδρομή του αρχείου αντιστοίχησης του ονόματος κάθε συγγραφέα από\n"
+"  το Mercurial σε Bugzilla user ID. Όταν ορίζεται αυτή η επιλογή το\n"
+"  αρχείο πρέπει να περιέχει μια αντιστοίχηση ανά γραμμή.  Κάθε γραμμή\n"
+"  είναι της μορφής \\\"committer\\\"=\\\"Bugzilla user\\\". Δείτε και την\n"
+"  περιγραφή του τμήματος [usermap].\n"
+"\n"
+"Το τμήμα [usermap] χρησιμοποιείται για την αντιστοίχηση του ονόματος\n"
+"κάθε συγγραφέα από το όνομα που χρησιμοποιεί στο Mercurial στο όνομα\n"
+"χρήστη που έχει στο Bugzilla.  Δείτε επίσης την περιγραφή της επιλογής\n"
+"[bugzilla].usermap.  Η μορφή που έχει κάθε γραμμή στο usermap είναι::\n"
+"\n"
+"\\\"committer\\\"=\\\"Bugzilla user\\\"\n"
+"\n"
+"Τέλος, στο τμήμα [web] υποστηρίζεται η εξής επιλογή:\n"
+"\n"
+"baseurl\n"
+"  Αρχικός κατάλογος για προβολή των αποθετηρίων Mercurial.  Η τιμή του\n"
+"  baseurl χρησιμοποιείται από τα πρότυπα μορφοποίησης ως {hgweb}.\n"
+"\n"
+"Ενεργοποίηση της επέκτασης::\n"
+"\n"
+"    [extensions]\n"
+"    bugzilla =\n"
+"\n"
+"    [hooks]\n"
+"    # run bugzilla hook on every change pulled or pushed in here\n"
+"    incoming.bugzilla = python:hgext.bugzilla.hook\n"
+"\n"
+"Παράδειγμα ρυθμίσεων:\n"
+"\n"
+"Οι παρακάτω ρυθμίσεις αναφέρονται σε μια συλλογή αποθετηρίων Mercurial\n"
+"στον κατάλογο /var/local/hg/repos/ και μια τοπική εγκατάσταση του\n"
+"Bugzilla 3.2 με αρχικό κατάλογο τον /opt/bugzilla-3.2. ::\n"
+"\n"
+"    [bugzilla]\n"
+"    host=localhost\n"
+"    password=XYZZY\n"
+"    version=3.0\n"
+"    bzuser=unknown@domain.com\n"
+"    bzdir=/opt/bugzilla-3.2\n"
+"    template=Αλλαγή {node|short} στο {root|basename}.\n"
+"             {hgweb}/{webroot}/rev/{node|short}\\\\n\n"
+"             {desc}\\\\n\n"
+"    strip=5\n"
+"\n"
+"    [web]\n"
+"    baseurl=http://dev.domain.com/hg\n"
+"\n"
+"    [usermap]\n"
+"    user@emaildomain.com=user.name@bugzilladomain.com\n"
+"\n"
+"Οι αλλαγές που στέλνονται στα αποθετήρια προσθέτουν στα αντίστοιχα bug\n"
+"report ένα σχόλιο της μορφής::\n"
+"\n"
+"    Αλλαγή 3b16791d6642 στο όνομα-αποθετηρίου.\n"
+"    http://dev.domain.com/hg/repository-name/rev/3b16791d6642\n"
+"\n"
+"    Περιγραφή της αλλαγής.  Bug 1234.\n"
 
 #, python-format
 msgid "connecting to %s:%s as %s, password %s\n"
@@ -829,7 +1072,7 @@
 msgstr "το πρόβλημα %d έχει ενημερωθεί ήδη για την αλλαγή %s\n"
 
 msgid "telling bugzilla to send mail:\n"
-msgstr ""
+msgstr "ειδοποίηση του bugzilla να στείλει email:\n"
 
 #, python-format
 msgid "  bug %s\n"
@@ -837,11 +1080,11 @@
 
 #, python-format
 msgid "running notify command %s\n"
-msgstr ""
+msgstr "εκτέλεση εντολής ειδοποίησης %s\n"
 
 #, python-format
 msgid "bugzilla notify command %s"
-msgstr ""
+msgstr "εντολή ειδοποίησης bugzilla %s"
 
 msgid "done\n"
 msgstr "ολοκληρώθηκε\n"
@@ -867,6 +1110,9 @@
 "details:\n"
 "\t{desc|tabindent}"
 msgstr ""
+"η αλλαγή {node|short} στο αποθετήριο {root} αναφέρεται στο bug {bug}.\n"
+"λεπτομέρειες:\n"
+"\t{desc|tabindent}"
 
 #, python-format
 msgid "python mysql support not available: %s"
@@ -881,7 +1127,7 @@
 msgstr "σφάλμα βάσης δεδομένων: %s"
 
 msgid "command to display child changesets"
-msgstr ""
+msgstr "εντολή προβολής εξαρτώμενων αλλαγών"
 
 msgid ""
 "show the children of the given or working directory revision\n"
@@ -894,27 +1140,24 @@
 "    "
 msgstr ""
 
-#, fuzzy
 msgid "show children of the specified revision"
-msgstr "lav statistik for de specificerede revisioner"
+msgstr ""
 
 msgid "hg children [-r REV] [FILE]"
 msgstr "hg children [-r ΕΚΔΟΣΗ] [ΑΡΧΕΙΟ]"
 
-#, fuzzy
 msgid "command to display statistics about repository history"
 msgstr ""
 "εντολή η οποία δείχνει κάποια στατιστικά για το ιστορικό του αποθετηρίου"
 
 #, python-format
 msgid "Revision %d is a merge, ignoring...\n"
-msgstr ""
+msgstr "Η αλλαγή %d είναι αλλαγή συγχώνευσης, αγνοείται...\n"
 
 #, python-format
 msgid "generating stats: %d%%"
-msgstr ""
-
-#, fuzzy
+msgstr "υπολογισμός στατιστικών: %d%%"
+
 msgid ""
 "histogram of changes to the repository\n"
 "\n"
@@ -951,32 +1194,6 @@
 "    a .hgchurn file will be looked for in the working directory root.\n"
 "    "
 msgstr ""
-"plot antallet af revisioner grupperet efter et mønster\n"
-"\n"
-"    Plotter antallet af ændrede linier eller antallet af revisioner\n"
-"    grupperet efter et mønster eller alternativt efter dato, hvis\n"
-"    dateformat bruges. I så tilfælde bruges mønstret ikke.\n"
-"\n"
-"    Som udgangspunkt laves der statistik over antallet af ændrede\n"
-"    linier.\n"
-"\n"
-"    Eksempler:\n"
-"\n"
-"      # viser antaller af ændrede linier for hver bruger\n"
-"      hg churn -t '{author|email}'\n"
-"\n"
-"      # viser graf over daglig aktivitet\n"
-"      hg churn -f '%H' -s -c\n"
-"\n"
-"      # viser månedlig aktivitet af udviklerne\n"
-"      hg churn -f '%Y-%m' -s -c\n"
-"\n"
-"      # viser antallet af linier ændret hvert år\n"
-"      hg churn -f '%Y' -s\n"
-"\n"
-"    Formatet for map-filen er rimelig simpelt:\n"
-"\n"
-"    <alias email> <faktisk email>"
 
 msgid "count rate for the specified revision or range"
 msgstr ""
@@ -996,11 +1213,14 @@
 msgid "sort by key (default: sort by count)"
 msgstr ""
 
+msgid "display added/removed lines separately"
+msgstr ""
+
 msgid "file with email aliases"
 msgstr ""
 
 msgid "show progress"
-msgstr ""
+msgstr "προβολή προόδου"
 
 msgid "hg churn [-d DATE] [-r REV] [--aliases FILE] [--progress] [FILE]"
 msgstr ""
@@ -1149,7 +1369,10 @@
 "    revision control system whose parents should be modified (same\n"
 "    format as a key in .hg/shamap). The values are the revision IDs\n"
 "    (in either the source or destination revision control system) that\n"
-"    should be used as the new parents for that node.\n"
+"    should be used as the new parents for that node. For example, if\n"
+"    you have merged \"release-1.0\" into \"trunk\", then you should\n"
+"    specify the revision on \"trunk\" as the first parent and the one on\n"
+"    the \"release-1.0\" branch as the second.\n"
 "\n"
 "    The branchmap is a file that allows you to rename a branch when it is\n"
 "    being brought in from whatever external repository. When used in\n"
@@ -1339,7 +1562,7 @@
 msgstr ""
 
 msgid "show parent changesets"
-msgstr ""
+msgstr "προβολή γονικών αλλαγών"
 
 msgid "show current changeset in ancestor branches"
 msgstr ""
@@ -1348,7 +1571,7 @@
 msgstr ""
 
 msgid "hg debugcvsps [OPTION]... [PATH]..."
-msgstr ""
+msgstr "hg debugcvsps [ΕΠΙΛΟΓΗ]... [ΑΡΧΕΙΟ]"
 
 msgid ""
 "warning: lightweight checkouts may cause conversion failures, try with a "
@@ -1523,13 +1746,15 @@
 msgstr "δημιουργία αλλαγών\n"
 
 msgid "synthetic changeset cannot have multiple parents"
-msgstr ""
+msgstr "μια συνθετική αλλαγή δε μπορεί να έχει πολλές γονικές αλλαγές"
 
 #, python-format
 msgid ""
 "warning: CVS commit message references non-existent branch %r:\n"
 "%s\n"
 msgstr ""
+"προειδοποίηση: το μήνυμα καταγραφής CVS αναφέρεται στον ανύπαρκτο κλάδο %r:\n"
+"%s\n"
 
 #, python-format
 msgid "%d changeset entries\n"
@@ -1615,17 +1840,20 @@
 msgid "copying file in renamed directory from '%s' to '%s'"
 msgstr ""
 
-#, fuzzy
 msgid "reading p4 views\n"
-msgstr "καθαρισμός %s\n"
-
-#, fuzzy
+msgstr ""
+
 msgid "collecting p4 changelists\n"
-msgstr "δημιουργία αλλαγών\n"
+msgstr ""
 
 msgid "Mercurial failed to run itself, check hg executable is in PATH"
 msgstr ""
 
+msgid ""
+"svn: cannot probe remote repository, assume it could be a subversion "
+"repository. Use --source-type if you know better.\n"
+msgstr ""
+
 msgid "Subversion python bindings could not be loaded"
 msgstr ""
 
@@ -1788,26 +2016,25 @@
 msgstr ""
 
 msgid "hg extdiff [OPT]... [FILE]..."
-msgstr ""
+msgstr "hg extdiff [ΕΠΙΛΟΓΗ]... [ΑΡΧΕΙΟ]..."
 
 #, python-format
 msgid ""
 "use %(path)s to diff repository (or selected files)\n"
 "\n"
-"    Show differences between revisions for the specified files, using the\n"
-"    %(path)s program.\n"
-"\n"
-"    When two revision arguments are given, then changes are shown between\n"
-"    those revisions. If only one revision is specified then that revision "
-"is\n"
-"    compared to the working directory, and, when no revisions are "
-"specified,\n"
-"    the working directory files are compared to its parent."
+"    Show differences between revisions for the specified files, using\n"
+"    the %(path)s program.\n"
+"\n"
+"    When two revision arguments are given, then changes are shown\n"
+"    between those revisions. If only one revision is specified then\n"
+"    that revision is compared to the working directory, and, when no\n"
+"    revisions are specified, the working directory files are compared\n"
+"    to its parent."
 msgstr ""
 
 #, python-format
 msgid "hg %s [OPTION]... [FILE]..."
-msgstr ""
+msgstr "hg %s [ΕΠΙΛΟΓΗ]... [ΑΡΧΕΙΟ]..."
 
 msgid "pull, update and merge in one command"
 msgstr ""
@@ -1866,11 +2093,11 @@
 
 #, python-format
 msgid "updating to %d:%s\n"
-msgstr ""
+msgstr "ενημέρωση σε %d:%s\n"
 
 #, python-format
 msgid "merging with %d:%s\n"
-msgstr ""
+msgstr "συγχώνευση με %d:%s\n"
 
 #, python-format
 msgid "new changeset %d:%s merges remote changes with local\n"
@@ -1880,7 +2107,7 @@
 msgstr ""
 
 msgid "edit commit message"
-msgstr ""
+msgstr "επεξεργασία μηνύματος καταγραφής"
 
 msgid "edit commit message (DEPRECATED)"
 msgstr ""
@@ -1889,13 +2116,13 @@
 msgstr ""
 
 msgid "hg fetch [SOURCE]"
-msgstr ""
+msgstr "hg fetch [ΠΗΓΗ]"
 
 msgid "commands to sign and verify changesets"
 msgstr ""
 
 msgid "error while verifying signature"
-msgstr ""
+msgstr "σφάλμα επιβεβαίωσης υπογραφής"
 
 #, python-format
 msgid "%s Bad signature from \"%s\"\n"
@@ -1910,7 +2137,7 @@
 msgstr ""
 
 msgid "list signed changesets"
-msgstr ""
+msgstr "προβολή λίστας υπογεγραμμένων αλλαγών"
 
 #, python-format
 msgid "%s:%d node does not exist\n"
@@ -1921,7 +2148,7 @@
 
 #, python-format
 msgid "No valid signature for %s\n"
-msgstr ""
+msgstr "Δεν υπάρχει έγκυρη υπογραφή για την αλλαγή %s\n"
 
 msgid ""
 "add a signature for the current or given revision\n"
@@ -1937,7 +2164,7 @@
 msgstr ""
 
 msgid "Error while signing"
-msgstr ""
+msgstr "Σφάλμα δημιουργίας υπογραφής"
 
 msgid ""
 "working copy of .hgsigs is changed (please commit .hgsigs manually or use --"
@@ -1957,16 +2184,16 @@
 msgstr ""
 
 msgid "the key id to sign with"
-msgstr ""
+msgstr "το κλειδί με το οποίο δημιουργούνται υπογραφές"
 
 msgid "commit message"
-msgstr ""
+msgstr "μήνυμα καταγραφής"
 
 msgid "hg sign [OPTION]... [REVISION]..."
-msgstr ""
+msgstr "hg sign [ΕΠΙΛΟΓΗ]... [ΑΛΛΑΓΗ]..."
 
 msgid "hg sigcheck REVISION"
-msgstr ""
+msgstr "hg sigcheck ΑΛΛΑΓΗ"
 
 msgid "hg sigs"
 msgstr ""
@@ -2014,7 +2241,7 @@
 msgstr ""
 
 msgid "hg glog [OPTION]... [FILE]"
-msgstr ""
+msgstr "hg glog [ΕΠΙΛΟΓΗ]... [ΑΡΧΕΙΟ]"
 
 msgid ""
 "hooks for integrating with the CIA.vc notification service\n"
@@ -2136,7 +2363,7 @@
 msgstr ""
 
 msgid "search"
-msgstr ""
+msgstr "αναζήτηση"
 
 msgid "hg git-diff-tree [OPTION]... NODE1 NODE2 [FILE]..."
 msgstr ""
@@ -2216,22 +2443,22 @@
 msgid "hg inserve [OPTION]..."
 msgstr ""
 
-msgid "(found dead inotify server socket; removing it)\n"
-msgstr ""
-
-#, python-format
-msgid "could not start inotify server: %s\n"
-msgstr ""
-
-#, python-format
-msgid "could not talk to new inotify server: %s\n"
-msgstr ""
-
-#, python-format
-msgid "failed to contact inotify server: %s\n"
-msgstr ""
-
-msgid "received empty answer from inotify server"
+msgid "inotify-client: found dead inotify server socket; removing it\n"
+msgstr ""
+
+#, python-format
+msgid "inotify-client: could not start inotify server: %s\n"
+msgstr ""
+
+#, python-format
+msgid "inotify-client: could not talk to new inotify server: %s\n"
+msgstr ""
+
+#, python-format
+msgid "inotify-client: failed to contact inotify server: %s\n"
+msgstr ""
+
+msgid "inotify-client: received empty answer from inotify server"
 msgstr ""
 
 #, python-format
@@ -2284,21 +2511,6 @@
 msgstr ""
 
 #, python-format
-msgid "status: %r %s -> %s\n"
-msgstr ""
-
-#, python-format
-msgid "%s dirstate reload\n"
-msgstr ""
-
-#, python-format
-msgid "%s end dirstate reload\n"
-msgstr ""
-
-msgid "rescanning due to .hgignore change\n"
-msgstr ""
-
-#, python-format
 msgid "%s event: created %s\n"
 msgstr ""
 
@@ -2330,8 +2542,22 @@
 msgid "%s hooking back up with %d bytes readable\n"
 msgstr ""
 
-#, python-format
-msgid "could not start server: %s"
+msgid "finished setup\n"
+msgstr ""
+
+#, python-format
+msgid "status: %r %s -> %s\n"
+msgstr ""
+
+msgid "rescanning due to .hgignore change\n"
+msgstr ""
+
+msgid "cannot start: socket is already bound"
+msgstr ""
+
+msgid ""
+"cannot start: tried linking .hg/inotify.sock to a temporary socket but .hg/"
+"inotify.sock already exists"
 msgstr ""
 
 #, python-format
@@ -2346,9 +2572,6 @@
 msgid "unrecognized query type: %s\n"
 msgstr ""
 
-msgid "finished setup\n"
-msgstr ""
-
 msgid ""
 "expand expressions into changelog and summaries\n"
 "\n"
@@ -2454,9 +2677,9 @@
 "    "
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "creating temporary repository at %s\n"
-msgstr "δημιουργία αποθετηρίου για το queue"
+msgstr "δημιουργία προσωρινού αποθετηρίου %s\n"
 
 msgid ""
 "\n"
@@ -2571,7 +2794,6 @@
 msgid "hg kwshrink [OPTION]... [FILE]..."
 msgstr ""
 
-#, fuzzy
 msgid ""
 "manage a stack of patches\n"
 "\n"
@@ -2595,29 +2817,6 @@
 "  remove patch from applied stack           qpop\n"
 "  refresh contents of top applied patch     qrefresh\n"
 msgstr ""
-"udvikling og håndtering af patches\n"
-"\n"
-"Denne udvidelse lader dig arbejde med en stak af patches i et\n"
-"Mercurial repository. Den håndterer to stakke af patches - alle kendte\n"
-"patches og alle anvendte patches (en delmængde af de kendte patches).\n"
-"\n"
-"Kendte patches er repræsenteret som patch-filer i .hg/patches\n"
-"biblioteket. Anvendte patches er både patch-filer og Mercurial\n"
-"ændringer.\n"
-"\n"
-"Almindelige opgaver (brug \"hg help kommado\" for flere detaljer):\n"
-"\n"
-"forbered repository til at arbejde med patches   qinit\n"
-"opret ny patch                                   qnew\n"
-"importer eksisterende patch                      qimport\n"
-"\n"
-"list patch-serien                                qseries\n"
-"list anvendte patches                            qapplied\n"
-"list navnet på den øverste patch                 qtop\n"
-"\n"
-"anvend og put patch på stakken                   qpush\n"
-"fjern patch fra stakken                          qpop\n"
-"genopfrisk indholdet af den øverste patch        qrefresh\n"
 
 #, python-format
 msgid "%s appears more than once in %s"
@@ -2700,9 +2899,9 @@
 msgid "applying %s\n"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "unable to read %s\n"
-msgstr " ενημέρωση σε %d:%s\n"
+msgstr "αποτυχία ανάγνωσης του %s\n"
 
 #, python-format
 msgid "imported patch %s\n"
@@ -2769,7 +2968,7 @@
 
 #, python-format
 msgid "error unlinking %s\n"
-msgstr ""
+msgstr "σφάλμα διαγραφής του %s\n"
 
 #, python-format
 msgid "patch name \"%s\" is ambiguous:\n"
@@ -2779,12 +2978,11 @@
 msgid "patch %s not in series"
 msgstr ""
 
-#, fuzzy
 msgid "(working directory not at a head)\n"
-msgstr "χώρος εργασίας του %s"
+msgstr "(ο χώρος εργασίας δεν ταιριάζει με κάποιο υπάρχοντα κλάδο)\n"
 
 msgid "no patches in series\n"
-msgstr ""
+msgstr "δεν υπάρχουν patches στην ακολουθία\n"
 
 #, python-format
 msgid "cannot push to a previous patch: %s"
@@ -2824,10 +3022,10 @@
 
 #, python-format
 msgid "patch %s is not applied"
-msgstr ""
+msgstr "το patch %s δεν έχει εφαρμοστεί"
 
 msgid "no patches applied\n"
-msgstr ""
+msgstr "δεν έχει εφαρμοστεί κανένα patch\n"
 
 #, python-format
 msgid "qpop: %s is already at the top\n"
@@ -2846,12 +3044,12 @@
 msgid "deletions found between repo revs"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "popping %s\n"
 msgstr "αφαίρεση του %s\n"
 
 msgid "patch queue now empty\n"
-msgstr ""
+msgstr "η ακολουθία των patches είναι τώρα κενή\n"
 
 msgid "cannot refresh a revision with children"
 msgstr ""
@@ -2873,7 +3071,7 @@
 
 #, python-format
 msgid "restoring status: %s\n"
-msgstr ""
+msgstr "επαναφορά κατάστασης: %s\n"
 
 msgid "save entry has children, leaving it alone\n"
 msgstr ""
@@ -2943,14 +3141,14 @@
 
 #, python-format
 msgid "patch %s does not exist"
-msgstr ""
+msgstr "το patch %s δεν υπάρχει"
 
 msgid "need --name to import a patch from -"
 msgstr ""
 
 #, python-format
 msgid "adding %s to series file\n"
-msgstr ""
+msgstr "προσθήκη του %s στο αρχείο series\n"
 
 msgid ""
 "remove patches from queue\n"
@@ -3035,29 +3233,28 @@
 msgstr ""
 
 msgid "cloning main repository\n"
-msgstr ""
-
-#, fuzzy
+msgstr "κλωνοποίηση του κεντρικού αποθετηρίου\n"
+
 msgid "cloning patch repository\n"
-msgstr "δε μπορεί να δημιουργηθεί ένα νέο αποθετήριο μέσω http"
+msgstr ""
 
 msgid "stripping applied patches from destination repository\n"
 msgstr ""
 
 msgid "updating destination repository\n"
-msgstr ""
+msgstr "ενημέρωση του αποθετηρίου προορισμού\n"
 
 msgid "commit changes in the queue repository"
 msgstr ""
 
 msgid "print the entire series file"
-msgstr ""
+msgstr "προβολή ολόκληρης της ακολουθίας των patches"
 
 msgid "print the name of the current patch"
-msgstr ""
+msgstr "προβολή του ονόματος του τρέχοντος patch"
 
 msgid "print the name of the next patch"
-msgstr ""
+msgstr "προβολή του ονόματος του επόμενου patch"
 
 msgid "print the name of the previous patch"
 msgstr "προβολή του ονόματος του προηγούμενου patch"
@@ -3106,7 +3303,7 @@
 msgstr ""
 
 msgid "option \"-e\" incompatible with \"-m\" or \"-l\""
-msgstr ""
+msgstr "η επιλογή \"-e\" είναι ασύμβατη με τις \"-m\" και \"-l\""
 
 msgid ""
 "diff of the current patch and subsequent modifications\n"
@@ -3141,7 +3338,7 @@
 msgstr ""
 
 msgid "No patches applied"
-msgstr ""
+msgstr "Δεν έχει εφαρμοστεί κανένα patch"
 
 #, python-format
 msgid "Skipping already folded patch %s"
@@ -3153,10 +3350,12 @@
 
 #, python-format
 msgid "Error folding patch %s"
-msgstr ""
+msgstr "Σφάλμα συγχώνευσης του patch %s"
 
 msgid "push or pop patches until named patch is at top of stack"
 msgstr ""
+"εφαρμογή ή αφαίρεση patches μέχρι το patch προορισμού να είναι στην κορυφή "
+"της στοίβας"
 
 msgid ""
 "set or print guards for a patch\n"
@@ -3171,7 +3370,8 @@
 "    With arguments, set guards for the named patch.\n"
 "    NOTE: Specifying negative guards now requires '--'.\n"
 "\n"
-"    To set guards on another patch:\n"
+"    To set guards on another patch::\n"
+"\n"
 "      hg qguard -- other.patch +2.6.17 -stable\n"
 "    "
 msgstr ""
@@ -3184,7 +3384,7 @@
 
 #, python-format
 msgid "no patch named %s"
-msgstr ""
+msgstr "δεν υπάρχει patch με το όνομα %s"
 
 msgid "print the header of the topmost or specified patch"
 msgstr ""
@@ -3202,7 +3402,7 @@
 
 #, python-format
 msgid "merging with queue at: %s\n"
-msgstr ""
+msgstr "συγχώνευση με την ουρά: %s\n"
 
 msgid ""
 "pop the current patch off the stack\n"
@@ -3226,17 +3426,17 @@
 
 #, python-format
 msgid "%s already exists"
-msgstr ""
+msgstr "το %s υπάρχει ήδη"
 
 #, python-format
 msgid "A patch named %s already exists in the series file"
-msgstr ""
+msgstr "Υπάρχει ήδη ένα patch με το όνομα %s στο αρχείο series "
 
 msgid "restore the queue state saved by a revision"
 msgstr ""
 
 msgid "save current queue state"
-msgstr ""
+msgstr "αποθήκευση της τρέχουσας κατάστασης της σειράς patch"
 
 #, python-format
 msgid "destination %s exists and is not a directory"
@@ -3248,7 +3448,7 @@
 
 #, python-format
 msgid "copy %s to %s\n"
-msgstr ""
+msgstr "αντιγραφή του %s σε %s\n"
 
 msgid ""
 "strip a revision and all its descendants from the repository\n"
@@ -3266,7 +3466,7 @@
 "    qselect to tell mq which guards to use. A patch will be pushed if\n"
 "    it has no guards or any positive guards match the currently\n"
 "    selected guard, but will not be pushed if any negative guards\n"
-"    match the current guard. For example:\n"
+"    match the current guard. For example::\n"
 "\n"
 "        qguard foo.patch -stable    (negative guard)\n"
 "        qguard bar.patch +stable    (positive guard)\n"
@@ -3378,9 +3578,8 @@
 msgid "use uncompressed transfer (fast over LAN)"
 msgstr ""
 
-#, fuzzy
 msgid "location of source patch repository"
-msgstr "δε μπορεί να δημιουργηθεί ένα νέο αποθετήριο μέσω http"
+msgstr ""
 
 msgid "hg qclone [OPTION]... SOURCE [DEST]"
 msgstr ""
@@ -3431,7 +3630,7 @@
 msgstr ""
 
 msgid "name of patch file"
-msgstr ""
+msgstr "όνομα του αρχείου patch"
 
 msgid "overwrite existing files"
 msgstr ""
@@ -3484,7 +3683,6 @@
 msgid "queue name to pop"
 msgstr ""
 
-#, fuzzy
 msgid "forget any local changes to patched files"
 msgstr "ακύρωση όλων των τοπικών αλλαγών"
 
@@ -3533,9 +3731,8 @@
 msgid "delete save entry"
 msgstr ""
 
-#, fuzzy
 msgid "update queue working directory"
-msgstr "χώρος εργασίας του %s"
+msgstr ""
 
 msgid "hg qrestore [-d] [-u] REV"
 msgstr ""
@@ -3719,10 +3916,13 @@
 "  ignore = version, help, update\n"
 "\n"
 "You can also enable the pager only for certain commands using\n"
-"pager.attend::\n"
+"pager.attend. Below is the default list of commands to be paged::\n"
 "\n"
 "  [pager]\n"
-"  attend = log\n"
+"  attend = annotate, cat, diff, export, glog, log, qdiff\n"
+"\n"
+"Setting pager.attend to an empty value will cause all commands to be\n"
+"paged.\n"
 "\n"
 "If pager.attend is present, pager.ignore will be ignored.\n"
 "\n"
@@ -3816,13 +4016,13 @@
 msgstr ""
 
 #, python-format
-msgid "%sPlease enter a valid value"
+msgid "%s Please enter a valid value"
 msgstr ""
 
 msgid "Please enter a valid value.\n"
 msgstr ""
 
-msgid "does the diffstat above look okay? "
+msgid "does the diffstat above look okay?"
 msgstr ""
 
 msgid "diffstat rejected"
@@ -4145,11 +4345,10 @@
 msgstr ""
 
 msgid "collapse the rebased changesets"
-msgstr ""
-
-#, fuzzy
+msgstr "συγχώνευση των αλλαγών καθώς μεταφέρονται"
+
 msgid "keep original changesets"
-msgstr "το %s δεν υπάρχει στα manifests"
+msgstr ""
 
 msgid "keep original branch names"
 msgstr ""
@@ -4218,9 +4417,6 @@
 msgid " and "
 msgstr ""
 
-msgid "y"
-msgstr ""
-
 #, python-format
 msgid "record this change to %r?"
 msgstr ""
@@ -4273,6 +4469,68 @@
 msgid "hg qrecord [OPTION]... PATCH [FILE]..."
 msgstr ""
 
+msgid "recreates hardlinks between repository clones"
+msgstr ""
+
+msgid ""
+"recreate hardlinks between two repositories\n"
+"\n"
+"    When repositories are cloned locally, their data files will be\n"
+"    hardlinked so that they only use the space of a single repository.\n"
+"\n"
+"    Unfortunately, subsequent pulls into either repository will break\n"
+"    hardlinks for any files touched by the new changesets, even if\n"
+"    both repositories end up pulling the same changes.\n"
+"\n"
+"    Similarly, passing --rev to \"hg clone\" will fail to use any\n"
+"    hardlinks, falling back to a complete copy of the source\n"
+"    repository.\n"
+"\n"
+"    This command lets you recreate those hardlinks and reclaim that\n"
+"    wasted space.\n"
+"\n"
+"    This repository will be relinked to share space with ORIGIN, which\n"
+"    must be on the same local disk. If ORIGIN is omitted, looks for\n"
+"    \"default-relink\", then \"default\", in [paths].\n"
+"\n"
+"    Do not attempt any read operations on this repository while the\n"
+"    command is running. (Both repositories will be locked against\n"
+"    writes.)\n"
+"    "
+msgstr ""
+
+#, python-format
+msgid "relinking %s to %s\n"
+msgstr ""
+
+#, python-format
+msgid "collected %d candidate storage files\n"
+msgstr ""
+
+msgid "source and destination are on different devices"
+msgstr ""
+
+#, python-format
+msgid "not linkable: %s\n"
+msgstr ""
+
+#, python-format
+msgid "pruned down to %d probably relinkable files\n"
+msgstr ""
+
+msgid " files"
+msgstr ""
+
+msgid "relink"
+msgstr ""
+
+#, python-format
+msgid "relinked %d files (%d bytes reclaimed)\n"
+msgstr ""
+
+msgid "[ORIGIN]"
+msgstr ""
+
 msgid "share a common history between several working directories"
 msgstr ""
 
@@ -4287,9 +4545,8 @@
 "    "
 msgstr ""
 
-#, fuzzy
 msgid "do not create a working copy"
-msgstr "(δώστε 'hg update' για να εξάγετε αντίγραφο εργασίας)\n"
+msgstr ""
 
 msgid "[-U] SOURCE [DEST]"
 msgstr ""
@@ -4670,15 +4927,13 @@
 msgid "moving %s to %s\n"
 msgstr "μετακίνηση του %s στο %s\n"
 
-#, fuzzy, python-format
+#, python-format
 msgid "copying %s to %s\n"
-msgstr "μετακίνηση του %s στο %s\n"
+msgstr "αντιγραφή του %s στο %s\n"
 
 #, python-format
 msgid "%s has not been committed yet, so no copy data will be stored for %s.\n"
 msgstr ""
-"%s er endnu ikke comitted, så der vil ikke blive gemt kopieringsdata for %"
-"s.\n"
 
 msgid "no source or destination specified"
 msgstr ""
@@ -4688,7 +4943,6 @@
 
 msgid "with multiple sources, destination must be an existing directory"
 msgstr ""
-"destinationen skal være en eksisterende mappe når der angivet flere kilder"
 
 #, python-format
 msgid "destination %s is not a directory"
@@ -4775,10 +5029,6 @@
 msgid "cannot follow nonexistent file: \"%s\""
 msgstr ""
 
-#, python-format
-msgid "%s:%s copy source revision cannot be found!\n"
-msgstr ""
-
 msgid "can only follow copies/renames for explicit filenames"
 msgstr ""
 
@@ -4799,17 +5049,17 @@
 msgid "HG: branch '%s'"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "HG: subrepo %s"
-msgstr "καθαρισμός %s\n"
+msgstr ""
 
 #, python-format
 msgid "HG: added %s"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "HG: changed %s"
-msgstr "προσθήκη αλλαγής %s\n"
+msgstr ""
 
 #, python-format
 msgid "HG: removed %s"
@@ -4821,7 +5071,6 @@
 msgid "empty commit message"
 msgstr ""
 
-#, fuzzy
 msgid ""
 "add the specified files on the next commit\n"
 "\n"
@@ -4834,17 +5083,6 @@
 "    If no names are given, add all files to the repository.\n"
 "    "
 msgstr ""
-"tilføj de angivne filer ved næste commit\n"
-"\n"
-"    Opskriv filer til at blive versionsstyret og tilføjet til\n"
-"    repository'et.\n"
-"\n"
-"    Filerne vil bliver tilføjet til repository'et ved næste commit.\n"
-"    For at omgøre en tilføjelse før det, se hg revert.\n"
-"\n"
-"    Hvis der ikke er angivet nogen navne tilføjes alle filer i\n"
-"    repository'et.\n"
-"    "
 
 msgid ""
 "add all new files, delete all missing files\n"
@@ -4904,14 +5142,14 @@
 "    directory; use -r/--rev to specify a different revision.\n"
 "\n"
 "    To specify the type of archive to create, use -t/--type. Valid\n"
-"    types are::\n"
-"\n"
-"      \"files\" (default): a directory full of files\n"
-"      \"tar\": tar archive, uncompressed\n"
-"      \"tbz2\": tar archive, compressed using bzip2\n"
-"      \"tgz\": tar archive, compressed using gzip\n"
-"      \"uzip\": zip archive, uncompressed\n"
-"      \"zip\": zip archive, compressed using deflate\n"
+"    types are:\n"
+"\n"
+"    :``files``: a directory full of files (default)\n"
+"    :``tar``:   tar archive, uncompressed\n"
+"    :``tbz2``:  tar archive, compressed using bzip2\n"
+"    :``tgz``:   tar archive, compressed using gzip\n"
+"    :``uzip``:  zip archive, uncompressed\n"
+"    :``zip``:   zip archive, compressed using deflate\n"
 "\n"
 "    The exact name of the destination archive or directory is given\n"
 "    using a format string; see 'hg help export' for details.\n"
@@ -5010,13 +5248,11 @@
 "    "
 msgstr ""
 
-#, fuzzy
 msgid "The first good revision is:\n"
-msgstr "Η πρώτη %s αλλαγή είναι:\n"
-
-#, fuzzy
+msgstr "Η πρώτη καλή %s αλλαγή είναι:\n"
+
 msgid "The first bad revision is:\n"
-msgstr "Η πρώτη %s αλλαγή είναι:\n"
+msgstr "Η πρώτη κακή %s αλλαγή είναι:\n"
 
 msgid "Due to skipped revisions, the first good revision could be any of:\n"
 msgstr ""
@@ -5044,9 +5280,9 @@
 msgid "%s killed"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "Changeset %d:%s: %s\n"
-msgstr "Αλλαγή: %s: %s\n"
+msgstr "Αλλαγή %d:%s: %s\n"
 
 #, python-format
 msgid "Testing changeset %d:%s (%d changesets remaining, ~%d tests)\n"
@@ -5138,11 +5374,11 @@
 "\n"
 "    Output may be to a file, in which case the name of the file is\n"
 "    given using a format string. The formatting rules are the same as\n"
-"    for the export command, with the following additions::\n"
-"\n"
-"      %s   basename of file being printed\n"
-"      %d   dirname of file being printed, or '.' if in repository root\n"
-"      %p   root-relative path name of file being printed\n"
+"    for the export command, with the following additions:\n"
+"\n"
+"    :``%s``: basename of file being printed\n"
+"    :``%d``: dirname of file being printed, or '.' if in repository root\n"
+"    :``%p``: root-relative path name of file being printed\n"
 "    "
 msgstr ""
 
@@ -5157,22 +5393,36 @@
 "    The location of the source is added to the new repository's\n"
 "    .hg/hgrc file, as the default to be used for future pulls.\n"
 "\n"
-"    If you use the -r/--rev option to clone up to a specific revision,\n"
-"    no subsequent revisions (including subsequent tags) will be\n"
-"    present in the cloned repository. This option implies --pull, even\n"
-"    on local repositories.\n"
-"\n"
-"    By default, clone will check out the head of the 'default' branch.\n"
-"    If the -U/--noupdate option is used, the new clone will contain\n"
-"    only a repository (.hg) and no working copy (the working copy\n"
-"    parent is the null revision).\n"
-"\n"
 "    See 'hg help urls' for valid source format details.\n"
 "\n"
 "    It is possible to specify an ssh:// URL as the destination, but no\n"
 "    .hg/hgrc and working directory will be created on the remote side.\n"
 "    Please see 'hg help urls' for important details about ssh:// URLs.\n"
 "\n"
+"    If the -U/--noupdate option is specified, the new clone will contain\n"
+"    only a repository (.hg) and no working copy (the working copy parent\n"
+"    will be the null changeset). Otherwise, clone will initially check\n"
+"    out (in order of precedence):\n"
+"\n"
+"    a) the changeset, tag or branch specified with -u/--updaterev\n"
+"    b) the changeset, tag or branch given with the first -r/--rev\n"
+"    c) the head of the default branch\n"
+"\n"
+"    Use 'hg clone -u . src dst' to checkout the source repository's\n"
+"    parent changeset (applicable for local source repositories only).\n"
+"\n"
+"    A set of changesets (tags, or branch names) to pull may be specified\n"
+"    by listing each changeset (tag, or branch name) with -r/--rev.\n"
+"    If -r/--rev is used, the cloned repository will contain only a subset\n"
+"    of the changesets of the source repository. Only the set of changesets\n"
+"    defined by all -r/--rev options (including all their ancestors)\n"
+"    will be pulled into the destination repository.\n"
+"    No subsequent changesets (including subsequent tags) will be present\n"
+"    in the destination.\n"
+"\n"
+"    Using -r/--rev (or 'clone src#rev dest') implies --pull, even for\n"
+"    local source repositories.\n"
+"\n"
 "    For efficiency, hardlinks are used for cloning whenever the source\n"
 "    and destination are on the same filesystem (note this applies only\n"
 "    to the repository data, not to the checked out files). Some\n"
@@ -5194,6 +5444,9 @@
 "    "
 msgstr ""
 
+msgid "cannot specify both --noupdate and --updaterev"
+msgstr ""
+
 msgid ""
 "commit the specified files or all outstanding changes\n"
 "\n"
@@ -5215,7 +5468,7 @@
 msgstr ""
 
 msgid "nothing changed\n"
-msgstr ""
+msgstr "δεν έγινε καμία αλλαγή\n"
 
 msgid "created new head\n"
 msgstr "δημιουργήθηκε νέο παρακλάδι\n"
@@ -5247,7 +5500,7 @@
 msgstr "Δεν υπάρχει αποθετήριο Mercurial εδώ (δε βρέθηκε υποκατάλογος .hg)"
 
 msgid "either two or three arguments required"
-msgstr "απαιτούνται είτε δύο ή τρία ορίσματα"
+msgstr "απαιτούνται δύο ή τρία ορίσματα"
 
 msgid "returns the completion list associated with the given command"
 msgstr ""
@@ -5256,7 +5509,7 @@
 msgstr ""
 
 msgid "validate the correctness of the current dirstate"
-msgstr ""
+msgstr "έλεγχος εγκυρότητας της τρέχουσας dirstate"
 
 #, python-format
 msgid "%s in state %s, but not in manifest1\n"
@@ -5294,7 +5547,7 @@
 msgstr ""
 
 msgid "only one config item permitted"
-msgstr ""
+msgstr "σε αυτό το σημείο επιτρέπεται μόνο ένα όρισμα ρυθμίσεων"
 
 msgid ""
 "manually set the parents of the current working directory\n"
@@ -5305,58 +5558,58 @@
 msgstr ""
 
 msgid "show the contents of the current dirstate"
-msgstr ""
+msgstr "προβολή περιεχομένων της τρέχουσας dirstate"
 
 #, python-format
 msgid "copy: %s -> %s\n"
 msgstr "αντιγραφή: %s -> %s\n"
 
 msgid "dump the contents of a data file revision"
-msgstr ""
+msgstr "εκτύπωση περιεχομένων μιας έκδοσης αρχείου δεδομένων"
 
 #, python-format
 msgid "invalid revision identifier %s"
 msgstr "μη έγκυρο όνομα αλλαγής: %s"
 
 msgid "parse and display a date"
-msgstr ""
+msgstr "αναγνώριση και εκτύπωση μιας ημερομηνίας"
 
 msgid "dump the contents of an index file"
-msgstr ""
+msgstr "εκτύπωση περιεχομένων ενός αρχείου καταλόγου"
 
 msgid "dump an index DAG as a graphviz dot file"
-msgstr ""
+msgstr "εκτύπωση του γράφου ενός καταλόγου σε μορφή graphviz dot"
 
 msgid "test Mercurial installation"
-msgstr ""
+msgstr "δοκιμή της εγκατάστασης του Mercurial"
 
 #, python-format
 msgid "Checking encoding (%s)...\n"
-msgstr ""
+msgstr "Έλεγχος κωδικοποίησης (%s)...\n"
 
 msgid " (check that your locale is properly set)\n"
-msgstr ""
+msgstr " (ελέγξτε ότι έχετε τις σωστές ρυθμίσεις γλώσσας)\n"
 
 msgid "Checking extensions...\n"
-msgstr ""
+msgstr "Έλεγχος επεκτάσεων...\n"
 
 msgid " One or more extensions could not be found"
-msgstr ""
+msgstr " Δεν ήταν δυνατή η εύρεση κάποιων επεκτάσεων"
 
 msgid " (check that you compiled the extensions)\n"
-msgstr ""
+msgstr " (ελέγξτε ότι έχετε μεταγλωττίσει τις επεκτάσεις)\n"
 
 msgid "Checking templates...\n"
-msgstr ""
+msgstr "Έλεγχος προτύπων...\n"
 
 msgid " (templates seem to have been installed incorrectly)\n"
-msgstr ""
+msgstr " (υπάρχει κάποιο πρόβλημα με την εγκατάσταση των προτύπων)\n"
 
 msgid "Checking patch...\n"
-msgstr ""
+msgstr "Έλεγχος εργαλείου patch...\n"
 
 msgid " patch call failed:\n"
-msgstr ""
+msgstr " η κλήση του patch απέτυχε:\n"
 
 msgid " unexpected patch output!\n"
 msgstr ""
@@ -5453,16 +5706,16 @@
 "    first parent only.\n"
 "\n"
 "    Output may be to a file, in which case the name of the file is\n"
-"    given using a format string. The formatting rules are as follows::\n"
-"\n"
-"      %%   literal \"%\" character\n"
-"      %H   changeset hash (40 bytes of hexadecimal)\n"
-"      %N   number of patches being generated\n"
-"      %R   changeset revision number\n"
-"      %b   basename of the exporting repository\n"
-"      %h   short-form changeset hash (12 bytes of hexadecimal)\n"
-"      %n   zero-padded sequence number, starting at 1\n"
-"      %r   zero-padded changeset revision number\n"
+"    given using a format string. The formatting rules are as follows:\n"
+"\n"
+"    :``%%``: literal \"%\" character\n"
+"    :``%H``: changeset hash (40 bytes of hexadecimal)\n"
+"    :``%N``: number of patches being generated\n"
+"    :``%R``: changeset revision number\n"
+"    :``%b``: basename of the exporting repository\n"
+"    :``%h``: short-form changeset hash (12 bytes of hexadecimal)\n"
+"    :``%n``: zero-padded sequence number, starting at 1\n"
+"    :``%r``: zero-padded changeset revision number\n"
 "\n"
 "    Without the -a/--text option, export will avoid generating diffs\n"
 "    of files it detects as binary. With -a, export will generate a\n"
@@ -5587,8 +5840,6 @@
 
 msgid "use \"hg help\" for the full list of commands or \"hg -v\" for details"
 msgstr ""
-"brug \"hg help\" for den fulde liste af kommandoer eller \"hg -v\" for "
-"detaljer"
 
 #, python-format
 msgid "use \"hg -v help%s\" to show aliases and global options"
@@ -5623,21 +5874,14 @@
 msgid "no commands defined\n"
 msgstr "δεν έχει οριστεί καμία εντολή\n"
 
-#, fuzzy
-msgid "enabled extensions:"
-msgstr ""
-"\n"
-"ενεργές επεκτάσεις:\n"
-"\n"
-
 msgid "no help text available"
 msgstr "δεν υπάρχει κείμενο βοήθειας"
 
-#, fuzzy, python-format
+#, python-format
 msgid ""
 "%s extension - %s\n"
 "\n"
-msgstr "** Ενεργές επεκτάσεις: %s\n"
+msgstr ""
 
 msgid "Mercurial Distributed SCM\n"
 msgstr "Mercurial Κατανεμημένο SCM\n"
@@ -5649,6 +5893,12 @@
 "βασικές εντολές:\n"
 "\n"
 
+msgid "enabled extensions:"
+msgstr "ενεργές επεκτάσεις:"
+
+msgid "DEPRECATED"
+msgstr ""
+
 msgid ""
 "\n"
 "additional help topics:\n"
@@ -5677,7 +5927,8 @@
 msgid ""
 "import an ordered set of patches\n"
 "\n"
-"    Import a list of patches and commit them individually.\n"
+"    Import a list of patches and commit them individually (unless\n"
+"    --no-commit is specified).\n"
 "\n"
 "    If there are outstanding changes in the working directory, import\n"
 "    will abort unless given the -f/--force flag.\n"
@@ -6024,14 +6275,16 @@
 msgid ""
 "retry file merges from a merge or update\n"
 "\n"
-"    This command will cleanly retry unresolved file merges using file\n"
-"    revisions preserved from the last update or merge. To attempt to\n"
-"    resolve all unresolved files, use the -a/--all switch.\n"
+"    This command can cleanly retry unresolved file merges using file\n"
+"    revisions preserved from the last update or merge.\n"
 "\n"
 "    If a conflict is resolved manually, please note that the changes\n"
 "    will be overwritten if the merge is retried with resolve. The\n"
 "    -m/--mark switch should be used to mark the file as resolved.\n"
 "\n"
+"    You can specify a set of files to operate on, or use the -a/-all\n"
+"    switch to select all unresolved files.\n"
+"\n"
 "    This command also allows listing resolved files and manually\n"
 "    indicating whether or not files are resolved. All files must be\n"
 "    marked as resolved before a commit is permitted.\n"
@@ -6051,8 +6304,8 @@
 
 msgid "no files or directories specified; use --all to remerge all files"
 msgstr ""
-"ingen filer eller mapper specificeret; brug --all for at gen-sammenføje alle "
-"filerne"
+"δεν ορίστηκαν αρχεία ή κατάλογοι· χρησιμοποιήστε την επιλογή --all για να "
+"επαναλάβετε τη συγχώνευση για όλα τα αρχεία"
 
 msgid ""
 "restore individual files or directories to an earlier state\n"
@@ -6131,13 +6384,13 @@
 "    Transactions are used to encapsulate the effects of all commands\n"
 "    that create new changesets or propagate existing changesets into a\n"
 "    repository. For example, the following commands are transactional,\n"
-"    and their effects can be rolled back::\n"
-"\n"
-"      commit\n"
-"      import\n"
-"      pull\n"
-"      push (with this repository as destination)\n"
-"      unbundle\n"
+"    and their effects can be rolled back:\n"
+"\n"
+"    - commit\n"
+"    - import\n"
+"    - pull\n"
+"    - push (with this repository as destination)\n"
+"    - unbundle\n"
 "\n"
 "    This command is not intended for use on public repositories. Once\n"
 "    changes are visible for pull by other users, rolling a transaction\n"
@@ -6216,17 +6469,15 @@
 "    "
 msgstr ""
 
-#, fuzzy
 msgid " (empty repository)"
-msgstr "δε μπορεί να δημιουργηθεί ένα νέο αποθετήριο μέσω http"
-
-#, fuzzy
+msgstr ""
+
 msgid " (no revision checked out)"
-msgstr "αλλαγή"
-
-#, fuzzy, python-format
+msgstr ""
+
+#, python-format
 msgid "parent: %d:%s %s\n"
-msgstr "Αλλαγή: %s: %s\n"
+msgstr ""
 
 #, python-format
 msgid "branch: %s\n"
@@ -6236,13 +6487,13 @@
 msgid "%d added"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "%d modified"
-msgstr "έχει τροποποιηθεί"
+msgstr "%d τροποποιήθηκαν"
 
 #, python-format
 msgid "%d removed"
-msgstr ""
+msgstr "%d αφαιρέθηκαν"
 
 #, python-format
 msgid "%d deleted"
@@ -6272,20 +6523,20 @@
 msgid " (new branch head)"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "commit: %s\n"
-msgstr "τώρα στο: %s\n"
+msgstr ""
 
 msgid "update: (current)\n"
 msgstr ""
 
 #, python-format
 msgid "update: %d new changesets (update)\n"
-msgstr ""
+msgstr "update: %d νέες αλλαγές (ενημερώστε)\n"
 
 #, python-format
 msgid "update: %d new changesets, %d branch heads (merge)\n"
-msgstr ""
+msgstr "update: %d νέες αλλαγές, %d παρακλάδια (συγχωνεύστε)\n"
 
 msgid "1 or more incoming"
 msgstr ""
@@ -6294,15 +6545,13 @@
 msgid "%d outgoing"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "remote: %s\n"
-msgstr "απομακρυσμένο:"
-
-#, fuzzy
+msgstr "απομακρυσμένο: %s\n"
+
 msgid "remote: (synced)\n"
-msgstr "απομακρυσμένο:"
-
-#, fuzzy
+msgstr "απομακρυσμένο: (συγχρονίστηκε)\n"
+
 msgid ""
 "add one or more tags for the current or given revision\n"
 "\n"
@@ -6410,30 +6659,35 @@
 "update working directory\n"
 "\n"
 "    Update the repository's working directory to the specified\n"
-"    revision, or the tip of the current branch if none is specified.\n"
-"    Use null as the revision to remove the working copy (like 'hg\n"
+"    changeset.\n"
+"\n"
+"    If no changeset is specified, attempt to update to the head of the\n"
+"    current branch. If this head is a descendant of the working\n"
+"    directory's parent, update to it, otherwise abort.\n"
+"\n"
+"    The following rules apply when the working directory contains\n"
+"    uncommitted changes:\n"
+"\n"
+"    1. If neither -c/--check nor -C/--clean is specified, and if\n"
+"       the requested changeset is an ancestor or descendant of\n"
+"       the working directory's parent, the uncommitted changes\n"
+"       are merged into the requested changeset and the merged\n"
+"       result is left uncommitted. If the requested changeset is\n"
+"       not an ancestor or descendant (that is, it is on another\n"
+"       branch), the update is aborted and the uncommitted changes\n"
+"       are preserved.\n"
+"\n"
+"    2. With the -c/--check option, the update is aborted and the\n"
+"       uncommitted changes are preserved.\n"
+"\n"
+"    3. With the -C/--clean option, uncommitted changes are discarded and\n"
+"       the working directory is updated to the requested changeset.\n"
+"\n"
+"    Use null as the changeset to remove the working directory (like 'hg\n"
 "    clone -U').\n"
 "\n"
-"    When the working directory contains no uncommitted changes, it\n"
-"    will be replaced by the state of the requested revision from the\n"
-"    repository. When the requested revision is on a different branch,\n"
-"    the working directory will additionally be switched to that\n"
-"    branch.\n"
-"\n"
-"    When there are uncommitted changes, use option -C/--clean to\n"
-"    discard them, forcibly replacing the state of the working\n"
-"    directory with the requested revision. Alternately, use -c/--check\n"
-"    to abort.\n"
-"\n"
-"    When there are uncommitted changes and option -C/--clean is not\n"
-"    used, and the parent revision and requested revision are on the\n"
-"    same branch, and one of them is an ancestor of the other, then the\n"
-"    new working directory will contain the requested revision merged\n"
-"    with the uncommitted changes. Otherwise, the update will fail with\n"
-"    a suggestion to use 'merge' or 'update -C' instead.\n"
-"\n"
-"    If you want to update just one file to an older revision, use\n"
-"    revert.\n"
+"    If you want to update just one file to an older changeset, use 'hg "
+"revert'.\n"
 "\n"
 "    See 'hg help dates' for a list of formats valid for -d/--date.\n"
 "    "
@@ -6442,7 +6696,6 @@
 msgid "cannot specify both -c/--check and -C/--clean"
 msgstr ""
 
-#, fuzzy
 msgid "uncommitted local changes"
 msgstr "υπάρχουν τοπικές αλλαγές ακόμη"
 
@@ -6471,6 +6724,12 @@
 "This is free software; see the source for copying conditions. There is NO\n"
 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
 msgstr ""
+"\n"
+"Πνευματικά δικαιώματα (C) 2005-2009 Matt Mackall <mpm@selenic.com> και "
+"άλλοι\n"
+"Αυτό το πρόγραμμα είναι ελεύθερο λογισμικό· δείτε τον πηγαίο κώδικα για\n"
+"την άδεια χρήσης του. Δεν παρέχεται ΚΑΜΙΑ εγγύηση· ούτε καν για την\n"
+"ΕΜΠΟΡΕΥΣΙΜΟΤΗΤΑ ή την ΚΑΤΑΛΛΗΛΟΤΗΤΑ ΓΙΑ ΚΑΠΟΙΟ ΣΚΟΠΟ.\n"
 
 msgid "repository root directory or name of overlay bundle file"
 msgstr ""
@@ -6502,7 +6761,7 @@
 msgid "set the charset encoding mode"
 msgstr ""
 
-msgid "print traceback on exception"
+msgid "always print a traceback on exception"
 msgstr ""
 
 msgid "time how long the command takes"
@@ -6562,6 +6821,9 @@
 msgid "show which function each change is in"
 msgstr ""
 
+msgid "produce a diff that undoes the changes"
+msgstr ""
+
 msgid "ignore white space when comparing lines"
 msgstr ""
 
@@ -6574,6 +6836,9 @@
 msgid "number of lines of context to show"
 msgstr ""
 
+msgid "output diffstat-style summary of changes"
+msgstr ""
+
 msgid "guess renamed files by similarity (0<=s<=100)"
 msgstr ""
 
@@ -6703,7 +6968,10 @@
 msgid "the clone will only contain a repository (no working copy)"
 msgstr ""
 
-msgid "a changeset you would like to have after cloning"
+msgid "revision, tag or branch to check out"
+msgstr ""
+
+msgid "clone only the specified revisions and ancestors"
 msgstr ""
 
 msgid "[OPTION]... SOURCE [DEST]"
@@ -6727,9 +6995,8 @@
 msgid "[INDEX] REV1 REV2"
 msgstr ""
 
-#, fuzzy
 msgid "[COMMAND]"
-msgstr "ΕΝΤΟΛΕΣ"
+msgstr "[ΕΝΤΟΛΗ]"
 
 msgid "show the command options"
 msgstr ""
@@ -6773,9 +7040,8 @@
 msgid "[OPTION]..."
 msgstr ""
 
-#, fuzzy
 msgid "revision to check"
-msgstr "αλλαγή"
+msgstr "αλλαγή προς έλεγχο"
 
 msgid "[OPTION]... [-r REV1 [-r REV2]] [FILE]..."
 msgstr ""
@@ -6872,7 +7138,7 @@
 msgid "file to store the bundles into"
 msgstr ""
 
-msgid "a specific revision up to which you would like to pull"
+msgid "a specific remote revision up to which you would like to pull"
 msgstr ""
 
 msgid "[-p] [-n] [-M] [-f] [-r REV]... [--bundle FILENAME] [SOURCE]"
@@ -6950,9 +7216,8 @@
 msgid "show parents from the specified revision"
 msgstr ""
 
-#, fuzzy
 msgid "[-r REV] [FILE]"
-msgstr "[-r ΕΚΔΟΣΗ] [ΑΡΧΕΙΟ]"
+msgstr ""
 
 msgid "[NAME]"
 msgstr ""
@@ -6981,7 +7246,7 @@
 msgid "[OPTION]... SOURCE... DEST"
 msgstr ""
 
-msgid "remerge all unresolved files"
+msgid "select all unresolved files"
 msgstr ""
 
 msgid "list state of files needing merge"
@@ -6993,6 +7258,9 @@
 msgid "unmark files as resolved"
 msgstr ""
 
+msgid "hide status prefix"
+msgstr ""
+
 msgid "revert all changes when no arguments given"
 msgstr ""
 
@@ -7077,9 +7345,6 @@
 msgid "show only ignored files"
 msgstr ""
 
-msgid "hide status prefix"
-msgstr ""
-
 msgid "show source of copied files"
 msgstr ""
 
@@ -7110,19 +7375,18 @@
 msgid "[-u] FILE..."
 msgstr ""
 
-msgid "overwrite locally modified files (no backup)"
-msgstr ""
-
-#, fuzzy
+msgid "discard uncommitted changes (no backup)"
+msgstr ""
+
 msgid "check for uncommitted changes"
-msgstr "υπάρχουν τοπικές αλλαγές ακόμη"
-
-msgid "[-C] [-d DATE] [[-r] REV]"
+msgstr ""
+
+msgid "[-c] [-C] [-d DATE] [[-r] REV]"
 msgstr ""
 
 #, python-format
 msgid "config error at %s:%d: '%s'"
-msgstr ""
+msgstr "σφάλμα ρυθμίσεων στο %s:%d: '%s'"
 
 msgid "not found in manifest"
 msgstr ""
@@ -7130,9 +7394,8 @@
 msgid "branch name not in UTF-8!"
 msgstr ""
 
-#, fuzzy
 msgid "working directory state appears damaged!"
-msgstr "χώρος εργασίας του %s"
+msgstr "ο χώρος εργασίας έχει πρόβλημα!"
 
 #, python-format
 msgid "'\\n' and '\\r' disallowed in filenames: %r"
@@ -7185,8 +7448,6 @@
 "hg: command '%s' is ambiguous:\n"
 "    %s\n"
 msgstr ""
-"hg: kommandoen '%s' is tvetydig:\n"
-"    %s\n"
 
 #, python-format
 msgid "timed out waiting for lock held by %s"
@@ -7194,7 +7455,7 @@
 
 #, python-format
 msgid "lock held by %s"
-msgstr ""
+msgstr "κλειδωμένο από %s"
 
 #, python-format
 msgid "abort: %s: %s\n"
@@ -7265,26 +7526,33 @@
 
 #, python-format
 msgid "** Mercurial Distributed SCM (version %s)\n"
-msgstr "** Mercurial Κατανεμημένο SCM (έκδοση %s)\n"
+msgstr ""
 
 #, python-format
 msgid "** Extensions loaded: %s\n"
-msgstr "** Ενεργές επεκτάσεις: %s\n"
+msgstr ""
 
 #, python-format
 msgid "no definition for alias '%s'\n"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
+msgid ""
+"alias for: hg %s\n"
+"\n"
+"%s"
+msgstr ""
+
+#, python-format
 msgid "alias '%s' resolves to unknown command '%s'\n"
-msgstr "η αλλαγή αναφέρεται σε άγνωστο manifest %s"
+msgstr ""
 
 #, python-format
 msgid "alias '%s' resolves to ambiguous command '%s'\n"
 msgstr ""
 
 #, python-format
-msgid "malformed --config option: %s"
+msgid "malformed --config option: %r (use --config section.name=value)"
 msgstr ""
 
 #, python-format
@@ -7390,12 +7658,11 @@
 msgid "unknown bisect kind %s"
 msgstr ""
 
-#, fuzzy
 msgid "disabled extensions:"
-msgstr ""
-"\n"
-"ενεργές επεκτάσεις:\n"
-"\n"
+msgstr "ανενεργές επεκτάσεις:"
+
+msgid "Configuration Files"
+msgstr ""
 
 msgid "Date Formats"
 msgstr ""
@@ -7453,9 +7720,9 @@
 msgid "clone from remote to remote not supported"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "updating to branch %s\n"
-msgstr " ενημέρωση σε %d:%s\n"
+msgstr ""
 
 #, python-format
 msgid ""
@@ -7495,6 +7762,12 @@
 msgid "%s hook is invalid (\"%s\" not in a module)"
 msgstr ""
 
+msgid "exception from first failed import attempt:\n"
+msgstr ""
+
+msgid "exception from second failed import attempt:\n"
+msgstr ""
+
 #, python-format
 msgid "%s hook is invalid (import of \"%s\" failed)"
 msgstr ""
@@ -7546,7 +7819,7 @@
 msgstr ""
 
 msgid "authorization failed"
-msgstr ""
+msgstr "απαιτείται έλεγχος πρόσβασης"
 
 msgid "http error, possibly caused by proxy setting"
 msgstr ""
@@ -7556,7 +7829,11 @@
 msgstr ""
 
 #, python-format
-msgid "'%s' does not appear to be an hg repository"
+msgid ""
+"'%s' does not appear to be an hg repository:\n"
+"---%%<--- (%s)\n"
+"%s\n"
+"---%%<---\n"
 msgstr ""
 
 #, python-format
@@ -7620,15 +7897,15 @@
 msgid "working copy of .hgtags is changed (please commit .hgtags manually)"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "working directory has unknown parent '%s'!"
-msgstr "χώρος εργασίας του %s"
+msgstr ""
 
 #, python-format
 msgid "unknown revision '%s'"
 msgstr ""
 
-msgid "journal already exists - run hg recover"
+msgid "abandoned transaction found - run hg recover"
 msgstr ""
 
 msgid "rolling back interrupted transaction\n"
@@ -7662,9 +7939,8 @@
 msgid "cannot partially commit a merge (do not specify files or patterns)"
 msgstr ""
 
-#, fuzzy
 msgid "file not found!"
-msgstr "δε βρέθηκε!\n"
+msgstr "δε βρέθηκε!"
 
 msgid "no match under directory!"
 msgstr ""
@@ -7680,6 +7956,10 @@
 msgstr ""
 
 #, python-format
+msgid "note: commit message saved in %s\n"
+msgstr ""
+
+#, python-format
 msgid "trouble committing %s!\n"
 msgstr ""
 
@@ -7722,7 +8002,7 @@
 msgstr ""
 
 msgid "searching for changes\n"
-msgstr ""
+msgstr "αναζήτηση αλλαγών\n"
 
 msgid "already have changeset "
 msgstr ""
@@ -7872,9 +8152,8 @@
 "(n)one, e(x)ec or sym(l)ink?"
 msgstr ""
 
-#, fuzzy
 msgid "&None"
-msgstr "ολοκληρώθηκε\n"
+msgstr ""
 
 msgid "E&xec"
 msgstr ""
@@ -7895,7 +8174,7 @@
 msgstr ""
 
 msgid "&Delete"
-msgstr ""
+msgstr "&Διαγραφή"
 
 #, python-format
 msgid ""
@@ -7904,7 +8183,7 @@
 msgstr ""
 
 msgid "&Deleted"
-msgstr ""
+msgstr "&Διαγράφηκε"
 
 #, python-format
 msgid "update failed to remove %s: %s!\n"
@@ -7924,7 +8203,7 @@
 
 #, python-format
 msgid "branch %s not found"
-msgstr ""
+msgstr "δε βρέθηκε ο κλάδος %s"
 
 msgid "can't merge with ancestor"
 msgstr ""
@@ -7932,17 +8211,15 @@
 msgid "nothing to merge (use 'hg update' or check 'hg heads')"
 msgstr ""
 
-#, fuzzy
 msgid "outstanding uncommitted changes (use 'hg status' to list changes)"
-msgstr "υπάρχουν τοπικές αλλαγές ακόμη"
-
-msgid "crosses branches (use 'hg merge' or 'hg update -C' to discard changes)"
-msgstr ""
-
-msgid "crosses branches (use 'hg merge' or 'hg update -C')"
-msgstr ""
-
-msgid "crosses named branches (use 'hg update -C' to discard changes)"
+msgstr "υπάρχουν τοπικές αλλαγές ακόμη (δώστε 'hg status' για να δείτε τις αλλαγές)"
+
+msgid ""
+"crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard "
+"changes)"
+msgstr ""
+
+msgid "crosses branches (use 'hg merge' or use 'hg update -c')"
 msgstr ""
 
 #, python-format
@@ -8023,24 +8300,24 @@
 msgid "Unsupported line endings type: %s"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid " %d files changed, %d insertions(+), %d deletions(-)\n"
-msgstr "%d αρχεία, %d αλλαγές, %d εκδόσεις αρχείων\n"
+msgstr " %d αρχεία τροποποιήθηκαν, %d εισαγωγές(+), %d διαγραφές(-)\n"
 
 #, python-format
 msgid "exited with status %d"
-msgstr ""
+msgstr "τερμάτισε με κωδικό %d"
 
 #, python-format
 msgid "killed by signal %d"
-msgstr ""
+msgstr "διακοπή λόγω σήματος %d"
 
 #, python-format
 msgid "saving bundle to %s\n"
 msgstr ""
 
 msgid "adding branch\n"
-msgstr ""
+msgstr "προσθήκη κλάδου\n"
 
 #, python-format
 msgid "cannot %s; remote repository does not support the %r capability"
@@ -8110,7 +8387,7 @@
 msgstr ""
 
 msgid "remote: "
-msgstr "απομακρυσμένο:"
+msgstr "απομακρυσμένο: "
 
 #, python-format
 msgid "push refused: %s"
@@ -8119,6 +8396,10 @@
 msgid "unsynced changes"
 msgstr ""
 
+#, python-format
+msgid "'%s' does not appear to be an hg repository"
+msgstr ""
+
 msgid "cannot lock static-http repository"
 msgstr ""
 
@@ -8135,9 +8416,8 @@
 "use (l)ocal source (%s) or (r)emote source (%s)?"
 msgstr ""
 
-#, fuzzy
 msgid "&Remote"
-msgstr "απομακρυσμένο:"
+msgstr "&Απομακρυσμένο:"
 
 #, python-format
 msgid ""
@@ -8151,17 +8431,17 @@
 "use (c)hanged version or (d)elete?"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "removing subrepo %s\n"
-msgstr "αφαίρεση του %s\n"
-
-#, fuzzy, python-format
+msgstr "αφαίρεση του εμφωλιασμένου αποθετηρίου %s\n"
+
+#, python-format
 msgid "pulling subrepo %s\n"
-msgstr "καθαρισμός %s\n"
+msgstr "λήψη στο εμφωλιασμένο αποθετήριο %s\n"
 
 #, python-format
 msgid "pushing subrepo %s\n"
-msgstr ""
+msgstr "αποστολή από το εμφωλιασμένο αποθετήριο %s\n"
 
 #, python-format
 msgid "%s, line %s: %s\n"
@@ -8221,23 +8501,23 @@
 msgid "ignoring untrusted configuration option %s.%s = %s\n"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "%s.%s not a boolean ('%s')"
-msgstr "η αλλαγή %s δεν είναι γονική αλλαγή της %s"
+msgstr ""
 
 msgid "enter a commit username:"
 msgstr ""
 
 #, python-format
 msgid "No username found, using '%s' instead\n"
-msgstr ""
-
-msgid "Please specify a username."
+msgstr "Δε βρέθηκε όνομα χρήστη. Χρησιμοποιήθηκε το όνομα '%s'\n"
+
+msgid "no username supplied (see \"hg help config\")"
 msgstr ""
 
 #, python-format
 msgid "username %s contains a newline\n"
-msgstr ""
+msgstr "το όνομα χρήστη %s περιέχει το χαρακτήρα αλλαγή γραμμής\n"
 
 msgid "response expected"
 msgstr ""
@@ -8274,11 +8554,11 @@
 
 #, python-format
 msgid "command '%s' failed: %s"
-msgstr ""
+msgstr "η εντολή '%s' απέτυχε: %s"
 
 #, python-format
 msgid "path contains illegal component: %s"
-msgstr ""
+msgstr "η διαδρομή περιέχει μη έγκυρα στοιχεία: %s"
 
 #, python-format
 msgid "path %r is inside repo %r"
@@ -8289,23 +8569,23 @@
 msgstr ""
 
 msgid "Hardlinks not supported"
-msgstr ""
+msgstr "Δεν υποστηρίζονται hard links"
 
 #, python-format
 msgid "could not symlink to %r: %s"
-msgstr ""
+msgstr "απέτυχε η δημιουργία συντόμευσης του %r: %s"
 
 #, python-format
 msgid "invalid date: %r "
-msgstr ""
+msgstr "μη έγκυρη ημερομηνία: %r "
 
 #, python-format
 msgid "date exceeds 32 bits: %d"
-msgstr ""
+msgstr "η ημερομηνία ξεπερνά τα 32 διφία: %d"
 
 #, python-format
 msgid "impossible time zone offset: %d"
-msgstr ""
+msgstr "μη έγκυρη μετατόπιση ζώνης ώρας: %d"
 
 #, python-format
 msgid "invalid day spec: %s"
@@ -8352,10 +8632,10 @@
 msgstr "%.0f bytes"
 
 msgid "cannot verify bundle or remote repos"
-msgstr ""
+msgstr "δεν είναι δυνατός ο έλεγχος σε bundles ή απομακρυσμένα αποθετήρια"
 
 msgid "interrupted"
-msgstr ""
+msgstr "διακόπηκε"
 
 #, python-format
 msgid "empty or missing %s"
@@ -8367,7 +8647,7 @@
 
 #, python-format
 msgid "index contains %d extra bytes"
-msgstr ""
+msgstr "το ευρετήριο περιέχει %d έξτρα bytes"
 
 #, python-format
 msgid "warning: `%s' uses revlog format 1"
@@ -8377,13 +8657,13 @@
 msgid "warning: `%s' uses revlog format 0"
 msgstr "προειδοποίηση: το '%s' χρησιμοποιεί revlog έκδοσης 0"
 
-#, fuzzy, python-format
+#, python-format
 msgid "rev %d points to nonexistent changeset %d"
-msgstr "η έκδοση %d αναφέρεται στο %s της αλλαγής %d"
-
-#, fuzzy, python-format
+msgstr "η έκδοση %d αναφέρεται στην ανύπαρκτη αλλαγή %d"
+
+#, python-format
 msgid "rev %d points to unexpected changeset %d"
-msgstr "η έκδοση %d αναφέρεται στο %s της αλλαγής %d"
+msgstr "η έκδοση %d αναφέρεται στη μη-αναμενόμενη αλλαγή %d"
 
 #, python-format
 msgid " (expected %s)"
@@ -8391,20 +8671,23 @@
 
 #, python-format
 msgid "unknown parent 1 %s of %s"
-msgstr ""
+msgstr "άγνωστη γονική αλλαγή 1 %s της %s"
 
 #, python-format
 msgid "unknown parent 2 %s of %s"
-msgstr ""
+msgstr "άγνωστη γονική αλλαγή 2 %s της %s"
 
 #, python-format
 msgid "checking parents of %s"
-msgstr ""
+msgstr "έλεγχος γονικών αλλαγών της %s"
 
 #, python-format
 msgid "duplicate revision %d (%d)"
 msgstr "διπλή έκδοση %d (%d)"
 
+msgid "abandoned transaction found - run hg recover\n"
+msgstr ""
+
 #, python-format
 msgid "repository uses revlog format %d\n"
 msgstr "το αποθετήριο χρησιμοποιεί τη μορφή revlog %d\n"
@@ -8419,9 +8702,9 @@
 msgid "checking manifests\n"
 msgstr "έλεγχος manifests\n"
 
-#, fuzzy, python-format
+#, python-format
 msgid "%s not in changesets"
-msgstr "το %s δεν υπάρχει στα manifests"
+msgstr "%s δεν υπάρχει ως αλλαγή"
 
 msgid "file without name in manifest"
 msgstr "αρχείο χωρίς όνομα στο manifest"
@@ -8469,21 +8752,20 @@
 msgid "unpacking %s"
 msgstr "εξαγωγή του %s"
 
-#, fuzzy, python-format
+#, python-format
 msgid "warning: copy source of '%s' not in parents of %s"
 msgstr ""
-"προειδοποίηση: %s@%s: η έκδοση προέλευσης της αντιγραφής αρχείου είναι το "
-"nullid %s:%s"
+"προειδοποίηση: η πηγή '%s' της αντιγραφής δεν υπάρχει στις γονικές της %s"
 
 #, python-format
 msgid "empty or missing copy source revlog %s:%s"
 msgstr "κενό ή μη έγκυρο revlog προέλευσης %s:%s"
 
-#, fuzzy, python-format
+#, python-format
 msgid "warning: %s@%s: copy source revision is nullid %s:%s\n"
 msgstr ""
-"προειδοποίηση: %s@%s: η έκδοση προέλευσης της αντιγραφής αρχείου είναι το "
-"nullid %s:%s"
+"προειδοποίηση: %s@%s: η έκδοση προέλευσης της αντιγραφής αρχείου είναι η "
+"κενή αλλαγή %s:%s\n"
 
 #, python-format
 msgid "checking rename of %s"
@@ -8491,7 +8773,7 @@
 
 #, python-format
 msgid "%s in manifests not found"
-msgstr ""
+msgstr "%s δε βρέθηκε στα manifests"
 
 #, python-format
 msgid "warning: orphan revlog '%s'"
--- a/i18n/ja.po	Thu Feb 11 23:15:42 2010 +0200
+++ b/i18n/ja.po	Sat Feb 13 23:50:38 2010 -0600
@@ -1,7 +1,7 @@
 # Japanese translation for Mercurial
 # Mercurial 日本語翻訳
 #
-# Copyright (C) 2009 the Mercurial team
+# Copyright (C) 2009-2010 the Mercurial team
 #
 # ========================================
 # 【翻訳用語集】
@@ -84,6 +84,7 @@
 # schedule              (add/remove の)予約
 # search                探索
 # server                サーバ
+# subrepo               副リポジトリ
 # summary               要約(情報)
 # tag                   タグ
 # tracked xxxx          構成管理対象の xxxx
@@ -98,7 +99,7 @@
 msgstr ""
 "Project-Id-Version: Mercurial\n"
 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
-"POT-Creation-Date: 2009-11-13 13:12+0900\n"
+"POT-Creation-Date: 2010-01-30 00:17+0900\n"
 "PO-Revision-Date: 2009-11-16 21:24+0100\n"
 "Last-Translator: Japanese translation team <mercurial-ja@googlegroups.com>\n"
 "Language-Team: Japanese\n"
@@ -134,962 +135,6 @@
 "\n"
 
 msgid ""
-"Mercurial reads configuration data from several files, if they exist.\n"
-"Below we list the most specific file first.\n"
-"\n"
-"On Windows, these configuration files are read:\n"
-"\n"
-"- ``<repo>\\.hg\\hgrc``\n"
-"- ``%USERPROFILE%\\.hgrc``\n"
-"- ``%USERPROFILE%\\Mercurial.ini``\n"
-"- ``%HOME%\\.hgrc``\n"
-"- ``%HOME%\\Mercurial.ini``\n"
-"- ``C:\\Mercurial\\Mercurial.ini``\n"
-"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
-"- ``<install-dir>\\Mercurial.ini``\n"
-"\n"
-"On Unix, these files are read:\n"
-"\n"
-"- ``<repo>/.hg/hgrc``\n"
-"- ``$HOME/.hgrc``\n"
-"- ``/etc/mercurial/hgrc``\n"
-"- ``/etc/mercurial/hgrc.d/*.rc``\n"
-"- ``<install-root>/etc/mercurial/hgrc``\n"
-"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
-"\n"
-"The configuration files for Mercurial use a simple ini-file format. A\n"
-"configuration file consists of sections, led by a ``[section]`` header\n"
-"and followed by ``name = value`` entries::\n"
-"\n"
-"  [ui]\n"
-"  username = Firstname Lastname <firstname.lastname@example.net>\n"
-"  verbose = True\n"
-"\n"
-"This above entries will be referred to as ``ui.username`` and\n"
-"``ui.verbose``, respectively. Please see the hgrc man page for a full\n"
-"description of the possible configuration values:\n"
-"\n"
-"- on Unix-like systems: ``man hgrc``\n"
-"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
-msgstr ""
-"Mercurial は設定ファイルを複数の場所から読み込みます。\n"
-"優先度順に読み込み位置を並べたものを以下に示します。\n"
-"\n"
-"Windows 環境では以下の設定ファイルが読み込まれます:\n"
-"\n"
-"- ``<リポジトリ>\\.hg\\hgrc``\n"
-"- ``%USERPROFILE%\\.hgrc``\n"
-"- ``%USERPROFILE%\\Mercurial.ini``\n"
-"- ``%HOME%\\.hgrc``\n"
-"- ``%HOME%\\Mercurial.ini``\n"
-"- ``C:\\Mercurial\\Mercurial.ini``\n"
-"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
-"- ``<インストール先>\\Mercurial.ini``\n"
-"\n"
-"Unix 環境では以下の設定ファイルが読み込まれます:\n"
-"\n"
-"- ``<リポジトリ>/.hg/hgrc``\n"
-"- ``$HOME/.hgrc``\n"
-"- ``/etc/mercurial/hgrc``\n"
-"- ``/etc/mercurial/hgrc.d/*.rc``\n"
-"- ``<インストール先>/etc/mercurial/hgrc``\n"
-"- ``<インストール先>/etc/mercurial/hgrc.d/*.rc``\n"
-"\n"
-"Mercurial の設定ファイルは、いわゆる ini ファイル形式で記述されます。\n"
-"設定ファイルは、``[セクション名]`` 形式のヘッダから始まるセクションから\n"
-"構成され、``名前 = 値`` 形式の要素が列挙されます::\n"
-"\n"
-"  [ui]\n"
-"  username = Firstname Lastname <firstname.lastname@example.net>\n"
-"  verbose = True\n"
-"\n"
-"上記要素はそれぞれ、``ui.username`` および ``ui.verbose`` として\n"
-"参照されます。設定ファイルで指定可能な値の詳細に関しては、\n"
-"hgrc のマニュアルページを参照してください:\n"
-"\n"
-"- Unix 系システム: ``man hgrc``\n"
-"- オンライン版: http://www.selenic.com/mercurial/hgrc.5.html\n"
-
-msgid ""
-"Some commands allow the user to specify a date, e.g.:\n"
-"\n"
-"- backout, commit, import, tag: Specify the commit date.\n"
-"- log, revert, update: Select revision(s) by date.\n"
-"\n"
-"Many date formats are valid. Here are some examples::\n"
-"\n"
-"  \"Wed Dec 6 13:18:29 2006\" (local timezone assumed)\n"
-"  \"Dec 6 13:18 -0600\" (year assumed, time offset provided)\n"
-"  \"Dec 6 13:18 UTC\" (UTC and GMT are aliases for +0000)\n"
-"  \"Dec 6\" (midnight)\n"
-"  \"13:18\" (today assumed)\n"
-"  \"3:39\" (3:39AM assumed)\n"
-"  \"3:39pm\" (15:39)\n"
-"  \"2006-12-06 13:18:29\" (ISO 8601 format)\n"
-"  \"2006-12-6 13:18\"\n"
-"  \"2006-12-6\"\n"
-"  \"12-6\"\n"
-"  \"12/6\"\n"
-"  \"12/6/6\" (Dec 6 2006)\n"
-"\n"
-"Lastly, there is Mercurial's internal format::\n"
-"\n"
-"  \"1165432709 0\" (Wed Dec 6 13:18:29 2006 UTC)\n"
-"\n"
-"This is the internal representation format for dates. unixtime is the\n"
-"number of seconds since the epoch (1970-01-01 00:00 UTC). offset is\n"
-"the offset of the local timezone, in seconds west of UTC (negative if\n"
-"the timezone is east of UTC).\n"
-"\n"
-"The log command also accepts date ranges::\n"
-"\n"
-"  \"<{datetime}\" - at or before a given date/time\n"
-"  \">{datetime}\" - on or after a given date/time\n"
-"  \"{datetime} to {datetime}\" - a date range, inclusive\n"
-"  \"-{days}\" - within a given number of days of today\n"
-msgstr ""
-"以下のコマンドで日時指定が可能です:\n"
-"\n"
-"- backout, commit, import, tag: コミット日時の指定\n"
-"- log, revert, update: 日時によるリビジョンの指定\n"
-"\n"
-"有効な日時指定形式は沢山あります。以下にいくつかの例を示します::\n"
-"\n"
-"  \"Wed Dec 6 13:18:29 2006\" (「ローカルタイムゾーン」を想定)\n"
-"  \"Dec 6 13:18 -0600\" (「今年」を想定、タイムゾーンはオフセット指定)\n"
-"  \"Dec 6 13:18 UTC\" (UTC および GMT は +0000 の別名)\n"
-"  \"Dec 6\" (「午前0時」を想定)\n"
-"  \"13:18\" (「本日」を想定)\n"
-"  \"3:39\" (「3:39AM」を想定)\n"
-"  \"3:39pm\" (15:39)\n"
-"  \"2006-12-06 13:18:29\" (ISO 8601 形式)\n"
-"  \"2006-12-6 13:18\"\n"
-"  \"2006-12-6\"\n"
-"  \"12-6\"\n"
-"  \"12/6\"\n"
-"  \"12/6/6\" (2006年12月6日)\n"
-"\n"
-"  最後に、Mercurial 固有の内部形式を示します::\n"
-"\n"
-"  \"1165432709 0\" (2006年12月6日 13:18:29 UTC)\n"
-"\n"
-"これは日時の内部表現形式です。基点となる 1970年1月1日 00:00 UTC からの\n"
-"経過秒数を表す unixtime 形式部分と、ローカルタイムゾーンのオフセット値\n"
-"(UTC よりも東側の地域は負値)を表すオフセット部分から構成されています。\n"
-"\n"
-"log コマンドには、日時範囲指定可能です::\n"
-"\n"
-"  \"<{datetime}\" - 指定日時以前(指定日時含む)\n"
-"  \">{datetime}\" - 指定日時以後(指定日時含む)\n"
-"  \"{datetime} to {datetime}\" - 指定日時範囲(指定日時含む)\n"
-"  \"-{days}\" - 本日から指定日数以内\n"
-
-msgid ""
-"Mercurial's default format for showing changes between two versions of\n"
-"a file is compatible with the unified format of GNU diff, which can be\n"
-"used by GNU patch and many other standard tools.\n"
-"\n"
-"While this standard format is often enough, it does not encode the\n"
-"following information:\n"
-"\n"
-"- executable status and other permission bits\n"
-"- copy or rename information\n"
-"- changes in binary files\n"
-"- creation or deletion of empty files\n"
-"\n"
-"Mercurial also supports the extended diff format from the git VCS\n"
-"which addresses these limitations. The git diff format is not produced\n"
-"by default because a few widespread tools still do not understand this\n"
-"format.\n"
-"\n"
-"This means that when generating diffs from a Mercurial repository\n"
-"(e.g. with \"hg export\"), you should be careful about things like file\n"
-"copies and renames or other things mentioned above, because when\n"
-"applying a standard diff to a different repository, this extra\n"
-"information is lost. Mercurial's internal operations (like push and\n"
-"pull) are not affected by this, because they use an internal binary\n"
-"format for communicating changes.\n"
-"\n"
-"To make Mercurial produce the git extended diff format, use the --git\n"
-"option available for many commands, or set 'git = True' in the [diff]\n"
-"section of your hgrc. You do not need to set this option when\n"
-"importing diffs in this format or using them in the mq extension.\n"
-msgstr ""
-"無指定時に Mercurial が2つのリビジョンを比較して差分表示する際の形式は\n"
-"GNU diff の unified 形式互換のもので、GNU patch をはじめとする多くの\n"
-"標準的なツールで使用できるものです。\n"
-"\n"
-"この標準的な形式は概ね十分なのですが、以下のような情報は含まれません:\n"
-"\n"
-"- 実行可否および権限設定\n"
-"- 複製/改名情報\n"
-"- バイナリファイルの変更\n"
-"- 空ファイルの作成/削除\n"
-"\n"
-"Mercurial は、別の構成管理ツールである git に由来する拡張差分形式にも\n"
-"対応しており、この形式は従来の差分形式の持つ制限を解消しています。\n"
-"但し、普及しているツールの幾つかが git 差分形式に対応していないため、\n"
-"Mercurial は指定が無い場合はこの形式では出力しません。\n"
-"\n"
-"つまり、Mercurial が(\"hg export\" 等で)生成した標準の差分形式は、\n"
-"他のリポジトリに対して適用した場合、上述した情報の欠落があることから、\n"
-"ファイルの複製・改名をはじめとする上記の制限に類する操作に関しては、\n"
-"十分注意する必要があります。push や pull のように、Mercurial の\n"
-"内部形式で実施される操作に関しては、バイナリ形式で変更情報の授受を行う\n"
-"ことから、情報の欠落に関しては心配する必要はありません。\n"
-"\n"
-"Mercurial から git 拡張差分形式の出力を得るには、受理可能なコマンドに\n"
-"対して --git を指定するか、設定ファイルの [diff] セクションに\n"
-"'git = True' 記述を追加してください。hg import や mq エクステンションを\n"
-"使用する場合は、この指定は不要です。\n"
-
-msgid ""
-"HG\n"
-"    Path to the 'hg' executable, automatically passed when running\n"
-"    hooks, extensions or external tools. If unset or empty, this is\n"
-"    the hg executable's name if it's frozen, or an executable named\n"
-"    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on\n"
-"    Windows) is searched.\n"
-"\n"
-"HGEDITOR\n"
-"    This is the name of the editor to run when committing. See EDITOR.\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"HGENCODING\n"
-"    This overrides the default locale setting detected by Mercurial.\n"
-"    This setting is used to convert data including usernames,\n"
-"    changeset descriptions, tag names, and branches. This setting can\n"
-"    be overridden with the --encoding command-line option.\n"
-"\n"
-"HGENCODINGMODE\n"
-"    This sets Mercurial's behavior for handling unknown characters\n"
-"    while transcoding user input. The default is \"strict\", which\n"
-"    causes Mercurial to abort if it can't map a character. Other\n"
-"    settings include \"replace\", which replaces unknown characters, and\n"
-"    \"ignore\", which drops them. This setting can be overridden with\n"
-"    the --encodingmode command-line option.\n"
-"\n"
-"HGMERGE\n"
-"    An executable to use for resolving merge conflicts. The program\n"
-"    will be executed with three arguments: local file, remote file,\n"
-"    ancestor file.\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"HGRCPATH\n"
-"    A list of files or directories to search for hgrc files. Item\n"
-"    separator is \":\" on Unix, \";\" on Windows. If HGRCPATH is not set,\n"
-"    platform default search path is used. If empty, only the .hg/hgrc\n"
-"    from the current repository is read.\n"
-"\n"
-"    For each element in HGRCPATH:\n"
-"\n"
-"    - if it's a directory, all files ending with .rc are added\n"
-"    - otherwise, the file itself will be added\n"
-"\n"
-"HGUSER\n"
-"    This is the string used as the author of a commit. If not set,\n"
-"    available values will be considered in this order:\n"
-"\n"
-"    - HGUSER (deprecated)\n"
-"    - hgrc files from the HGRCPATH\n"
-"    - EMAIL\n"
-"    - interactive prompt\n"
-"    - LOGNAME (with ``@hostname`` appended)\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"EMAIL\n"
-"    May be used as the author of a commit; see HGUSER.\n"
-"\n"
-"LOGNAME\n"
-"    May be used as the author of a commit; see HGUSER.\n"
-"\n"
-"VISUAL\n"
-"    This is the name of the editor to use when committing. See EDITOR.\n"
-"\n"
-"EDITOR\n"
-"    Sometimes Mercurial needs to open a text file in an editor for a\n"
-"    user to modify, for example when writing commit messages. The\n"
-"    editor it uses is determined by looking at the environment\n"
-"    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
-"    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'.\n"
-"\n"
-"PYTHONPATH\n"
-"    This is used by Python to find imported modules and may need to be\n"
-"    set appropriately if this Mercurial is not installed system-wide.\n"
-msgstr ""
-"HG\n"
-"    'hg' コマンドへのパス。フック/エクステンションないし外部ツールの起動の\n"
-"    際に自動的に設定されます。未設定や空の場合は、frozen 形式の\n"
-"    hg 実行可能ファイルの名前か設定されるか、'hg' という名前の実行可能\n"
-"    ファイルが検索されます(Windows の場合、PATHEXT 環境変数に設定された\n"
-"    COM/EXE/BAT/CMD 等の拡張子付き)。\n"
-"\n"
-"HGEDITOR\n"
-"    コミットの際のメッセージ入力を行うためのエディタの名前。EDITOR 環境変数\n"
-"    についても参照してください。\n"
-"\n"
-"    (推奨されない環境変数。設定ファイル経由で指定してください。)\n"
-"\n"
-"HGENCODING\n"
-"    Mercurial によるロケール自動検出の上書き。この設定は、ユーザ名、\n"
-"    コミットメッセージ、タグ名およびブランチ名を内部データ形式に変換する\n"
-"    際に使用されます。この環境変数設定は、コマンドラインでの --encoding\n"
-"    使用により、更に上書きすることが出来ます。\n"
-"\n"
-"HGENCODINGMODE\n"
-"    ユーザからの指定値を内部データ形式に変換する際に、指定の符号化と\n"
-"    合致しない文字が検出された場合の Mercurial の挙動の指定。無指定時は、\n"
-"    「指定の符号化と合致しない場合は処理中断」を意味する \"strict\" が指定\n"
-"    されたものとみなします。他には、「未知の文字の置き換え」を意味する\n"
-"    \"replace\" と、「未知の文字の切り捨て」を意味する \"ignore\" が指定\n"
-"    出来ます。この環境変数設定は、コマンドラインでの --encodingmode\n"
-"    使用により、更に上書きすることが出来ます。\n"
-"\n"
-"HGMERGE\n"
-"    マージの際の衝突解消に使用するコマンド。指定されたコマンドの起動には、\n"
-"    作業領域のファイル、マージ対象別リビジョンのファイル、\n"
-"    両者の親リビジョンのファイルを表す3つの引数が指定されます。\n"
-"\n"
-"    (推奨されない環境変数。設定ファイル経由で指定してください)\n"
-"\n"
-"HGRCPATH\n"
-"    設定ファイル読込のための、ファイルないしディレクトリの一覧の指定。\n"
-"    一覧要素の区切り記号は、Unix なら \":\"、WIndows なら \";\" です。\n"
-"    HGRCPATH 環境変数が設定されていない場合、各稼働環境に応じた\n"
-"    読み込み先から読み込まれます。空の値が設定されている場合、\n"
-"    現リポジトリの .hg/hgrc のみが読み込まれます。\n"
-"\n"
-"    指定された一覧の各要素に対して、以下のように振舞います:\n"
-"\n"
-"    - ディレクトリなら、配下の \".rc\" で終わる名前のファイルを読み込む\n"
-"    - ファイルなら、そのファイル自身を読み込む\n"
-"\n"
-"HGUSER\n"
-"    チェンジセット作成者としてコミット時に記録する名前の指定。\n"
-"    作成者名として採用される値の決定順序は以下の通りです:\n"
-"\n"
-"    - HGUSER 環境変数値(推奨されません)\n"
-"    - (HGRCPATH 環境変数で指定される)設定ファイル中の設定\n"
-"    - EMAIL 環境変数値\n"
-"    - 対話的な入力\n"
-"    - LOGNAME 環境変数値(``@hostname`` が付与されます)\n"
-"\n"
-"    (推奨されない環境変数。設定ファイル経由で指定してください)\n"
-"\n"
-"EMAIL\n"
-"    チェンジセット作成者としてこの環境変数値が記録される可能性があります。\n"
-"    詳細は HGUSER の記述を参照してください。\n"
-"\n"
-"LOGNAME\n"
-"    チェンジセット作成者としてこの環境変数値が記録される可能性があります。\n"
-"    詳細は HGUSER の記述を参照してください。\n"
-"\n"
-"VISUAL\n"
-"    コミット時のメッセージを編集するエディタ名の指定。EDITOR 環境変数\n"
-"    についても参照してください。\n"
-"\n"
-"EDITOR\n"
-"    コミット時のメッセージのように、エディタでファイルを開き、ユーザによる\n"
-"    編集を促す状況があります。そこで使用されるエディタは、HGEDITOR、VISUAL\n"
-"    あるいは EDITOR 環境変数に設定されたものを(この順序で)使用します。\n"
-"    最初の空で無い値に設定された環境変数の値を使用します。いずれも未設定\n"
-"    (あるいは空)の場合は、'vi' が使用されます。\n"
-"\n"
-"PYTHONPATH\n"
-"    Mercurial が当該システムの共有領域にインストールされていない場合、\n"
-"    Python が必要なモジュールを読み込むためには、この環境変数の設定が\n"
-"    必要です。\n"
-
-msgid ""
-"Mercurial has the ability to add new features through the use of\n"
-"extensions. Extensions may add new commands, add options to\n"
-"existing commands, change the default behavior of commands, or\n"
-"implement hooks.\n"
-"\n"
-"Extensions are not loaded by default for a variety of reasons:\n"
-"they can increase startup overhead; they may be meant for advanced\n"
-"usage only; they may provide potentially dangerous abilities (such\n"
-"as letting you destroy or modify history); they might not be ready\n"
-"for prime time; or they may alter some usual behaviors of stock\n"
-"Mercurial. It is thus up to the user to activate extensions as\n"
-"needed.\n"
-"\n"
-"To enable the \"foo\" extension, either shipped with Mercurial or in\n"
-"the Python search path, create an entry for it in your hgrc, like\n"
-"this::\n"
-"\n"
-"  [extensions]\n"
-"  foo =\n"
-"\n"
-"You may also specify the full path to an extension::\n"
-"\n"
-"  [extensions]\n"
-"  myfeature = ~/.hgext/myfeature.py\n"
-"\n"
-"To explicitly disable an extension enabled in an hgrc of broader\n"
-"scope, prepend its path with !::\n"
-"\n"
-"  [extensions]\n"
-"  # disabling extension bar residing in /path/to/extension/bar.py\n"
-"  bar = !/path/to/extension/bar.py\n"
-"  # ditto, but no path was supplied for extension baz\n"
-"  baz = !\n"
-msgstr ""
-"Mercurial には、新規機能を「エクステンション」という機構を用いて\n"
-"追加する仕組みが備わっています。エクステンションでは、コマンドの\n"
-"新規追加、既存コマンドへのオプションの追加、コマンドの挙動の変更、\n"
-"フックの実装といったことが可能です。\n"
-"\n"
-"様々な事情から、特に指定の無い場合にはエクステンションは読み込まれ\n"
-"ません。付加的な読み込みは、起動時間の増加を意味します。上級用途\n"
-"限定のものもあります。(履歴の破壊や改変などの)潜在的な危険性を持つ\n"
-"場合もあります。実験的なものであるかもしれません。これまでの\n"
-"Mercurial の振る舞いを変えてしまうかもしれません。エクステンションを\n"
-"必要に応じて有効化するのは利用者の責務です。\n"
-"\n"
-"\"foo\" というエクステンションを有効化するには、Mercurial 同梱の\n"
-"ものであろうと、Python の検索パス中のものであろうと、設定ファイル\n"
-"において以下のような記述が必要です::\n"
-"\n"
-"  [extensions]\n"
-"  foo =\n"
-"\n"
-"エクステンションへのフルパスを記述することも可能です::\n"
-"\n"
-"  [extensions]\n"
-"  myfeature = ~/.hgext/myfeature.py\n"
-"\n"
-"明示的にエクステンションを無効化する場合、適切な設定ファイルにおいて\n"
-"パス指定の冒頭に '!' を付与します::\n"
-"\n"
-"  [extensions]\n"
-"  # /path/to/extension/bar.py にあるエクステンション bar の無効化\n"
-"  bar = !/path/to/extension/bar.py\n"
-"  # こちらはパス指定無しでの baz エクステンションの無効化\n"
-"  baz = !\n"
-
-msgid ""
-"When Mercurial accepts more than one revision, they may be specified\n"
-"individually, or provided as a topologically continuous range,\n"
-"separated by the \":\" character.\n"
-"\n"
-"The syntax of range notation is [BEGIN]:[END], where BEGIN and END are\n"
-"revision identifiers. Both BEGIN and END are optional. If BEGIN is not\n"
-"specified, it defaults to revision number 0. If END is not specified,\n"
-"it defaults to the tip. The range \":\" thus means \"all revisions\".\n"
-"\n"
-"If BEGIN is greater than END, revisions are treated in reverse order.\n"
-"\n"
-"A range acts as a closed interval. This means that a range of 3:5\n"
-"gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.\n"
-msgstr ""
-"Mercurial に複数のリビジョンを指定する場合の方法には、\n"
-"個々のリビジョンをそれぞれ指定する方法以外にも、\":\" を区切り\n"
-"記号にした範囲指定による方法があります。\n"
-"\n"
-"範囲表記の文法は、\"[開始]:[終了]\" というもので、\"開始\"・\"終了\"\n"
-"部分にはそれぞれリビジョン識別用の情報が記述されます。\n"
-"\"開始\"・\"終了\" はそれぞれ省略可能です。\"開始\" 部分が\n"
-"記述されない場合、リビジョン番号 0 が記述されたものとみなされます。\n"
-"\"終了\" 部分が記述されない場合、tip が記述されたものとみなされます。\n"
-"以上のことから、\":\" という記述は \"全リビジョン\" を指します。\n"
-"\n"
-"\"開始\" 指定が \"終了\" 指定よりも後のリビジョンである場合、逆順指定\n"
-"とみなされます。\n"
-"\n"
-"範囲指定は \"閉区間\" とみなされます。つまり、3:5 という範囲指定は\n"
-"3, 4, 5 の指定と等価です。同様に 9:6 という指定は 9, 8, 7, 6 の指定と\n"
-"等価です。\n"
-
-msgid ""
-"Mercurial accepts several notations for identifying one or more files\n"
-"at a time.\n"
-"\n"
-"By default, Mercurial treats filenames as shell-style extended glob\n"
-"patterns.\n"
-"\n"
-"Alternate pattern notations must be specified explicitly.\n"
-"\n"
-"To use a plain path name without any pattern matching, start it with\n"
-"``path:``. These path names must completely match starting at the\n"
-"current repository root.\n"
-"\n"
-"To use an extended glob, start a name with ``glob:``. Globs are rooted\n"
-"at the current directory; a glob such as ``*.c`` will only match files\n"
-"in the current directory ending with ``.c``.\n"
-"\n"
-"The supported glob syntax extensions are ``**`` to match any string\n"
-"across path separators and ``{a,b}`` to mean \"a or b\".\n"
-"\n"
-"To use a Perl/Python regular expression, start a name with ``re:``.\n"
-"Regexp pattern matching is anchored at the root of the repository.\n"
-"\n"
-"Plain examples::\n"
-"\n"
-"  path:foo/bar   a name bar in a directory named foo in the root\n"
-"                 of the repository\n"
-"  path:path:name a file or directory named \"path:name\"\n"
-"\n"
-"Glob examples::\n"
-"\n"
-"  glob:*.c       any name ending in \".c\" in the current directory\n"
-"  *.c            any name ending in \".c\" in the current directory\n"
-"  **.c           any name ending in \".c\" in any subdirectory of the\n"
-"                 current directory including itself.\n"
-"  foo/*.c        any name ending in \".c\" in the directory foo\n"
-"  foo/**.c       any name ending in \".c\" in any subdirectory of foo\n"
-"                 including itself.\n"
-"\n"
-"Regexp examples::\n"
-"\n"
-"  re:.*\\.c$      any name ending in \".c\", anywhere in the repository\n"
-msgstr ""
-"Mercurial には、ファイルを特定するパターン指定方法が複数あります。\n"
-"\n"
-"特に指定の無い場合、Mercurial は指定されたファイル名に対して、\n"
-"shell 形式の拡張ワイルドカード合致を行います。\n"
-"\n"
-"別な形式でのパターン記述の際には、明示的に種別を指定してください。\n"
-"\n"
-"パターン合致を行わずに、指定された名前をそのまま使用する場合、\n"
-"名前の前に ``path:`` を記述します。この形式を使用する場合、\n"
-"リポジトリのルートからのパスと完全に一致しなければなりません。\n"
-"\n"
-"拡張ワイルドカード合致の場合、名前の前に ``glob:`` を記述します。この\n"
-"形式では、現ディレクトリからの相対になりますので、``*.c`` パターンは\n"
-"末尾が ``.c`` で終わる現ディレクトリ中のファイルとのみ合致します。\n"
-"\n"
-"ワイルドカードの拡張文法には、パス区切りも含めた任意の文字列と合致する\n"
-"``**`` と、\"a ないし b\" を意味する ``{a,b}`` という形式があります。\n"
-"\n"
-"Perl/Python 形式の正規表現の場合、名前の前に ``re:`` を記述します。\n"
-"正規表現形式では、リポジトリのルートからの合致とみなされます。\n"
-"(訳注: .hgignore での指定では付与「されません」ので注意が必要です)。\n"
-"\n"
-"パターン合致未使用例::\n"
-"\n"
-"  path:foo/bar   リポジトリルート直下の foo ディレクトリ中の bar\n"
-"  path:path:name \"path:name\" という名前\n"
-"\n"
-"ワイルドカード指定例::\n"
-"\n"
-"  glob:*.c       現ディレクトリ直下で、名前が \".c\" で終わるもの\n"
-"  *.c            現ディレクトリ直下で、名前が \".c\" で終わるもの\n"
-"  **.c           現ディレクトリないしその配下のディレクトリにおいて、\n"
-"                 名前が \".c\" で終わるもの\n"
-"  foo/*.c        foo ディレクトリ直下で、名前が \".c\" で終わるもの\n"
-"  foo/**.c       foo ディレクトリないしその配下のディレクトリにおいて、\n"
-"                 名前が \".c\" で終わるもの\n"
-"\n"
-"正規表現指定例::\n"
-"\n"
-"  re:.*\\.c$     作業領域中の任意の位置で、名前が \".c\" で終わるもの\n"
-
-msgid ""
-"Mercurial supports several ways to specify individual revisions.\n"
-"\n"
-"A plain integer is treated as a revision number. Negative integers are\n"
-"treated as sequential offsets from the tip, with -1 denoting the tip,\n"
-"-2 denoting the revision prior to the tip, and so forth.\n"
-"\n"
-"A 40-digit hexadecimal string is treated as a unique revision\n"
-"identifier.\n"
-"\n"
-"A hexadecimal string less than 40 characters long is treated as a\n"
-"unique revision identifier and is referred to as a short-form\n"
-"identifier. A short-form identifier is only valid if it is the prefix\n"
-"of exactly one full-length identifier.\n"
-"\n"
-"Any other string is treated as a tag or branch name. A tag name is a\n"
-"symbolic name associated with a revision identifier. A branch name\n"
-"denotes the tipmost revision of that branch. Tag and branch names must\n"
-"not contain the \":\" character.\n"
-"\n"
-"The reserved name \"tip\" is a special tag that always identifies the\n"
-"most recent revision.\n"
-"\n"
-"The reserved name \"null\" indicates the null revision. This is the\n"
-"revision of an empty repository, and the parent of revision 0.\n"
-"\n"
-"The reserved name \".\" indicates the working directory parent. If no\n"
-"working directory is checked out, it is equivalent to null. If an\n"
-"uncommitted merge is in progress, \".\" is the revision of the first\n"
-"parent.\n"
-msgstr ""
-"Mercurial に個々のリビジョン指定する際には複数の記法が使用できます。\n"
-"\n"
-"整数値は、「リビジョン番号」とみなされます。負値は、tip からの距離を\n"
-"意味し、-1 は tip 自身を、-2 は tip の直前といったリビジョンを指します。\n"
-"\n"
-"40桁の16進文字列は、一意な「リビジョン識別子」とみなされます。\n"
-"\n"
-"40桁未満の16進文字列は、一意な「リビジョン識別子」の短縮形式と\n"
-"みなされます。短縮形式の識別子は、厳密に1つの完全長の識別子とだけ\n"
-"前方一致する場合にのみ有効です。\n"
-"\n"
-"それ以外の文字列は、「タグ名」ないし「ブランチ名」とみなされます。\n"
-"「タグ名」はリビジョン識別子に付与された象徴的な名前です。\n"
-"「ブランチ名」は、ブランチ中の最新リビジョンを意味します。nタグ名およびブラン"
-"チ名は \":\" を含んではなりません。\n"
-"\n"
-"常に「最新のリビジョン」を意味する名前 \"tip\" は、特別なタグ名として\n"
-"予約されています。\n"
-"\n"
-"「空リビジョン」を意味する名前 \"null\" は、特別な名前として予約\n"
-"されています。空リポジトリにおけるリビジョンはこのリビジョンで、\n"
-"リビジョン 0 の親は \"null\" リビジョンです。\n"
-"\n"
-"常に「作業領域の親リビジョン」を示すための名前 \".\" は、特別な名前として\n"
-"予約されています。作業領域が未更新の場合は、\"null\" 指定と等価です。\n"
-"未コミットのマージ中の場合、\".\" は第1親リビジョンを指します。\n"
-
-msgid ""
-"Mercurial allows you to customize output of commands through\n"
-"templates. You can either pass in a template from the command\n"
-"line, via the --template option, or select an existing\n"
-"template-style (--style).\n"
-"\n"
-"You can customize output for any \"log-like\" command: log,\n"
-"outgoing, incoming, tip, parents, heads and glog.\n"
-"\n"
-"Three styles are packaged with Mercurial: default (the style used\n"
-"when no explicit preference is passed), compact and changelog.\n"
-"Usage::\n"
-"\n"
-"    $ hg log -r1 --style changelog\n"
-"\n"
-"A template is a piece of text, with markup to invoke variable\n"
-"expansion::\n"
-"\n"
-"    $ hg log -r1 --template \"{node}\\n\"\n"
-"    b56ce7b07c52de7d5fd79fb89701ea538af65746\n"
-"\n"
-"Strings in curly braces are called keywords. The availability of\n"
-"keywords depends on the exact context of the templater. These\n"
-"keywords are usually available for templating a log-like command:\n"
-"\n"
-":author:    String. The unmodified author of the changeset.\n"
-":branches:  String. The name of the branch on which the changeset\n"
-"            was committed. Will be empty if the branch name was\n"
-"            default.\n"
-":date:      Date information. The date when the changeset was\n"
-"            committed.\n"
-":desc:      String. The text of the changeset description.\n"
-":diffstat:  String. Statistics of changes with the following\n"
-"            format: \"modified files: +added/-removed lines\"\n"
-":files:     List of strings. All files modified, added, or removed\n"
-"            by this changeset.\n"
-":file_adds: List of strings. Files added by this changeset.\n"
-":file_mods: List of strings. Files modified by this changeset.\n"
-":file_dels: List of strings. Files removed by this changeset.\n"
-":node:      String. The changeset identification hash, as a\n"
-"            40-character hexadecimal string.\n"
-":parents:   List of strings. The parents of the changeset.\n"
-":rev:       Integer. The repository-local changeset revision\n"
-"            number.\n"
-":tags:      List of strings. Any tags associated with the\n"
-"            changeset.\n"
-":latesttag: String. Most recent global tag in the ancestors of this\n"
-"            changeset.\n"
-":latesttagdistance: Integer. Longest path to the latest tag.\n"
-"\n"
-"The \"date\" keyword does not produce human-readable output. If you\n"
-"want to use a date in your output, you can use a filter to process\n"
-"it. Filters are functions which return a string based on the input\n"
-"variable. You can also use a chain of filters to get the desired\n"
-"output::\n"
-"\n"
-"   $ hg tip --template \"{date|isodate}\\n\"\n"
-"   2008-08-21 18:22 +0000\n"
-"\n"
-"List of filters:\n"
-"\n"
-":addbreaks:   Any text. Add an XHTML \"<br />\" tag before the end of\n"
-"              every line except the last.\n"
-":age:         Date. Returns a human-readable date/time difference\n"
-"              between the given date/time and the current\n"
-"              date/time.\n"
-":basename:    Any text. Treats the text as a path, and returns the\n"
-"              last component of the path after splitting by the\n"
-"              path separator (ignoring trailing separators). For\n"
-"              example, \"foo/bar/baz\" becomes \"baz\" and \"foo/bar//\"\n"
-"              becomes \"bar\".\n"
-":stripdir:    Treat the text as path and strip a directory level,\n"
-"              if possible. For example, \"foo\" and \"foo/bar\" becomes\n"
-"              \"foo\".\n"
-":date:        Date. Returns a date in a Unix date format, including\n"
-"              the timezone: \"Mon Sep 04 15:13:13 2006 0700\".\n"
-":domain:      Any text. Finds the first string that looks like an\n"
-"              email address, and extracts just the domain\n"
-"              component. Example: ``User <user@example.com>`` becomes\n"
-"              ``example.com``.\n"
-":email:       Any text. Extracts the first string that looks like\n"
-"              an email address. Example: ``User <user@example.com>``\n"
-"              becomes ``user@example.com``.\n"
-":escape:      Any text. Replaces the special XML/XHTML characters\n"
-"              \"&\", \"<\" and \">\" with XML entities.\n"
-":fill68:      Any text. Wraps the text to fit in 68 columns.\n"
-":fill76:      Any text. Wraps the text to fit in 76 columns.\n"
-":firstline:   Any text. Returns the first line of text.\n"
-":nonempty:    Any text. Returns '(none)' if the string is empty.\n"
-":hgdate:      Date. Returns the date as a pair of numbers:\n"
-"              \"1157407993 25200\" (Unix timestamp, timezone offset).\n"
-":isodate:     Date. Returns the date in ISO 8601 format:\n"
-"              \"2009-08-18 13:00 +0200\".\n"
-":isodatesec:  Date. Returns the date in ISO 8601 format, including\n"
-"              seconds: \"2009-08-18 13:00:13 +0200\". See also the\n"
-"              rfc3339date filter.\n"
-":localdate:   Date. Converts a date to local date.\n"
-":obfuscate:   Any text. Returns the input text rendered as a\n"
-"              sequence of XML entities.\n"
-":person:      Any text. Returns the text before an email address.\n"
-":rfc822date:  Date. Returns a date using the same format used in\n"
-"              email headers: \"Tue, 18 Aug 2009 13:00:13 +0200\".\n"
-":rfc3339date: Date. Returns a date using the Internet date format\n"
-"              specified in RFC 3339: \"2009-08-18T13:00:13+02:00\".\n"
-":short:       Changeset hash. Returns the short form of a changeset\n"
-"              hash, i.e. a 12-byte hexadecimal string.\n"
-":shortdate:   Date. Returns a date like \"2006-09-18\".\n"
-":strip:       Any text. Strips all leading and trailing whitespace.\n"
-":tabindent:   Any text. Returns the text, with every line except\n"
-"              the first starting with a tab character.\n"
-":urlescape:   Any text. Escapes all \"special\" characters. For\n"
-"              example, \"foo bar\" becomes \"foo%20bar\".\n"
-":user:        Any text. Returns the user portion of an email\n"
-"              address.\n"
-msgstr ""
-"Mercurial では、テンプレート機能によってコマンドの出力をカスタマイズ\n"
-"することができます。コマンドラインからの指定では、--template による\n"
-"テンプレート指定と、--style によるスタイル指定の両方が使用できます。\n"
-"\n"
-"「log 的」な出力を行う一連のコマンド出力をカスタマイズ可能です:\n"
-"log, outgoing, incoming, tip, parents, heads, glog\n"
-"\n"
-"Mercurial には(明示的な指定が無い場合に使用される)default、compact\n"
-"および changelog の3つのスタイル設定が同梱されています。利用方法は::\n"
-"\n"
-"    $ hg log -r1 --style changelog\n"
-"\n"
-"テンプレートとは、変数展開マークアップ機能を備えたテキストです::\n"
-"\n"
-"    $ hg log -r1 --template \"{node}\\n\"\n"
-"    b56ce7b07c52de7d5fd79fb89701ea538af65746\n"
-"\n"
-"波括弧で囲まれた部分は「キーワード」と呼ばれます。キーワード利用の\n"
-"可否は、テンプレートの利用される状況に依存します。以下のキーワードは\n"
-"log 的なコマンドでのテンプレート利用の際には常に使用可能です:\n"
-"\n"
-":author:    文字列。リビジョンの作者名(記録情報そのまま)。\n"
-":branches:  文字列。リビジョンの属するブランチ名。所属ブランチが\n"
-"            default の場合は空文字列。\n"
-":date:      日時情報。リビジョンが記録された日時。\n"
-":desc:      文字列。リビジョンのコミットメッセージ。\n"
-":diffstat:  文字列。以下の形式での変更概要。\n"
-"            \"変更対象ファイル: +追加行数/-削除行数\"\n"
-":files:     文字列列挙。当該リビジョンでの、変更/追加登録ないし\n"
-"            登録除外ファイルの一覧。\n"
-":file_adds: 文字列列挙。当該リビジョンでの追加ファイル一覧。\n"
-":file_mods: 文字列列挙。当該リビジョンでの変更ファイル一覧。\n"
-":file_dels: 文字列列挙。当該リビジョンでの登録除外ファイル一覧。\n"
-":node:      文字列。リビジョン識別用の 40 桁 16 進数ハッシュ値。\n"
-":parents:   文字列列挙。リビジョンの親。\n"
-":rev:       整数。各リポジトリ固有のリビジョン番号。\n"
-":tags:      文字列列挙。当該リビジョンに付与されたタグの一覧。\n"
-":latesttag: 文字列。先祖に対して最も最近に付与されたタグ\n"
-":latesttagdistance: 整数。最新タグへの最長パス\n"
-"\n"
-"\"date\" キーワードの出力は可読形式ではありません。出力に日時情報を\n"
-"含めたい場合、可読化するために「フィルター」を使用します。\n"
-"「フィルター」とは、指定値に基づいて文字列を生成する機能です。複数の\n"
-"フィルターを連ねることで、様々な出力を得ることができます::\n"
-"\n"
-"   $ hg tip --template \"{date|isodate}\\n\"\n"
-"   2008-08-21 18:22 +0000\n"
-"\n"
-"フィルター一覧(入力と、それに対する出力):\n"
-"\n"
-":addbreaks:   文字列。最終行を除く各行の行末に XHTML の \n"
-"              \"<br />\" タグを追加します。\n"
-":age:         日時情報。与えられた日時と、現在日時との差分を表す\n"
-"              可読形式の文字列を生成します。\n"
-":basename:    文字列。与えられた文字列をパスとみなし、パス区切りで\n"
-"              区切られた最後の要素だけを取り出します(末尾パス\n"
-"              区切りは無視されます)。例えば、\"foo/bar/baz\" は\n"
-"              \"baz\" に、\"foo/bar//\" は \"bar\" になります。\n"
-":stripdir:    文字列。与えられた文字列をパスとみなし、ディレクトリ\n"
-"              要素があればそれを取り除きます。例えば、\"foo\"\n"
-"              および \"foo/bar\" は \"foo\" となります。\n"
-":date:        日時情報。タイムゾーンを含んだ、Unix の date コマンド\n"
-"              形式で可読化します: \"Mon Sep 04 15:13:13 2006 0700\"\n"
-":domain:      文字列。メールアドレスと思しき最初の文字列部分から\n"
-"              ドメイン部分だけを取り出します。例えば、\n"
-"              ``User <user@example.com>`` は ``example.com`` です。\n"
-":email:       文字列。メールアドレスと思しき最初の部分を取り出します。\n"
-"              例えば ``User <user@example.com>`` は\n"
-"              ``user@example.com`` となります。\n"
-":escape:      文字列。XML/XHTML の特殊文字である \"&\"、\"<\" および\n"
-"              \">\" を XML のエンティティ形式に変換します。\n"
-":fill68:      文字列。68 桁に収まるように文字列を折り返します。\n"
-":fill76:      文字列。76 桁に収まるように文字列を折り返します。\n"
-":firstline:   文字列。最初の行のみを取り出します。\n"
-":nonempty:    文字列。与えられた文字列が空の場合 '(none)'となります。\n"
-":hgdate:      日時情報。Unix タイムスタンプとタイムゾーンオフセット\n"
-"              による数値対形式で可読化します: \"1157407993 25200\"\n"
-":isodate:     日時情報。秒情報付きの ISO 8601 形式で可読化します:\n"
-"              \"2009-08-18 13:00:13 +0200\"\n"
-"              後述する rfc3339date フィルタの説明も参照してください。\n"
-":localdate:   日時情報。ローカル日時で可読化します。\n"
-":obfuscate:   文字列。全ての文字を XML エンティティ形式に変換します。\n"
-":person:      文字列。メールアドレス直前の部分だけを取り出します。\n"
-":rfc822date:  日時情報。メールのヘッダと同形式で可読化します:\n"
-"              \"Tue, 18 Aug 2009 13:00:13 +0200\".\n"
-":rfc3339date: 日付情報。 RFC 3339 で定められた形式で、インターネット日付\n"
-"              情報形式文字列に変換します。\n"
-":short:       リビジョンハッシュ 値。12 桁程度の短縮形式にします。\n"
-":shortdate:   日時情報。\"2006-09-18\" 形式で可読化します。\n"
-":strip:       文字列。先頭/末尾の空白文字を取り除きます。\n"
-":tabindent:   文字列。タブ文字以外で始まる行をタブ文字で字下げします。\n"
-":urlescape:   文字列。全ての「特殊」文字を変換します。\n"
-"              例えば \"foo bar\" は \"foo%20bar\" となります。\n"
-":user:        文字列。メールアドレスのユーザ名部分を取り出します。\n"
-
-msgid ""
-"Valid URLs are of the form::\n"
-"\n"
-"  local/filesystem/path[#revision]\n"
-"  file://local/filesystem/path[#revision]\n"
-"  http://[user[:pass]@]host[:port]/[path][#revision]\n"
-"  https://[user[:pass]@]host[:port]/[path][#revision]\n"
-"  ssh://[user[:pass]@]host[:port]/[path][#revision]\n"
-"\n"
-"Paths in the local filesystem can either point to Mercurial\n"
-"repositories or to bundle files (as created by 'hg bundle' or 'hg\n"
-"incoming --bundle').\n"
-"\n"
-"An optional identifier after # indicates a particular branch, tag, or\n"
-"changeset to use from the remote repository. See also 'hg help\n"
-"revisions'.\n"
-"\n"
-"Some features, such as pushing to http:// and https:// URLs are only\n"
-"possible if the feature is explicitly enabled on the remote Mercurial\n"
-"server.\n"
-"\n"
-"Some notes about using SSH with Mercurial:\n"
-"\n"
-"- SSH requires an accessible shell account on the destination machine\n"
-"  and a copy of hg in the remote path or specified with as remotecmd.\n"
-"- path is relative to the remote user's home directory by default. Use\n"
-"  an extra slash at the start of a path to specify an absolute path::\n"
-"\n"
-"    ssh://example.com//tmp/repository\n"
-"\n"
-"- Mercurial doesn't use its own compression via SSH; the right thing\n"
-"  to do is to configure it in your ~/.ssh/config, e.g.::\n"
-"\n"
-"    Host *.mylocalnetwork.example.com\n"
-"      Compression no\n"
-"    Host *\n"
-"      Compression yes\n"
-"\n"
-"  Alternatively specify \"ssh -C\" as your ssh command in your hgrc or\n"
-"  with the --ssh command line option.\n"
-"\n"
-"These URLs can all be stored in your hgrc with path aliases under the\n"
-"[paths] section like so::\n"
-"\n"
-"  [paths]\n"
-"  alias1 = URL1\n"
-"  alias2 = URL2\n"
-"  ...\n"
-"\n"
-"You can then use the alias for any command that uses a URL (for\n"
-"example 'hg pull alias1' will be treated as 'hg pull URL1').\n"
-"\n"
-"Two path aliases are special because they are used as defaults when\n"
-"you do not provide the URL to a command:\n"
-"\n"
-"default:\n"
-"  When you create a repository with hg clone, the clone command saves\n"
-"  the location of the source repository as the new repository's\n"
-"  'default' path. This is then used when you omit path from push- and\n"
-"  pull-like commands (including incoming and outgoing).\n"
-"\n"
-"default-push:\n"
-"  The push command will look for a path named 'default-push', and\n"
-"  prefer it over 'default' if both are defined.\n"
-msgstr ""
-"有効な URL 指定は以下の形式です::\n"
-"\n"
-"  local/filesystem/path[#revision]\n"
-"  file://local/filesystem/path[#revision]\n"
-"  http://[user[:pass]@]host[:port]/[path][#revision]\n"
-"  https://[user[:pass]@]host[:port]/[path][#revision]\n"
-"  ssh://[user[:pass]@]host[:port]/[path][#revision]\n"
-"\n"
-"ローカルファイルシステム上のパスが指す先は、Mercurial のリポジトリでも、\n"
-"バンドルファイル('hg bundle' ないし 'hg incoming --bundle' で生成)でも\n"
-"構いません。\n"
-"\n"
-"連携先リポジトリ指定において、'#' 記号に続けて識別子を指定することで、\n"
-"特定のブランチ、タグないしチェンジセットを指定することが出来ます。\n"
-"'hg help revisions' も参照してください。\n"
-"\n"
-"http:// や https:// 形式の URL で指定される連携先への push の様な\n"
-"機能のうちの幾つかは、その機能が連携先の Mercurial サーバ側で明示的に\n"
-"利用可能になっている場合に限り使用可能です。\n"
-"\n"
-"Mercurial と SSH を併用する場合の注意点:\n"
-"\n"
-"- SSH アクセス先ホスト上に、shell アカウントと hg コマンドが必要です。\n"
-"  hg コマンドがアクセス先ホストの PATH 設定で利用可能になっていない\n"
-"  場合は、--remotecmd で明示的に指定してください。\n"
-"- URL 中のパス指定は、アクセス先ホスト上のユーザのホームディレクトリ\n"
-"  からの相対パスとみなされます。絶対パスを指定する場合は、パスの先頭に\n"
-"  更にスラッシュ('/')を付与してください::\n"
-"\n"
-"     例: ssh://example.com//tmp/repository\n"
-"\n"
-"- SSH 連携の際には Mercurial は自身の圧縮処理を行いません。以下のように\n"
-"  ~/.ssh/config 等で SSH の圧縮実施を指示することをお勧めします::\n"
-"\n"
-"    Host *.mylocalnetwork.example.com\n"
-"      Compression no\n"
-"    Host *\n"
-"      Compression yes\n"
-"\n"
-"  あるいは、設定ファイルにおける ssh コマンド指定や、コマンドラインでの\n"
-"  --ssh に対して、'ssh -C' を指定する方法もあります。\n"
-"\n"
-"連携先 URL は、設定ファイルの [paths] セクションで、別名を付けて記述\n"
-"することが出来ます::\n"
-"\n"
-"  [paths]\n"
-"  alias1 = URL1\n"
-"  alias2 = URL2\n"
-"  ...\n"
-"\n"
-"URL 指定が必要なコマンドに対しては、別名を指定することが出来ます\n"
-"(例えば、'hg pull alias1' は alias1 の指す先から変更を取り込みます)。\n"
-"\n"
-"コマンドに URL を指定しなかった場合に、暗黙の連携先として使用される\n"
-"重要な別名が2つあります:\n"
-"\n"
-"default:\n"
-"  'hg clone' によって複製した場合、新規リポジトリの 'default' として\n"
-"  複製元リポジトリの URL が保存されます。\n"
-"  以後、連携先を省略して 'hg push' や 'hg pull' に類するコマンドを\n"
-"  実行した際には、この URL が連携先として使用されます。\n"
-"\n"
-"default-push:\n"
-"  'hg push' は、'default-push' の別名で定義される URL を探します。\n"
-"  'default' が定義されている場合でも、'default-push' が定義されていれば\n"
-"  こちらが優先されます。\n"
-
-msgid ""
 "hooks for controlling repository access\n"
 "\n"
 "This hook makes it possible to allow or deny write access to portions\n"
@@ -1139,7 +184,7 @@
 
 #, python-format
 msgid "config error - hook type \"%s\" cannot stop incoming changesets"
-msgstr ""
+msgstr "設定エラー - フック種別 \"%s\" は履歴の取り込みを抑止できません"
 
 #, python-format
 msgid "acl: access denied for changeset %s"
@@ -1200,22 +245,22 @@
 msgstr "ブックマーク名に改行を含めません"
 
 msgid "a bookmark cannot have the name of an existing branch"
-msgstr ""
+msgstr "既存ブランチと同名のブックマークは作成できません"
 
 msgid "force"
-msgstr ""
+msgstr "強制実施"
 
 msgid "revision"
 msgstr "リビジョン"
 
 msgid "delete a given bookmark"
-msgstr ""
+msgstr "指定ブックマークの削除"
 
 msgid "rename a given bookmark"
-msgstr ""
+msgstr "指定ブックマークの改名"
 
 msgid "hg bookmarks [-f] [-d] [-m NAME] [-r REV] [NAME]"
-msgstr ""
+msgstr "hg bookmarks [-f] [-d] [-m NAME] [-r REV] [NAME]"
 
 msgid ""
 "hooks for integrating with the Bugzilla bug tracker\n"
@@ -1370,10 +415,10 @@
 
 #, python-format
 msgid "bug %d already knows about changeset %s\n"
-msgstr ""
+msgstr "バグ %d にとってリビジョン %s は既知のものです\n"
 
 msgid "telling bugzilla to send mail:\n"
-msgstr ""
+msgstr "bugzilla へのメール送信指示中:\n"
 
 #, python-format
 msgid "  bug %s\n"
@@ -1385,7 +430,7 @@
 
 #, python-format
 msgid "bugzilla notify command %s"
-msgstr ""
+msgstr "bugzilla 通知コマンド実行エラー: %s"
 
 msgid "done\n"
 msgstr "完了\n"
@@ -1418,7 +463,7 @@
 
 #, python-format
 msgid "hook type %s does not pass a changeset id"
-msgstr ""
+msgstr "フック種別 %s によりチェンジセットの処理が抑止されました"
 
 #, python-format
 msgid "database error: %s"
@@ -1567,8 +612,9 @@
 msgid ""
 "colorize output from some commands\n"
 "\n"
-"This extension modifies the status command to add color to its output\n"
-"to reflect file status, the qseries command to add color to reflect\n"
+"This extension modifies the status and resolve commands to add color to "
+"their\n"
+"output to reflect file status, the qseries command to add color to reflect\n"
 "patch status (applied, unapplied, missing), and to diff-related\n"
 "commands to highlight additions, removals, diff headers, and trailing\n"
 "whitespace.\n"
@@ -1605,17 +651,22 @@
 "  diff.inserted = green\n"
 "  diff.changed = white\n"
 "  diff.trailingwhitespace = bold red_background\n"
+"\n"
+"  resolve.unresolved = red bold\n"
+"  resolve.resolved = green bold\n"
+"\n"
+"  bookmarks.current = green\n"
 msgstr ""
 
 msgid "when to colorize (always, auto, or never)"
-msgstr ""
+msgstr "色づけ実施種別。always(常時), auto(自動)ないし never(禁止)"
 
 msgid "don't colorize output (DEPRECATED)"
 msgstr "出力を色付けしない(非推奨)"
 
 #, python-format
 msgid "ignoring unknown color/effect %r (configured in color.%s)\n"
-msgstr ""
+msgstr "未知の色/効果指定 %r を無視(color.%s で設定記述)\n"
 
 msgid "import revisions from foreign VCS repositories into Mercurial"
 msgstr "他の構成管理ツールから Mercurial への履歴取り込み"
@@ -1770,6 +821,15 @@
 "        matched. If a match occurs, then the conversion process will\n"
 "        add the most recent revision on the branch indicated in the\n"
 "        regex as the second parent of the changeset.\n"
+"    --config hook.cvslog\n"
+"        Specify a Python function to be called at the end of gathering\n"
+"        the CVS log. The function is passed a list with the log entries,\n"
+"        and can modify the entries in-place, or add or delete them.\n"
+"    --config hook.cvschangesets\n"
+"        Specify a Python function to be called after the changesets\n"
+"        are calculated from the the CVS log. The function is passed\n"
+"        a list with the changeset entries, and can modify the changesets\n"
+"        in-place, or add or delete them.\n"
 "\n"
 "    An additional \"debugcvsps\" Mercurial command allows the builtin\n"
 "    changeset merging code to be run without doing a conversion. Its\n"
@@ -1957,10 +1017,18 @@
 msgstr "変換ファイル %r を開くことができません: %s"
 
 #, python-format
+msgid "%s: invalid source repository type"
+msgstr "%s: 変換元リポジトリ種別が不正です"
+
+#, python-format
 msgid "%s: missing or unsupported repository"
 msgstr "%s: リポジトリが見つからないか、サポートされていない形式です"
 
 #, python-format
+msgid "%s: invalid destination repository type"
+msgstr "%s: 変換先リポジトリ種別が不正です"
+
+#, python-format
 msgid "convert: %s\n"
 msgstr "変換: %s\n"
 
@@ -2196,10 +1264,10 @@
 
 msgid ""
 "svn: cannot probe remote repository, assume it could be a subversion "
-"repository. Use --source if you know better.\n"
-msgstr ""
-"svn: subversion の遠隔リポジトリの確認に失敗しました。--source の使用を検討し"
-"てください。\n"
+"repository. Use --source-type if you know better.\n"
+msgstr ""
+"svn: subversion の遠隔リポジトリの確認に失敗しました。--source-type の使用を"
+"検討してください。\n"
 
 msgid "Subversion python bindings could not be loaded"
 msgstr "Subversion python バインディングが読み込めません"
@@ -2369,15 +1437,14 @@
 msgid ""
 "use %(path)s to diff repository (or selected files)\n"
 "\n"
-"    Show differences between revisions for the specified files, using the\n"
-"    %(path)s program.\n"
-"\n"
-"    When two revision arguments are given, then changes are shown between\n"
-"    those revisions. If only one revision is specified then that revision "
-"is\n"
-"    compared to the working directory, and, when no revisions are "
-"specified,\n"
-"    the working directory files are compared to its parent."
+"    Show differences between revisions for the specified files, using\n"
+"    the %(path)s program.\n"
+"\n"
+"    When two revision arguments are given, then changes are shown\n"
+"    between those revisions. If only one revision is specified then\n"
+"    that revision is compared to the working directory, and, when no\n"
+"    revisions are specified, the working directory files are compared\n"
+"    to its parent."
 msgstr ""
 
 #, python-format
@@ -2806,23 +1873,23 @@
 msgid "hg inserve [OPTION]..."
 msgstr "hg inserve [OPTION]..."
 
-msgid "(found dead inotify server socket; removing it)\n"
-msgstr "(終了した inotify サーバのソケットを検出したので削除します)\n"
-
-#, python-format
-msgid "could not start inotify server: %s\n"
-msgstr "inotify サーバの起動に失敗: %s\n"
-
-#, python-format
-msgid "could not talk to new inotify server: %s\n"
-msgstr "inotify サーバとの連携に失敗: %s\n"
-
-#, python-format
-msgid "failed to contact inotify server: %s\n"
-msgstr "inotify サーバとの連携に失敗: %s\n"
-
-msgid "received empty answer from inotify server"
-msgstr "inotify サーバからの空応答 "
+msgid "inotify-client: found dead inotify server socket; removing it\n"
+msgstr "inotify-client:無効な inotify サーバソケットを検出したので削除します\n"
+
+#, python-format
+msgid "inotify-client: could not start inotify server: %s\n"
+msgstr "inotify-client: inotify サーバの起動に失敗: %s\n"
+
+#, python-format
+msgid "inotify-client: could not talk to new inotify server: %s\n"
+msgstr "inotify-client: 新規 inotify サーバとの連携に失敗: %s\n"
+
+#, python-format
+msgid "inotify-client: failed to contact inotify server: %s\n"
+msgstr "inotify-client: inotify サーバとの連携に失敗: %s\n"
+
+msgid "inotify-client: received empty answer from inotify server"
+msgstr "inotify-client: inotify サーバからの空応答を受信"
 
 #, python-format
 msgid "(inotify: received response from incompatible server version %d)\n"
@@ -2874,21 +1941,6 @@
 msgstr "%r 配下のディレクトリを監視\n"
 
 #, python-format
-msgid "status: %r %s -> %s\n"
-msgstr "status: %r %s -> %s\n"
-
-#, python-format
-msgid "%s dirstate reload\n"
-msgstr "%s: dirstate 再読み込み中\n"
-
-#, python-format
-msgid "%s end dirstate reload\n"
-msgstr "%s: dirstate 再読み込み完了\n"
-
-msgid "rescanning due to .hgignore change\n"
-msgstr ".hgignore 変更に付き再走査中\n"
-
-#, python-format
 msgid "%s event: created %s\n"
 msgstr "%s: %s を作成\n"
 
@@ -2920,9 +1972,24 @@
 msgid "%s hooking back up with %d bytes readable\n"
 msgstr "%s: 読み込み可能な %d バイトのバックアップをフック\n"
 
-#, python-format
-msgid "could not start server: %s"
-msgstr "サーバ起動が失敗: %s"
+msgid "finished setup\n"
+msgstr "セットアップを終了しました\n"
+
+#, python-format
+msgid "status: %r %s -> %s\n"
+msgstr "status: %r %s -> %s\n"
+
+msgid "rescanning due to .hgignore change\n"
+msgstr ".hgignore 変更に付き再走査中\n"
+
+msgid "cannot start: socket is already bound"
+msgstr "ソケットが既にバインドされているため開始できません"
+
+msgid ""
+"cannot start: tried linking .hg/inotify.sock to a temporary socket but .hg/"
+"inotify.sock already exists"
+msgstr ""
+"一時ソケットに使用する .hg/inotify.sock が既に存在するため開始できません"
 
 #, python-format
 msgid "answering query for %r\n"
@@ -2936,9 +2003,6 @@
 msgid "unrecognized query type: %s\n"
 msgstr "未知の問い合わせ種別: %s\n"
 
-msgid "finished setup\n"
-msgstr "セットアップを終了しました\n"
-
 msgid ""
 "expand expressions into changelog and summaries\n"
 "\n"
@@ -3297,6 +2361,18 @@
 "  add known patch to applied stack          qpush\n"
 "  remove patch from applied stack           qpop\n"
 "  refresh contents of top applied patch     qrefresh\n"
+"\n"
+"By default, mq will automatically use git patches when required to\n"
+"avoid losing file mode changes, copy records, binary files or empty\n"
+"files creations or deletions. This behaviour can be configured with::\n"
+"\n"
+"  [mq]\n"
+"  git = auto/keep/yes/no\n"
+"\n"
+"If set to 'keep', mq will obey the [diff] section configuration while\n"
+"preserving existing git patches upon qrefresh. If set to 'yes' or\n"
+"'no', mq will override the [diff] section and always generate git or\n"
+"regular patches, possibly losing data in the second case.\n"
 msgstr ""
 "パッチ併用の管理\n"
 "\n"
@@ -3321,6 +2397,23 @@
 "  既知のパッチの適用                     qpush\n"
 "  パッチ適用の解除                       qpop\n"
 "  適用中の最上位パッチの内容更新         qrefresh\n"
+"\n"
+"ファイルモードの変更や、複製履歴、バイナリファイルや空ファイルの生成\n"
+"/削除等の情報を維持するために、mq は必要に応じて git 形式のパッチを\n"
+"自動的に使用することができます。この振る舞いは以下の指定で制御します::\n"
+"\n"
+"  [mq]\n"
+"  git = auto/keep/yes/no\n"
+"\n"
+"'keep' が指定された場合、既存の qrefresh 対象となるパッチが git 形式\n"
+"パッチである間は、mq は [diff] セクションの設定に従います。\n"
+"'yes' ないし 'no' が指定された場合、mq は [diff] セクションの設定を無視\n"
+"して、git パッチないし通常パッチを生成します。通常パッチを生成する場合、\n"
+"情報が失われる可能性があります。\n"
+
+#, python-format
+msgid "mq.git option can be auto/keep/yes/no got %s"
+msgstr "mq.git オプションが auto/keep/yes/no 以外の %s でした"
 
 #, python-format
 msgid "%s appears more than once in %s"
@@ -3408,18 +2501,6 @@
 msgstr "ファイル %s が読み込めません\n"
 
 #, python-format
-msgid "imported patch %s\n"
-msgstr "パッチ %s の取り込み\n"
-
-#, python-format
-msgid ""
-"\n"
-"imported patch %s"
-msgstr ""
-"\n"
-"パッチ %s の取り込み"
-
-#, python-format
 msgid "patch %s is empty\n"
 msgstr "パッチ %s は空です\n"
 
@@ -3472,6 +2553,9 @@
 msgid "patch \"%s\" already exists"
 msgstr "パッチ \"%s\" は既に存在します"
 
+msgid "cannot manage merge changesets"
+msgstr "マージリビジョンは MQ の管理対象にできません"
+
 #, python-format
 msgid "error unlinking %s\n"
 msgstr "%s の unlink に失敗\n"
@@ -4676,6 +3760,9 @@
 "  cc = cc1, cc2, ...\n"
 "  bcc = bcc1, bcc2, ...\n"
 "\n"
+"Use ``[patchbomb]`` as configuration section name if you need to\n"
+"override global ``[email]`` address settings.\n"
+"\n"
 "Then you can use the \"hg email\" command to mail a series of changesets\n"
 "as a patchbomb.\n"
 "\n"
@@ -4738,6 +3825,9 @@
 "  cc = cc1, cc2, ...\n"
 "  bcc = bcc1, bcc2, ...\n"
 "\n"
+"``[email]`` セクションにおけるグローバルなアドレス設定よりも優先させたい\n"
+"設定がある場合には、``[patchbomb]`` セクションを使って記述してください。\n"
+"\n"
 "ここまで設定できたなら、\"hg email\" コマンドを使用して、一連の\n"
 "リビジョンをパッチ爆弾(patchbomb)としてメール送信することができます。\n"
 "\n"
@@ -5322,34 +4412,32 @@
 msgid ""
 "recreate hardlinks between two repositories\n"
 "\n"
-"    When repositories are cloned locally, their data files will be "
-"hardlinked\n"
-"    so that they only use the space of a single repository.\n"
-"\n"
-"    Unfortunately, subsequent pulls into either repository will break "
-"hardlinks\n"
-"    for any files touched by the new changesets, even if both repositories "
-"end\n"
-"    up pulling the same changes.\n"
-"\n"
-"    Similarly, passing --rev to \"hg clone\" will fail to use\n"
-"    any hardlinks, falling back to a complete copy of the source "
-"repository.\n"
-"\n"
-"    This command lets you recreate those hardlinks and reclaim that wasted\n"
-"    space.\n"
-"\n"
-"    This repository will be relinked to share space with ORIGIN, which must "
-"be\n"
-"    on the same local disk. If ORIGIN is omitted, looks for \"default-relink"
-"\",\n"
-"    then \"default\", in [paths].\n"
-"\n"
-"    Do not attempt any read operations on this repository while the command "
-"is\n"
-"    running. (Both repositories will be locked against writes.)\n"
-"    "
-msgstr ""
+"    When repositories are cloned locally, their data files will be\n"
+"    hardlinked so that they only use the space of a single repository.\n"
+"\n"
+"    Unfortunately, subsequent pulls into either repository will break\n"
+"    hardlinks for any files touched by the new changesets, even if\n"
+"    both repositories end up pulling the same changes.\n"
+"\n"
+"    Similarly, passing --rev to \"hg clone\" will fail to use any\n"
+"    hardlinks, falling back to a complete copy of the source\n"
+"    repository.\n"
+"\n"
+"    This command lets you recreate those hardlinks and reclaim that\n"
+"    wasted space.\n"
+"\n"
+"    This repository will be relinked to share space with ORIGIN, which\n"
+"    must be on the same local disk. If ORIGIN is omitted, looks for\n"
+"    \"default-relink\", then \"default\", in [paths].\n"
+"\n"
+"    Do not attempt any read operations on this repository while the\n"
+"    command is running. (Both repositories will be locked against\n"
+"    writes.)\n"
+"    "
+msgstr ""
+
+msgid "hardlinks are not supported on this system"
+msgstr "このシステム上ではハードリンクはサポートしていません"
 
 #, python-format
 msgid "relinking %s to %s\n"
@@ -5383,6 +4471,43 @@
 msgid "[ORIGIN]"
 msgstr ""
 
+msgid ""
+"extend schemes with shortcuts to repository swarms\n"
+"\n"
+"This extension allows you to specify shortcuts for parent URLs with a\n"
+"lot of repositories to act like a scheme, for example::\n"
+"\n"
+"  [schemes]\n"
+"  py = http://code.python.org/hg/\n"
+"\n"
+"After that you can use it like::\n"
+"\n"
+"  hg clone py://trunk/\n"
+"\n"
+"Additionally there is support for some more complex schemas, for\n"
+"example used by Google Code::\n"
+"\n"
+"  [schemes]\n"
+"  gcode = http://{1}.googlecode.com/hg/\n"
+"\n"
+"The syntax is taken from Mercurial templates, and you have unlimited\n"
+"number of variables, starting with ``{1}`` and continuing with\n"
+"``{2}``, ``{3}`` and so on. This variables will receive parts of URL\n"
+"supplied, split by ``/``. Anything not specified as ``{part}`` will be\n"
+"just appended to an URL.\n"
+"\n"
+"For convenience, the extension adds these schemes by default::\n"
+"\n"
+"  [schemes]\n"
+"  py = http://hg.python.org/\n"
+"  bb = https://bitbucket.org/\n"
+"  bb+ssh = ssh://hg@bitbucket.org/\n"
+"  gcode = https://{1}.googlecode.com/hg/\n"
+"\n"
+"You can override a predefined scheme by defining a new scheme with the\n"
+"same name.\n"
+msgstr ""
+
 msgid "share a common history between several working directories"
 msgstr ""
 
@@ -5392,8 +4517,15 @@
 "    Initialize a new repository and working directory that shares its\n"
 "    history with another repository.\n"
 "\n"
-"    NOTE: actions that change history such as rollback or moving the\n"
-"    source may confuse sharers.\n"
+"    NOTE: using rollback or extensions that destroy/modify history\n"
+"    (mq, rebase, etc.) can cause considerable confusion with shared\n"
+"    clones. In particular, if two shared clones are both updated to\n"
+"    the same changeset, and one of them destroys that changeset with\n"
+"    rollback, the other clone will suddenly stop working: all\n"
+"    operations will fail with \"abort: working directory has unknown\n"
+"    parent\". The only known workaround is to use debugsetparents on\n"
+"    the broken clone to reset it to a changeset that still exists\n"
+"    (e.g. tip).\n"
 "    "
 msgstr ""
 
@@ -5614,12 +4746,15 @@
 "Note that there are some limitations on using this extension:\n"
 "\n"
 "- You should use single encoding in one repository.\n"
-"- You should set same encoding for the repository by locale or\n"
-"  HGENCODING.\n"
-"\n"
-"Path encoding conversion are done between Unicode and\n"
-"encoding.encoding which is decided by Mercurial from current locale\n"
-"setting or HGENCODING.\n"
+"\n"
+"\n"
+"By default, win32mbcs uses encoding.encoding decided by Mercurial.\n"
+"You can specify the encoding by config option::\n"
+"\n"
+" [win32mbcs]\n"
+" encoding = sjis\n"
+"\n"
+"It is useful for the users who want to commit with UTF-8 log message.\n"
 msgstr ""
 "問題のある文字コードでの多バイト符号化文字を使用したパス名の有効化\n"
 "\n"
@@ -5644,11 +4779,16 @@
 "このエクステンションの利用には幾つかの制限があります:\n"
 "\n"
 "- リポジトリ内では単一の文字コードを使用してください\n"
-"- ロケール設定なり HGENCODING 環境変数なりの設定を、リポジトリで\n"
-"  使用する文字コードと同じものにしてください\n"
-"\n"
-"パス名の文字コード変換は、unicode と、ロケール設定ないし HGENCODING\n"
-"環境変数によって Mercurial が決定する文字コードとの間で行なわれます。\n"
+"\n"
+"\n"
+"指定の無い場合、win32mbcs は Mercurial により決定される\n"
+"(Python プログラム上の) encoding.encoding 変数値を使用します。\n"
+"以下の設定記述により、文字コードを指定することができます::\n"
+"\n"
+" [win32mbcs]\n"
+" encoding = sjis\n"
+"\n"
+"ログメッセージの文字コードに UTF-8 を使用したいユーザ等に有用です。\n"
 
 #, python-format
 msgid "[win32mbcs] filename conversion failed with %s encoding\n"
@@ -6142,14 +5282,14 @@
 "    directory; use -r/--rev to specify a different revision.\n"
 "\n"
 "    To specify the type of archive to create, use -t/--type. Valid\n"
-"    types are::\n"
-"\n"
-"      \"files\" (default): a directory full of files\n"
-"      \"tar\": tar archive, uncompressed\n"
-"      \"tbz2\": tar archive, compressed using bzip2\n"
-"      \"tgz\": tar archive, compressed using gzip\n"
-"      \"uzip\": zip archive, uncompressed\n"
-"      \"zip\": zip archive, compressed using deflate\n"
+"    types are:\n"
+"\n"
+"    :``files``: a directory full of files (default)\n"
+"    :``tar``:   tar archive, uncompressed\n"
+"    :``tbz2``:  tar archive, compressed using bzip2\n"
+"    :``tgz``:   tar archive, compressed using gzip\n"
+"    :``uzip``:  zip archive, uncompressed\n"
+"    :``zip``:   zip archive, compressed using deflate\n"
 "\n"
 "    The exact name of the destination archive or directory is given\n"
 "    using a format string; see 'hg help export' for details.\n"
@@ -6166,14 +5306,14 @@
 "    他のリビジョンを指定する場合は -r/--rev を使用します。\n"
 "\n"
 "    生成するアーカイブの種別を指定する場合は、-t/--type を使用します。\n"
-"    使用可能な種別は::\n"
-"\n"
-"      \"files\": 展開済みアーカイブのイメージ(無指定時)\n"
-"      \"tar\": 非圧縮の tar アーカイブ形式\n"
-"      \"tbz2\": bzip2 圧縮の tar アーカイブ形式\n"
-"      \"tgz\": gzip 圧縮の tar アーカイブ形式\n"
-"      \"uzip\": 非圧縮の zip アーカイブ形式\n"
-"      \"zip\": deflate 圧縮の zip アーカイブ形式\n"
+"    使用可能な種別は:\n"
+"\n"
+"    :``files``: 展開済みアーカイブのイメージ(無指定時)\n"
+"    :``tar``:   非圧縮の tar アーカイブ形式\n"
+"    :``tbz2``:  bzip2 圧縮の tar アーカイブ形式\n"
+"    :``tgz``:   gzip 圧縮の tar アーカイブ形式\n"
+"    :``uzip``:  非圧縮の zip アーカイブ形式\n"
+"    :``zip``:   deflate 圧縮の zip アーカイブ形式\n"
 "\n"
 "    アーカイブ生成先となるファイル名ないしディレクトリ名の指定には\n"
 "    置換指定を使用することができます。置換指定に関する詳細は \n"
@@ -6382,7 +5522,7 @@
 "\n"
 "    作業領域の内容を既存ブランチのもので更新する場合は 'hg update' を\n"
 "    使用してください。現ブランチを閉鎖する場合は\n"
-"    'hg commit --close-baranch' を使用してください。\n"
+"    'hg commit --close-branch' を使用してください。\n"
 "    "
 
 #, python-format
@@ -6422,6 +5562,12 @@
 "    使用してください。\n"
 "    "
 
+msgid " (closed)"
+msgstr " (閉鎖済み)"
+
+msgid " (inactive)"
+msgstr " (非アクティブ)"
+
 msgid ""
 "create a changegroup file\n"
 "\n"
@@ -6483,11 +5629,11 @@
 "\n"
 "    Output may be to a file, in which case the name of the file is\n"
 "    given using a format string. The formatting rules are the same as\n"
-"    for the export command, with the following additions::\n"
-"\n"
-"      %s   basename of file being printed\n"
-"      %d   dirname of file being printed, or '.' if in repository root\n"
-"      %p   root-relative path name of file being printed\n"
+"    for the export command, with the following additions:\n"
+"\n"
+"    :``%s``: basename of file being printed\n"
+"    :``%d``: dirname of file being printed, or '.' if in repository root\n"
+"    :``%p``: root-relative path name of file being printed\n"
 "    "
 msgstr ""
 "指定されたリビジョン時点のファイル内容の出力\n"
@@ -6498,12 +5644,11 @@
 "\n"
 "    出力先指定(置換指定可能)がある場合、出力はファイルに保存されます。\n"
 "    置換指定には 'hg export' で指定可能なものに加えて以下のものを指定\n"
-"    できます::\n"
-"    \n"
-"\n"
-"      %s   対象ファイルのベース名\n"
-"      %d   対象ファイルの格納ディレクトリ、ないし '.'\n"
-"      %p   対象ファイルのリポジトリルートからの相対パス\n"
+"    できます:\n"
+"\n"
+"    :``%s``: 対象ファイルのベース名\n"
+"    :``%d``: 対象ファイルの格納ディレクトリ、ないし '.'\n"
+"    :``%p``: 対象ファイルのリポジトリルートからの相対パス\n"
 "    "
 
 msgid ""
@@ -6528,9 +5673,9 @@
 "    will be the null changeset). Otherwise, clone will initially check\n"
 "    out (in order of precedence):\n"
 "\n"
-"      a) the changeset, tag or branch specified with -u/--updaterev\n"
-"      b) the changeset, tag or branch given with the first -r/--rev\n"
-"      c) the head of the default branch\n"
+"    a) the changeset, tag or branch specified with -u/--updaterev\n"
+"    b) the changeset, tag or branch given with the first -r/--rev\n"
+"    c) the head of the default branch\n"
 "\n"
 "    Use 'hg clone -u . src dst' to checkout the source repository's\n"
 "    parent changeset (applicable for local source repositories only).\n"
@@ -6581,7 +5726,7 @@
 "\n"
 "    複製先として ``ssh://`` URL 形式を指定することも可能ですが、遠隔ホスト\n"
 "    上では、.hg/hgrc の作成も、作業領域の更新も行われません。\n"
-"    ``ssh://`` URL 形式の詳細に関しては、'hg help urls' を参照してください。\n"
+"    ``ssh://`` URL 形式の詳細は、'hg help urls' を参照してください。\n"
 "\n"
 "    -U/--noupdate が指定された場合、新規複製先は、\n"
 "    管理領域(.hg)のみを保持し、作業領域の更新は行われません\n"
@@ -6589,9 +5734,9 @@
 "    それ以外の場合は、以下の優先順位で定まるリビジョン時点の内容で\n"
 "    作業領域を更新します:\n"
 "\n"
-"      a) -u/--updaterev で指定されたリビジョン(タグやブランチ名も可)\n"
-"      b) 最初の -r/--rev で指定されたリビジョン(タグやブランチ名も可)\n"
-"      c) 'default' ブランチのヘッドリビジョン\n"
+"    a) -u/--updaterev で指定されたリビジョン(タグやブランチ名も可)\n"
+"    b) 最初の -r/--rev で指定されたリビジョン(タグやブランチ名も可)\n"
+"    c) 'default' ブランチのヘッドリビジョン\n"
 "\n"
 "    複製元の作業領域における親リビジョンで、複製先リポジトリの作業領域を\n"
 "    更新するには、'hg clone -u . 複製元 複製先' と指定します\n"
@@ -6629,7 +5774,6 @@
 "    (Emacs および多くの Linux 系ツールはそのように振舞います)。この制約は\n"
 "    .hg ディレクトリ配下にメタデータを配置する、MQ のような\n"
 "    エクステンションとは相容れないものです。\n"
-"\n"
 "    "
 
 msgid "cannot specify both --noupdate and --updaterev"
@@ -6966,16 +6110,16 @@
 "    first parent only.\n"
 "\n"
 "    Output may be to a file, in which case the name of the file is\n"
-"    given using a format string. The formatting rules are as follows::\n"
-"\n"
-"      %%   literal \"%\" character\n"
-"      %H   changeset hash (40 bytes of hexadecimal)\n"
-"      %N   number of patches being generated\n"
-"      %R   changeset revision number\n"
-"      %b   basename of the exporting repository\n"
-"      %h   short-form changeset hash (12 bytes of hexadecimal)\n"
-"      %n   zero-padded sequence number, starting at 1\n"
-"      %r   zero-padded changeset revision number\n"
+"    given using a format string. The formatting rules are as follows:\n"
+"\n"
+"    :``%%``: literal \"%\" character\n"
+"    :``%H``: changeset hash (40 bytes of hexadecimal)\n"
+"    :``%N``: number of patches being generated\n"
+"    :``%R``: changeset revision number\n"
+"    :``%b``: basename of the exporting repository\n"
+"    :``%h``: short-form changeset hash (12 bytes of hexadecimal)\n"
+"    :``%n``: zero-padded sequence number, starting at 1\n"
+"    :``%r``: zero-padded changeset revision number\n"
 "\n"
 "    Without the -a/--text option, export will avoid generating diffs\n"
 "    of files it detects as binary. With -a, export will generate a\n"
@@ -6999,16 +6143,16 @@
 "    出力するのは、第1親との差分のみを出力するためです。\n"
 "\n"
 "    出力先指定(置換指定可能)がある場合、出力はファイルに保存されます。\n"
-"    置換指定として以下のものが使用可能です::\n"
-"\n"
-"      %%   \"%\" 文字そのもの\n"
-"      %H   ハッシュ値(40 桁 16 進数)\n"
-"      %N   生成されるファイルの総数\n"
-"      %R   リビジョン番号\n"
-"      %b   対象リポジトリのベース名\n"
-"      %h   短縮形式ハッシュ値(12 桁 16 進数)\n"
-"      %n   1から始まるゼロ詰めの通し番号\n"
-"      %r   ゼロ詰めのリビジョン番号\n"
+"    置換指定として以下のものが使用可能です:\n"
+"\n"
+"    :``%%``: \"%\" 文字そのもの\n"
+"    :``%H``: ハッシュ値(40 桁 16 進数)\n"
+"    :``%N``: 生成されるファイルの総数\n"
+"    :``%R``: リビジョン番号\n"
+"    :``%b``: 対象リポジトリのベース名\n"
+"    :``%h``: 短縮形式ハッシュ値(12 桁 16 進数)\n"
+"    :``%n``: 1から始まるゼロ詰めの通し番号\n"
+"    :``%r``: ゼロ詰めのリビジョン番号\n"
 "\n"
 "    -a/--text 指定が無い場合、バイナリと思しきファイルは処理対象から\n"
 "    除外されます。-a 指定が有る場合、結果に関わらず、全てのファイルが\n"
@@ -7086,7 +6230,7 @@
 "    作業領域は検索対象には含まれません。パターンに合致する内容が現れた\n"
 "    リビジョンを表示します。\n"
 "\n"
-"    指定が無い場合本コマンドは、パターンに合致する内容が最小に現れた\n"
+"    指定が無い場合本コマンドは、パターンに合致する内容が最初に現れた\n"
 "    リビジョンを各ファイル毎に表示します。パターンに合致する変更のあった\n"
 "    全てのリビジョンを表示する場合、--all を指定します(パターン合致部分に\n"
 "    対する削除は \"-\"、追加は \"+\" を検索結果に表示することで区別)。\n"
@@ -7740,7 +6884,7 @@
 "    -r/--rev が指定された場合、指定されたものと、その祖先となる\n"
 "    リビジョンが連携先リポジトリへと反映されます。\n"
 "\n"
-"    ``ssh://`` URL 形式の詳細に関しては、'hg help urls' を参照してください。\n"
+"    ``ssh://`` URL 形式の詳細は、'hg help urls' を参照してください。\n"
 "    連携先が省略された場合、'default' パスが連携先として使用されます。\n"
 "    "
 
@@ -7877,7 +7021,7 @@
 "    will be overwritten if the merge is retried with resolve. The\n"
 "    -m/--mark switch should be used to mark the file as resolved.\n"
 "\n"
-"    You can specify a set of files to operate on, or use the -a/-all\n"
+"    You can specify a set of files to operate on, or use the -a/--all\n"
 "    switch to select all unresolved files.\n"
 "\n"
 "    This command also allows listing resolved files and manually\n"
@@ -7905,7 +7049,7 @@
 "    衝突が「未解消」な全てのファイルを実施対象にすることもできます。\n"
 "\n"
 "    本コマンドは、ファイルの衝突解消状態の一覧表示や、「解消済み」/\n"
-"   「未解消」といった衝突解消状態の手動変更もできます。全てのファイルの\n"
+"    「未解消」といった衝突解消状態の手動変更もできます。全てのファイルの\n"
 "    衝突解消状態が「解消済み」になるまでは、コミットができません。\n"
 "\n"
 "    ファイルの衝突解消状態表示には以下の記号が使用されます::\n"
@@ -8031,13 +7175,13 @@
 "    Transactions are used to encapsulate the effects of all commands\n"
 "    that create new changesets or propagate existing changesets into a\n"
 "    repository. For example, the following commands are transactional,\n"
-"    and their effects can be rolled back::\n"
-"\n"
-"      commit\n"
-"      import\n"
-"      pull\n"
-"      push (with this repository as destination)\n"
-"      unbundle\n"
+"    and their effects can be rolled back:\n"
+"\n"
+"    - commit\n"
+"    - import\n"
+"    - pull\n"
+"    - push (with this repository as destination)\n"
+"    - unbundle\n"
 "\n"
 "    This command is not intended for use on public repositories. Once\n"
 "    changes are visible for pull by other users, rolling a transaction\n"
@@ -8057,13 +7201,13 @@
 "    トランザクションとは、新規リビジョンの作成、ないし外部からの既存\n"
 "    リビジョンの取り込みにおけるコマンドの改変操作を一括化するものです。\n"
 "    例えば、以下のコマンドはいずれもトランザクションを形成するもので、\n"
-"    その効果は本コマンドにより巻き戻し可能です::\n"
-"\n"
-"      commit\n"
-"      import\n"
-"      pull\n"
-"      push (rollback 可能なのは反映先リポジトリ側)\n"
-"      unbundle\n"
+"    その効果は本コマンドにより巻き戻し可能です:\n"
+"\n"
+"    - commit\n"
+"    - import\n"
+"    - pull\n"
+"    - push (rollback 可能なのは反映先リポジトリ側)\n"
+"    - unbundle\n"
 "\n"
 "    本コマンドは、公開リポジトリでの実行を想定していません。他のユーザ\n"
 "    から 'hg pull' 可能な状態になってしまったなら、公開リポジトリでの\n"
@@ -8127,7 +7271,8 @@
 "\n"
 "    If one revision is given, it is used as the base revision.\n"
 "    If two revisions are given, the differences between them are\n"
-"    shown.\n"
+"    shown. The --change option can also be used as a shortcut to list\n"
+"    the changed files of a revision from its first parent.\n"
 "\n"
 "    The codes used to show the status of files are::\n"
 "\n"
@@ -8161,6 +7306,8 @@
 "\n"
 "    1つのリビジョンが指定された場合、比較元リビジョンとして扱われます。\n"
 "    2つのリビジョンが指定された場合、両リビジョン間で状態を比較します。\n"
+"    --change 指定を使うことで、第1親から変更されたファイル一覧を簡単に\n"
+"    表示させることができます。\n"
 "\n"
 "    ファイルの状態を表す記号は以下の通り::\n"
 "\n"
@@ -8688,8 +7835,8 @@
 msgid "do not update to target"
 msgstr "対象リビジョンによる作業領域内容の更新を抑止"
 
-msgid "[-gbsr] [-c CMD] [REV]"
-msgstr "[-gbsr] [-c CMD] [REV]"
+msgid "[-gbsr] [-U] [-c CMD] [REV]"
+msgstr "[-gbsr] [-U] [-c CMD] [REV]"
 
 msgid "set branch name even if it shadows an existing branch"
 msgstr "同名既存ブランチが存在する場合でもブランチ作成を実施"
@@ -8706,8 +7853,8 @@
 msgid "show normal and closed branches"
 msgstr "閉鎖したヘッドも表示"
 
-msgid "[-a]"
-msgstr "[-a]"
+msgid "[-ac]"
+msgstr "[-ac]"
 
 msgid "run even when remote repository is unrelated"
 msgstr "連携先が無関係なリポジトリでも実行"
@@ -8724,8 +7871,8 @@
 msgid "bundle compression type to use"
 msgstr "バンドルファイルの圧縮形式"
 
-msgid "[-f] [-a] [-r REV]... [--base REV]... FILE [DEST]"
-msgstr "[-f] [-a] [-r REV]... [--base REV]... FILE [DEST]"
+msgid "[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]"
+msgstr "[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]"
 
 msgid "print output to file with formatted name"
 msgstr "ファイル内容の保存先"
@@ -8745,8 +7892,8 @@
 msgid "revision, tag or branch to check out"
 msgstr "作業領域更新用リビジョン(タグ名/ブランチ名)"
 
-msgid "a changeset you would like to have after cloning"
-msgstr "複製における上限のリビジョン"
+msgid "clone only the specified revisions and ancestors"
+msgstr "指定リビジョンと、その祖先のみを複製"
 
 msgid "[OPTION]... SOURCE [DEST]"
 msgstr "[OPTION]... SOURCE [DEST]"
@@ -8823,6 +7970,9 @@
 msgid "diff against the second parent"
 msgstr "第2親との差分を使用"
 
+msgid "revisions to export"
+msgstr "対象リビジョン"
+
 msgid "[OPTION]... [-o OUTFILESPEC] REV..."
 msgstr "[OPTION]... [-o OUTFILESPEC] REV..."
 
@@ -8859,8 +8009,8 @@
 msgid "show normal and closed branch heads"
 msgstr "閉鎖したヘッドも表示"
 
-msgid "[-r STARTREV] [REV]..."
-msgstr "[-r STARTREV] [REV]..."
+msgid "[-ac] [-r STARTREV] [REV]..."
+msgstr "[-ac] [-r STARTREV] [REV]..."
 
 msgid "[TOPIC]"
 msgstr "[TOPIC]"
@@ -8978,8 +8128,8 @@
 msgid "review revisions to merge (no merge is performed)"
 msgstr "マージ対象リビジョンの確認(マージ処理は未実施)"
 
-msgid "[-f] [[-r] REV]"
-msgstr "[-f] [[-r] REV]"
+msgid "[-P] [-f] [[-r] REV]"
+msgstr "[-P] [-f] [[-r] REV]"
 
 msgid "a specific revision up to which you would like to push"
 msgstr "反映対象とする上限のリビジョン"
@@ -8996,8 +8146,8 @@
 msgid "[NAME]"
 msgstr "[NAME]"
 
-msgid "update to new tip if changesets were pulled"
-msgstr "新規取り込みの際には作業領域を tip で更新"
+msgid "update to new branch head if changesets were pulled"
+msgstr "新規取り込みの際には作業領域を新規のブランチヘッドで更新"
 
 msgid "[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]"
 msgstr "[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]"
@@ -9125,6 +8275,9 @@
 msgid "show difference from revision"
 msgstr "当該リビジョンとの差分で状態を判定"
 
+msgid "list the changed files of a revision"
+msgstr "指定リビジョンにおける更新ファイルの一覧"
+
 msgid "replace existing tag"
 msgstr "既存のタグを置き換え"
 
@@ -9137,14 +8290,14 @@
 msgid "remove a tag"
 msgstr "タグの削除"
 
-msgid "[-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME..."
-msgstr "[-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME..."
-
-msgid "[-p]"
-msgstr "[-p]"
-
-msgid "update to new tip if changesets were unbundled"
-msgstr "新規取り込みの際には作業領域を tip で更新"
+msgid "[-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME..."
+msgstr "[-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME..."
+
+msgid "[-p] [-g]"
+msgstr "[-p] [-g]"
+
+msgid "update to new branch head if changesets were unbundled"
+msgstr "新規取り込みの際には作業領域を新規ブランチヘッドでで更新"
 
 msgid "[-u] FILE..."
 msgstr "[-u] FILE..."
@@ -9159,6 +8312,10 @@
 msgstr "[-c] [-C] [-d DATE] [[-r] REV]"
 
 #, python-format
+msgid "config error at %s:%d: cannot include %s (%s)"
+msgstr "%s:%d:設定エラー: %s を読み込めません(%s)"
+
+#, python-format
 msgid "config error at %s:%d: '%s'"
 msgstr "%s:%d:設定エラー:%s"
 
@@ -9315,6 +8472,16 @@
 msgstr "'%s' を別名に持つコマンドはありません\n"
 
 #, python-format
+msgid ""
+"alias for: hg %s\n"
+"\n"
+"%s"
+msgstr ""
+"hg %s の別名\n"
+"\n"
+"%s"
+
+#, python-format
 msgid "alias '%s' resolves to unknown command '%s'\n"
 msgstr "'%s' が未知のコマンド '%s' の別名とみなされました\n"
 
@@ -9468,6 +8635,1044 @@
 msgid "Using additional features"
 msgstr "付加機能の使用"
 
+msgid ""
+"Mercurial reads configuration data from several files, if they exist.\n"
+"Below we list the most specific file first.\n"
+"\n"
+"On Windows, these configuration files are read:\n"
+"\n"
+"- ``<repo>\\.hg\\hgrc``\n"
+"- ``%USERPROFILE%\\.hgrc``\n"
+"- ``%USERPROFILE%\\Mercurial.ini``\n"
+"- ``%HOME%\\.hgrc``\n"
+"- ``%HOME%\\Mercurial.ini``\n"
+"- ``C:\\Mercurial\\Mercurial.ini``\n"
+"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
+"- ``<install-dir>\\Mercurial.ini``\n"
+"\n"
+"On Unix, these files are read:\n"
+"\n"
+"- ``<repo>/.hg/hgrc``\n"
+"- ``$HOME/.hgrc``\n"
+"- ``/etc/mercurial/hgrc``\n"
+"- ``/etc/mercurial/hgrc.d/*.rc``\n"
+"- ``<install-root>/etc/mercurial/hgrc``\n"
+"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
+"\n"
+"The configuration files for Mercurial use a simple ini-file format. A\n"
+"configuration file consists of sections, led by a ``[section]`` header\n"
+"and followed by ``name = value`` entries::\n"
+"\n"
+"  [ui]\n"
+"  username = Firstname Lastname <firstname.lastname@example.net>\n"
+"  verbose = True\n"
+"\n"
+"This above entries will be referred to as ``ui.username`` and\n"
+"``ui.verbose``, respectively. Please see the hgrc man page for a full\n"
+"description of the possible configuration values:\n"
+"\n"
+"- on Unix-like systems: ``man hgrc``\n"
+"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
+msgstr ""
+"Mercurial は設定ファイルを複数の場所から読み込みます。\n"
+"優先度順に読み込み位置を並べたものを以下に示します。\n"
+"\n"
+"Windows 環境では以下の設定ファイルが読み込まれます:\n"
+"\n"
+"- ``<リポジトリ>\\.hg\\hgrc``\n"
+"- ``%USERPROFILE%\\.hgrc``\n"
+"- ``%USERPROFILE%\\Mercurial.ini``\n"
+"- ``%HOME%\\.hgrc``\n"
+"- ``%HOME%\\Mercurial.ini``\n"
+"- ``C:\\Mercurial\\Mercurial.ini``\n"
+"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
+"- ``<インストール先>\\Mercurial.ini``\n"
+"\n"
+"Unix 環境では以下の設定ファイルが読み込まれます:\n"
+"\n"
+"- ``<リポジトリ>/.hg/hgrc``\n"
+"- ``$HOME/.hgrc``\n"
+"- ``/etc/mercurial/hgrc``\n"
+"- ``/etc/mercurial/hgrc.d/*.rc``\n"
+"- ``<インストール先>/etc/mercurial/hgrc``\n"
+"- ``<インストール先>/etc/mercurial/hgrc.d/*.rc``\n"
+"\n"
+"Mercurial の設定ファイルは、いわゆる ini ファイル形式で記述されます。\n"
+"設定ファイルは、``[セクション名]`` 形式のヘッダから始まるセクションから\n"
+"構成され、``名前 = 値`` 形式の要素が列挙されます::\n"
+"\n"
+"  [ui]\n"
+"  username = Firstname Lastname <firstname.lastname@example.net>\n"
+"  verbose = True\n"
+"\n"
+"上記要素はそれぞれ、``ui.username`` および ``ui.verbose`` として\n"
+"参照されます。設定ファイルで指定可能な値の詳細に関しては、\n"
+"hgrc のマニュアルページを参照してください:\n"
+"\n"
+"- Unix 系システム: ``man hgrc``\n"
+"- オンライン版: http://www.selenic.com/mercurial/hgrc.5.html\n"
+
+msgid ""
+"Some commands allow the user to specify a date, e.g.:\n"
+"\n"
+"- backout, commit, import, tag: Specify the commit date.\n"
+"- log, revert, update: Select revision(s) by date.\n"
+"\n"
+"Many date formats are valid. Here are some examples:\n"
+"\n"
+"- ``Wed Dec 6 13:18:29 2006`` (local timezone assumed)\n"
+"- ``Dec 6 13:18 -0600`` (year assumed, time offset provided)\n"
+"- ``Dec 6 13:18 UTC`` (UTC and GMT are aliases for +0000)\n"
+"- ``Dec 6`` (midnight)\n"
+"- ``13:18`` (today assumed)\n"
+"- ``3:39`` (3:39AM assumed)\n"
+"- ``3:39pm`` (15:39)\n"
+"- ``2006-12-06 13:18:29`` (ISO 8601 format)\n"
+"- ``2006-12-6 13:18``\n"
+"- ``2006-12-6``\n"
+"- ``12-6``\n"
+"- ``12/6``\n"
+"- ``12/6/6`` (Dec 6 2006)\n"
+"\n"
+"Lastly, there is Mercurial's internal format:\n"
+"\n"
+"- ``1165432709 0`` (Wed Dec 6 13:18:29 2006 UTC)\n"
+"\n"
+"This is the internal representation format for dates. unixtime is the\n"
+"number of seconds since the epoch (1970-01-01 00:00 UTC). offset is\n"
+"the offset of the local timezone, in seconds west of UTC (negative if\n"
+"the timezone is east of UTC).\n"
+"\n"
+"The log command also accepts date ranges:\n"
+"\n"
+"- ``<{datetime}`` - at or before a given date/time\n"
+"- ``>{datetime}`` - on or after a given date/time\n"
+"- ``{datetime} to {datetime}`` - a date range, inclusive\n"
+"- ``-{days}`` - within a given number of days of today\n"
+msgstr ""
+"以下のコマンドで日時指定が可能です:\n"
+"\n"
+"- backout, commit, import, tag: コミット日時の指定\n"
+"- log, revert, update: 日時によるリビジョンの指定\n"
+"\n"
+"有効な日時指定形式は沢山あります。以下にいくつかの例を示します:\n"
+"\n"
+"- ``Wed Dec 6 13:18:29 2006`` (「ローカルタイムゾーン」を想定)\n"
+"- ``Dec 6 13:18 -0600`` (「今年」を想定、タイムゾーンはオフセット指定)\n"
+"- ``Dec 6 13:18 UTC`` (UTC および GMT は +0000 の別名)\n"
+"- ``Dec 6`` (「午前0時」を想定)\n"
+"- ``13:18`` (「本日」を想定)\n"
+"- ``3:39`` (「3:39AM」を想定)\n"
+"- ``3:39pm`` (15:39)\n"
+"- ``2006-12-06 13:18:29`` (ISO 8601 形式)\n"
+"- ``2006-12-6 13:18``\n"
+"- ``2006-12-6``\n"
+"- ``12-6``\n"
+"- ``12/6``\n"
+"- ``12/6/6`` (2006年12月6日)\n"
+"\n"
+"最後に、Mercurial 固有の内部形式を示します:\n"
+"\n"
+"- ``1165432709 0`` (2006年12月6日 13:18:29 UTC)\n"
+"\n"
+"これは日時の内部表現形式です。基点となる 1970年1月1日 00:00 UTC からの\n"
+"経過秒数を表す unixtime 形式部分と、ローカルタイムゾーンのオフセット値\n"
+"(UTC よりも東側の地域は負値)を表すオフセット部分から構成されています。\n"
+"\n"
+"log コマンドには、日時範囲指定可能です:\n"
+"\n"
+"- ``<{datetime}`` - 指定日時以前(指定日時含む)\n"
+"- ``>{datetime}`` - 指定日時以後(指定日時含む)\n"
+"- ``{datetime} to {datetime}`` - 指定日時範囲(指定日時含む)\n"
+"- ``-{days}`` - 本日から指定日数以内\n"
+
+msgid ""
+"Mercurial's default format for showing changes between two versions of\n"
+"a file is compatible with the unified format of GNU diff, which can be\n"
+"used by GNU patch and many other standard tools.\n"
+"\n"
+"While this standard format is often enough, it does not encode the\n"
+"following information:\n"
+"\n"
+"- executable status and other permission bits\n"
+"- copy or rename information\n"
+"- changes in binary files\n"
+"- creation or deletion of empty files\n"
+"\n"
+"Mercurial also supports the extended diff format from the git VCS\n"
+"which addresses these limitations. The git diff format is not produced\n"
+"by default because a few widespread tools still do not understand this\n"
+"format.\n"
+"\n"
+"This means that when generating diffs from a Mercurial repository\n"
+"(e.g. with \"hg export\"), you should be careful about things like file\n"
+"copies and renames or other things mentioned above, because when\n"
+"applying a standard diff to a different repository, this extra\n"
+"information is lost. Mercurial's internal operations (like push and\n"
+"pull) are not affected by this, because they use an internal binary\n"
+"format for communicating changes.\n"
+"\n"
+"To make Mercurial produce the git extended diff format, use the --git\n"
+"option available for many commands, or set 'git = True' in the [diff]\n"
+"section of your hgrc. You do not need to set this option when\n"
+"importing diffs in this format or using them in the mq extension.\n"
+msgstr ""
+"無指定時に Mercurial が2つのリビジョンを比較して差分表示する際の形式は\n"
+"GNU diff の unified 形式互換のもので、GNU patch をはじめとする多くの\n"
+"標準的なツールで使用できるものです。\n"
+"\n"
+"この標準的な形式は概ね十分なのですが、以下のような情報は含まれません:\n"
+"\n"
+"- 実行可否および権限設定\n"
+"- 複製/改名情報\n"
+"- バイナリファイルの変更\n"
+"- 空ファイルの作成/削除\n"
+"\n"
+"Mercurial は、別の構成管理ツールである git に由来する拡張差分形式にも\n"
+"対応しており、この形式は従来の差分形式の持つ制限を解消しています。\n"
+"但し、普及しているツールの幾つかが git 差分形式に対応していないため、\n"
+"Mercurial は指定が無い場合はこの形式では出力しません。\n"
+"\n"
+"つまり、Mercurial が(\"hg export\" 等で)生成した標準の差分形式は、\n"
+"他のリポジトリに対して適用した場合、上述した情報の欠落があることから、\n"
+"ファイルの複製・改名をはじめとする上記の制限に類する操作に関しては、\n"
+"十分注意する必要があります。push や pull のように、Mercurial の\n"
+"内部形式で実施される操作に関しては、バイナリ形式で変更情報の授受を行う\n"
+"ことから、情報の欠落に関しては心配する必要はありません。\n"
+"\n"
+"Mercurial から git 拡張差分形式の出力を得るには、受理可能なコマンドに\n"
+"対して --git を指定するか、設定ファイルの [diff] セクションに\n"
+"'git = True' 記述を追加してください。hg import や mq エクステンションを\n"
+"使用する場合は、この指定は不要です。\n"
+
+msgid ""
+"HG\n"
+"    Path to the 'hg' executable, automatically passed when running\n"
+"    hooks, extensions or external tools. If unset or empty, this is\n"
+"    the hg executable's name if it's frozen, or an executable named\n"
+"    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on\n"
+"    Windows) is searched.\n"
+"\n"
+"HGEDITOR\n"
+"    This is the name of the editor to run when committing. See EDITOR.\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"HGENCODING\n"
+"    This overrides the default locale setting detected by Mercurial.\n"
+"    This setting is used to convert data including usernames,\n"
+"    changeset descriptions, tag names, and branches. This setting can\n"
+"    be overridden with the --encoding command-line option.\n"
+"\n"
+"HGENCODINGMODE\n"
+"    This sets Mercurial's behavior for handling unknown characters\n"
+"    while transcoding user input. The default is \"strict\", which\n"
+"    causes Mercurial to abort if it can't map a character. Other\n"
+"    settings include \"replace\", which replaces unknown characters, and\n"
+"    \"ignore\", which drops them. This setting can be overridden with\n"
+"    the --encodingmode command-line option.\n"
+"\n"
+"HGMERGE\n"
+"    An executable to use for resolving merge conflicts. The program\n"
+"    will be executed with three arguments: local file, remote file,\n"
+"    ancestor file.\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"HGRCPATH\n"
+"    A list of files or directories to search for hgrc files. Item\n"
+"    separator is \":\" on Unix, \";\" on Windows. If HGRCPATH is not set,\n"
+"    platform default search path is used. If empty, only the .hg/hgrc\n"
+"    from the current repository is read.\n"
+"\n"
+"    For each element in HGRCPATH:\n"
+"\n"
+"    - if it's a directory, all files ending with .rc are added\n"
+"    - otherwise, the file itself will be added\n"
+"\n"
+"HGUSER\n"
+"    This is the string used as the author of a commit. If not set,\n"
+"    available values will be considered in this order:\n"
+"\n"
+"    - HGUSER (deprecated)\n"
+"    - hgrc files from the HGRCPATH\n"
+"    - EMAIL\n"
+"    - interactive prompt\n"
+"    - LOGNAME (with ``@hostname`` appended)\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"EMAIL\n"
+"    May be used as the author of a commit; see HGUSER.\n"
+"\n"
+"LOGNAME\n"
+"    May be used as the author of a commit; see HGUSER.\n"
+"\n"
+"VISUAL\n"
+"    This is the name of the editor to use when committing. See EDITOR.\n"
+"\n"
+"EDITOR\n"
+"    Sometimes Mercurial needs to open a text file in an editor for a\n"
+"    user to modify, for example when writing commit messages. The\n"
+"    editor it uses is determined by looking at the environment\n"
+"    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
+"    non-empty one is chosen. If all of them are empty, the editor\n"
+"    defaults to 'vi'.\n"
+"\n"
+"PYTHONPATH\n"
+"    This is used by Python to find imported modules and may need to be\n"
+"    set appropriately if this Mercurial is not installed system-wide.\n"
+msgstr ""
+"HG\n"
+"    'hg' コマンドへのパス。フック/エクステンションないし外部ツールの起動の\n"
+"    際に自動的に設定されます。未設定や空の場合は、frozen 形式の\n"
+"    hg 実行可能ファイルの名前か設定されるか、'hg' という名前の実行可能\n"
+"    ファイルが検索されます(Windows の場合、PATHEXT 環境変数に設定された\n"
+"    COM/EXE/BAT/CMD 等の拡張子付き)。\n"
+"\n"
+"HGEDITOR\n"
+"    コミットの際のメッセージ入力を行うためのエディタの名前。EDITOR 環境変数\n"
+"    についても参照してください。\n"
+"\n"
+"    (推奨されない環境変数。設定ファイル経由で指定してください。)\n"
+"\n"
+"HGENCODING\n"
+"    Mercurial によるロケール自動検出の上書き。この設定は、ユーザ名、\n"
+"    コミットメッセージ、タグ名およびブランチ名を内部データ形式に変換する\n"
+"    際に使用されます。この環境変数設定は、コマンドラインでの --encoding\n"
+"    使用により、更に上書きすることが出来ます。\n"
+"\n"
+"HGENCODINGMODE\n"
+"    ユーザからの指定値を内部データ形式に変換する際に、指定の符号化と\n"
+"    合致しない文字が検出された場合の Mercurial の挙動の指定。無指定時は、\n"
+"    「指定の符号化と合致しない場合は処理中断」を意味する \"strict\" が指定\n"
+"    されたものとみなします。他には、「未知の文字の置き換え」を意味する\n"
+"    \"replace\" と、「未知の文字の切り捨て」を意味する \"ignore\" が指定\n"
+"    出来ます。この環境変数設定は、コマンドラインでの --encodingmode\n"
+"    使用により、更に上書きすることが出来ます。\n"
+"\n"
+"HGMERGE\n"
+"    マージの際の衝突解消に使用するコマンド。指定されたコマンドの起動には、\n"
+"    作業領域のファイル、マージ対象別リビジョンのファイル、\n"
+"    両者の親リビジョンのファイルを表す3つの引数が指定されます。\n"
+"\n"
+"    (推奨されない環境変数。設定ファイル経由で指定してください)\n"
+"\n"
+"HGRCPATH\n"
+"    設定ファイル読込のための、ファイルないしディレクトリの一覧の指定。\n"
+"    一覧要素の区切り記号は、Unix なら \":\"、WIndows なら \";\" です。\n"
+"    HGRCPATH 環境変数が設定されていない場合、各稼働環境に応じた\n"
+"    読み込み先から読み込まれます。空の値が設定されている場合、\n"
+"    現リポジトリの .hg/hgrc のみが読み込まれます。\n"
+"\n"
+"    指定された一覧の各要素に対して、以下のように振舞います:\n"
+"\n"
+"    - ディレクトリなら、配下の \".rc\" で終わる名前のファイルを読み込む\n"
+"    - ファイルなら、そのファイル自身を読み込む\n"
+"\n"
+"HGUSER\n"
+"    チェンジセット作成者としてコミット時に記録する名前の指定。\n"
+"    作成者名として採用される値の決定順序は以下の通りです:\n"
+"\n"
+"    - HGUSER 環境変数値(推奨されません)\n"
+"    - (HGRCPATH 環境変数で指定される)設定ファイル中の設定\n"
+"    - EMAIL 環境変数値\n"
+"    - 対話的な入力\n"
+"    - LOGNAME 環境変数値(``@hostname`` が付与されます)\n"
+"\n"
+"    (推奨されない環境変数。設定ファイル経由で指定してください)\n"
+"\n"
+"EMAIL\n"
+"    チェンジセット作成者としてこの環境変数値が記録される可能性があります。\n"
+"    詳細は HGUSER の記述を参照してください。\n"
+"\n"
+"LOGNAME\n"
+"    チェンジセット作成者としてこの環境変数値が記録される可能性があります。\n"
+"    詳細は HGUSER の記述を参照してください。\n"
+"\n"
+"VISUAL\n"
+"    コミット時のメッセージを編集するエディタ名の指定。EDITOR 環境変数\n"
+"    についても参照してください。\n"
+"\n"
+"EDITOR\n"
+"    コミット時のメッセージのように、エディタでファイルを開き、ユーザによる\n"
+"    編集を促す状況があります。そこで使用されるエディタは、HGEDITOR、VISUAL\n"
+"    あるいは EDITOR 環境変数に設定されたものを(この順序で)使用します。\n"
+"    最初の空で無い値に設定された環境変数の値を使用します。いずれも未設定\n"
+"    (あるいは空)の場合は、'vi' が使用されます。\n"
+"\n"
+"PYTHONPATH\n"
+"    Mercurial が当該システムの共有領域にインストールされていない場合、\n"
+"    Python が必要なモジュールを読み込むためには、この環境変数の設定が\n"
+"    必要です。\n"
+
+msgid ""
+"Mercurial has the ability to add new features through the use of\n"
+"extensions. Extensions may add new commands, add options to\n"
+"existing commands, change the default behavior of commands, or\n"
+"implement hooks.\n"
+"\n"
+"Extensions are not loaded by default for a variety of reasons:\n"
+"they can increase startup overhead; they may be meant for advanced\n"
+"usage only; they may provide potentially dangerous abilities (such\n"
+"as letting you destroy or modify history); they might not be ready\n"
+"for prime time; or they may alter some usual behaviors of stock\n"
+"Mercurial. It is thus up to the user to activate extensions as\n"
+"needed.\n"
+"\n"
+"To enable the \"foo\" extension, either shipped with Mercurial or in\n"
+"the Python search path, create an entry for it in your hgrc, like\n"
+"this::\n"
+"\n"
+"  [extensions]\n"
+"  foo =\n"
+"\n"
+"You may also specify the full path to an extension::\n"
+"\n"
+"  [extensions]\n"
+"  myfeature = ~/.hgext/myfeature.py\n"
+"\n"
+"To explicitly disable an extension enabled in an hgrc of broader\n"
+"scope, prepend its path with !::\n"
+"\n"
+"  [extensions]\n"
+"  # disabling extension bar residing in /path/to/extension/bar.py\n"
+"  bar = !/path/to/extension/bar.py\n"
+"  # ditto, but no path was supplied for extension baz\n"
+"  baz = !\n"
+msgstr ""
+"Mercurial には、新規機能を「エクステンション」という機構を用いて\n"
+"追加する仕組みが備わっています。エクステンションでは、コマンドの\n"
+"新規追加、既存コマンドへのオプションの追加、コマンドの挙動の変更、\n"
+"フックの実装といったことが可能です。\n"
+"\n"
+"様々な事情から、特に指定の無い場合にはエクステンションは読み込まれ\n"
+"ません。付加的な読み込みは、起動時間の増加を意味します。上級用途\n"
+"限定のものもあります。(履歴の破壊や改変などの)潜在的な危険性を持つ\n"
+"場合もあります。実験的なものであるかもしれません。これまでの\n"
+"Mercurial の振る舞いを変えてしまうかもしれません。エクステンションを\n"
+"必要に応じて有効化するのは利用者の責務です。\n"
+"\n"
+"\"foo\" というエクステンションを有効化するには、Mercurial 同梱の\n"
+"ものであろうと、Python の検索パス中のものであろうと、設定ファイル\n"
+"において以下のような記述が必要です::\n"
+"\n"
+"  [extensions]\n"
+"  foo =\n"
+"\n"
+"エクステンションへのフルパスを記述することも可能です::\n"
+"\n"
+"  [extensions]\n"
+"  myfeature = ~/.hgext/myfeature.py\n"
+"\n"
+"明示的にエクステンションを無効化する場合、適切な設定ファイルにおいて\n"
+"パス指定の冒頭に '!' を付与します::\n"
+"\n"
+"  [extensions]\n"
+"  # /path/to/extension/bar.py にあるエクステンション bar の無効化\n"
+"  bar = !/path/to/extension/bar.py\n"
+"  # こちらはパス指定無しでの baz エクステンションの無効化\n"
+"  baz = !\n"
+
+msgid ""
+"When Mercurial accepts more than one revision, they may be specified\n"
+"individually, or provided as a topologically continuous range,\n"
+"separated by the \":\" character.\n"
+"\n"
+"The syntax of range notation is [BEGIN]:[END], where BEGIN and END are\n"
+"revision identifiers. Both BEGIN and END are optional. If BEGIN is not\n"
+"specified, it defaults to revision number 0. If END is not specified,\n"
+"it defaults to the tip. The range \":\" thus means \"all revisions\".\n"
+"\n"
+"If BEGIN is greater than END, revisions are treated in reverse order.\n"
+"\n"
+"A range acts as a closed interval. This means that a range of 3:5\n"
+"gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.\n"
+msgstr ""
+"Mercurial に複数のリビジョンを指定する場合の方法には、\n"
+"個々のリビジョンをそれぞれ指定する方法以外にも、\":\" を区切り\n"
+"記号にした範囲指定による方法があります。\n"
+"\n"
+"範囲表記の文法は、\"[開始]:[終了]\" というもので、\"開始\"・\"終了\"\n"
+"部分にはそれぞれリビジョン識別用の情報が記述されます。\n"
+"\"開始\"・\"終了\" はそれぞれ省略可能です。\"開始\" 部分が\n"
+"記述されない場合、リビジョン番号 0 が記述されたものとみなされます。\n"
+"\"終了\" 部分が記述されない場合、tip が記述されたものとみなされます。\n"
+"以上のことから、\":\" という記述は \"全リビジョン\" を指します。\n"
+"\n"
+"\"開始\" 指定が \"終了\" 指定よりも後のリビジョンである場合、逆順指定\n"
+"とみなされます。\n"
+"\n"
+"範囲指定は \"閉区間\" とみなされます。つまり、3:5 という範囲指定は\n"
+"3, 4, 5 の指定と等価です。同様に 9:6 という指定は 9, 8, 7, 6 の指定と\n"
+"等価です。\n"
+
+msgid ""
+"Mercurial accepts several notations for identifying one or more files\n"
+"at a time.\n"
+"\n"
+"By default, Mercurial treats filenames as shell-style extended glob\n"
+"patterns.\n"
+"\n"
+"Alternate pattern notations must be specified explicitly.\n"
+"\n"
+"To use a plain path name without any pattern matching, start it with\n"
+"``path:``. These path names must completely match starting at the\n"
+"current repository root.\n"
+"\n"
+"To use an extended glob, start a name with ``glob:``. Globs are rooted\n"
+"at the current directory; a glob such as ``*.c`` will only match files\n"
+"in the current directory ending with ``.c``.\n"
+"\n"
+"The supported glob syntax extensions are ``**`` to match any string\n"
+"across path separators and ``{a,b}`` to mean \"a or b\".\n"
+"\n"
+"To use a Perl/Python regular expression, start a name with ``re:``.\n"
+"Regexp pattern matching is anchored at the root of the repository.\n"
+"\n"
+"Plain examples::\n"
+"\n"
+"  path:foo/bar   a name bar in a directory named foo in the root\n"
+"                 of the repository\n"
+"  path:path:name a file or directory named \"path:name\"\n"
+"\n"
+"Glob examples::\n"
+"\n"
+"  glob:*.c       any name ending in \".c\" in the current directory\n"
+"  *.c            any name ending in \".c\" in the current directory\n"
+"  **.c           any name ending in \".c\" in any subdirectory of the\n"
+"                 current directory including itself.\n"
+"  foo/*.c        any name ending in \".c\" in the directory foo\n"
+"  foo/**.c       any name ending in \".c\" in any subdirectory of foo\n"
+"                 including itself.\n"
+"\n"
+"Regexp examples::\n"
+"\n"
+"  re:.*\\.c$      any name ending in \".c\", anywhere in the repository\n"
+msgstr ""
+"Mercurial には、ファイルを特定するパターン指定方法が複数あります。\n"
+"\n"
+"特に指定の無い場合、Mercurial は指定されたファイル名に対して、\n"
+"shell 形式の拡張ワイルドカード合致を行います。\n"
+"\n"
+"別な形式でのパターン記述の際には、明示的に種別を指定してください。\n"
+"\n"
+"パターン合致を行わずに、指定された名前をそのまま使用する場合、\n"
+"名前の前に ``path:`` を記述します。この形式を使用する場合、\n"
+"リポジトリのルートからのパスと完全に一致しなければなりません。\n"
+"\n"
+"拡張ワイルドカード合致の場合、名前の前に ``glob:`` を記述します。この\n"
+"形式では、現ディレクトリからの相対になりますので、``*.c`` パターンは\n"
+"末尾が ``.c`` で終わる現ディレクトリ中のファイルとのみ合致します。\n"
+"\n"
+"ワイルドカードの拡張文法には、パス区切りも含めた任意の文字列と合致する\n"
+"``**`` と、\"a ないし b\" を意味する ``{a,b}`` という形式があります。\n"
+"\n"
+"Perl/Python 形式の正規表現の場合、名前の前に ``re:`` を記述します。\n"
+"正規表現形式では、リポジトリのルートからの合致とみなされます。\n"
+"(訳注: .hgignore での指定では付与「されません」ので注意が必要です)。\n"
+"\n"
+"パターン合致未使用例::\n"
+"\n"
+"  path:foo/bar   リポジトリルート直下の foo ディレクトリ中の bar\n"
+"  path:path:name \"path:name\" という名前\n"
+"\n"
+"ワイルドカード指定例::\n"
+"\n"
+"  glob:*.c       現ディレクトリ直下で、名前が \".c\" で終わるもの\n"
+"  *.c            現ディレクトリ直下で、名前が \".c\" で終わるもの\n"
+"  **.c           現ディレクトリないしその配下のディレクトリにおいて、\n"
+"                 名前が \".c\" で終わるもの\n"
+"  foo/*.c        foo ディレクトリ直下で、名前が \".c\" で終わるもの\n"
+"  foo/**.c       foo ディレクトリないしその配下のディレクトリにおいて、\n"
+"                 名前が \".c\" で終わるもの\n"
+"\n"
+"正規表現指定例::\n"
+"\n"
+"  re:.*\\.c$     作業領域中の任意の位置で、名前が \".c\" で終わるもの\n"
+
+msgid ""
+"Mercurial supports several ways to specify individual revisions.\n"
+"\n"
+"A plain integer is treated as a revision number. Negative integers are\n"
+"treated as sequential offsets from the tip, with -1 denoting the tip,\n"
+"-2 denoting the revision prior to the tip, and so forth.\n"
+"\n"
+"A 40-digit hexadecimal string is treated as a unique revision\n"
+"identifier.\n"
+"\n"
+"A hexadecimal string less than 40 characters long is treated as a\n"
+"unique revision identifier and is referred to as a short-form\n"
+"identifier. A short-form identifier is only valid if it is the prefix\n"
+"of exactly one full-length identifier.\n"
+"\n"
+"Any other string is treated as a tag or branch name. A tag name is a\n"
+"symbolic name associated with a revision identifier. A branch name\n"
+"denotes the tipmost revision of that branch. Tag and branch names must\n"
+"not contain the \":\" character.\n"
+"\n"
+"The reserved name \"tip\" is a special tag that always identifies the\n"
+"most recent revision.\n"
+"\n"
+"The reserved name \"null\" indicates the null revision. This is the\n"
+"revision of an empty repository, and the parent of revision 0.\n"
+"\n"
+"The reserved name \".\" indicates the working directory parent. If no\n"
+"working directory is checked out, it is equivalent to null. If an\n"
+"uncommitted merge is in progress, \".\" is the revision of the first\n"
+"parent.\n"
+msgstr ""
+"Mercurial に個々のリビジョン指定する際には複数の記法が使用できます。\n"
+"\n"
+"整数値は、「リビジョン番号」とみなされます。負値は、tip からの距離を\n"
+"意味し、-1 は tip 自身を、-2 は tip の直前といったリビジョンを指します。\n"
+"\n"
+"40桁の16進文字列は、一意な「リビジョン識別子」とみなされます。\n"
+"\n"
+"40桁未満の16進文字列は、一意な「リビジョン識別子」の短縮形式と\n"
+"みなされます。短縮形式の識別子は、厳密に1つの完全長の識別子とだけ\n"
+"前方一致する場合にのみ有効です。\n"
+"\n"
+"それ以外の文字列は、「タグ名」ないし「ブランチ名」とみなされます。\n"
+"「タグ名」はリビジョン識別子に付与されたシンボリックな名前です。\n"
+"「ブランチ名」は、ブランチ中の最新リビジョンを意味します。\n"
+"タグ名およびブランチ名は \":\" を含んではなりません。\n"
+"\n"
+"常に「最新のリビジョン」を意味する名前 \"tip\" は、特別なタグ名として\n"
+"予約されています。\n"
+"\n"
+"「空リビジョン」を意味する名前 \"null\" は、特別な名前として予約\n"
+"されています。空リポジトリにおけるリビジョンはこのリビジョンで、\n"
+"リビジョン 0 の親は \"null\" リビジョンです。\n"
+"\n"
+"常に「作業領域の親リビジョン」を示すための名前 \".\" は、特別な名前として\n"
+"予約されています。作業領域が未更新の場合は、\"null\" 指定と等価です。\n"
+"未コミットのマージ中の場合、\".\" は第1親リビジョンを指します。\n"
+
+msgid ""
+"Mercurial allows you to customize output of commands through\n"
+"templates. You can either pass in a template from the command\n"
+"line, via the --template option, or select an existing\n"
+"template-style (--style).\n"
+"\n"
+"You can customize output for any \"log-like\" command: log,\n"
+"outgoing, incoming, tip, parents, heads and glog.\n"
+"\n"
+"Three styles are packaged with Mercurial: default (the style used\n"
+"when no explicit preference is passed), compact and changelog.\n"
+"Usage::\n"
+"\n"
+"    $ hg log -r1 --style changelog\n"
+"\n"
+"A template is a piece of text, with markup to invoke variable\n"
+"expansion::\n"
+"\n"
+"    $ hg log -r1 --template \"{node}\\n\"\n"
+"    b56ce7b07c52de7d5fd79fb89701ea538af65746\n"
+"\n"
+"Strings in curly braces are called keywords. The availability of\n"
+"keywords depends on the exact context of the templater. These\n"
+"keywords are usually available for templating a log-like command:\n"
+"\n"
+":author: String. The unmodified author of the changeset.\n"
+"\n"
+":branches: String. The name of the branch on which the changeset was\n"
+"    committed. Will be empty if the branch name was default.\n"
+"\n"
+":date: Date information. The date when the changeset was committed.\n"
+"\n"
+":desc: String. The text of the changeset description.\n"
+"\n"
+":diffstat: String. Statistics of changes with the following format:\n"
+"    \"modified files: +added/-removed lines\"\n"
+"\n"
+":files: List of strings. All files modified, added, or removed by this\n"
+"    changeset.\n"
+"\n"
+":file_adds: List of strings. Files added by this changeset.\n"
+"\n"
+":file_copies: List of strings. Files copied in this changeset with\n"
+"    their sources.\n"
+"\n"
+":file_copies_switch: List of strings. Like \"file_copies\" but displayed\n"
+"    only if the --copied switch is set.\n"
+"\n"
+":file_mods: List of strings. Files modified by this changeset.\n"
+"\n"
+":file_dels: List of strings. Files removed by this changeset.\n"
+"\n"
+":node: String. The changeset identification hash, as a 40-character\n"
+"    hexadecimal string.\n"
+"\n"
+":parents: List of strings. The parents of the changeset.\n"
+"\n"
+":rev: Integer. The repository-local changeset revision number.\n"
+"\n"
+":tags: List of strings. Any tags associated with the changeset.\n"
+"\n"
+":latesttag: String. Most recent global tag in the ancestors of this\n"
+"    changeset.\n"
+"\n"
+":latesttagdistance: Integer. Longest path to the latest tag.\n"
+"\n"
+"The \"date\" keyword does not produce human-readable output. If you\n"
+"want to use a date in your output, you can use a filter to process\n"
+"it. Filters are functions which return a string based on the input\n"
+"variable. You can also use a chain of filters to get the desired\n"
+"output::\n"
+"\n"
+"   $ hg tip --template \"{date|isodate}\\n\"\n"
+"   2008-08-21 18:22 +0000\n"
+"\n"
+"List of filters:\n"
+"\n"
+":addbreaks: Any text. Add an XHTML \"<br />\" tag before the end of\n"
+"    every line except the last.\n"
+"\n"
+":age: Date. Returns a human-readable date/time difference between the\n"
+"    given date/time and the current date/time.\n"
+"\n"
+":basename: Any text. Treats the text as a path, and returns the last\n"
+"    component of the path after splitting by the path separator\n"
+"    (ignoring trailing separators). For example, \"foo/bar/baz\" becomes\n"
+"    \"baz\" and \"foo/bar//\" becomes \"bar\".\n"
+"\n"
+":stripdir: Treat the text as path and strip a directory level, if\n"
+"    possible. For example, \"foo\" and \"foo/bar\" becomes \"foo\".\n"
+"\n"
+":date: Date. Returns a date in a Unix date format, including the\n"
+"    timezone: \"Mon Sep 04 15:13:13 2006 0700\".\n"
+"\n"
+":domain: Any text. Finds the first string that looks like an email\n"
+"    address, and extracts just the domain component. Example: ``User\n"
+"    <user@example.com>`` becomes ``example.com``.\n"
+"\n"
+":email: Any text. Extracts the first string that looks like an email\n"
+"    address. Example: ``User <user@example.com>`` becomes\n"
+"    ``user@example.com``.\n"
+"\n"
+":escape: Any text. Replaces the special XML/XHTML characters \"&\", \"<\"\n"
+"    and \">\" with XML entities.\n"
+"\n"
+":fill68: Any text. Wraps the text to fit in 68 columns.\n"
+"\n"
+":fill76: Any text. Wraps the text to fit in 76 columns.\n"
+"\n"
+":firstline: Any text. Returns the first line of text.\n"
+"\n"
+":nonempty: Any text. Returns '(none)' if the string is empty.\n"
+"\n"
+":hgdate: Date. Returns the date as a pair of numbers: \"1157407993\n"
+"    25200\" (Unix timestamp, timezone offset).\n"
+"\n"
+":isodate: Date. Returns the date in ISO 8601 format: \"2009-08-18 13:00\n"
+"    +0200\".\n"
+"\n"
+":isodatesec: Date. Returns the date in ISO 8601 format, including\n"
+"    seconds: \"2009-08-18 13:00:13 +0200\". See also the rfc3339date\n"
+"    filter.\n"
+"\n"
+":localdate: Date. Converts a date to local date.\n"
+"\n"
+":obfuscate: Any text. Returns the input text rendered as a sequence of\n"
+"    XML entities.\n"
+"\n"
+":person: Any text. Returns the text before an email address.\n"
+"\n"
+":rfc822date: Date. Returns a date using the same format used in email\n"
+"    headers: \"Tue, 18 Aug 2009 13:00:13 +0200\".\n"
+"\n"
+":rfc3339date: Date. Returns a date using the Internet date format\n"
+"    specified in RFC 3339: \"2009-08-18T13:00:13+02:00\".\n"
+"\n"
+":short: Changeset hash. Returns the short form of a changeset hash,\n"
+"    i.e. a 12-byte hexadecimal string.\n"
+"\n"
+":shortdate: Date. Returns a date like \"2006-09-18\".\n"
+"\n"
+":strip: Any text. Strips all leading and trailing whitespace.\n"
+"\n"
+":tabindent: Any text. Returns the text, with every line except the\n"
+"     first starting with a tab character.\n"
+"\n"
+":urlescape: Any text. Escapes all \"special\" characters. For example,\n"
+"    \"foo bar\" becomes \"foo%20bar\".\n"
+"\n"
+":user: Any text. Returns the user portion of an email address.\n"
+msgstr ""
+"Mercurial では、テンプレート機能によってコマンドの出力をカスタマイズ\n"
+"することができます。コマンドラインからの指定では、--template による\n"
+"テンプレート指定と、--style によるスタイル指定の両方が使用できます。\n"
+"\n"
+"「log 的」な出力を行う一連のコマンド出力をカスタマイズ可能です:\n"
+"log, outgoing, incoming, tip, parents, heads, glog\n"
+"\n"
+"Mercurial には(明示的な指定が無い場合に使用される)default、compact\n"
+"および changelog の3つのスタイル設定が同梱されています。利用方法は::\n"
+"\n"
+"    $ hg log -r1 --style changelog\n"
+"\n"
+"テンプレートとは、変数展開マークアップ機能を備えたテキストです::\n"
+"\n"
+"    $ hg log -r1 --template \"{node}\\n\"\n"
+"    b56ce7b07c52de7d5fd79fb89701ea538af65746\n"
+"\n"
+"波括弧で囲まれた部分は「キーワード」と呼ばれます。キーワード利用の\n"
+"可否は、テンプレートの利用される状況に依存します。以下のキーワードは\n"
+"log 的なコマンドでのテンプレート利用の際には常に使用可能です:\n"
+"\n"
+":author: 文字列。リビジョンの作者名(記録情報そのまま)。\n"
+"\n"
+":branches: 文字列。リビジョンの属するブランチ名。所属ブランチが\n"
+"    default の場合は空文字列。\n"
+"\n"
+":date: 日時情報。リビジョンが記録された日時。\n"
+"\n"
+":desc:      文字列。リビジョンのコミットメッセージ。\n"
+"\n"
+":diffstat: 文字列。以下の形式での変更概要。\n"
+"    \"変更対象ファイル: +追加行数/-削除行数\"\n"
+"\n"
+":files: 文字列列挙。当該リビジョンでの、変更/追加登録ないし\n"
+"    登録除外ファイルの一覧。\n"
+"\n"
+":file_adds: 文字列列挙。当該リビジョンでの追加ファイル一覧。\n"
+"\n"
+":file_copies: 文字列列挙。 当該リビジョンでの複製元ファイル一覧。\n"
+"\n"
+":file_copies_switch: 文字列列挙。 \"file_copies\" と同義だが、\n"
+"    --copied 指定のある時のみ表示。\n"
+"\n"
+":file_mods: 文字列列挙。当該リビジョンでの変更ファイル一覧。\n"
+"\n"
+":file_dels: 文字列列挙。当該リビジョンでの登録除外ファイル一覧。\n"
+"\n"
+":node: 文字列。リビジョン識別用の 40 桁 16 進数ハッシュ値。\n"
+"\n"
+":parents: 文字列列挙。リビジョンの親。\n"
+"\n"
+":rev: 整数。各リポジトリ固有のリビジョン番号。\n"
+"\n"
+":tags: 文字列列挙。当該リビジョンに付与されたタグの一覧。\n"
+"\n"
+":latesttag: 文字列。当該リビジョンの先祖に対して最も最近に付与されたタグ\n"
+"\n"
+":latesttagdistance: 整数。最新タグへの最長パス\n"
+"\n"
+"\"date\" キーワードの出力は可読形式ではありません。出力に日時情報を\n"
+"含めたい場合、可読化するために「フィルター」を使用します。\n"
+"「フィルター」とは、指定値に基づいて文字列を生成する機能です。複数の\n"
+"フィルターを連ねることで、様々な出力を得ることができます::\n"
+"\n"
+"   $ hg tip --template \"{date|isodate}\\n\"\n"
+"   2008-08-21 18:22 +0000\n"
+"\n"
+"フィルター一覧(入力と、それに対する出力):\n"
+"\n"
+":addbreaks: 文字列。最終行を除く各行の行末に XHTML の \n"
+"    \"<br />\" タグを追加します。\n"
+"\n"
+":age: 日時情報。与えられた日時と、現在日時との差分を表す\n"
+"    可読形式の文字列を生成します。\n"
+"\n"
+":basename: 文字列。与えられた文字列をパスとみなし、パス区切りで\n"
+"    区切られた最後の要素だけを取り出します(末尾パス\n"
+"    区切りは無視されます)。\n"
+"    例) \"foo/bar/baz\" は \"baz\"、\"foo/bar//\" は \"bar\"\n"
+"\n"
+":stripdir: 文字列。与えられた文字列をパスとみなし、ディレクトリ\n"
+"    階層があればそれを取り除きます。\n"
+"    例) \"foo\" および \"foo/bar\" は \"foo\"\n"
+"\n"
+":date: 日時情報。タイムゾーン込みの Unix date コマンド形式にします。\n"
+"    例) \"Mon Sep 04 15:13:13 2006 0700\"\n"
+"\n"
+":domain: 文字列。メールアドレスと思しき最初の文字列部分から\n"
+"    ドメイン部分だけを取り出します。\n"
+"    例) ``User <user@example.com>`` は ``example.com``\n"
+"\n"
+":email: 文字列。メールアドレスと思しき最初の部分を取り出します。\n"
+"    例) ``User <user@example.com>`` は ``user@example.com``\n"
+"\n"
+":escape: 文字列。XML/XHTML の特殊文字である \"&\"、\"<\" および\n"
+"    \">\" を XML のエンティティ形式に変換します。\n"
+"\n"
+":fill68: 文字列。68 桁に収まるように文字列を折り返します。\n"
+"\n"
+":fill76: 文字列。76 桁に収まるように文字列を折り返します。\n"
+"\n"
+":firstline: 文字列。最初の行のみを取り出します。\n"
+"\n"
+":nonempty: 文字列。与えられた文字列が空の場合 '(none)'となります。\n"
+"\n"
+":hgdate: 日時情報。Unix タイムスタンプとタイムゾーンオフセットによる\n"
+"   数値対形式で可読化します。\n"
+"   例) \"1157407993 25200\"\n"
+"\n"
+":isodate: 日時情報。ISO 8601 形式で可読化します:\n"
+"   例) \"2009-08-18 13:00 +0200\"\n"
+"\n"
+":isodatesec: 日時情報。秒情報付きの ISO 8601 形式で可読化します:\n"
+"   例) \"2009-08-18 13:00:13 +0200\"\n"
+"   ※ 後述する rfc3339date フィルタの説明も参照してください。\n"
+"\n"
+":localdate: 日時情報。ローカル日時で可読化します。\n"
+"\n"
+":obfuscate: 文字列。全ての文字を XML エンティティ形式に変換します。\n"
+"\n"
+":person: 文字列。メールアドレス直前の部分だけを取り出します。\n"
+"\n"
+":rfc822date: 日時情報。メールのヘッダと同形式で可読化します:\n"
+"    例) \"Tue, 18 Aug 2009 13:00:13 +0200\".\n"
+"\n"
+":rfc3339date: 日付情報。 RFC 3339 で定められた日付形式で可読化します。\n"
+"    例) \"2009-08-18T13:00:13+02:00\".\n"
+"\n"
+":short: リビジョンハッシュ 値。12 桁程度の短縮形式にします。\n"
+"\n"
+":shortdate: 日時情報。\"2006-09-18\" 形式で可読化します。\n"
+"\n"
+":strip: 文字列。先頭/末尾の空白文字を取り除きます。\n"
+"\n"
+":tabindent: 文字列。タブ文字以外で始まる行をタブ文字で字下げします。\n"
+"\n"
+":urlescape: 文字列。全ての「特殊」文字を変換します。\n"
+"    例えば \"foo bar\" は \"foo%20bar\" となります。\n"
+"\n"
+":user: 文字列。メールアドレスのユーザ名部分を取り出します。\n"
+
+msgid ""
+"Valid URLs are of the form::\n"
+"\n"
+"  local/filesystem/path[#revision]\n"
+"  file://local/filesystem/path[#revision]\n"
+"  http://[user[:pass]@]host[:port]/[path][#revision]\n"
+"  https://[user[:pass]@]host[:port]/[path][#revision]\n"
+"  ssh://[user[:pass]@]host[:port]/[path][#revision]\n"
+"\n"
+"Paths in the local filesystem can either point to Mercurial\n"
+"repositories or to bundle files (as created by 'hg bundle' or 'hg\n"
+"incoming --bundle').\n"
+"\n"
+"An optional identifier after # indicates a particular branch, tag, or\n"
+"changeset to use from the remote repository. See also 'hg help\n"
+"revisions'.\n"
+"\n"
+"Some features, such as pushing to http:// and https:// URLs are only\n"
+"possible if the feature is explicitly enabled on the remote Mercurial\n"
+"server.\n"
+"\n"
+"Some notes about using SSH with Mercurial:\n"
+"\n"
+"- SSH requires an accessible shell account on the destination machine\n"
+"  and a copy of hg in the remote path or specified with as remotecmd.\n"
+"- path is relative to the remote user's home directory by default. Use\n"
+"  an extra slash at the start of a path to specify an absolute path::\n"
+"\n"
+"    ssh://example.com//tmp/repository\n"
+"\n"
+"- Mercurial doesn't use its own compression via SSH; the right thing\n"
+"  to do is to configure it in your ~/.ssh/config, e.g.::\n"
+"\n"
+"    Host *.mylocalnetwork.example.com\n"
+"      Compression no\n"
+"    Host *\n"
+"      Compression yes\n"
+"\n"
+"  Alternatively specify \"ssh -C\" as your ssh command in your hgrc or\n"
+"  with the --ssh command line option.\n"
+"\n"
+"These URLs can all be stored in your hgrc with path aliases under the\n"
+"[paths] section like so::\n"
+"\n"
+"  [paths]\n"
+"  alias1 = URL1\n"
+"  alias2 = URL2\n"
+"  ...\n"
+"\n"
+"You can then use the alias for any command that uses a URL (for\n"
+"example 'hg pull alias1' will be treated as 'hg pull URL1').\n"
+"\n"
+"Two path aliases are special because they are used as defaults when\n"
+"you do not provide the URL to a command:\n"
+"\n"
+"default:\n"
+"  When you create a repository with hg clone, the clone command saves\n"
+"  the location of the source repository as the new repository's\n"
+"  'default' path. This is then used when you omit path from push- and\n"
+"  pull-like commands (including incoming and outgoing).\n"
+"\n"
+"default-push:\n"
+"  The push command will look for a path named 'default-push', and\n"
+"  prefer it over 'default' if both are defined.\n"
+msgstr ""
+"有効な URL 指定は以下の形式です::\n"
+"\n"
+"  local/filesystem/path[#revision]\n"
+"  file://local/filesystem/path[#revision]\n"
+"  http://[user[:pass]@]host[:port]/[path][#revision]\n"
+"  https://[user[:pass]@]host[:port]/[path][#revision]\n"
+"  ssh://[user[:pass]@]host[:port]/[path][#revision]\n"
+"\n"
+"ローカルファイルシステム上のパスが指す先は、Mercurial のリポジトリでも、\n"
+"バンドルファイル('hg bundle' ないし 'hg incoming --bundle' で生成)でも\n"
+"構いません。\n"
+"\n"
+"連携先リポジトリ指定において、'#' 記号に続けて識別子を指定することで、\n"
+"特定のブランチ、タグないしチェンジセットを指定することが出来ます。\n"
+"'hg help revisions' も参照してください。\n"
+"\n"
+"http:// や https:// 形式の URL で指定される連携先への push の様な\n"
+"機能のうちの幾つかは、その機能が連携先の Mercurial サーバ側で明示的に\n"
+"利用可能になっている場合に限り使用可能です。\n"
+"\n"
+"Mercurial と SSH を併用する場合の注意点:\n"
+"\n"
+"- SSH アクセス先ホスト上に、shell アカウントと hg コマンドが必要です。\n"
+"  hg コマンドがアクセス先ホストの PATH 設定で利用可能になっていない\n"
+"  場合は、--remotecmd で明示的に指定してください。\n"
+"- URL 中のパス指定は、アクセス先ホスト上のユーザのホームディレクトリ\n"
+"  からの相対パスとみなされます。絶対パスを指定する場合は、パスの先頭に\n"
+"  更にスラッシュ('/')を付与してください::\n"
+"\n"
+"     例: ssh://example.com//tmp/repository\n"
+"\n"
+"- SSH 連携の際には Mercurial は自身の圧縮処理を行いません。以下のように\n"
+"  ~/.ssh/config 等で SSH の圧縮実施を指示することをお勧めします::\n"
+"\n"
+"    Host *.mylocalnetwork.example.com\n"
+"      Compression no\n"
+"    Host *\n"
+"      Compression yes\n"
+"\n"
+"  あるいは、設定ファイルにおける ssh コマンド指定や、コマンドラインでの\n"
+"  --ssh に対して、'ssh -C' を指定する方法もあります。\n"
+"\n"
+"連携先 URL は、設定ファイルの [paths] セクションで、別名を付けて記述\n"
+"することが出来ます::\n"
+"\n"
+"  [paths]\n"
+"  alias1 = URL1\n"
+"  alias2 = URL2\n"
+"  ...\n"
+"\n"
+"URL 指定が必要なコマンドに対しては、別名を指定することが出来ます\n"
+"(例えば、'hg pull alias1' は alias1 の指す先から変更を取り込みます)。\n"
+"\n"
+"コマンドに URL を指定しなかった場合に、暗黙の連携先として使用される\n"
+"重要な別名が2つあります:\n"
+"\n"
+"default:\n"
+"  'hg clone' によって複製した場合、新規リポジトリの 'default' として\n"
+"  複製元リポジトリの URL が保存されます。\n"
+"  以後、連携先を省略して 'hg push' や 'hg pull' に類するコマンドを\n"
+"  実行した際には、この URL が連携先として使用されます。\n"
+"\n"
+"default-push:\n"
+"  'hg push' は、'default-push' の別名で定義される URL を探します。\n"
+"  'default' が定義されている場合でも、'default-push' が定義されていれば\n"
+"  こちらが優先されます。\n"
+
 msgid "can only share local repositories"
 msgstr "共有可能なのはローカルリポジトリのみです"
 
@@ -9539,6 +9744,12 @@
 msgid "%s hook is invalid (\"%s\" not in a module)"
 msgstr "フック %s は不正です(モジュール中に \"%s\" がありません)"
 
+msgid "exception from first failed import attempt:\n"
+msgstr "モジュール読み込みにおける最初の例外:\n"
+
+msgid "exception from second failed import attempt:\n"
+msgstr "モジュール読み込みにおける2つ目の例外:\n"
+
 #, python-format
 msgid "%s hook is invalid (import of \"%s\" failed)"
 msgstr "フック %s は不正です(\"%s\" の読み込みに失敗)"
@@ -9731,6 +9942,10 @@
 msgstr "副リポジトリ %s でのコミット中\n"
 
 #, python-format
+msgid "note: commit message saved in %s\n"
+msgstr "備考: コミットメッセージを %s に保存しました\n"
+
+#, python-format
 msgid "trouble committing %s!\n"
 msgstr "%s のコミットに失敗しました!\n"
 
@@ -10192,6 +10407,13 @@
 msgstr "ファイル名キャッシュに不正なエントリ: %s 行目"
 
 #, python-format
+msgid "subrepo spec file %s not found"
+msgstr "副リポジトリの spec ファイル %s が見つかりません"
+
+msgid "missing ] in subrepo source"
+msgstr "副リポジトリ元指定に ] がありません"
+
+#, python-format
 msgid ""
 " subrepository sources for %s differ\n"
 "use (l)ocal source (%s) or (r)emote source (%s)?"
@@ -10219,6 +10441,10 @@
 "どちらを採用しますか?変更:(c)hange, 登録除外:(d)elete"
 
 #, python-format
+msgid "unknown subrepo type %s"
+msgstr "未知の副リポジトリ種別 '%s'"
+
+#, python-format
 msgid "removing subrepo %s\n"
 msgstr "副リポジトリの %s を登録除外中\n"
 
@@ -10230,6 +10456,13 @@
 msgid "pushing subrepo %s\n"
 msgstr "副リポジトリを %s へ反映中\n"
 
+msgid "cannot commit svn externals"
+msgstr "svn 外部リポジトリに commit できません"
+
+#, python-format
+msgid "not removing repo %s because it has changes.\n"
+msgstr "変更が含まれているため、リポジトリ %s は削除されません\n"
+
 #, python-format
 msgid "%s, line %s: %s\n"
 msgstr "%s %s行目: %s\n"
--- a/i18n/sv.po	Thu Feb 11 23:15:42 2010 +0200
+++ b/i18n/sv.po	Sat Feb 13 23:50:38 2010 -0600
@@ -1,6 +1,6 @@
 # Swedish translation for Mercurial
 # Svensk översättning för Mercurial
-# Copyright (C) 2009 Matt Mackall and others
+# Copyright (C) 2009-2010 Matt Mackall and others
 #
 # Translation dictionary:
 #
@@ -13,8 +13,8 @@
 msgstr ""
 "Project-Id-Version: Mercurial\n"
 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
-"POT-Creation-Date: 2009-11-10 20:01+0100\n"
-"PO-Revision-Date: 2009-11-10 20:06+0100\n"
+"POT-Creation-Date: 2010-01-18 19:49+0100\n"
+"PO-Revision-Date: 2010-01-18 19:57+0100\n"
 "Last-Translator: Jens Bäckman <jens.backman@gmail.com>\n"
 "Language-Team: Swedish\n"
 "MIME-Version: 1.0\n"
@@ -47,506 +47,6 @@
 "\n"
 
 msgid ""
-"Mercurial reads configuration data from several files, if they exist.\n"
-"Below we list the most specific file first.\n"
-"\n"
-"On Windows, these configuration files are read:\n"
-"\n"
-"- ``<repo>\\.hg\\hgrc``\n"
-"- ``%USERPROFILE%\\.hgrc``\n"
-"- ``%USERPROFILE%\\Mercurial.ini``\n"
-"- ``%HOME%\\.hgrc``\n"
-"- ``%HOME%\\Mercurial.ini``\n"
-"- ``C:\\Mercurial\\Mercurial.ini``\n"
-"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
-"- ``<install-dir>\\Mercurial.ini``\n"
-"\n"
-"On Unix, these files are read:\n"
-"\n"
-"- ``<repo>/.hg/hgrc``\n"
-"- ``$HOME/.hgrc``\n"
-"- ``/etc/mercurial/hgrc``\n"
-"- ``/etc/mercurial/hgrc.d/*.rc``\n"
-"- ``<install-root>/etc/mercurial/hgrc``\n"
-"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
-"\n"
-"The configuration files for Mercurial use a simple ini-file format. A\n"
-"configuration file consists of sections, led by a ``[section]`` header\n"
-"and followed by ``name = value`` entries::\n"
-"\n"
-"  [ui]\n"
-"  username = Firstname Lastname <firstname.lastname@example.net>\n"
-"  verbose = True\n"
-"\n"
-"This above entries will be referred to as ``ui.username`` and\n"
-"``ui.verbose``, respectively. Please see the hgrc man page for a full\n"
-"description of the possible configuration values:\n"
-"\n"
-"- on Unix-like systems: ``man hgrc``\n"
-"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
-msgstr ""
-
-msgid ""
-"Some commands allow the user to specify a date, e.g.:\n"
-"\n"
-"- backout, commit, import, tag: Specify the commit date.\n"
-"- log, revert, update: Select revision(s) by date.\n"
-"\n"
-"Many date formats are valid. Here are some examples::\n"
-"\n"
-"  \"Wed Dec 6 13:18:29 2006\" (local timezone assumed)\n"
-"  \"Dec 6 13:18 -0600\" (year assumed, time offset provided)\n"
-"  \"Dec 6 13:18 UTC\" (UTC and GMT are aliases for +0000)\n"
-"  \"Dec 6\" (midnight)\n"
-"  \"13:18\" (today assumed)\n"
-"  \"3:39\" (3:39AM assumed)\n"
-"  \"3:39pm\" (15:39)\n"
-"  \"2006-12-06 13:18:29\" (ISO 8601 format)\n"
-"  \"2006-12-6 13:18\"\n"
-"  \"2006-12-6\"\n"
-"  \"12-6\"\n"
-"  \"12/6\"\n"
-"  \"12/6/6\" (Dec 6 2006)\n"
-"\n"
-"Lastly, there is Mercurial's internal format::\n"
-"\n"
-"  \"1165432709 0\" (Wed Dec 6 13:18:29 2006 UTC)\n"
-"\n"
-"This is the internal representation format for dates. unixtime is the\n"
-"number of seconds since the epoch (1970-01-01 00:00 UTC). offset is\n"
-"the offset of the local timezone, in seconds west of UTC (negative if\n"
-"the timezone is east of UTC).\n"
-"\n"
-"The log command also accepts date ranges::\n"
-"\n"
-"  \"<{datetime}\" - at or before a given date/time\n"
-"  \">{datetime}\" - on or after a given date/time\n"
-"  \"{datetime} to {datetime}\" - a date range, inclusive\n"
-"  \"-{days}\" - within a given number of days of today\n"
-msgstr ""
-
-msgid ""
-"Mercurial's default format for showing changes between two versions of\n"
-"a file is compatible with the unified format of GNU diff, which can be\n"
-"used by GNU patch and many other standard tools.\n"
-"\n"
-"While this standard format is often enough, it does not encode the\n"
-"following information:\n"
-"\n"
-"- executable status and other permission bits\n"
-"- copy or rename information\n"
-"- changes in binary files\n"
-"- creation or deletion of empty files\n"
-"\n"
-"Mercurial also supports the extended diff format from the git VCS\n"
-"which addresses these limitations. The git diff format is not produced\n"
-"by default because a few widespread tools still do not understand this\n"
-"format.\n"
-"\n"
-"This means that when generating diffs from a Mercurial repository\n"
-"(e.g. with \"hg export\"), you should be careful about things like file\n"
-"copies and renames or other things mentioned above, because when\n"
-"applying a standard diff to a different repository, this extra\n"
-"information is lost. Mercurial's internal operations (like push and\n"
-"pull) are not affected by this, because they use an internal binary\n"
-"format for communicating changes.\n"
-"\n"
-"To make Mercurial produce the git extended diff format, use the --git\n"
-"option available for many commands, or set 'git = True' in the [diff]\n"
-"section of your hgrc. You do not need to set this option when\n"
-"importing diffs in this format or using them in the mq extension.\n"
-msgstr ""
-
-msgid ""
-"HG\n"
-"    Path to the 'hg' executable, automatically passed when running\n"
-"    hooks, extensions or external tools. If unset or empty, this is\n"
-"    the hg executable's name if it's frozen, or an executable named\n"
-"    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on\n"
-"    Windows) is searched.\n"
-"\n"
-"HGEDITOR\n"
-"    This is the name of the editor to run when committing. See EDITOR.\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"HGENCODING\n"
-"    This overrides the default locale setting detected by Mercurial.\n"
-"    This setting is used to convert data including usernames,\n"
-"    changeset descriptions, tag names, and branches. This setting can\n"
-"    be overridden with the --encoding command-line option.\n"
-"\n"
-"HGENCODINGMODE\n"
-"    This sets Mercurial's behavior for handling unknown characters\n"
-"    while transcoding user input. The default is \"strict\", which\n"
-"    causes Mercurial to abort if it can't map a character. Other\n"
-"    settings include \"replace\", which replaces unknown characters, and\n"
-"    \"ignore\", which drops them. This setting can be overridden with\n"
-"    the --encodingmode command-line option.\n"
-"\n"
-"HGMERGE\n"
-"    An executable to use for resolving merge conflicts. The program\n"
-"    will be executed with three arguments: local file, remote file,\n"
-"    ancestor file.\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"HGRCPATH\n"
-"    A list of files or directories to search for hgrc files. Item\n"
-"    separator is \":\" on Unix, \";\" on Windows. If HGRCPATH is not set,\n"
-"    platform default search path is used. If empty, only the .hg/hgrc\n"
-"    from the current repository is read.\n"
-"\n"
-"    For each element in HGRCPATH:\n"
-"\n"
-"    - if it's a directory, all files ending with .rc are added\n"
-"    - otherwise, the file itself will be added\n"
-"\n"
-"HGUSER\n"
-"    This is the string used as the author of a commit. If not set,\n"
-"    available values will be considered in this order:\n"
-"\n"
-"    - HGUSER (deprecated)\n"
-"    - hgrc files from the HGRCPATH\n"
-"    - EMAIL\n"
-"    - interactive prompt\n"
-"    - LOGNAME (with ``@hostname`` appended)\n"
-"\n"
-"    (deprecated, use .hgrc)\n"
-"\n"
-"EMAIL\n"
-"    May be used as the author of a commit; see HGUSER.\n"
-"\n"
-"LOGNAME\n"
-"    May be used as the author of a commit; see HGUSER.\n"
-"\n"
-"VISUAL\n"
-"    This is the name of the editor to use when committing. See EDITOR.\n"
-"\n"
-"EDITOR\n"
-"    Sometimes Mercurial needs to open a text file in an editor for a\n"
-"    user to modify, for example when writing commit messages. The\n"
-"    editor it uses is determined by looking at the environment\n"
-"    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
-"    non-empty one is chosen. If all of them are empty, the editor\n"
-"    defaults to 'vi'.\n"
-"\n"
-"PYTHONPATH\n"
-"    This is used by Python to find imported modules and may need to be\n"
-"    set appropriately if this Mercurial is not installed system-wide.\n"
-msgstr ""
-
-msgid ""
-"Mercurial has the ability to add new features through the use of\n"
-"extensions. Extensions may add new commands, add options to\n"
-"existing commands, change the default behavior of commands, or\n"
-"implement hooks.\n"
-"\n"
-"Extensions are not loaded by default for a variety of reasons:\n"
-"they can increase startup overhead; they may be meant for advanced\n"
-"usage only; they may provide potentially dangerous abilities (such\n"
-"as letting you destroy or modify history); they might not be ready\n"
-"for prime time; or they may alter some usual behaviors of stock\n"
-"Mercurial. It is thus up to the user to activate extensions as\n"
-"needed.\n"
-"\n"
-"To enable the \"foo\" extension, either shipped with Mercurial or in\n"
-"the Python search path, create an entry for it in your hgrc, like\n"
-"this::\n"
-"\n"
-"  [extensions]\n"
-"  foo =\n"
-"\n"
-"You may also specify the full path to an extension::\n"
-"\n"
-"  [extensions]\n"
-"  myfeature = ~/.hgext/myfeature.py\n"
-"\n"
-"To explicitly disable an extension enabled in an hgrc of broader\n"
-"scope, prepend its path with !::\n"
-"\n"
-"  [extensions]\n"
-"  # disabling extension bar residing in /path/to/extension/bar.py\n"
-"  bar = !/path/to/extension/bar.py\n"
-"  # ditto, but no path was supplied for extension baz\n"
-"  baz = !\n"
-msgstr ""
-
-msgid ""
-"When Mercurial accepts more than one revision, they may be specified\n"
-"individually, or provided as a topologically continuous range,\n"
-"separated by the \":\" character.\n"
-"\n"
-"The syntax of range notation is [BEGIN]:[END], where BEGIN and END are\n"
-"revision identifiers. Both BEGIN and END are optional. If BEGIN is not\n"
-"specified, it defaults to revision number 0. If END is not specified,\n"
-"it defaults to the tip. The range \":\" thus means \"all revisions\".\n"
-"\n"
-"If BEGIN is greater than END, revisions are treated in reverse order.\n"
-"\n"
-"A range acts as a closed interval. This means that a range of 3:5\n"
-"gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.\n"
-msgstr ""
-
-msgid ""
-"Mercurial accepts several notations for identifying one or more files\n"
-"at a time.\n"
-"\n"
-"By default, Mercurial treats filenames as shell-style extended glob\n"
-"patterns.\n"
-"\n"
-"Alternate pattern notations must be specified explicitly.\n"
-"\n"
-"To use a plain path name without any pattern matching, start it with\n"
-"``path:``. These path names must completely match starting at the\n"
-"current repository root.\n"
-"\n"
-"To use an extended glob, start a name with ``glob:``. Globs are rooted\n"
-"at the current directory; a glob such as ``*.c`` will only match files\n"
-"in the current directory ending with ``.c``.\n"
-"\n"
-"The supported glob syntax extensions are ``**`` to match any string\n"
-"across path separators and ``{a,b}`` to mean \"a or b\".\n"
-"\n"
-"To use a Perl/Python regular expression, start a name with ``re:``.\n"
-"Regexp pattern matching is anchored at the root of the repository.\n"
-"\n"
-"Plain examples::\n"
-"\n"
-"  path:foo/bar   a name bar in a directory named foo in the root\n"
-"                 of the repository\n"
-"  path:path:name a file or directory named \"path:name\"\n"
-"\n"
-"Glob examples::\n"
-"\n"
-"  glob:*.c       any name ending in \".c\" in the current directory\n"
-"  *.c            any name ending in \".c\" in the current directory\n"
-"  **.c           any name ending in \".c\" in any subdirectory of the\n"
-"                 current directory including itself.\n"
-"  foo/*.c        any name ending in \".c\" in the directory foo\n"
-"  foo/**.c       any name ending in \".c\" in any subdirectory of foo\n"
-"                 including itself.\n"
-"\n"
-"Regexp examples::\n"
-"\n"
-"  re:.*\\.c$      any name ending in \".c\", anywhere in the repository\n"
-msgstr ""
-
-msgid ""
-"Mercurial supports several ways to specify individual revisions.\n"
-"\n"
-"A plain integer is treated as a revision number. Negative integers are\n"
-"treated as sequential offsets from the tip, with -1 denoting the tip,\n"
-"-2 denoting the revision prior to the tip, and so forth.\n"
-"\n"
-"A 40-digit hexadecimal string is treated as a unique revision\n"
-"identifier.\n"
-"\n"
-"A hexadecimal string less than 40 characters long is treated as a\n"
-"unique revision identifier and is referred to as a short-form\n"
-"identifier. A short-form identifier is only valid if it is the prefix\n"
-"of exactly one full-length identifier.\n"
-"\n"
-"Any other string is treated as a tag or branch name. A tag name is a\n"
-"symbolic name associated with a revision identifier. A branch name\n"
-"denotes the tipmost revision of that branch. Tag and branch names must\n"
-"not contain the \":\" character.\n"
-"\n"
-"The reserved name \"tip\" is a special tag that always identifies the\n"
-"most recent revision.\n"
-"\n"
-"The reserved name \"null\" indicates the null revision. This is the\n"
-"revision of an empty repository, and the parent of revision 0.\n"
-"\n"
-"The reserved name \".\" indicates the working directory parent. If no\n"
-"working directory is checked out, it is equivalent to null. If an\n"
-"uncommitted merge is in progress, \".\" is the revision of the first\n"
-"parent.\n"
-msgstr ""
-
-msgid ""
-"Mercurial allows you to customize output of commands through\n"
-"templates. You can either pass in a template from the command\n"
-"line, via the --template option, or select an existing\n"
-"template-style (--style).\n"
-"\n"
-"You can customize output for any \"log-like\" command: log,\n"
-"outgoing, incoming, tip, parents, heads and glog.\n"
-"\n"
-"Three styles are packaged with Mercurial: default (the style used\n"
-"when no explicit preference is passed), compact and changelog.\n"
-"Usage::\n"
-"\n"
-"    $ hg log -r1 --style changelog\n"
-"\n"
-"A template is a piece of text, with markup to invoke variable\n"
-"expansion::\n"
-"\n"
-"    $ hg log -r1 --template \"{node}\\n\"\n"
-"    b56ce7b07c52de7d5fd79fb89701ea538af65746\n"
-"\n"
-"Strings in curly braces are called keywords. The availability of\n"
-"keywords depends on the exact context of the templater. These\n"
-"keywords are usually available for templating a log-like command:\n"
-"\n"
-":author:    String. The unmodified author of the changeset.\n"
-":branches:  String. The name of the branch on which the changeset\n"
-"            was committed. Will be empty if the branch name was\n"
-"            default.\n"
-":date:      Date information. The date when the changeset was\n"
-"            committed.\n"
-":desc:      String. The text of the changeset description.\n"
-":diffstat:  String. Statistics of changes with the following\n"
-"            format: \"modified files: +added/-removed lines\"\n"
-":files:     List of strings. All files modified, added, or removed\n"
-"            by this changeset.\n"
-":file_adds: List of strings. Files added by this changeset.\n"
-":file_mods: List of strings. Files modified by this changeset.\n"
-":file_dels: List of strings. Files removed by this changeset.\n"
-":node:      String. The changeset identification hash, as a\n"
-"            40-character hexadecimal string.\n"
-":parents:   List of strings. The parents of the changeset.\n"
-":rev:       Integer. The repository-local changeset revision\n"
-"            number.\n"
-":tags:      List of strings. Any tags associated with the\n"
-"            changeset.\n"
-":latesttag: String. Most recent global tag in the ancestors of this\n"
-"            changeset.\n"
-":latesttagdistance: Integer. Longest path to the latest tag.\n"
-"\n"
-"The \"date\" keyword does not produce human-readable output. If you\n"
-"want to use a date in your output, you can use a filter to process\n"
-"it. Filters are functions which return a string based on the input\n"
-"variable. You can also use a chain of filters to get the desired\n"
-"output::\n"
-"\n"
-"   $ hg tip --template \"{date|isodate}\\n\"\n"
-"   2008-08-21 18:22 +0000\n"
-"\n"
-"List of filters:\n"
-"\n"
-":addbreaks:   Any text. Add an XHTML \"<br />\" tag before the end of\n"
-"              every line except the last.\n"
-":age:         Date. Returns a human-readable date/time difference\n"
-"              between the given date/time and the current\n"
-"              date/time.\n"
-":basename:    Any text. Treats the text as a path, and returns the\n"
-"              last component of the path after splitting by the\n"
-"              path separator (ignoring trailing separators). For\n"
-"              example, \"foo/bar/baz\" becomes \"baz\" and \"foo/bar//\"\n"
-"              becomes \"bar\".\n"
-":stripdir:    Treat the text as path and strip a directory level,\n"
-"              if possible. For example, \"foo\" and \"foo/bar\" becomes\n"
-"              \"foo\".\n"
-":date:        Date. Returns a date in a Unix date format, including\n"
-"              the timezone: \"Mon Sep 04 15:13:13 2006 0700\".\n"
-":domain:      Any text. Finds the first string that looks like an\n"
-"              email address, and extracts just the domain\n"
-"              component. Example: ``User <user@example.com>`` becomes\n"
-"              ``example.com``.\n"
-":email:       Any text. Extracts the first string that looks like\n"
-"              an email address. Example: ``User <user@example.com>``\n"
-"              becomes ``user@example.com``.\n"
-":escape:      Any text. Replaces the special XML/XHTML characters\n"
-"              \"&\", \"<\" and \">\" with XML entities.\n"
-":fill68:      Any text. Wraps the text to fit in 68 columns.\n"
-":fill76:      Any text. Wraps the text to fit in 76 columns.\n"
-":firstline:   Any text. Returns the first line of text.\n"
-":nonempty:    Any text. Returns '(none)' if the string is empty.\n"
-":hgdate:      Date. Returns the date as a pair of numbers:\n"
-"              \"1157407993 25200\" (Unix timestamp, timezone offset).\n"
-":isodate:     Date. Returns the date in ISO 8601 format:\n"
-"              \"2009-08-18 13:00 +0200\".\n"
-":isodatesec:  Date. Returns the date in ISO 8601 format, including\n"
-"              seconds: \"2009-08-18 13:00:13 +0200\". See also the\n"
-"              rfc3339date filter.\n"
-":localdate:   Date. Converts a date to local date.\n"
-":obfuscate:   Any text. Returns the input text rendered as a\n"
-"              sequence of XML entities.\n"
-":person:      Any text. Returns the text before an email address.\n"
-":rfc822date:  Date. Returns a date using the same format used in\n"
-"              email headers: \"Tue, 18 Aug 2009 13:00:13 +0200\".\n"
-":rfc3339date: Date. Returns a date using the Internet date format\n"
-"              specified in RFC 3339: \"2009-08-18T13:00:13+02:00\".\n"
-":short:       Changeset hash. Returns the short form of a changeset\n"
-"              hash, i.e. a 12-byte hexadecimal string.\n"
-":shortdate:   Date. Returns a date like \"2006-09-18\".\n"
-":strip:       Any text. Strips all leading and trailing whitespace.\n"
-":tabindent:   Any text. Returns the text, with every line except\n"
-"              the first starting with a tab character.\n"
-":urlescape:   Any text. Escapes all \"special\" characters. For\n"
-"              example, \"foo bar\" becomes \"foo%20bar\".\n"
-":user:        Any text. Returns the user portion of an email\n"
-"              address.\n"
-msgstr ""
-
-msgid ""
-"Valid URLs are of the form::\n"
-"\n"
-"  local/filesystem/path[#revision]\n"
-"  file://local/filesystem/path[#revision]\n"
-"  http://[user[:pass]@]host[:port]/[path][#revision]\n"
-"  https://[user[:pass]@]host[:port]/[path][#revision]\n"
-"  ssh://[user[:pass]@]host[:port]/[path][#revision]\n"
-"\n"
-"Paths in the local filesystem can either point to Mercurial\n"
-"repositories or to bundle files (as created by 'hg bundle' or 'hg\n"
-"incoming --bundle').\n"
-"\n"
-"An optional identifier after # indicates a particular branch, tag, or\n"
-"changeset to use from the remote repository. See also 'hg help\n"
-"revisions'.\n"
-"\n"
-"Some features, such as pushing to http:// and https:// URLs are only\n"
-"possible if the feature is explicitly enabled on the remote Mercurial\n"
-"server.\n"
-"\n"
-"Some notes about using SSH with Mercurial:\n"
-"\n"
-"- SSH requires an accessible shell account on the destination machine\n"
-"  and a copy of hg in the remote path or specified with as remotecmd.\n"
-"- path is relative to the remote user's home directory by default. Use\n"
-"  an extra slash at the start of a path to specify an absolute path::\n"
-"\n"
-"    ssh://example.com//tmp/repository\n"
-"\n"
-"- Mercurial doesn't use its own compression via SSH; the right thing\n"
-"  to do is to configure it in your ~/.ssh/config, e.g.::\n"
-"\n"
-"    Host *.mylocalnetwork.example.com\n"
-"      Compression no\n"
-"    Host *\n"
-"      Compression yes\n"
-"\n"
-"  Alternatively specify \"ssh -C\" as your ssh command in your hgrc or\n"
-"  with the --ssh command line option.\n"
-"\n"
-"These URLs can all be stored in your hgrc with path aliases under the\n"
-"[paths] section like so::\n"
-"\n"
-"  [paths]\n"
-"  alias1 = URL1\n"
-"  alias2 = URL2\n"
-"  ...\n"
-"\n"
-"You can then use the alias for any command that uses a URL (for\n"
-"example 'hg pull alias1' will be treated as 'hg pull URL1').\n"
-"\n"
-"Two path aliases are special because they are used as defaults when\n"
-"you do not provide the URL to a command:\n"
-"\n"
-"default:\n"
-"  When you create a repository with hg clone, the clone command saves\n"
-"  the location of the source repository as the new repository's\n"
-"  'default' path. This is then used when you omit path from push- and\n"
-"  pull-like commands (including incoming and outgoing).\n"
-"\n"
-"default-push:\n"
-"  The push command will look for a path named 'default-push', and\n"
-"  prefer it over 'default' if both are defined.\n"
-msgstr ""
-
-msgid ""
 "hooks for controlling repository access\n"
 "\n"
 "This hook makes it possible to allow or deny write access to portions\n"
@@ -982,8 +482,9 @@
 msgid ""
 "colorize output from some commands\n"
 "\n"
-"This extension modifies the status command to add color to its output\n"
-"to reflect file status, the qseries command to add color to reflect\n"
+"This extension modifies the status and resolve commands to add color to "
+"their\n"
+"output to reflect file status, the qseries command to add color to reflect\n"
 "patch status (applied, unapplied, missing), and to diff-related\n"
 "commands to highlight additions, removals, diff headers, and trailing\n"
 "whitespace.\n"
@@ -1020,6 +521,11 @@
 "  diff.inserted = green\n"
 "  diff.changed = white\n"
 "  diff.trailingwhitespace = bold red_background\n"
+"\n"
+"  resolve.unresolved = red bold\n"
+"  resolve.resolved = green bold\n"
+"\n"
+"  bookmarks.current = green\n"
 msgstr ""
 
 msgid "when to colorize (always, auto, or never)"
@@ -1185,6 +691,15 @@
 "        matched. If a match occurs, then the conversion process will\n"
 "        add the most recent revision on the branch indicated in the\n"
 "        regex as the second parent of the changeset.\n"
+"    --config hook.cvslog\n"
+"        Specify a Python function to be called at the end of gathering\n"
+"        the CVS log. The function is passed a list with the log entries,\n"
+"        and can modify the entries in-place, or add or delete them.\n"
+"    --config hook.cvschangesets\n"
+"        Specify a Python function to be called after the changesets\n"
+"        are calculated from the the CVS log. The function is passed\n"
+"        a list with the changeset entries, and can modify the changesets\n"
+"        in-place, or add or delete them.\n"
 "\n"
 "    An additional \"debugcvsps\" Mercurial command allows the builtin\n"
 "    changeset merging code to be run without doing a conversion. Its\n"
@@ -1364,10 +879,18 @@
 msgstr ""
 
 #, python-format
+msgid "%s: invalid source repository type"
+msgstr "%s: ogiltig typ för källarkiv"
+
+#, python-format
 msgid "%s: missing or unsupported repository"
 msgstr ""
 
 #, python-format
+msgid "%s: invalid destination repository type"
+msgstr "%s: ogiltig typ för destinationsarkiv"
+
+#, python-format
 msgid "convert: %s\n"
 msgstr ""
 
@@ -1599,6 +1122,11 @@
 msgid "Mercurial failed to run itself, check hg executable is in PATH"
 msgstr ""
 
+msgid ""
+"svn: cannot probe remote repository, assume it could be a subversion "
+"repository. Use --source-type if you know better.\n"
+msgstr ""
+
 msgid "Subversion python bindings could not be loaded"
 msgstr ""
 
@@ -1767,15 +1295,14 @@
 msgid ""
 "use %(path)s to diff repository (or selected files)\n"
 "\n"
-"    Show differences between revisions for the specified files, using the\n"
-"    %(path)s program.\n"
-"\n"
-"    When two revision arguments are given, then changes are shown between\n"
-"    those revisions. If only one revision is specified then that revision "
-"is\n"
-"    compared to the working directory, and, when no revisions are "
-"specified,\n"
-"    the working directory files are compared to its parent."
+"    Show differences between revisions for the specified files, using\n"
+"    the %(path)s program.\n"
+"\n"
+"    When two revision arguments are given, then changes are shown\n"
+"    between those revisions. If only one revision is specified then\n"
+"    that revision is compared to the working directory, and, when no\n"
+"    revisions are specified, the working directory files are compared\n"
+"    to its parent."
 msgstr ""
 
 #, python-format
@@ -1975,7 +1502,7 @@
 msgstr "inga ändringar hittades\n"
 
 msgid "show the revision DAG"
-msgstr ""
+msgstr "visa revisionsdiagram"
 
 msgid "limit number of changes displayed"
 msgstr "begränsa antalet visade ändringar"
@@ -2189,22 +1716,22 @@
 msgid "hg inserve [OPTION]..."
 msgstr ""
 
-msgid "(found dead inotify server socket; removing it)\n"
-msgstr ""
-
-#, python-format
-msgid "could not start inotify server: %s\n"
-msgstr ""
-
-#, python-format
-msgid "could not talk to new inotify server: %s\n"
-msgstr ""
-
-#, python-format
-msgid "failed to contact inotify server: %s\n"
-msgstr ""
-
-msgid "received empty answer from inotify server"
+msgid "inotify-client: found dead inotify server socket; removing it\n"
+msgstr ""
+
+#, python-format
+msgid "inotify-client: could not start inotify server: %s\n"
+msgstr ""
+
+#, python-format
+msgid "inotify-client: could not talk to new inotify server: %s\n"
+msgstr ""
+
+#, python-format
+msgid "inotify-client: failed to contact inotify server: %s\n"
+msgstr ""
+
+msgid "inotify-client: received empty answer from inotify server"
 msgstr ""
 
 #, python-format
@@ -2257,21 +1784,6 @@
 msgstr ""
 
 #, python-format
-msgid "status: %r %s -> %s\n"
-msgstr ""
-
-#, python-format
-msgid "%s dirstate reload\n"
-msgstr ""
-
-#, python-format
-msgid "%s end dirstate reload\n"
-msgstr ""
-
-msgid "rescanning due to .hgignore change\n"
-msgstr ""
-
-#, python-format
 msgid "%s event: created %s\n"
 msgstr ""
 
@@ -2303,8 +1815,22 @@
 msgid "%s hooking back up with %d bytes readable\n"
 msgstr ""
 
-#, python-format
-msgid "could not start server: %s"
+msgid "finished setup\n"
+msgstr ""
+
+#, python-format
+msgid "status: %r %s -> %s\n"
+msgstr ""
+
+msgid "rescanning due to .hgignore change\n"
+msgstr ""
+
+msgid "cannot start: socket is already bound"
+msgstr ""
+
+msgid ""
+"cannot start: tried linking .hg/inotify.sock to a temporary socket but .hg/"
+"inotify.sock already exists"
 msgstr ""
 
 #, python-format
@@ -2319,9 +1845,6 @@
 msgid "unrecognized query type: %s\n"
 msgstr ""
 
-msgid "finished setup\n"
-msgstr ""
-
 msgid ""
 "expand expressions into changelog and summaries\n"
 "\n"
@@ -2566,6 +2089,22 @@
 "  add known patch to applied stack          qpush\n"
 "  remove patch from applied stack           qpop\n"
 "  refresh contents of top applied patch     qrefresh\n"
+"\n"
+"By default, mq will automatically use git patches when required to\n"
+"avoid losing file mode changes, copy records, binary files or empty\n"
+"files creations or deletions. This behaviour can be configured with::\n"
+"\n"
+"  [mq]\n"
+"  git = auto/keep/yes/no\n"
+"\n"
+"If set to 'keep', mq will obey the [diff] section configuration while\n"
+"preserving existing git patches upon qrefresh. If set to 'yes' or\n"
+"'no', mq will override the [diff] section and always generate git or\n"
+"regular patches, possibly losing data in the second case.\n"
+msgstr ""
+
+#, python-format
+msgid "mq.git option can be auto/keep/yes/no got %s"
 msgstr ""
 
 #, python-format
@@ -2716,6 +2255,9 @@
 msgid "patch \"%s\" already exists"
 msgstr ""
 
+msgid "cannot manage merge changesets"
+msgstr "kan inte hantera sammanfogningar"
+
 #, python-format
 msgid "error unlinking %s\n"
 msgstr ""
@@ -3118,7 +2660,8 @@
 "    With arguments, set guards for the named patch.\n"
 "    NOTE: Specifying negative guards now requires '--'.\n"
 "\n"
-"    To set guards on another patch:\n"
+"    To set guards on another patch::\n"
+"\n"
 "      hg qguard -- other.patch +2.6.17 -stable\n"
 "    "
 msgstr ""
@@ -3213,7 +2756,7 @@
 "    qselect to tell mq which guards to use. A patch will be pushed if\n"
 "    it has no guards or any positive guards match the currently\n"
 "    selected guard, but will not be pushed if any negative guards\n"
-"    match the current guard. For example:\n"
+"    match the current guard. For example::\n"
 "\n"
 "        qguard foo.patch -stable    (negative guard)\n"
 "        qguard bar.patch +stable    (positive guard)\n"
@@ -3663,10 +3206,13 @@
 "  ignore = version, help, update\n"
 "\n"
 "You can also enable the pager only for certain commands using\n"
-"pager.attend::\n"
+"pager.attend. Below is the default list of commands to be paged::\n"
 "\n"
 "  [pager]\n"
-"  attend = log\n"
+"  attend = annotate, cat, diff, export, glog, log, qdiff\n"
+"\n"
+"Setting pager.attend to an empty value will cause all commands to be\n"
+"paged.\n"
 "\n"
 "If pager.attend is present, pager.ignore will be ignored.\n"
 "\n"
@@ -4161,9 +3707,6 @@
 msgid " and "
 msgstr ""
 
-msgid "y"
-msgstr ""
-
 #, python-format
 msgid "record this change to %r?"
 msgstr ""
@@ -4222,34 +3765,32 @@
 msgid ""
 "recreate hardlinks between two repositories\n"
 "\n"
-"    When repositories are cloned locally, their data files will be "
-"hardlinked\n"
-"    so that they only use the space of a single repository.\n"
-"\n"
-"    Unfortunately, subsequent pulls into either repository will break "
-"hardlinks\n"
-"    for any files touched by the new changesets, even if both repositories "
-"end\n"
-"    up pulling the same changes.\n"
-"\n"
-"    Similarly, passing --rev to \"hg clone\" will fail to use\n"
-"    any hardlinks, falling back to a complete copy of the source "
-"repository.\n"
-"\n"
-"    This command lets you recreate those hardlinks and reclaim that wasted\n"
-"    space.\n"
-"\n"
-"    This repository will be relinked to share space with ORIGIN, which must "
-"be\n"
-"    on the same local disk. If ORIGIN is omitted, looks for \"default-relink"
-"\",\n"
-"    then \"default\", in [paths].\n"
-"\n"
-"    Do not attempt any read operations on this repository while the command "
-"is\n"
-"    running. (Both repositories will be locked against writes.)\n"
-"    "
-msgstr ""
+"    When repositories are cloned locally, their data files will be\n"
+"    hardlinked so that they only use the space of a single repository.\n"
+"\n"
+"    Unfortunately, subsequent pulls into either repository will break\n"
+"    hardlinks for any files touched by the new changesets, even if\n"
+"    both repositories end up pulling the same changes.\n"
+"\n"
+"    Similarly, passing --rev to \"hg clone\" will fail to use any\n"
+"    hardlinks, falling back to a complete copy of the source\n"
+"    repository.\n"
+"\n"
+"    This command lets you recreate those hardlinks and reclaim that\n"
+"    wasted space.\n"
+"\n"
+"    This repository will be relinked to share space with ORIGIN, which\n"
+"    must be on the same local disk. If ORIGIN is omitted, looks for\n"
+"    \"default-relink\", then \"default\", in [paths].\n"
+"\n"
+"    Do not attempt any read operations on this repository while the\n"
+"    command is running. (Both repositories will be locked against\n"
+"    writes.)\n"
+"    "
+msgstr ""
+
+msgid "hardlinks are not supported on this system"
+msgstr "hårda länkar stöds inte av detta system"
 
 #, python-format
 msgid "relinking %s to %s\n"
@@ -4283,6 +3824,43 @@
 msgid "[ORIGIN]"
 msgstr ""
 
+msgid ""
+"extend schemes with shortcuts to repository swarms\n"
+"\n"
+"This extension allows you to specify shortcuts for parent URLs with a\n"
+"lot of repositories to act like a scheme, for example::\n"
+"\n"
+"  [schemes]\n"
+"  py = http://code.python.org/hg/\n"
+"\n"
+"After that you can use it like::\n"
+"\n"
+"  hg clone py://trunk/\n"
+"\n"
+"Additionally there is support for some more complex schemas, for\n"
+"example used by Google Code::\n"
+"\n"
+"  [schemes]\n"
+"  gcode = http://{1}.googlecode.com/hg/\n"
+"\n"
+"The syntax is taken from Mercurial templates, and you have unlimited\n"
+"number of variables, starting with ``{1}`` and continuing with\n"
+"``{2}``, ``{3}`` and so on. This variables will receive parts of URL\n"
+"supplied, split by ``/``. Anything not specified as ``{part}`` will be\n"
+"just appended to an URL.\n"
+"\n"
+"For convenience, the extension adds these schemes by default::\n"
+"\n"
+"  [schemes]\n"
+"  py = http://hg.python.org/\n"
+"  bb = https://bitbucket.org/\n"
+"  bb+ssh = ssh://hg@bitbucket.org/\n"
+"  gcode = https://{1}.googlecode.com/hg/\n"
+"\n"
+"You can override a predefined scheme by defining a new scheme with the\n"
+"same name.\n"
+msgstr ""
+
 msgid "share a common history between several working directories"
 msgstr ""
 
@@ -4292,8 +3870,15 @@
 "    Initialize a new repository and working directory that shares its\n"
 "    history with another repository.\n"
 "\n"
-"    NOTE: actions that change history such as rollback or moving the\n"
-"    source may confuse sharers.\n"
+"    NOTE: using rollback or extensions that destroy/modify history\n"
+"    (mq, rebase, etc.) can cause considerable confusion with shared\n"
+"    clones. In particular, if two shared clones are both updated to\n"
+"    the same changeset, and one of them destroys that changeset with\n"
+"    rollback, the other clone will suddenly stop working: all\n"
+"    operations will fail with \"abort: working directory has unknown\n"
+"    parent\". The only known workaround is to use debugsetparents on\n"
+"    the broken clone to reset it to a changeset that still exists\n"
+"    (e.g. tip).\n"
 "    "
 msgstr ""
 
@@ -4474,12 +4059,15 @@
 "Note that there are some limitations on using this extension:\n"
 "\n"
 "- You should use single encoding in one repository.\n"
-"- You should set same encoding for the repository by locale or\n"
-"  HGENCODING.\n"
-"\n"
-"Path encoding conversion are done between Unicode and\n"
-"encoding.encoding which is decided by Mercurial from current locale\n"
-"setting or HGENCODING.\n"
+"\n"
+"\n"
+"By default, win32mbcs uses encoding.encoding decided by Mercurial.\n"
+"You can specify the encoding by config option::\n"
+"\n"
+" [win32mbcs]\n"
+" encoding = sjis\n"
+"\n"
+"It is useful for the users who want to commit with UTF-8 log message.\n"
 msgstr ""
 
 #, python-format
@@ -4863,12 +4451,27 @@
 "    can be expensive.\n"
 "    "
 msgstr ""
+"lägg till alla nya nya filer, radera alla saknade filer\n"
+"\n"
+"    Lägg till alla nya filer och radera alla saknade filer från arkivet.\n"
+"\n"
+"    Nya filer ignoreras om de överrensstämmer något av mönstren i\n"
+"    .hgignore. Precis som med add, kommer ändringarna att träda i kraft vid\n"
+"    nästa arkivering.\n"
+"\n"
+"    Använd flaggan -s/--similarity för att upptäcka omdöpta filer. Med en\n"
+"    parameter större än 0, kommer varje borttagen fil att jämföras med\n"
+"    varje tillagd fil och lagrar de som är tillräckligt lika som ett\n"
+"    namnbyte. Flaggan tar ett procentvärde mellan 0 (deaktiverad) och 100\n"
+"    (filer måste vara identiska) som parameter. Att upptäcka omdöpta filer\n"
+"    på det här sättet kan ta lång tid.\n"
+"    "
 
 msgid "similarity must be a number"
-msgstr ""
+msgstr "likhet måste vara ett nummer"
 
 msgid "similarity must be between 0 and 100"
-msgstr ""
+msgstr "likhet måste vara mellan 0 och 100"
 
 msgid ""
 "show changeset information by line for each file\n"
@@ -4914,14 +4517,14 @@
 "    directory; use -r/--rev to specify a different revision.\n"
 "\n"
 "    To specify the type of archive to create, use -t/--type. Valid\n"
-"    types are::\n"
-"\n"
-"      \"files\" (default): a directory full of files\n"
-"      \"tar\": tar archive, uncompressed\n"
-"      \"tbz2\": tar archive, compressed using bzip2\n"
-"      \"tgz\": tar archive, compressed using gzip\n"
-"      \"uzip\": zip archive, uncompressed\n"
-"      \"zip\": zip archive, compressed using deflate\n"
+"    types are:\n"
+"\n"
+"    :``files``: a directory full of files (default)\n"
+"    :``tar``:   tar archive, uncompressed\n"
+"    :``tbz2``:  tar archive, compressed using bzip2\n"
+"    :``tgz``:   tar archive, compressed using gzip\n"
+"    :``uzip``:  zip archive, uncompressed\n"
+"    :``zip``:   zip archive, compressed using deflate\n"
 "\n"
 "    The exact name of the destination archive or directory is given\n"
 "    using a format string; see 'hg help export' for details.\n"
@@ -4932,15 +4535,37 @@
 "    removed.\n"
 "    "
 msgstr ""
+"skapa ett icke versionshanterat arkiv från en arkivresision\n"
+"\n"
+"    Som standard används revisonen för arbetskatalogens förälder; använd\n"
+"    -r/--rev för att specificera en annan revision.\n"
+"\n"
+"    För att definiera vilken typ av arkiv som ska skapas, använd -t/--type.\n"
+"    Giltiga typer är::\n"
+"\n"
+"    :``files``: en katalog fylld med filer (standard)\n"
+"    :``tar``:   tar-arkiv, okomprimerad\n"
+"    :``tbz2``:  tar-arkiv, komprimerad med bzip2\n"
+"    :``tgz``:   tar-arkiv, komprimerad med gzip\n"
+"    :``uzip``:  zip-arkiv, okomprimerad\n"
+"    :``zip``:   zip-arkiv, komprimerad med deflate\n"
+"\n"
+"    Det exakta namnet på destinationsarkivet eller -katalogen anges med en\n"
+"    formatsträng; se 'hg help export' för detaljer.\n"
+"\n"
+"    Varje fil som läggs till en arkivfil har ett katalogprefix. Använd\n"
+"    -p/--prefix för att specificera en formatsträn för prefixet. Som\n"
+"    standard används basnamnet för arkivet, med suffix borttagna.\n"
+"    "
 
 msgid "no working directory: please specify a revision"
-msgstr ""
+msgstr "ingen arbetskatalog: specificera en revision"
 
 msgid "repository root cannot be destination"
-msgstr ""
+msgstr "arkivroten kan inte vara destinationen"
 
 msgid "cannot archive plain files to stdout"
-msgstr ""
+msgstr "kan inte arkivera rena filer till stdout"
 
 msgid ""
 "reverse effect of earlier changeset\n"
@@ -4960,42 +4585,59 @@
 "    See 'hg help dates' for a list of formats valid for -d/--date.\n"
 "    "
 msgstr ""
+"omvänd effekten från en tidigare ändring\n"
+"\n"
+"    Arkivera de återkallade ändringarna som en ny ändring. Den nya\n"
+"    ändringen är ett barn till den återkallade ändringen.\n"
+"\n"
+"    Om du återkallar en annan ändring än toppen, skapas ett nytt huvud.\n"
+"    Detta huvud kommer att vara en nya toppen och du bör sammanfoga den med\n"
+"    ett annat huvud.\n"
+"\n"
+"    Flaggan --merge kommer ihåg arbetskatalogens förälder innan\n"
+"    återkallningen påbörjas, och sammanfogar sedan det nya huvudet med den\n"
+"    ändringen efteråt. Detta gör att du inte behöver göra sammanfogningen\n"
+"    manuellt. Resultatet av sammanfogningen arkiveras inte, precis som en\n"
+"    vanlig sammanfogning.\n"
+"\n"
+"    Se 'hg help dates' för en lista med giltiga format för -d/--date.\n"
+"    "
 
 msgid "please specify just one revision"
-msgstr ""
+msgstr "specificera bara en revision"
 
 msgid "please specify a revision to backout"
-msgstr ""
+msgstr "specificera en revision att återkalla"
 
 msgid "cannot backout change on a different branch"
-msgstr ""
+msgstr "kan inte återkalla en ändring på en annan gren"
 
 msgid "cannot backout a change with no parents"
-msgstr ""
+msgstr "kan inte återkalla en ändring utan föräldrar"
 
 msgid "cannot backout a merge changeset without --parent"
-msgstr ""
+msgstr "kan inte återkalla en sammanfogande ändring utan --parent"
 
 #, python-format
 msgid "%s is not a parent of %s"
-msgstr ""
+msgstr "%s är inte en förälder till %s"
 
 msgid "cannot use --parent on non-merge changeset"
-msgstr ""
+msgstr "kan inte använda --parent på icke-sammanfogande ändring"
 
 #, python-format
 msgid "changeset %s backs out changeset %s\n"
-msgstr ""
+msgstr "ändringen %s återkallar ändringen %s\n"
 
 #, python-format
 msgid "merging with changeset %s\n"
-msgstr ""
+msgstr "sammanfogar med ändring %s\n"
 
 msgid "the backout changeset is a new head - do not forget to merge\n"
-msgstr ""
+msgstr "återkallningsändringen är ett nytt huvud - glöm inte att sammanfoga\n"
 
 msgid "(use \"backout --merge\" if you want to auto-merge)\n"
-msgstr ""
+msgstr "(använd \"backout --merge\" om du vill auto-sammanfoga)\n"
 
 msgid ""
 "subdivision search of changesets\n"
@@ -5106,6 +4748,12 @@
 "    "
 msgstr ""
 
+msgid " (closed)"
+msgstr " (stängd)"
+
+msgid " (inactive)"
+msgstr " (inaktiv)"
+
 msgid ""
 "create a changegroup file\n"
 "\n"
@@ -5146,11 +4794,11 @@
 "\n"
 "    Output may be to a file, in which case the name of the file is\n"
 "    given using a format string. The formatting rules are the same as\n"
-"    for the export command, with the following additions::\n"
-"\n"
-"      %s   basename of file being printed\n"
-"      %d   dirname of file being printed, or '.' if in repository root\n"
-"      %p   root-relative path name of file being printed\n"
+"    for the export command, with the following additions:\n"
+"\n"
+"    :``%s``: basename of file being printed\n"
+"    :``%d``: dirname of file being printed, or '.' if in repository root\n"
+"    :``%p``: root-relative path name of file being printed\n"
 "    "
 msgstr ""
 
@@ -5176,9 +4824,9 @@
 "    will be the null changeset). Otherwise, clone will initially check\n"
 "    out (in order of precedence):\n"
 "\n"
-"      a) the changeset, tag or branch specified with -u/--updaterev\n"
-"      b) the changeset, tag or branch given with the first -r/--rev\n"
-"      c) the head of the default branch\n"
+"    a) the changeset, tag or branch specified with -u/--updaterev\n"
+"    b) the changeset, tag or branch given with the first -r/--rev\n"
+"    c) the head of the default branch\n"
 "\n"
 "    Use 'hg clone -u . src dst' to checkout the source repository's\n"
 "    parent changeset (applicable for local source repositories only).\n"
@@ -5187,8 +4835,8 @@
 "    by listing each changeset (tag, or branch name) with -r/--rev.\n"
 "    If -r/--rev is used, the cloned repository will contain only a subset\n"
 "    of the changesets of the source repository. Only the set of changesets\n"
-"    defined by all -r/--rev options (including their direct and indirect\n"
-"    parent changesets) will be pulled into the destination repository.\n"
+"    defined by all -r/--rev options (including all their ancestors)\n"
+"    will be pulled into the destination repository.\n"
 "    No subsequent changesets (including subsequent tags) will be present\n"
 "    in the destination.\n"
 "\n"
@@ -5227,18 +4875,18 @@
 "\n"
 "    Se 'hg help urls' för detaljer om giltiga källformat.\n"
 "\n"
-"    Det är möjligt att specificera en ``ssh://``-URL som destination, men ingen\n"
-"    .hg/hgrc och arbetskatalog skapas på fjärrsidan. Se 'hg help urls' för\n"
-"    viktiga detaljer om ``ssh://``-URLer.\n"
+"    Det är möjligt att specificera en ``ssh://``-URL som destination, men\n"
+"    ingen .hg/hgrc och arbetskatalog skapas på fjärrsidan.\n"
+"    Se 'hg help urls' för viktiga detaljer om ``ssh://``-URLer.\n"
 "\n"
 "    Om alternativet -U/--noupdate är angivet, kommer den nya klonen bara\n"
 "    att innehålla ett arkiv (.hg) och ingen arbetskopia (arbetskopians\n"
 "    förälder kommer att vara null-ändringen). Annars kommer klonen initialt\n"
 "    att hämta ut (i prioritetsordning):\n"
 "\n"
-"      a) ändringen, taggen eller grenen specificerad med -u/--updaterev\n"
-"      b) ändringen, taggen eller grenen given med den första -r/--rev\n"
-"      c) huvudet på grenen 'default'\n"
+"    a) ändringen, taggen eller grenen specificerad med -u/--updaterev\n"
+"    b) ändringen, taggen eller grenen given med den första -r/--rev\n"
+"    c) huvudet på grenen 'default'\n"
 "\n"
 "    Använd 'hg clone -u . källa dst' för att hämta ut källkodsarkivets\n"
 "    föräldraänrding (gäller bara för lokala arkiv).\n"
@@ -5247,9 +4895,9 @@
 "    genom att lista varje ändring (märke, eller grennamn) med -r/--rev.\n"
 "    Om -r/--rev används, kommer det klonade arkivet bara att innehålla en\n"
 "    delmängd av ändringarna i källarkivet. Bara ändringarna definierade med\n"
-"    -r/--rev (inklusive direkta och indirekta föräldrar) kommer att dras in\n"
-"    i destinationsarkivet. Inga efterföljande ändringar (inklusive\n"
-"    efterföljande märken) kommer att finnas i destinationen.\n"
+"    -r/--rev (och alla föräldrar) kommer att dras in i destinationsarkivet.\n"
+"    Inga efterföljande ändringar (inklusive efterföljande märken) kommer\n"
+"    att finnas i destinationen.\n"
 "\n"
 "    Användande av -r/--rev (eller 'clone källa#rev dest') aktiverar också\n"
 "    --pull, även för lokala arkiv.\n"
@@ -5343,7 +4991,7 @@
 msgstr ""
 
 msgid "There is no Mercurial repository here (.hg not found)"
-msgstr ""
+msgstr "Det finns inget Mercurial-arkiv här (.hg hittades inte)"
 
 msgid "either two or three arguments required"
 msgstr ""
@@ -5391,9 +5039,22 @@
 "    for each config item.\n"
 "    "
 msgstr ""
+"visa kombinerade konfigurationsalternativ från alla hgrc-filer\n"
+"\n"
+"    Utan argument, skrivs namn och värden för alla alternativ.\n"
+"\n"
+"    Med ett argument i formen sektion.namn, visas bara värdet för det\n"
+"    konfigurationsalternativet.\n"
+"\n"
+"    Med flera argument, visas namn och värden för alla alternativ med\n"
+"    överrensstämmande sektionsnamn.\n"
+"\n"
+"    Med --debug, visas källan (filnamn och radnummer) för varje\n"
+"    alternativ.\n"
+"    "
 
 msgid "only one config item permitted"
-msgstr ""
+msgstr "bara ett konfigurationsalternativ tillåts"
 
 msgid ""
 "manually set the parents of the current working directory\n"
@@ -5574,16 +5235,16 @@
 "    first parent only.\n"
 "\n"
 "    Output may be to a file, in which case the name of the file is\n"
-"    given using a format string. The formatting rules are as follows::\n"
-"\n"
-"      %%   literal \"%\" character\n"
-"      %H   changeset hash (40 bytes of hexadecimal)\n"
-"      %N   number of patches being generated\n"
-"      %R   changeset revision number\n"
-"      %b   basename of the exporting repository\n"
-"      %h   short-form changeset hash (12 bytes of hexadecimal)\n"
-"      %n   zero-padded sequence number, starting at 1\n"
-"      %r   zero-padded changeset revision number\n"
+"    given using a format string. The formatting rules are as follows:\n"
+"\n"
+"    :``%%``: literal \"%\" character\n"
+"    :``%H``: changeset hash (40 bytes of hexadecimal)\n"
+"    :``%N``: number of patches being generated\n"
+"    :``%R``: changeset revision number\n"
+"    :``%b``: basename of the exporting repository\n"
+"    :``%h``: short-form changeset hash (12 bytes of hexadecimal)\n"
+"    :``%n``: zero-padded sequence number, starting at 1\n"
+"    :``%r``: zero-padded changeset revision number\n"
 "\n"
 "    Without the -a/--text option, export will avoid generating diffs\n"
 "    of files it detects as binary. With -a, export will generate a\n"
@@ -5610,14 +5271,14 @@
 "    Utmatning kan vara till en fil, och då anges namnet på filen med en\n"
 "    formatsträng. Formateringsreglerna är som följer::\n"
 "\n"
-"      %%   ett \"%\"-tecken\n"
-"      %H   ändringshash (40 hexadecimala bytes)\n"
-"      %N   antal genererade patchar\n"
-"      %R   ändringens revisionsnummer\n"
-"      %b   basnamn för det exporterande arkivet\n"
-"      %h   kort ändringshash (12 hexadecimala bytes)\n"
-"      %n   nollpaddat sekvensnummer, börjar med 1\n"
-"      %r   nollpaddat ändringsrevisionsnummer\n"
+"    :``%%``: ett \"%\"-tecken\n"
+"    :``%H``: ändringshash (40 hexadecimala bytes)\n"
+"    :``%N``: antal genererade patchar\n"
+"    :``%R``: ändringens revisionsnummer\n"
+"    :``%b``: basnamn för det exporterande arkivet\n"
+"    :``%h``: kort ändringshash (12 hexadecimala bytes)\n"
+"    :``%n``: nollpaddat sekvensnummer, börjar med 1\n"
+"    :``%r``: nollpaddat ändringsrevisionsnummer\n"
 "\n"
 "    Utan flaggan -a/--text, kommer export att undvika skapandet av diffar\n"
 "    av filer som upptäcks vara binära. Med -a, kommer filen att exporteras\n"
@@ -5783,25 +5444,24 @@
 "alias: %s\n"
 
 msgid "(no help text available)"
-msgstr ""
+msgstr "(ingen hjälptext tillgänglig)"
 
 msgid "options:\n"
 msgstr "flaggor:\n"
 
 msgid "no commands defined\n"
-msgstr ""
-
-msgid "enabled extensions:"
-msgstr "aktiverade utökningar:"
+msgstr "inga kommandon definierade\n"
 
 msgid "no help text available"
-msgstr ""
+msgstr "ingen hjälptext tillgänglig"
 
 #, python-format
 msgid ""
 "%s extension - %s\n"
 "\n"
 msgstr ""
+"%s-utökning - %s\n"
+"\n"
 
 msgid "Mercurial Distributed SCM\n"
 msgstr "Mercurial Distribuerad SCM\n"
@@ -5813,6 +5473,9 @@
 "grundläggande kommandon:\n"
 "\n"
 
+msgid "enabled extensions:"
+msgstr "aktiverade utökningar:"
+
 msgid "DEPRECATED"
 msgstr "FÖRLEGAD"
 
@@ -5922,8 +5585,8 @@
 "\n"
 "    Om ingen katalog anges, används den nuvarande katalogen.\n"
 "\n"
-"    Det är möjligt att specificera en URL med ``ssh://`` som destination. Se\n"
-"    'hg help urls' för mer information.\n"
+"    Det är möjligt att specificera en URL med ``ssh://`` som destination.\n"
+"    Se 'hg help urls' för mer information.\n"
 "    "
 
 msgid ""
@@ -6050,23 +5713,25 @@
 
 #, python-format
 msgid "branch '%s' has %d heads - please merge with an explicit rev"
-msgstr ""
+msgstr "grenen '%s' har %d huvuden - sammanfoga med en specifik rev"
 
 #, python-format
 msgid "branch '%s' has one head - please merge with an explicit rev"
-msgstr ""
+msgstr "grenen '%s' har ett huvud - sammanfoga med en specifik rev"
 
 msgid "there is nothing to merge"
-msgstr ""
+msgstr "det finns inget att sammanfoga"
 
 #, python-format
 msgid "%s - use \"hg update\" instead"
-msgstr ""
+msgstr "%s - använd \"hg update\" istället"
 
 msgid ""
 "working dir not at a head rev - use \"hg update\" or merge with an explicit "
 "rev"
 msgstr ""
+"arbetskatalogen är inte vid huvudrevisionen - använd \"hg update\" eller "
+"sammanfoga med en speficik rev"
 
 msgid ""
 "show changesets not found in destination\n"
@@ -6078,6 +5743,14 @@
 "    See pull for valid destination format details.\n"
 "    "
 msgstr ""
+"visa ändringar som inte hittas i destinationen\n"
+"\n"
+"    Visa ändringar som inte hittas i det angivna destionationsarkivet\n"
+"    eller den vanliga push-platsen. Detta är de ändringar som skulle\n"
+"    tryckas om push genomfördes.\n"
+"\n"
+"    Se pull för information om giltiga destinationsformat.\n"
+"    "
 
 msgid ""
 "show the parents of the working directory or revision\n"
@@ -6098,11 +5771,11 @@
 "    "
 
 msgid "can only specify an explicit filename"
-msgstr ""
+msgstr "kan bara specificera ett explicit filnamn"
 
 #, python-format
 msgid "'%s' not found in manifest!"
-msgstr ""
+msgstr "'%s' hittades inte i manifestet!"
 
 msgid ""
 "show aliases for remote repositories\n"
@@ -6116,18 +5789,29 @@
 "    See 'hg help urls' for more information.\n"
 "    "
 msgstr ""
+"visa aliases för fjärrarkiv\n"
+"\n"
+"    Visa definitioner för sökvägen NAME. Om inget namn anges, visas\n"
+"    definitionen för alla tillgängliga namn.\n"
+"\n"
+"    Sökvägar definieras i sektionen [paths] i /etc/mercurial/hgrc och\n"
+"    $HOME/.hgrc. Om det körs i ett arkiv, så används .hg/hgrc också.\n"
+"\n"
+"    Se 'hg help urls' för mer information.\n"
+"    "
 
 msgid "not found!\n"
-msgstr ""
+msgstr "hittades inte!\n"
 
 msgid "not updating, since new heads added\n"
-msgstr ""
+msgstr "uppdaterar inte, eftersom nya huvuden läggs till\n"
 
 msgid "(run 'hg heads' to see heads, 'hg merge' to merge)\n"
 msgstr ""
+"(kör 'hg heads' för att se nya huvuden, 'hg merge' för att sammanfoga)\n"
 
 msgid "(run 'hg update' to get a working copy)\n"
-msgstr ""
+msgstr "(kör 'hg update' för att få en arbetskopia)\n"
 
 msgid ""
 "pull changes from the specified source\n"
@@ -6207,7 +5891,7 @@
 
 #, python-format
 msgid "pushing to %s\n"
-msgstr ""
+msgstr "trycker till %s\n"
 
 msgid ""
 "roll back an interrupted transaction\n"
@@ -6219,6 +5903,13 @@
 "    suggests it.\n"
 "    "
 msgstr ""
+"ångra en avbruten transaktion\n"
+"\n"
+"    Återställ från en avbruten commit eller pull.\n"
+"\n"
+"    Kommandot försöker att fixa arkivstatusen efter en avbruten operation.\n"
+"    Det bör bara användas när Mercurial föreslår det.\n"
+"    "
 
 msgid ""
 "remove the specified files on the next commit\n"
@@ -6276,20 +5967,20 @@
 
 #, python-format
 msgid "not removing %s: file is untracked\n"
-msgstr ""
+msgstr "raderar inte %s: filen är inte hanterad\n"
 
 #, python-format
 msgid "not removing %s: file %s (use -f to force removal)\n"
-msgstr ""
+msgstr "raderar inte %s: filen %s (använd -f för att tvinga)\n"
 
 msgid "still exists"
-msgstr ""
+msgstr "existerar fortfarande"
 
 msgid "is modified"
-msgstr ""
+msgstr "är modifierad"
 
 msgid "has been marked for add"
-msgstr ""
+msgstr "har markerats för addering"
 
 msgid ""
 "rename files; equivalent of copy + remove\n"
@@ -6306,6 +5997,19 @@
 "    before that, see hg revert.\n"
 "    "
 msgstr ""
+"döp om filer; likvärdig med kopiering + radering\n"
+"\n"
+"    Markera dest som kopior av källorna; markera källorna för radering.\n"
+"    Om dest är en katalog, placeras kopiorna i den katalogen. Om dest är\n"
+"    en fil, kan det bara finnas en källa.\n"
+"\n"
+"    Som standard kopierar detta kommando innehållet i filerna som de ser\n"
+"    ut i arbetskopian. Om det utförs med -A/--after, så sparas\n"
+"    operationen, men ingen kopiering utförs.\n"
+"\n"
+"    Det här kommandot får effekt vid nästa arkivering. För att ångra ett\n"
+"    namnbyte innan det, se hg revert.\n"
+"    "
 
 msgid ""
 "retry file merges from a merge or update\n"
@@ -6317,7 +6021,7 @@
 "    will be overwritten if the merge is retried with resolve. The\n"
 "    -m/--mark switch should be used to mark the file as resolved.\n"
 "\n"
-"    You can specify a set of files to operate on, or use the -a/-all\n"
+"    You can specify a set of files to operate on, or use the -a/--all\n"
 "    switch to select all unresolved files.\n"
 "\n"
 "    This command also allows listing resolved files and manually\n"
@@ -6330,15 +6034,37 @@
 "      R = resolved\n"
 "    "
 msgstr ""
+"gör om filsammanfogningar från merge eller update\n"
+"\n"
+"    Det här kommandot kan göra om olösta filsammanfogningar med hjälp av\n"
+"    filrevisioner bevarade från det senaste update eller merge.\n"
+"\n"
+"    Om en konflikt löses manuellt, notera att ändringarna kommer att\n"
+"    skrivas över om sammanfogningen görs om med resolve. Flaggan -m/--mark\n"
+"    bör användas för att markers filen som löst.\n"
+"\n"
+"    Du kan specificera en uppsättning filer att arbeta med, eller använda\n"
+"    flaggan -a/--all för att välja alla olösta filer.\n"
+"\n"
+"    Kommandot kan också visa lösta filer och manuellt indikera om filer är\n"
+"    lösta. Alla filer måste markeras som lösta innan arkivering tillåts.\n"
+"\n"
+"    Koderna som används för att visa filstatus är::\n"
+"\n"
+"      U = olöst (engelskans 'unresolved')\n"
+"      R = löst (engelskans 'resolved')\n"
+"    "
 
 msgid "too many options specified"
-msgstr ""
+msgstr "för många flaggor specificerade"
 
 msgid "can't specify --all and patterns"
-msgstr ""
+msgstr "kan inte specificera --all och mönster"
 
 msgid "no files or directories specified; use --all to remerge all files"
 msgstr ""
+"inga filer eller kataloger specificerade; använd --all för att "
+"återsammanfoga alla filer"
 
 msgid ""
 "restore individual files or directories to an earlier state\n"
@@ -6374,36 +6100,68 @@
 "    To disable these backups, use --no-backup.\n"
 "    "
 msgstr ""
+"återställ filer eller kataloger till ett tidigare tillstånd\n"
+"\n"
+"    (Använd update -r för att hämta ut tidigare revisioner, revert ändrar\n"
+"    inte arbetskatalogens föräldrar.)\n"
+"\n"
+"    Om ingen revision anges, så återställs de givna filerna eller\n"
+"    katalogerna till innehållet de hade i arbetskatalogens förälder. Det\n"
+"    sätter filer i ett omodifierad läge och avbeställer adderingar,\n"
+"    raderingar, kopior och namnbyten. Om arbetskatalogen har två\n"
+"    föräldrar, så måste du ange vilken revision som skall återställas.\n"
+"\n"
+"    Med flaggan -r/--rev, återställs de givna filerna eller katalogerna\n"
+"    till innehållet i den specifika revisionen. Detta kan användas för\n"
+"    att ångra delar av eller hela tidigare ändringar. Se 'hg help dates'\n"
+"    för en lista med giltiga format för -d/--date.\n"
+"\n"
+"    Revert modifierar arbetskatalogen. Det arkiverar inga ändringar, och\n"
+"    ändrar inte arbetskatalogens förälder. Om du återgår till en revision\n"
+"    som inte är arbetskatalogens förälder, kommer den återställda filen\n"
+"    att visas som modifierad.\n"
+"\n"
+"    Om en fil har raderas, så återställs den. Om läget för exekverbarhet\n"
+"    har ändrats för en fil, så återställs det.\n"
+"\n"
+"    Om namn anges, så återställs alla filer med överrensstämmande namn.\n"
+"    Om inga argument ges, återställs inga filer.\n"
+"\n"
+"    Modifierade filer sparas med suffixet .orig innan återställning.\n"
+"    För att deaktivera dessa säkerhetskopior, använd --no-backup.\n"
+"    "
 
 msgid "you can't specify a revision and a date"
-msgstr ""
+msgstr "du kan inte specificera en revision och ett datum"
 
 msgid "no files or directories specified; use --all to revert the whole repo"
 msgstr ""
+"inga filer eller kataloger angivna; använd --all för att återställa hela "
+"arkivet"
 
 #, python-format
 msgid "forgetting %s\n"
-msgstr ""
+msgstr "glömmer %s\n"
 
 #, python-format
 msgid "reverting %s\n"
-msgstr ""
+msgstr "återställer %s\n"
 
 #, python-format
 msgid "undeleting %s\n"
-msgstr ""
+msgstr "ångrar radering av %s\n"
 
 #, python-format
 msgid "saving current version of %s as %s\n"
-msgstr ""
+msgstr "sparar nuvarande revision av %s som %s\n"
 
 #, python-format
 msgid "file not managed: %s\n"
-msgstr ""
+msgstr "filen hanteras inte: %s\n"
 
 #, python-format
 msgid "no changes needed to %s\n"
-msgstr ""
+msgstr "inga ändringar behövs för %s\n"
 
 msgid ""
 "roll back the last transaction\n"
@@ -6417,13 +6175,13 @@
 "    Transactions are used to encapsulate the effects of all commands\n"
 "    that create new changesets or propagate existing changesets into a\n"
 "    repository. For example, the following commands are transactional,\n"
-"    and their effects can be rolled back::\n"
-"\n"
-"      commit\n"
-"      import\n"
-"      pull\n"
-"      push (with this repository as destination)\n"
-"      unbundle\n"
+"    and their effects can be rolled back:\n"
+"\n"
+"    - commit\n"
+"    - import\n"
+"    - pull\n"
+"    - push (with this repository as destination)\n"
+"    - unbundle\n"
 "\n"
 "    This command is not intended for use on public repositories. Once\n"
 "    changes are visible for pull by other users, rolling a transaction\n"
@@ -6433,6 +6191,32 @@
 "    may fail if a rollback is performed.\n"
 "    "
 msgstr ""
+"återgång från den senaste transaktionen\n"
+"\n"
+"    Detta kommando bör användas med försiktighet. Det finns bara en nivå\n"
+"    av återgång, och det finns inget sätt att ångra en återgång.\n"
+"    Det återställer också katalogstatusen till tillståndet vid den\n"
+"    senaste transaktionen, så dessa förloras. Kommandot ändrar inte\n"
+"    arbetskatalogen.\n"
+"\n"
+"    Transaktioner används för att kapsla in alla kommandon som skapar nya\n"
+"    ändringar eller sprider existerade ändringar till ett arkiv.\n"
+"    Exempelvis skapar de följande kommandona transaktioner, och deras\n"
+"    ändringar kan återkallas:\n"
+"\n"
+"    - commit\n"
+"    - import\n"
+"    - pull\n"
+"    - push (med det här arkivet som destination)\n"
+"    - unbundle\n"
+"\n"
+"    Detta kommando är inte tänkt att användas i offentliga arkiv. När\n"
+"    ändringar är tillgängliga att dras av andra användare, så är en\n"
+"    lokal återgång ineffektivt (någon annan kan redan ha dragit\n"
+"    ändringarna). Dessutom finns möjligheten till timingproblem; som\n"
+"    ett exempel kan en pågående dragning misslyckas om en återgång\n"
+"    utförs.\n"
+"    "
 
 msgid ""
 "print the root (top) of the current working directory\n"
@@ -6440,6 +6224,10 @@
 "    Print the root directory of the current repository.\n"
 "    "
 msgstr ""
+"visa roten för den aktuella arbetskatalogen\n"
+"\n"
+"    Visa rotkatalogen för det aktuella arkivet.\n"
+"    "
 
 msgid ""
 "export the repository via HTTP\n"
@@ -6462,7 +6250,7 @@
 
 #, python-format
 msgid "listening at http://%s%s/%s (bound to %s:%d)\n"
-msgstr ""
+msgstr "lyssnar på http://%s%s/%s (bunden till %s:%d)\n"
 
 msgid ""
 "show changed files in the working directory\n"
@@ -6484,7 +6272,8 @@
 "\n"
 "    If one revision is given, it is used as the base revision.\n"
 "    If two revisions are given, the differences between them are\n"
-"    shown.\n"
+"    shown. The --change option can also be used as a shortcut to list\n"
+"    the changed files of a revision from its first parent.\n"
 "\n"
 "    The codes used to show the status of files are::\n"
 "\n"
@@ -6504,16 +6293,20 @@
 "    matchar. FIler som är rena eller ignorerade eller källan för en flytt-\n"
 "    eller kopieringsoperation, visas inte om förrän -c/--clean,\n"
 "    -i/--ignored, -C/--copies eller -A/--all anges. Om inte flaggor med\n"
-"    beskrivningen \"visa bara ...\" anges, används flaggorna -mardu.\n"
+"    beskrivningen \"visa bara ...\" anges, så används flaggorna -mardu.\n"
 "\n"
 "    Flaggan -q/--quiet döljer ospårade (okända och ignorerade) filer om det\n"
 "    inte bes om explicit med -u/--unknown eller -i/--ignored.\n"
 "\n"
-"    NOTERA: status kan verka osams med diff om tillstånd har ändrat eller "
-"en\n"
-"    sammanfogning har utförts. Det vanliga diff-formatet rapporterar inte\n"
-"    förändringar av tillstånd och diff rapporterar bara ändringar relativt\n"
-"    till en förälder vid sammanfogningar.\n"
+"    NOTERA: status kan verka osams med diff om tillstånd har ändrat eller\n"
+"    en sammanfogning har utförts. Det vanliga diff-formatet rapporterar\n"
+"    inte förändringar av tillstånd och diff rapporterar bara ändringar\n"
+"    relativt till en förälder vid sammanfogningar.\n"
+"\n"
+"    Om en revision anges, används den som basrevision. Om två revisioner\n"
+"    anges, visas skillnaderna mellan dem. Flaggan --change kan också\n"
+"    användas som en genväg för att visa de ändrade filerna i en revision\n"
+"    från dess första förälder.\n"
 "\n"
 "    Koderna som används för att visa filstatus är::\n"
 "\n"
@@ -6650,32 +6443,51 @@
 "    See 'hg help dates' for a list of formats valid for -d/--date.\n"
 "    "
 msgstr ""
+"lägg till en eller fler märken för en revision\n"
+"\n"
+"    Namnge en specifik revision med <namn>.\n"
+"\n"
+"    Märken används för att namnge specifika revisioner i arkivet och är\n"
+"    väldigt användbara för at jämföra olika revisioner, för att gå\n"
+"    tillbaka till tidigare versioner eller för att markera förgreningar\n"
+"    som releaser, osv.\n"
+"\n"
+"    Om ingen revision anges, används föräldern för arbetskatalogen, eller\n"
+"    toppen om ingen revision är uthämtad.\n"
+"\n"
+"    För att underlätta versionshantering, distribution, och sammanfogning\n"
+"    av märken, lagras de som en fil vid namn \".hgtags\" som hanteras på\n"
+"    samma sätt som andra projektfiler och kan ändras för hand vid behov.\n"
+"    Filen '.hg/localtags' används för lokala märken (ej delad i arkiv).\n"
+"\n"
+"    Se 'hg help dates' för en lista med giltiga format för -d/--date.\n"
+"    "
 
 msgid "tag names must be unique"
-msgstr ""
+msgstr "märkesnamn måste vara unika"
 
 #, python-format
 msgid "the name '%s' is reserved"
-msgstr ""
+msgstr "namnet '%s' är reserverat"
 
 msgid "--rev and --remove are incompatible"
-msgstr ""
+msgstr "--rev och --remove är inkompatibla"
 
 #, python-format
 msgid "tag '%s' does not exist"
-msgstr ""
+msgstr "märket '%s' existerar inte"
 
 #, python-format
 msgid "tag '%s' is not a global tag"
-msgstr ""
+msgstr "märket '%s' är inte ett globalt märke"
 
 #, python-format
 msgid "tag '%s' is not a local tag"
-msgstr ""
+msgstr "märket '%s' är inte ett lokalt märke"
 
 #, python-format
 msgid "tag '%s' already exists (use -f to force)"
-msgstr ""
+msgstr "märket '%s' existerar redan (använd -f för att tvinga)"
 
 msgid ""
 "list repository tags\n"
@@ -6684,6 +6496,11 @@
 "    switch is used, a third column \"local\" is printed for local tags.\n"
 "    "
 msgstr ""
+"lista arkivmärken\n"
+"\n"
+"    Listar både vanliga och lokala märken. När flaggan -v/--verbose\n"
+"    används, visas en tredje kolumn med namnet \"local\" för lokala märken.\n"
+"    "
 
 msgid ""
 "show the tip revision\n"
@@ -6698,6 +6515,16 @@
 "    and cannot be renamed or assigned to a different changeset.\n"
 "    "
 msgstr ""
+"visa topprevisionen\n"
+"\n"
+"    Topprevisionen (kallas tip av Mercurial) är den senast tillagda\n"
+"    ändringen i arkivet (och därför det senast tillagda huvudet).\n"
+"\n"
+"    Om du precis har gjort en arkivering, kommer den att vara toppen. Om\n"
+"    du har dragit ändringar från ett annat arkiv, så blir toppen för det\n"
+"    arkivet den aktuella toppen. Märket \"tip\" är speciellt och kan inte\n"
+"    döpas om eller tilldelas en annan ändring.\n"
+"    "
 
 msgid ""
 "apply one or more changegroup files\n"
@@ -6706,6 +6533,11 @@
 "    bundle command.\n"
 "    "
 msgstr ""
+"applicera en eller flera filer med ändringar\n"
+"\n"
+"    Applicera en eller flera komprimerade filer med ändringar genererade\n"
+"    av bundle-kommandot.\n"
+"    "
 
 msgid ""
 "update working directory\n"
@@ -6720,13 +6552,13 @@
 "    The following rules apply when the working directory contains\n"
 "    uncommitted changes:\n"
 "\n"
-"    1. If neither -c/--check nor -C/--clean is specified, uncommitted\n"
-"       changes are merged into the requested changeset, and the merged "
-"result\n"
-"       is left uncommitted. Updating and merging will occur only if the\n"
-"       requested changeset is an ancestor or descendant of the parent\n"
-"       changeset. Otherwise, the update is aborted and the uncommitted "
-"changes\n"
+"    1. If neither -c/--check nor -C/--clean is specified, and if\n"
+"       the requested changeset is an ancestor or descendant of\n"
+"       the working directory's parent, the uncommitted changes\n"
+"       are merged into the requested changeset and the merged\n"
+"       result is left uncommitted. If the requested changeset is\n"
+"       not an ancestor or descendant (that is, it is on another\n"
+"       branch), the update is aborted and the uncommitted changes\n"
 "       are preserved.\n"
 "\n"
 "    2. With the -c/--check option, the update is aborted and the\n"
@@ -6755,12 +6587,13 @@
 "    Följande regler gäller när arbetskatalogen innehåller oarkiverade\n"
 "    ändringar:\n"
 "\n"
-"    1. Om varken -c/--check eller -C/--clean specificeras, kommer\n"
-"       oarkiverade ändringar att sammanfogas med den begärda ändringen,\n"
-"       och det sammanfogade resultatet lämnas oarkiverat. Uppdatering och\n"
-"       sammanfogning kommer bara att göras om den begärda ändringen är en\n"
-"       anfader eller ättling till föräldraändringen. Om inte, avbryts\n"
-"       uppdateringen och de oarkiverade ändringarna lämnas.\n"
+"    1. Om varken -c/--check eller -C/--clean specificeras, och om den\n"
+"       begärda ändringen är en anfader eller ättling till arbetskatalogens\n"
+"       förälder, kommer oarkiverade ändringar att sammanfogas med den\n"
+"       begärda ändringen och det sammanfogade resultatet lämnas oarkiverat.\n"
+"       Om den begärda ändringen inte är en anfader eller ättling (dvs är i\n"
+"       en annan gren), avbryts uppdateringen och de oarkiverade ändringarna\n"
+"       bevaras.\n"
 "\n"
 "    2. Med flaggan -c/--check avbryts uppdateringen och de oarkiverade\n"
 "       ändringarna lämnas.\n"
@@ -6794,13 +6627,21 @@
 "    integrity of their crosslinks and indices.\n"
 "    "
 msgstr ""
+"verifiera arkivets integritet\n"
+"\n"
+"    Verifiera det aktuella arkivets integritet.\n"
+"\n"
+"    Detta genomför en omfattande kontroll av arkivets integritet, validerar\n"
+"    hash- och checksummor för varje notering i ändringsloggen, manifestet,\n"
+"    och spårade filer, såväl som integriteten av korslänkar och indexar.\n"
+"    "
 
 msgid "output version and copyright information"
-msgstr ""
+msgstr "visa version och copyright-information"
 
 #, python-format
 msgid "Mercurial Distributed SCM (version %s)\n"
-msgstr ""
+msgstr "Mercurial Distribuerad SCM (version %s)\n"
 
 msgid ""
 "\n"
@@ -6808,6 +6649,10 @@
 "This is free software; see the source for copying conditions. There is NO\n"
 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
 msgstr ""
+"\n"
+"Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> och andra\n"
+"Detta är fri mjukvara; se källkoden för kopieringsvillkor. Det ges INGEN\n"
+"garanti; inte ens för SÄLJBARHET eller ATT PASSA FÖR ETT VISST ÄNDAMÅL.\n"
 
 msgid "repository root directory or name of overlay bundle file"
 msgstr "arkivrotkatalog eller namn på påläggsbuntfil"
@@ -6918,7 +6763,7 @@
 msgstr "visa sammanfattning av ändringar i diffstat-stil"
 
 msgid "guess renamed files by similarity (0<=s<=100)"
-msgstr ""
+msgstr "gissa omdöpta filer efter likhet (0<=s<=100)"
 
 msgid "[OPTION]... [FILE]..."
 msgstr "[FLAGGA]... [FIL]..."
@@ -6948,31 +6793,31 @@
 msgstr "[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FIL..."
 
 msgid "do not pass files through decoders"
-msgstr ""
+msgstr "passera inte filer genom dekoders"
 
 msgid "directory prefix for files in archive"
-msgstr ""
+msgstr "katalogprefix för filer i arkiv"
 
 msgid "revision to distribute"
-msgstr ""
+msgstr "revision att distribuera"
 
 msgid "type of distribution to create"
-msgstr ""
+msgstr "distributionstyp att skapa"
 
 msgid "[OPTION]... DEST"
-msgstr ""
+msgstr "[FLAGGA]... DEST"
 
 msgid "merge with old dirstate parent after backout"
-msgstr ""
+msgstr "sammanfoga med gamla dirstate-föräldern efter återkallning"
 
 msgid "parent to choose when backing out merge"
-msgstr ""
+msgstr "förälder att välja när en sammanfogning återkallas"
 
 msgid "revision to backout"
-msgstr ""
+msgstr "revision att återkalla"
 
 msgid "[OPTION]... [-r] REV"
-msgstr ""
+msgstr "[FLAGGA]... [-r] REV"
 
 msgid "reset bisect state"
 msgstr ""
@@ -6992,8 +6837,8 @@
 msgid "do not update to target"
 msgstr ""
 
-msgid "[-gbsr] [-c CMD] [REV]"
-msgstr ""
+msgid "[-gbsr] [-U] [-c CMD] [REV]"
+msgstr "[-gbsr] [-U] [-c KMD] [REV]"
 
 msgid "set branch name even if it shadows an existing branch"
 msgstr ""
@@ -7010,8 +6855,8 @@
 msgid "show normal and closed branches"
 msgstr ""
 
-msgid "[-a]"
-msgstr ""
+msgid "[-ac]"
+msgstr "[-ac]"
 
 msgid "run even when remote repository is unrelated"
 msgstr "kör även när fjärrarkivet är orelaterat"
@@ -7028,8 +6873,8 @@
 msgid "bundle compression type to use"
 msgstr ""
 
-msgid "[-f] [-a] [-r REV]... [--base REV]... FILE [DEST]"
-msgstr ""
+msgid "[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]"
+msgstr "[-f] [-t TYP] [-a] [-r REV]... [--base REV]... FIL [DEST]"
 
 msgid "print output to file with formatted name"
 msgstr "skriv utmatning till fil med formatterat namn"
@@ -7049,8 +6894,8 @@
 msgid "revision, tag or branch to check out"
 msgstr "revision, märke eller gren att hämta ut"
 
-msgid "a changeset you would like to have after cloning"
-msgstr "en ändring du skulle vilja ha efter kloning"
+msgid "clone only the specified revisions and ancestors"
+msgstr "klona bara specificerade revisioner och anfäder"
 
 msgid "[OPTION]... SOURCE [DEST]"
 msgstr "[FLAGGA]... KÄLLA [DEST]"
@@ -7065,10 +6910,10 @@
 msgstr ""
 
 msgid "forcibly copy over an existing managed file"
-msgstr ""
+msgstr "tvinga kopiering över en eixsterande hanterad fil"
 
 msgid "[OPTION]... [SOURCE]... DEST"
-msgstr ""
+msgstr "[FLAGGA]... [KÄLLA]... DEST"
 
 msgid "[INDEX] REV1 REV2"
 msgstr ""
@@ -7127,6 +6972,9 @@
 msgid "diff against the second parent"
 msgstr "diffa mot den andra föräldern"
 
+msgid "revisions to export"
+msgstr "revisioner att exportera"
+
 msgid "[OPTION]... [-o OUTFILESPEC] REV..."
 msgstr "[FLAGGA]... [-o UTFILSPEC] REV..."
 
@@ -7164,8 +7012,8 @@
 msgid "show normal and closed branch heads"
 msgstr ""
 
-msgid "[-r STARTREV] [REV]..."
-msgstr ""
+msgid "[-ac] [-r STARTREV] [REV]..."
+msgstr "[-ac] [-r STARTREV] [REV]..."
 
 msgid "[TOPIC]"
 msgstr "[ÄMNE]"
@@ -7212,7 +7060,7 @@
 msgstr ""
 
 msgid "show newest record first"
-msgstr ""
+msgstr "visa nyaste saken först"
 
 msgid "file to store the bundles into"
 msgstr ""
@@ -7266,13 +7114,13 @@
 msgstr "visa inte revision eller någon av dess föräldrar"
 
 msgid "[OPTION]... [FILE]"
-msgstr ""
+msgstr "[FLAGGA]... [FIL]"
 
 msgid "revision to display"
-msgstr ""
+msgstr "revision att visa"
 
 msgid "[-r REV]"
-msgstr ""
+msgstr "[-r REV]"
 
 msgid "force a merge with outstanding changes"
 msgstr "tvinga en sammanfogning med utestående ändringar"
@@ -7283,14 +7131,14 @@
 msgid "review revisions to merge (no merge is performed)"
 msgstr "granska revisioner att sammanfoga (ingen sammanfogning utförs)"
 
-msgid "[-f] [[-r] REV]"
-msgstr "[-f] [[-r] REV]"
+msgid "[-P] [-f] [[-r] REV]"
+msgstr "[-P] [-f] [[-r] REV]"
 
 msgid "a specific revision up to which you would like to push"
 msgstr "en specifik revision upp till vilken du vill trycka"
 
 msgid "[-M] [-p] [-n] [-f] [-r REV]... [DEST]"
-msgstr ""
+msgstr "[-M] [-p] [-n] [-f] [-r REV]... [DEST]"
 
 msgid "show parents from the specified revision"
 msgstr "visa föräldrar från den angivna revisionen"
@@ -7299,10 +7147,10 @@
 msgstr "[-r REV] [FIL]"
 
 msgid "[NAME]"
-msgstr ""
-
-msgid "update to new tip if changesets were pulled"
-msgstr "uppdatera till ny topp om ändringar drogs"
+msgstr "[NAMN]"
+
+msgid "update to new branch head if changesets were pulled"
+msgstr "uppdatera till nytt grenhuvud om ändringar drogs"
 
 msgid "[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]"
 msgstr "[-u] [-f] [-r REV]... [-e KMD] [--remotecmd KMD] [KÄLLA]"
@@ -7320,40 +7168,40 @@
 msgstr "radera (och ta bort) filer även om tillagda eller modifierade"
 
 msgid "record a rename that has already occurred"
-msgstr ""
+msgstr "spara en namnändring som redan har inträffat"
 
 msgid "[OPTION]... SOURCE... DEST"
-msgstr ""
+msgstr "[FLAGGA]... KÄLLA... DEST"
 
 msgid "select all unresolved files"
 msgstr "välj alla olösta filer"
 
 msgid "list state of files needing merge"
-msgstr ""
+msgstr "visa status för filer som behöver sammanfogas"
 
 msgid "mark files as resolved"
-msgstr ""
+msgstr "markera filen som löst"
 
 msgid "unmark files as resolved"
-msgstr ""
+msgstr "avmarkera filen som löst"
 
 msgid "hide status prefix"
 msgstr "göm statusprefix"
 
 msgid "revert all changes when no arguments given"
-msgstr ""
+msgstr "återställ alla ändringar när inga argument ges"
 
 msgid "tipmost revision matching date"
 msgstr "senaste revision matchande datum"
 
 msgid "revision to revert to"
-msgstr ""
+msgstr "revision att revertera till"
 
 msgid "do not save backup copies of files"
-msgstr ""
+msgstr "spara inte backup-kopior av filer"
 
 msgid "[OPTION]... [-r REV] [NAME]..."
-msgstr ""
+msgstr "[FLAGGA]... [-r REV] [NAMN]..."
 
 msgid "name of access log file to write to"
 msgstr "namn på åtkomstlogg att skriva till"
@@ -7392,10 +7240,10 @@
 msgstr "SSL-certifikatsfil"
 
 msgid "show untrusted configuration options"
-msgstr ""
+msgstr "visa opålitliga konfigurationsalternativ"
 
 msgid "[-u] [NAME]..."
-msgstr ""
+msgstr "[-u] [NAMN]..."
 
 msgid "check for push and pull"
 msgstr "sök efter inkommande och utgående ändringar"
@@ -7430,29 +7278,32 @@
 msgid "show difference from revision"
 msgstr "visa differens från revision"
 
+msgid "list the changed files of a revision"
+msgstr "visa de ändrade filerna från en revision"
+
 msgid "replace existing tag"
-msgstr ""
+msgstr "ersätt existerande märke"
 
 msgid "make the tag local"
-msgstr ""
+msgstr "gör märket lokalt"
 
 msgid "revision to tag"
-msgstr ""
+msgstr "revision att märka"
 
 msgid "remove a tag"
-msgstr ""
-
-msgid "[-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME..."
-msgstr ""
-
-msgid "[-p]"
-msgstr ""
-
-msgid "update to new tip if changesets were unbundled"
-msgstr ""
+msgstr "ta bort ett märke"
+
+msgid "[-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME..."
+msgstr "[-f] [-l] [-m TEXT] [-d DATUM] [-u ANVÄNDARE] [-r REV] NAMN..."
+
+msgid "[-p] [-g]"
+msgstr "[-p] [-g]"
+
+msgid "update to new branch head if changesets were unbundled"
+msgstr "uppdatera till nytt grenhuvud om ändringrs packades upp"
 
 msgid "[-u] FILE..."
-msgstr ""
+msgstr "[-u] FIL..."
 
 msgid "discard uncommitted changes (no backup)"
 msgstr "kassera oarkiverade ändringar (ingen backup)"
@@ -7464,6 +7315,10 @@
 msgstr "[-c] [-C] [-d DATUM] [[-r] REV]"
 
 #, python-format
+msgid "config error at %s:%d: cannot include %s (%s)"
+msgstr ""
+
+#, python-format
 msgid "config error at %s:%d: '%s'"
 msgstr ""
 
@@ -7516,7 +7371,7 @@
 
 #, python-format
 msgid "abort: %s\n"
-msgstr ""
+msgstr "avbryter: %s\n"
 
 #, python-format
 msgid "hg: %s\n"
@@ -7616,6 +7471,16 @@
 msgstr ""
 
 #, python-format
+msgid ""
+"alias for: hg %s\n"
+"\n"
+"%s"
+msgstr ""
+"alias för: hg %s\n"
+"\n"
+"%s"
+
+#, python-format
 msgid "alias '%s' resolves to unknown command '%s'\n"
 msgstr ""
 
@@ -7624,7 +7489,7 @@
 msgstr ""
 
 #, python-format
-msgid "malformed --config option: %s"
+msgid "malformed --config option: %r (use --config section.name=value)"
 msgstr ""
 
 #, python-format
@@ -7734,7 +7599,7 @@
 msgstr ""
 
 msgid "Configuration Files"
-msgstr ""
+msgstr "Konfigurationsfiler"
 
 msgid "Date Formats"
 msgstr ""
@@ -7763,6 +7628,579 @@
 msgid "Using additional features"
 msgstr ""
 
+msgid ""
+"Mercurial reads configuration data from several files, if they exist.\n"
+"Below we list the most specific file first.\n"
+"\n"
+"On Windows, these configuration files are read:\n"
+"\n"
+"- ``<repo>\\.hg\\hgrc``\n"
+"- ``%USERPROFILE%\\.hgrc``\n"
+"- ``%USERPROFILE%\\Mercurial.ini``\n"
+"- ``%HOME%\\.hgrc``\n"
+"- ``%HOME%\\Mercurial.ini``\n"
+"- ``C:\\Mercurial\\Mercurial.ini``\n"
+"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
+"- ``<install-dir>\\Mercurial.ini``\n"
+"\n"
+"On Unix, these files are read:\n"
+"\n"
+"- ``<repo>/.hg/hgrc``\n"
+"- ``$HOME/.hgrc``\n"
+"- ``/etc/mercurial/hgrc``\n"
+"- ``/etc/mercurial/hgrc.d/*.rc``\n"
+"- ``<install-root>/etc/mercurial/hgrc``\n"
+"- ``<install-root>/etc/mercurial/hgrc.d/*.rc``\n"
+"\n"
+"The configuration files for Mercurial use a simple ini-file format. A\n"
+"configuration file consists of sections, led by a ``[section]`` header\n"
+"and followed by ``name = value`` entries::\n"
+"\n"
+"  [ui]\n"
+"  username = Firstname Lastname <firstname.lastname@example.net>\n"
+"  verbose = True\n"
+"\n"
+"This above entries will be referred to as ``ui.username`` and\n"
+"``ui.verbose``, respectively. Please see the hgrc man page for a full\n"
+"description of the possible configuration values:\n"
+"\n"
+"- on Unix-like systems: ``man hgrc``\n"
+"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
+msgstr ""
+"Mercurial läser konfigurationsdata från flera filer, om de existerar.\n"
+"Nedan listar vi den mest specifika filen först.\n"
+"\n"
+"Under Windows läses dessa konfigurationsfiler:\n"
+"\n"
+"- ``<arkiv>\\.hg\\hgrc``\n"
+"- ``%USERPROFILE%\\.hgrc``\n"
+"- ``%USERPROFILE%\\Mercurial.ini``\n"
+"- ``%HOME%\\.hgrc``\n"
+"- ``%HOME%\\Mercurial.ini``\n"
+"- ``C:\\Mercurial\\Mercurial.ini``\n"
+"- ``HKEY_LOCAL_MACHINE\\SOFTWARE\\Mercurial``\n"
+"- ``<installationskatalog>\\Mercurial.ini``\n"
+"\n"
+"Under Unix läses dessa filer:\n"
+"\n"
+"- ``<arkiv>/.hg/hgrc``\n"
+"- ``$HOME/.hgrc``\n"
+"- ``/etc/mercurial/hgrc``\n"
+"- ``/etc/mercurial/hgrc.d/*.rc``\n"
+"- ``<installationsrot>/etc/mercurial/hgrc``\n"
+"- ``<installationsrot>/etc/mercurial/hgrc.d/*.rc``\n"
+"\n"
+"Konfigurationsfilerna för Mercurial använder ett enkelt ini-filformat. En\n"
+"file består av sektioner, som inleds av en rubrik (ex ``[sektion]``) och\n"
+"följs av rader med ``namn = värde``::\n"
+"\n"
+"  [ui]\n"
+"  username = Förnamn Efternamn <fornamn.efternamn@example.net>\n"
+"  verbose = True\n"
+"\n"
+"Raderna ovanför refereras till som ``ui.username`` och\n"
+"``ui.verbose``. Läs man-sidan för hgrc för en full beskrivning av alla\n"
+"möjliga konfigurationsvärden:\n"
+"\n"
+"- under Unix-liknande system: ``man hgrc``\n"
+"- online: http://www.selenic.com/mercurial/hgrc.5.html\n"
+
+msgid ""
+"Some commands allow the user to specify a date, e.g.:\n"
+"\n"
+"- backout, commit, import, tag: Specify the commit date.\n"
+"- log, revert, update: Select revision(s) by date.\n"
+"\n"
+"Many date formats are valid. Here are some examples:\n"
+"\n"
+"- ``Wed Dec 6 13:18:29 2006`` (local timezone assumed)\n"
+"- ``Dec 6 13:18 -0600`` (year assumed, time offset provided)\n"
+"- ``Dec 6 13:18 UTC`` (UTC and GMT are aliases for +0000)\n"
+"- ``Dec 6`` (midnight)\n"
+"- ``13:18`` (today assumed)\n"
+"- ``3:39`` (3:39AM assumed)\n"
+"- ``3:39pm`` (15:39)\n"
+"- ``2006-12-06 13:18:29`` (ISO 8601 format)\n"
+"- ``2006-12-6 13:18``\n"
+"- ``2006-12-6``\n"
+"- ``12-6``\n"
+"- ``12/6``\n"
+"- ``12/6/6`` (Dec 6 2006)\n"
+"\n"
+"Lastly, there is Mercurial's internal format:\n"
+"\n"
+"- ``1165432709 0`` (Wed Dec 6 13:18:29 2006 UTC)\n"
+"\n"
+"This is the internal representation format for dates. unixtime is the\n"
+"number of seconds since the epoch (1970-01-01 00:00 UTC). offset is\n"
+"the offset of the local timezone, in seconds west of UTC (negative if\n"
+"the timezone is east of UTC).\n"
+"\n"
+"The log command also accepts date ranges:\n"
+"\n"
+"- ``<{datetime}`` - at or before a given date/time\n"
+"- ``>{datetime}`` - on or after a given date/time\n"
+"- ``{datetime} to {datetime}`` - a date range, inclusive\n"
+"- ``-{days}`` - within a given number of days of today\n"
+msgstr ""
+
+msgid ""
+"Mercurial's default format for showing changes between two versions of\n"
+"a file is compatible with the unified format of GNU diff, which can be\n"
+"used by GNU patch and many other standard tools.\n"
+"\n"
+"While this standard format is often enough, it does not encode the\n"
+"following information:\n"
+"\n"
+"- executable status and other permission bits\n"
+"- copy or rename information\n"
+"- changes in binary files\n"
+"- creation or deletion of empty files\n"
+"\n"
+"Mercurial also supports the extended diff format from the git VCS\n"
+"which addresses these limitations. The git diff format is not produced\n"
+"by default because a few widespread tools still do not understand this\n"
+"format.\n"
+"\n"
+"This means that when generating diffs from a Mercurial repository\n"
+"(e.g. with \"hg export\"), you should be careful about things like file\n"
+"copies and renames or other things mentioned above, because when\n"
+"applying a standard diff to a different repository, this extra\n"
+"information is lost. Mercurial's internal operations (like push and\n"
+"pull) are not affected by this, because they use an internal binary\n"
+"format for communicating changes.\n"
+"\n"
+"To make Mercurial produce the git extended diff format, use the --git\n"
+"option available for many commands, or set 'git = True' in the [diff]\n"
+"section of your hgrc. You do not need to set this option when\n"
+"importing diffs in this format or using them in the mq extension.\n"
+msgstr ""
+
+msgid ""
+"HG\n"
+"    Path to the 'hg' executable, automatically passed when running\n"
+"    hooks, extensions or external tools. If unset or empty, this is\n"
+"    the hg executable's name if it's frozen, or an executable named\n"
+"    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on\n"
+"    Windows) is searched.\n"
+"\n"
+"HGEDITOR\n"
+"    This is the name of the editor to run when committing. See EDITOR.\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"HGENCODING\n"
+"    This overrides the default locale setting detected by Mercurial.\n"
+"    This setting is used to convert data including usernames,\n"
+"    changeset descriptions, tag names, and branches. This setting can\n"
+"    be overridden with the --encoding command-line option.\n"
+"\n"
+"HGENCODINGMODE\n"
+"    This sets Mercurial's behavior for handling unknown characters\n"
+"    while transcoding user input. The default is \"strict\", which\n"
+"    causes Mercurial to abort if it can't map a character. Other\n"
+"    settings include \"replace\", which replaces unknown characters, and\n"
+"    \"ignore\", which drops them. This setting can be overridden with\n"
+"    the --encodingmode command-line option.\n"
+"\n"
+"HGMERGE\n"
+"    An executable to use for resolving merge conflicts. The program\n"
+"    will be executed with three arguments: local file, remote file,\n"
+"    ancestor file.\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"HGRCPATH\n"
+"    A list of files or directories to search for hgrc files. Item\n"
+"    separator is \":\" on Unix, \";\" on Windows. If HGRCPATH is not set,\n"
+"    platform default search path is used. If empty, only the .hg/hgrc\n"
+"    from the current repository is read.\n"
+"\n"
+"    For each element in HGRCPATH:\n"
+"\n"
+"    - if it's a directory, all files ending with .rc are added\n"
+"    - otherwise, the file itself will be added\n"
+"\n"
+"HGUSER\n"
+"    This is the string used as the author of a commit. If not set,\n"
+"    available values will be considered in this order:\n"
+"\n"
+"    - HGUSER (deprecated)\n"
+"    - hgrc files from the HGRCPATH\n"
+"    - EMAIL\n"
+"    - interactive prompt\n"
+"    - LOGNAME (with ``@hostname`` appended)\n"
+"\n"
+"    (deprecated, use .hgrc)\n"
+"\n"
+"EMAIL\n"
+"    May be used as the author of a commit; see HGUSER.\n"
+"\n"
+"LOGNAME\n"
+"    May be used as the author of a commit; see HGUSER.\n"
+"\n"
+"VISUAL\n"
+"    This is the name of the editor to use when committing. See EDITOR.\n"
+"\n"
+"EDITOR\n"
+"    Sometimes Mercurial needs to open a text file in an editor for a\n"
+"    user to modify, for example when writing commit messages. The\n"
+"    editor it uses is determined by looking at the environment\n"
+"    variables HGEDITOR, VISUAL and EDITOR, in that order. The first\n"
+"    non-empty one is chosen. If all of them are empty, the editor\n"
+"    defaults to 'vi'.\n"
+"\n"
+"PYTHONPATH\n"
+"    This is used by Python to find imported modules and may need to be\n"
+"    set appropriately if this Mercurial is not installed system-wide.\n"
+msgstr ""
+
+msgid ""
+"Mercurial has the ability to add new features through the use of\n"
+"extensions. Extensions may add new commands, add options to\n"
+"existing commands, change the default behavior of commands, or\n"
+"implement hooks.\n"
+"\n"
+"Extensions are not loaded by default for a variety of reasons:\n"
+"they can increase startup overhead; they may be meant for advanced\n"
+"usage only; they may provide potentially dangerous abilities (such\n"
+"as letting you destroy or modify history); they might not be ready\n"
+"for prime time; or they may alter some usual behaviors of stock\n"
+"Mercurial. It is thus up to the user to activate extensions as\n"
+"needed.\n"
+"\n"
+"To enable the \"foo\" extension, either shipped with Mercurial or in\n"
+"the Python search path, create an entry for it in your hgrc, like\n"
+"this::\n"
+"\n"
+"  [extensions]\n"
+"  foo =\n"
+"\n"
+"You may also specify the full path to an extension::\n"
+"\n"
+"  [extensions]\n"
+"  myfeature = ~/.hgext/myfeature.py\n"
+"\n"
+"To explicitly disable an extension enabled in an hgrc of broader\n"
+"scope, prepend its path with !::\n"
+"\n"
+"  [extensions]\n"
+"  # disabling extension bar residing in /path/to/extension/bar.py\n"
+"  bar = !/path/to/extension/bar.py\n"
+"  # ditto, but no path was supplied for extension baz\n"
+"  baz = !\n"
+msgstr ""
+
+msgid ""
+"When Mercurial accepts more than one revision, they may be specified\n"
+"individually, or provided as a topologically continuous range,\n"
+"separated by the \":\" character.\n"
+"\n"
+"The syntax of range notation is [BEGIN]:[END], where BEGIN and END are\n"
+"revision identifiers. Both BEGIN and END are optional. If BEGIN is not\n"
+"specified, it defaults to revision number 0. If END is not specified,\n"
+"it defaults to the tip. The range \":\" thus means \"all revisions\".\n"
+"\n"
+"If BEGIN is greater than END, revisions are treated in reverse order.\n"
+"\n"
+"A range acts as a closed interval. This means that a range of 3:5\n"
+"gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.\n"
+msgstr ""
+
+msgid ""
+"Mercurial accepts several notations for identifying one or more files\n"
+"at a time.\n"
+"\n"
+"By default, Mercurial treats filenames as shell-style extended glob\n"
+"patterns.\n"
+"\n"
+"Alternate pattern notations must be specified explicitly.\n"
+"\n"
+"To use a plain path name without any pattern matching, start it with\n"
+"``path:``. These path names must completely match starting at the\n"
+"current repository root.\n"
+"\n"
+"To use an extended glob, start a name with ``glob:``. Globs are rooted\n"
+"at the current directory; a glob such as ``*.c`` will only match files\n"
+"in the current directory ending with ``.c``.\n"
+"\n"
+"The supported glob syntax extensions are ``**`` to match any string\n"
+"across path separators and ``{a,b}`` to mean \"a or b\".\n"
+"\n"
+"To use a Perl/Python regular expression, start a name with ``re:``.\n"
+"Regexp pattern matching is anchored at the root of the repository.\n"
+"\n"
+"Plain examples::\n"
+"\n"
+"  path:foo/bar   a name bar in a directory named foo in the root\n"
+"                 of the repository\n"
+"  path:path:name a file or directory named \"path:name\"\n"
+"\n"
+"Glob examples::\n"
+"\n"
+"  glob:*.c       any name ending in \".c\" in the current directory\n"
+"  *.c            any name ending in \".c\" in the current directory\n"
+"  **.c           any name ending in \".c\" in any subdirectory of the\n"
+"                 current directory including itself.\n"
+"  foo/*.c        any name ending in \".c\" in the directory foo\n"
+"  foo/**.c       any name ending in \".c\" in any subdirectory of foo\n"
+"                 including itself.\n"
+"\n"
+"Regexp examples::\n"
+"\n"
+"  re:.*\\.c$      any name ending in \".c\", anywhere in the repository\n"
+msgstr ""
+
+msgid ""
+"Mercurial supports several ways to specify individual revisions.\n"
+"\n"
+"A plain integer is treated as a revision number. Negative integers are\n"
+"treated as sequential offsets from the tip, with -1 denoting the tip,\n"
+"-2 denoting the revision prior to the tip, and so forth.\n"
+"\n"
+"A 40-digit hexadecimal string is treated as a unique revision\n"
+"identifier.\n"
+"\n"
+"A hexadecimal string less than 40 characters long is treated as a\n"
+"unique revision identifier and is referred to as a short-form\n"
+"identifier. A short-form identifier is only valid if it is the prefix\n"
+"of exactly one full-length identifier.\n"
+"\n"
+"Any other string is treated as a tag or branch name. A tag name is a\n"
+"symbolic name associated with a revision identifier. A branch name\n"
+"denotes the tipmost revision of that branch. Tag and branch names must\n"
+"not contain the \":\" character.\n"
+"\n"
+"The reserved name \"tip\" is a special tag that always identifies the\n"
+"most recent revision.\n"
+"\n"
+"The reserved name \"null\" indicates the null revision. This is the\n"
+"revision of an empty repository, and the parent of revision 0.\n"
+"\n"
+"The reserved name \".\" indicates the working directory parent. If no\n"
+"working directory is checked out, it is equivalent to null. If an\n"
+"uncommitted merge is in progress, \".\" is the revision of the first\n"
+"parent.\n"
+msgstr ""
+
+msgid ""
+"Mercurial allows you to customize output of commands through\n"
+"templates. You can either pass in a template from the command\n"
+"line, via the --template option, or select an existing\n"
+"template-style (--style).\n"
+"\n"
+"You can customize output for any \"log-like\" command: log,\n"
+"outgoing, incoming, tip, parents, heads and glog.\n"
+"\n"
+"Three styles are packaged with Mercurial: default (the style used\n"
+"when no explicit preference is passed), compact and changelog.\n"
+"Usage::\n"
+"\n"
+"    $ hg log -r1 --style changelog\n"
+"\n"
+"A template is a piece of text, with markup to invoke variable\n"
+"expansion::\n"
+"\n"
+"    $ hg log -r1 --template \"{node}\\n\"\n"
+"    b56ce7b07c52de7d5fd79fb89701ea538af65746\n"
+"\n"
+"Strings in curly braces are called keywords. The availability of\n"
+"keywords depends on the exact context of the templater. These\n"
+"keywords are usually available for templating a log-like command:\n"
+"\n"
+":author: String. The unmodified author of the changeset.\n"
+"\n"
+":branches: String. The name of the branch on which the changeset was\n"
+"    committed. Will be empty if the branch name was default.\n"
+"\n"
+":date: Date information. The date when the changeset was committed.\n"
+"\n"
+":desc: String. The text of the changeset description.\n"
+"\n"
+":diffstat: String. Statistics of changes with the following format:\n"
+"    \"modified files: +added/-removed lines\"\n"
+"\n"
+":files: List of strings. All files modified, added, or removed by this\n"
+"    changeset.\n"
+"\n"
+":file_adds: List of strings. Files added by this changeset.\n"
+"\n"
+":file_copies: List of strings. Files copied in this changeset with\n"
+"    their sources.\n"
+"\n"
+":file_copies_switch: List of strings. Like \"file_copies\" but displayed\n"
+"    only if the --copied switch is set.\n"
+"\n"
+":file_mods: List of strings. Files modified by this changeset.\n"
+"\n"
+":file_dels: List of strings. Files removed by this changeset.\n"
+"\n"
+":node: String. The changeset identification hash, as a 40-character\n"
+"    hexadecimal string.\n"
+"\n"
+":parents: List of strings. The parents of the changeset.\n"
+"\n"
+":rev: Integer. The repository-local changeset revision number.\n"
+"\n"
+":tags: List of strings. Any tags associated with the changeset.\n"
+"\n"
+":latesttag: String. Most recent global tag in the ancestors of this\n"
+"    changeset.\n"
+"\n"
+":latesttagdistance: Integer. Longest path to the latest tag.\n"
+"\n"
+"The \"date\" keyword does not produce human-readable output. If you\n"
+"want to use a date in your output, you can use a filter to process\n"
+"it. Filters are functions which return a string based on the input\n"
+"variable. You can also use a chain of filters to get the desired\n"
+"output::\n"
+"\n"
+"   $ hg tip --template \"{date|isodate}\\n\"\n"
+"   2008-08-21 18:22 +0000\n"
+"\n"
+"List of filters:\n"
+"\n"
+":addbreaks: Any text. Add an XHTML \"<br />\" tag before the end of\n"
+"    every line except the last.\n"
+"\n"
+":age: Date. Returns a human-readable date/time difference between the\n"
+"    given date/time and the current date/time.\n"
+"\n"
+":basename: Any text. Treats the text as a path, and returns the last\n"
+"    component of the path after splitting by the path separator\n"
+"    (ignoring trailing separators). For example, \"foo/bar/baz\" becomes\n"
+"    \"baz\" and \"foo/bar//\" becomes \"bar\".\n"
+"\n"
+":stripdir: Treat the text as path and strip a directory level, if\n"
+"    possible. For example, \"foo\" and \"foo/bar\" becomes \"foo\".\n"
+"\n"
+":date: Date. Returns a date in a Unix date format, including the\n"
+"    timezone: \"Mon Sep 04 15:13:13 2006 0700\".\n"
+"\n"
+":domain: Any text. Finds the first string that looks like an email\n"
+"    address, and extracts just the domain component. Example: ``User\n"
+"    <user@example.com>`` becomes ``example.com``.\n"
+"\n"
+":email: Any text. Extracts the first string that looks like an email\n"
+"    address. Example: ``User <user@example.com>`` becomes\n"
+"    ``user@example.com``.\n"
+"\n"
+":escape: Any text. Replaces the special XML/XHTML characters \"&\", \"<\"\n"
+"    and \">\" with XML entities.\n"
+"\n"
+":fill68: Any text. Wraps the text to fit in 68 columns.\n"
+"\n"
+":fill76: Any text. Wraps the text to fit in 76 columns.\n"
+"\n"
+":firstline: Any text. Returns the first line of text.\n"
+"\n"
+":nonempty: Any text. Returns '(none)' if the string is empty.\n"
+"\n"
+":hgdate: Date. Returns the date as a pair of numbers: \"1157407993\n"
+"    25200\" (Unix timestamp, timezone offset).\n"
+"\n"
+":isodate: Date. Returns the date in ISO 8601 format: \"2009-08-18 13:00\n"
+"    +0200\".\n"
+"\n"
+":isodatesec: Date. Returns the date in ISO 8601 format, including\n"
+"    seconds: \"2009-08-18 13:00:13 +0200\". See also the rfc3339date\n"
+"    filter.\n"
+"\n"
+":localdate: Date. Converts a date to local date.\n"
+"\n"
+":obfuscate: Any text. Returns the input text rendered as a sequence of\n"
+"    XML entities.\n"
+"\n"
+":person: Any text. Returns the text before an email address.\n"
+"\n"
+":rfc822date: Date. Returns a date using the same format used in email\n"
+"    headers: \"Tue, 18 Aug 2009 13:00:13 +0200\".\n"
+"\n"
+":rfc3339date: Date. Returns a date using the Internet date format\n"
+"    specified in RFC 3339: \"2009-08-18T13:00:13+02:00\".\n"
+"\n"
+":short: Changeset hash. Returns the short form of a changeset hash,\n"
+"    i.e. a 12-byte hexadecimal string.\n"
+"\n"
+":shortdate: Date. Returns a date like \"2006-09-18\".\n"
+"\n"
+":strip: Any text. Strips all leading and trailing whitespace.\n"
+"\n"
+":tabindent: Any text. Returns the text, with every line except the\n"
+"     first starting with a tab character.\n"
+"\n"
+":urlescape: Any text. Escapes all \"special\" characters. For example,\n"
+"    \"foo bar\" becomes \"foo%20bar\".\n"
+"\n"
+":user: Any text. Returns the user portion of an email address.\n"
+msgstr ""
+
+msgid ""
+"Valid URLs are of the form::\n"
+"\n"
+"  local/filesystem/path[#revision]\n"
+"  file://local/filesystem/path[#revision]\n"
+"  http://[user[:pass]@]host[:port]/[path][#revision]\n"
+"  https://[user[:pass]@]host[:port]/[path][#revision]\n"
+"  ssh://[user[:pass]@]host[:port]/[path][#revision]\n"
+"\n"
+"Paths in the local filesystem can either point to Mercurial\n"
+"repositories or to bundle files (as created by 'hg bundle' or 'hg\n"
+"incoming --bundle').\n"
+"\n"
+"An optional identifier after # indicates a particular branch, tag, or\n"
+"changeset to use from the remote repository. See also 'hg help\n"
+"revisions'.\n"
+"\n"
+"Some features, such as pushing to http:// and https:// URLs are only\n"
+"possible if the feature is explicitly enabled on the remote Mercurial\n"
+"server.\n"
+"\n"
+"Some notes about using SSH with Mercurial:\n"
+"\n"
+"- SSH requires an accessible shell account on the destination machine\n"
+"  and a copy of hg in the remote path or specified with as remotecmd.\n"
+"- path is relative to the remote user's home directory by default. Use\n"
+"  an extra slash at the start of a path to specify an absolute path::\n"
+"\n"
+"    ssh://example.com//tmp/repository\n"
+"\n"
+"- Mercurial doesn't use its own compression via SSH; the right thing\n"
+"  to do is to configure it in your ~/.ssh/config, e.g.::\n"
+"\n"
+"    Host *.mylocalnetwork.example.com\n"
+"      Compression no\n"
+"    Host *\n"
+"      Compression yes\n"
+"\n"
+"  Alternatively specify \"ssh -C\" as your ssh command in your hgrc or\n"
+"  with the --ssh command line option.\n"
+"\n"
+"These URLs can all be stored in your hgrc with path aliases under the\n"
+"[paths] section like so::\n"
+"\n"
+"  [paths]\n"
+"  alias1 = URL1\n"
+"  alias2 = URL2\n"
+"  ...\n"
+"\n"
+"You can then use the alias for any command that uses a URL (for\n"
+"example 'hg pull alias1' will be treated as 'hg pull URL1').\n"
+"\n"
+"Two path aliases are special because they are used as defaults when\n"
+"you do not provide the URL to a command:\n"
+"\n"
+"default:\n"
+"  When you create a repository with hg clone, the clone command saves\n"
+"  the location of the source repository as the new repository's\n"
+"  'default' path. This is then used when you omit path from push- and\n"
+"  pull-like commands (including incoming and outgoing).\n"
+"\n"
+"default-push:\n"
+"  The push command will look for a path named 'default-push', and\n"
+"  prefer it over 'default' if both are defined.\n"
+msgstr ""
+
 msgid "can only share local repositories"
 msgstr ""
 
@@ -7834,6 +8272,12 @@
 msgid "%s hook is invalid (\"%s\" not in a module)"
 msgstr ""
 
+msgid "exception from first failed import attempt:\n"
+msgstr ""
+
+msgid "exception from second failed import attempt:\n"
+msgstr ""
+
 #, python-format
 msgid "%s hook is invalid (import of \"%s\" failed)"
 msgstr ""
@@ -7985,7 +8429,7 @@
 msgstr ""
 
 msgid "rolling back last transaction\n"
-msgstr ""
+msgstr "återkallar den senaste transaktionen\n"
 
 #, python-format
 msgid "Named branch could not be reset, current branch still is: %s\n"
@@ -8026,6 +8470,10 @@
 msgstr ""
 
 #, python-format
+msgid "note: commit message saved in %s\n"
+msgstr ""
+
+#, python-format
 msgid "trouble committing %s!\n"
 msgstr ""
 
@@ -8477,6 +8925,13 @@
 msgstr ""
 
 #, python-format
+msgid "subrepo spec file %s not found"
+msgstr ""
+
+msgid "missing ] in subrepo source"
+msgstr ""
+
+#, python-format
 msgid ""
 " subrepository sources for %s differ\n"
 "use (l)ocal source (%s) or (r)emote source (%s)?"
@@ -8498,6 +8953,10 @@
 msgstr ""
 
 #, python-format
+msgid "unknown subrepo type %s"
+msgstr ""
+
+#, python-format
 msgid "removing subrepo %s\n"
 msgstr ""
 
@@ -8510,6 +8969,10 @@
 msgstr ""
 
 #, python-format
+msgid "not removing repo %s because it has changes.\n"
+msgstr "raderar inte arkivet %s eftersom den har ändringar.\n"
+
+#, python-format
 msgid "%s, line %s: %s\n"
 msgstr ""
 
@@ -8579,7 +9042,7 @@
 msgstr ""
 
 msgid "no username supplied (see \"hg help config\")"
-msgstr ""
+msgstr "inget användarnamn angivet (se \"hg help config\")"
 
 #, python-format
 msgid "username %s contains a newline\n"
--- a/mercurial/ancestor.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/ancestor.py	Sat Feb 13 23:50:38 2010 -0600
@@ -9,10 +9,11 @@
 
 def ancestor(a, b, pfunc):
     """
-    return the least common ancestor of nodes a and b or None if there
-    is no such ancestor.
+    return a minimal-distance ancestor of nodes a and b, or None if there is no
+    such ancestor. Note that there can be several ancestors with the same
+    (minimal) distance, and the one returned is arbitrary.
 
-    pfunc must return a list of parent vertices
+    pfunc must return a list of parent vertices for a given vertex
     """
 
     if a == b:
--- a/mercurial/archival.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/archival.py	Sat Feb 13 23:50:38 2010 -0600
@@ -205,7 +205,8 @@
     prefix is name of path to put before every archive member.'''
 
     def write(name, mode, islink, getdata):
-        if matchfn and not matchfn(name): return
+        if matchfn and not matchfn(name):
+            return
         data = getdata()
         if decode:
             data = repo.wwritedata(name, data)
--- a/mercurial/base85.c	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/base85.c	Sat Feb 13 23:50:38 2010 -0600
@@ -105,18 +105,24 @@
 		{
 			c = b85dec[(int)*text++] - 1;
 			if (c < 0)
-				return PyErr_Format(PyExc_ValueError, "Bad base85 character at position %d", i);
+				return PyErr_Format(
+					PyExc_ValueError,
+					"Bad base85 character at position %d", i);
 			acc = acc * 85 + c;
 		}
 		if (i++ < len)
 		{
 			c = b85dec[(int)*text++] - 1;
 			if (c < 0)
-				return PyErr_Format(PyExc_ValueError, "Bad base85 character at position %d", i);
+				return PyErr_Format(
+					PyExc_ValueError,
+					"Bad base85 character at position %d", i);
 			/* overflow detection: 0xffffffff == "|NsC0",
 			 * "|NsC" == 0x03030303 */
 			if (acc > 0x03030303 || (acc *= 85) > 0xffffffff - c)
-				return PyErr_Format(PyExc_ValueError, "Bad base85 sequence at position %d", i);
+				return PyErr_Format(
+					PyExc_ValueError,
+					"Bad base85 sequence at position %d", i);
 			acc += c;
 		}
 
--- a/mercurial/bdiff.c	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/bdiff.c	Sat Feb 13 23:50:38 2010 -0600
@@ -15,11 +15,11 @@
 #include <limits.h>
 
 #if defined __hpux || defined __SUNPRO_C || defined _AIX
-# define inline
+#define inline
 #endif
 
 #ifdef __linux
-# define inline __inline
+#define inline __inline
 #endif
 
 #ifdef _WIN32
@@ -267,19 +267,21 @@
 
 	/* normalize the hunk list, try to push each hunk towards the end */
 	for (curr = l.base; curr != l.head; curr++) {
-		struct hunk *next = curr+1;
+		struct hunk *next = curr + 1;
 		int shift = 0;
 
 		if (next == l.head)
 			break;
 
 		if (curr->a2 == next->a1)
-			while (curr->a2+shift < an && curr->b2+shift < bn
-			       && !cmp(a+curr->a2+shift, b+curr->b2+shift))
+			while (curr->a2 + shift < an && curr->b2 + shift < bn
+			       && !cmp(a + curr->a2 + shift,
+				       b + curr->b2 + shift))
 				shift++;
 		else if (curr->b2 == next->b1)
-			while (curr->b2+shift < bn && curr->a2+shift < an
-			       && !cmp(b+curr->b2+shift, a+curr->a2+shift))
+			while (curr->b2 + shift < bn && curr->a2 + shift < an
+			       && !cmp(b + curr->b2 + shift,
+				       a + curr->a2 + shift))
 				shift++;
 		if (!shift)
 			continue;
--- a/mercurial/bundlerepo.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/bundlerepo.py	Sat Feb 13 23:50:38 2010 -0600
@@ -73,7 +73,8 @@
         if rev < 0:
             return False
         return rev in self.basemap
-    def bundlebase(self, rev): return self.basemap[rev]
+    def bundlebase(self, rev):
+        return self.basemap[rev]
     def _chunk(self, rev):
         # Warning: in case of bundle, the diff is against bundlebase,
         # not against rev - 1
@@ -98,7 +99,8 @@
 
     def revision(self, node):
         """return an uncompressed revision of a given"""
-        if node == nullid: return ""
+        if node == nullid:
+            return ""
 
         text = None
         chain = []
--- a/mercurial/byterange.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/byterange.py	Sat Feb 13 23:50:38 2010 -0600
@@ -310,7 +310,8 @@
                 (fb, lb) = range_tup
                 if lb == '':
                     if retrlen is None or retrlen == 0:
-                        raise RangeError('Requested Range Not Satisfiable due to unobtainable file length.')
+                        raise RangeError('Requested Range Not Satisfiable due'
+                                         ' to unobtainable file length.')
                     lb = retrlen
                     retrlen = lb - fb
                     if retrlen < 0:
--- a/mercurial/changegroup.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/changegroup.py	Sat Feb 13 23:50:38 2010 -0600
@@ -24,13 +24,15 @@
                           % (len(d), l - 4))
     return d
 
-def chunkiter(source):
+def chunkiter(source, progress=None):
     """iterate through the chunks in source, yielding a sequence of chunks
     (strings)"""
     while 1:
         c = getchunk(source)
         if not c:
             break
+        elif progress is not None:
+            progress()
         yield c
 
 def chunkheader(length):
@@ -54,6 +56,16 @@
     "HG10GZ": ("HG10GZ", lambda: zlib.compressobj()),
 }
 
+def collector(cl, mmfs, files):
+    # Gather information about changeset nodes going out in a bundle.
+    # We want to gather manifests needed and filelogs affected.
+    def collect(node):
+        c = cl.read(node)
+        for fn in c[3]:
+            files.setdefault(fn, fn)
+        mmfs.setdefault(c[0], node)
+    return collect
+
 # hgweb uses this list to communicate its preferred type
 bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN']
 
--- a/mercurial/changelog.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/changelog.py	Sat Feb 13 23:50:38 2010 -0600
@@ -78,7 +78,7 @@
             doff = self.offset - self.size
             self.data.insert(0, "".join(self.data))
             del self.data[1:]
-            s = self.data[0][doff:doff+count]
+            s = self.data[0][doff:doff + count]
             self.offset += len(s)
             ret += s
         return ret
--- a/mercurial/cmdutil.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/cmdutil.py	Sat Feb 13 23:50:38 2010 -0600
@@ -7,12 +7,15 @@
 
 from node import hex, nullid, nullrev, short
 from i18n import _
-import os, sys, errno, re, glob
-import mdiff, bdiff, util, templater, patch, error, encoding
+import os, sys, errno, re, glob, tempfile, time
+import mdiff, bdiff, util, templater, patch, error, encoding, templatekw
 import match as _match
 
 revrangesep = ':'
 
+def parsealiases(cmd):
+    return cmd.lstrip("^").split("|")
+
 def findpossible(cmd, table, strict=False):
     """
     Return cmd -> (aliases, command table entry)
@@ -22,7 +25,7 @@
     choice = {}
     debugchoice = {}
     for e in table.keys():
-        aliases = e.lstrip("^").split("|")
+        aliases = parsealiases(e)
         found = None
         if cmd in aliases:
             found = cmd
@@ -59,6 +62,14 @@
 
     raise error.UnknownCommand(cmd)
 
+def findrepo(p):
+    while not os.path.isdir(os.path.join(p, ".hg")):
+        oldp, p = p, os.path.dirname(p)
+        if p == oldp:
+            return None
+
+    return p
+
 def bail_if_changed(repo):
     if repo.dirstate.parents()[1] != nullid:
         raise util.Abort(_('outstanding uncommitted merge'))
@@ -93,9 +104,10 @@
             limit = int(limit)
         except ValueError:
             raise util.Abort(_('limit must be a positive integer'))
-        if limit <= 0: raise util.Abort(_('limit must be positive'))
+        if limit <= 0:
+            raise util.Abort(_('limit must be positive'))
     else:
-        limit = sys.maxint
+        limit = None
     return limit
 
 def remoteui(src, opts):
@@ -166,7 +178,7 @@
             start = revfix(repo, start, 0)
             end = revfix(repo, end, len(repo) - 1)
             step = start > end and -1 or 1
-            for rev in xrange(start, end+step, step):
+            for rev in xrange(start, end + step, step):
                 if rev in seen:
                     continue
                 seen.add(rev)
@@ -275,31 +287,42 @@
 
 def findrenames(repo, added, removed, threshold):
     '''find renamed files -- yields (before, after, score) tuples'''
+    copies = {}
     ctx = repo['.']
-    for a in added:
-        aa = repo.wread(a)
-        bestname, bestscore = None, threshold
-        for r in removed:
-            if r not in ctx:
-                continue
-            rr = ctx.filectx(r).data()
+    for r in removed:
+        if r not in ctx:
+            continue
+        fctx = ctx.filectx(r)
 
+        def score(text):
+            if not len(text):
+                return 0.0
+            if not fctx.cmp(text):
+                return 1.0
+            if threshold == 1.0:
+                return 0.0
+            orig = fctx.data()
             # bdiff.blocks() returns blocks of matching lines
             # count the number of bytes in each
             equal = 0
-            alines = mdiff.splitnewlines(aa)
-            matches = bdiff.blocks(aa, rr)
-            for x1,x2,y1,y2 in matches:
+            alines = mdiff.splitnewlines(text)
+            matches = bdiff.blocks(text, orig)
+            for x1, x2, y1, y2 in matches:
                 for line in alines[x1:x2]:
                     equal += len(line)
 
-            lengths = len(aa) + len(rr)
-            if lengths:
-                myscore = equal*2.0 / lengths
-                if myscore >= bestscore:
-                    bestname, bestscore = r, myscore
-        if bestname:
-            yield bestname, a, bestscore
+            lengths = len(text) + len(orig)
+            return equal * 2.0 / lengths
+
+        for a in added:
+            bestscore = copies.get(a, (None, threshold))[1]
+            myscore = score(repo.wread(a))
+            if myscore >= bestscore:
+                copies[a] = (r, myscore)
+
+    for dest, v in copies.iteritems():
+        source, score = v
+        yield source, dest, score
 
 def addremove(repo, pats=[], opts={}, dry_run=None, similarity=None):
     if dry_run is None:
@@ -552,27 +575,37 @@
     return errors
 
 def service(opts, parentfn=None, initfn=None, runfn=None, logfile=None,
-    runargs=None):
+    runargs=None, appendpid=False):
     '''Run a command as a service.'''
 
     if opts['daemon'] and not opts['daemon_pipefds']:
-        rfd, wfd = os.pipe()
-        if not runargs:
-            runargs = sys.argv[:]
-        runargs.append('--daemon-pipefds=%d,%d' % (rfd, wfd))
-        # Don't pass --cwd to the child process, because we've already
-        # changed directory.
-        for i in xrange(1,len(runargs)):
-            if runargs[i].startswith('--cwd='):
-                del runargs[i]
-                break
-            elif runargs[i].startswith('--cwd'):
-                del runargs[i:i+2]
-                break
-        pid = os.spawnvp(os.P_NOWAIT | getattr(os, 'P_DETACH', 0),
-                         runargs[0], runargs)
-        os.close(wfd)
-        os.read(rfd, 1)
+        # Signal child process startup with file removal
+        lockfd, lockpath = tempfile.mkstemp(prefix='hg-service-')
+        os.close(lockfd)
+        try:
+            if not runargs:
+                runargs = util.hgcmd() + sys.argv[1:]
+            runargs.append('--daemon-pipefds=%s' % lockpath)
+            # Don't pass --cwd to the child process, because we've already
+            # changed directory.
+            for i in xrange(1, len(runargs)):
+                if runargs[i].startswith('--cwd='):
+                    del runargs[i]
+                    break
+                elif runargs[i].startswith('--cwd'):
+                    del runargs[i:i + 2]
+                    break
+            def condfn():
+                return not os.path.exists(lockpath)
+            pid = util.rundetached(runargs, condfn)
+            if pid < 0:
+                raise util.Abort(_('child process failed to start'))
+        finally:
+            try:
+                os.unlink(lockpath)
+            except OSError, e:
+                if e.errno != errno.ENOENT:
+                    raise
         if parentfn:
             return parentfn(pid)
         else:
@@ -582,19 +615,19 @@
         initfn()
 
     if opts['pid_file']:
-        fp = open(opts['pid_file'], 'w')
+        mode = appendpid and 'a' or 'w'
+        fp = open(opts['pid_file'], mode)
         fp.write(str(os.getpid()) + '\n')
         fp.close()
 
     if opts['daemon_pipefds']:
-        rfd, wfd = [int(x) for x in opts['daemon_pipefds'].split(',')]
-        os.close(rfd)
+        lockpath = opts['daemon_pipefds']
         try:
             os.setsid()
         except AttributeError:
             pass
-        os.write(wfd, 'y')
-        os.close(wfd)
+        os.unlink(lockpath)
+        util.hidewindow()
         sys.stdout.flush()
         sys.stderr.flush()
 
@@ -625,6 +658,7 @@
         self.header = {}
         self.hunk = {}
         self.lastheader = None
+        self.footer = None
 
     def flush(self, rev):
         if rev in self.header:
@@ -639,7 +673,11 @@
             return 1
         return 0
 
-    def show(self, ctx, copies=(), **props):
+    def close(self):
+        if self.footer:
+            self.ui.write(self.footer)
+
+    def show(self, ctx, copies=None, **props):
         if self.buffered:
             self.ui.pushbuffer()
             self._show(ctx, copies, props)
@@ -745,14 +783,17 @@
     def __init__(self, ui, repo, patch, diffopts, mapfile, buffered):
         changeset_printer.__init__(self, ui, repo, patch, diffopts, buffered)
         formatnode = ui.debugflag and (lambda x: x) or (lambda x: x[:12])
+        defaulttempl = {
+            'parent': '{rev}:{node|formatnode} ',
+            'manifest': '{rev}:{node|formatnode}',
+            'file_copy': '{name} ({source})',
+            'extra': '{key}={value|stringescape}'
+            }
+        # filecopy is preserved for compatibility reasons
+        defaulttempl['filecopy'] = defaulttempl['file_copy']
         self.t = templater.templater(mapfile, {'formatnode': formatnode},
-                                     cache={
-                                         'parent': '{rev}:{node|formatnode} ',
-                                         'manifest': '{rev}:{node|formatnode}',
-                                         'filecopy': '{name} ({source})'})
-        # Cache mapping from rev to a tuple with tag date, tag
-        # distance and tag name
-        self._latesttagcache = {-1: (0, 0, 'null')}
+                                     cache=defaulttempl)
+        self.cache = {}
 
     def use_template(self, t):
         '''set template string to use'''
@@ -770,174 +811,29 @@
             return []
         return parents
 
-    def _latesttaginfo(self, rev):
-        '''return date, distance and name for the latest tag of rev'''
-        todo = [rev]
-        while todo:
-            rev = todo.pop()
-            if rev in self._latesttagcache:
-                continue
-            ctx = self.repo[rev]
-            tags = [t for t in ctx.tags() if self.repo.tagtype(t) == 'global']
-            if tags:
-                self._latesttagcache[rev] = ctx.date()[0], 0, ':'.join(sorted(tags))
-                continue
-            try:
-                # The tuples are laid out so the right one can be found by comparison.
-                pdate, pdist, ptag = max(
-                    self._latesttagcache[p.rev()] for p in ctx.parents())
-            except KeyError:
-                # Cache miss - recurse
-                todo.append(rev)
-                todo.extend(p.rev() for p in ctx.parents())
-                continue
-            self._latesttagcache[rev] = pdate, pdist + 1, ptag
-        return self._latesttagcache[rev]
-
     def _show(self, ctx, copies, props):
         '''show a single changeset or file revision'''
 
-        def showlist(name, values, plural=None, **args):
-            '''expand set of values.
-            name is name of key in template map.
-            values is list of strings or dicts.
-            plural is plural of name, if not simply name + 's'.
-
-            expansion works like this, given name 'foo'.
-
-            if values is empty, expand 'no_foos'.
-
-            if 'foo' not in template map, return values as a string,
-            joined by space.
-
-            expand 'start_foos'.
-
-            for each value, expand 'foo'. if 'last_foo' in template
-            map, expand it instead of 'foo' for last key.
+        showlist = templatekw.showlist
 
-            expand 'end_foos'.
-            '''
-            if plural: names = plural
-            else: names = name + 's'
-            if not values:
-                noname = 'no_' + names
-                if noname in self.t:
-                    yield self.t(noname, **args)
-                return
-            if name not in self.t:
-                if isinstance(values[0], str):
-                    yield ' '.join(values)
-                else:
-                    for v in values:
-                        yield dict(v, **args)
-                return
-            startname = 'start_' + names
-            if startname in self.t:
-                yield self.t(startname, **args)
-            vargs = args.copy()
-            def one(v, tag=name):
-                try:
-                    vargs.update(v)
-                except (AttributeError, ValueError):
-                    try:
-                        for a, b in v:
-                            vargs[a] = b
-                    except ValueError:
-                        vargs[name] = v
-                return self.t(tag, **vargs)
-            lastname = 'last_' + name
-            if lastname in self.t:
-                last = values.pop()
-            else:
-                last = None
-            for v in values:
-                yield one(v)
-            if last is not None:
-                yield one(last, tag=lastname)
-            endname = 'end_' + names
-            if endname in self.t:
-                yield self.t(endname, **args)
-
-        def showbranches(**args):
-            branch = ctx.branch()
-            if branch != 'default':
-                branch = encoding.tolocal(branch)
-                return showlist('branch', [branch], plural='branches', **args)
-
+        # showparents() behaviour depends on ui trace level which
+        # causes unexpected behaviours at templating level and makes
+        # it harder to extract it in a standalone function. Its
+        # behaviour cannot be changed so leave it here for now.
         def showparents(**args):
+            ctx = args['ctx']
             parents = [[('rev', p.rev()), ('node', p.hex())]
                        for p in self._meaningful_parentrevs(ctx)]
             return showlist('parent', parents, **args)
 
-        def showtags(**args):
-            return showlist('tag', ctx.tags(), **args)
-
-        def showextras(**args):
-            for key, value in sorted(ctx.extra().items()):
-                args = args.copy()
-                args.update(dict(key=key, value=value))
-                yield self.t('extra', **args)
-
-        def showcopies(**args):
-            c = [{'name': x[0], 'source': x[1]} for x in copies]
-            return showlist('file_copy', c, plural='file_copies', **args)
-
-        files = []
-        def getfiles():
-            if not files:
-                files[:] = self.repo.status(ctx.parents()[0].node(),
-                                            ctx.node())[:3]
-            return files
-        def showfiles(**args):
-            return showlist('file', ctx.files(), **args)
-        def showmods(**args):
-            return showlist('file_mod', getfiles()[0], **args)
-        def showadds(**args):
-            return showlist('file_add', getfiles()[1], **args)
-        def showdels(**args):
-            return showlist('file_del', getfiles()[2], **args)
-        def showmanifest(**args):
-            args = args.copy()
-            args.update(dict(rev=self.repo.manifest.rev(ctx.changeset()[0]),
-                             node=hex(ctx.changeset()[0])))
-            return self.t('manifest', **args)
-
-        def showdiffstat(**args):
-            diff = patch.diff(self.repo, ctx.parents()[0].node(), ctx.node())
-            files, adds, removes = 0, 0, 0
-            for i in patch.diffstatdata(util.iterlines(diff)):
-                files += 1
-                adds += i[1]
-                removes += i[2]
-            return '%s: +%s/-%s' % (files, adds, removes)
-
-        def showlatesttag(**args):
-            return self._latesttaginfo(ctx.rev())[2]
-        def showlatesttagdistance(**args):
-            return self._latesttaginfo(ctx.rev())[1]
-
-        defprops = {
-            'author': ctx.user(),
-            'branches': showbranches,
-            'date': ctx.date(),
-            'desc': ctx.description().strip(),
-            'file_adds': showadds,
-            'file_dels': showdels,
-            'file_mods': showmods,
-            'files': showfiles,
-            'file_copies': showcopies,
-            'manifest': showmanifest,
-            'node': ctx.hex(),
-            'parents': showparents,
-            'rev': ctx.rev(),
-            'tags': showtags,
-            'extras': showextras,
-            'diffstat': showdiffstat,
-            'latesttag': showlatesttag,
-            'latesttagdistance': showlatesttagdistance,
-            }
         props = props.copy()
-        props.update(defprops)
+        props.update(templatekw.keywords)
+        props['parents'] = showparents
+        props['templ'] = self.t
+        props['ctx'] = ctx
+        props['repo'] = self.repo
+        props['revcache'] = {'copies': copies}
+        props['cache'] = self.cache
 
         # find correct templates for current mode
 
@@ -948,7 +844,7 @@
             (self.ui.debugflag, 'debug'),
         ]
 
-        types = {'header': '', 'changeset': 'changeset'}
+        types = {'header': '', 'footer':'', 'changeset': 'changeset'}
         for mode, postfix  in tmplmodes:
             for type in types:
                 cur = postfix and ('%s_%s' % (type, postfix)) or type
@@ -970,6 +866,11 @@
             self.ui.write(templater.stringify(self.t(key, **props)))
             self.showpatch(ctx.node())
 
+            if types['footer']:
+                if not self.footer:
+                    self.footer = templater.stringify(self.t(types['footer'],
+                                                      **props))
+
         except KeyError, inst:
             msg = _("%s: no key named '%s'")
             raise util.Abort(msg % (self.t.mapfile, inst.args[0]))
@@ -1016,13 +917,15 @@
         if not os.path.split(mapfile)[0]:
             mapname = (templater.templatepath('map-cmdline.' + mapfile)
                        or templater.templatepath(mapfile))
-            if mapname: mapfile = mapname
+            if mapname:
+                mapfile = mapname
 
     try:
         t = changeset_templater(ui, repo, patch, opts, mapfile, buffered)
     except SyntaxError, inst:
         raise util.Abort(inst.args[0])
-    if tmpl: t.use_template(tmpl)
+    if tmpl:
+        t.use_template(tmpl)
     return t
 
 def finddate(ui, repo, date):
@@ -1064,13 +967,13 @@
     def increasing_windows(start, end, windowsize=8, sizelimit=512):
         if start < end:
             while start < end:
-                yield start, min(windowsize, end-start)
+                yield start, min(windowsize, end - start)
                 start += windowsize
                 if windowsize < sizelimit:
                     windowsize *= 2
         else:
             while start > end:
-                yield start, min(windowsize, start-end-1)
+                yield start, min(windowsize, start - end - 1)
                 start -= windowsize
                 if windowsize < sizelimit:
                     windowsize *= 2
@@ -1127,7 +1030,8 @@
                     # A zero count may be a directory or deleted file, so
                     # try to find matching entries on the slow path.
                     if follow:
-                        raise util.Abort(_('cannot follow nonexistent file: "%s"') % file_)
+                        raise util.Abort(
+                            _('cannot follow nonexistent file: "%s"') % file_)
                     slowpath = True
                     break
                 else:
@@ -1161,7 +1065,7 @@
     class followfilter(object):
         def __init__(self, onlyfirst=False):
             self.startrev = nullrev
-            self.roots = []
+            self.roots = set()
             self.onlyfirst = onlyfirst
 
         def match(self, rev):
@@ -1179,18 +1083,18 @@
             if rev > self.startrev:
                 # forward: all descendants
                 if not self.roots:
-                    self.roots.append(self.startrev)
+                    self.roots.add(self.startrev)
                 for parent in realparents(rev):
                     if parent in self.roots:
-                        self.roots.append(rev)
+                        self.roots.add(rev)
                         return True
             else:
                 # backwards: all parents
                 if not self.roots:
-                    self.roots.extend(realparents(self.startrev))
+                    self.roots.update(realparents(self.startrev))
                 if rev in self.roots:
                     self.roots.remove(rev)
-                    self.roots.extend(realparents(rev))
+                    self.roots.update(realparents(rev))
                     return True
 
             return False
@@ -1201,7 +1105,7 @@
         rev = repo.changelog.rev(repo.lookup(rev))
         ff = followfilter()
         stop = min(revs[0], revs[-1])
-        for x in xrange(rev, stop-1, -1):
+        for x in xrange(rev, stop - 1, -1):
             if ff.match(x):
                 wanted.discard(x)
 
@@ -1216,7 +1120,7 @@
 
         for i, window in increasing_windows(0, len(revs)):
             change = util.cachefunc(repo.changectx)
-            nrevs = [rev for rev in revs[i:i+window] if want(rev)]
+            nrevs = [rev for rev in revs[i:i + window] if want(rev)]
             for rev in sorted(nrevs):
                 fns = fncache.get(rev)
                 ctx = change(rev)
--- a/mercurial/commands.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/commands.py	Sat Feb 13 23:50:38 2010 -0600
@@ -10,7 +10,7 @@
 from i18n import _, gettext
 import os, re, sys, difflib, time, tempfile
 import hg, util, revlog, bundlerepo, extensions, copies, error
-import patch, help, mdiff, url, encoding
+import patch, help, mdiff, url, encoding, templatekw
 import archival, changegroup, cmdutil, sshserver, hbisect
 from hgweb import server
 import merge as merge_
@@ -28,13 +28,27 @@
     undo an add before that, see hg forget.
 
     If no names are given, add all files to the repository.
+
+    .. container:: verbose
+
+       An example showing how new (unknown) files are added
+       automatically by ``hg add``::
+
+         $ ls
+         foo.c
+         $ hg status
+         ? foo.c
+         $ hg add
+         adding foo.c
+         $ hg status
+         A foo.c
     """
 
     bad = []
     names = []
     m = cmdutil.match(repo, pats, opts)
     oldbad = m.bad
-    m.bad = lambda x,y: bad.append(x) or oldbad(x,y)
+    m.bad = lambda x, y: bad.append(x) or oldbad(x, y)
 
     for f in repo.walk(m):
         exact = m.exact(f)
@@ -69,7 +83,7 @@
         raise util.Abort(_('similarity must be a number'))
     if sim < 0 or sim > 100:
         raise util.Abort(_('similarity must be between 0 and 100'))
-    return cmdutil.addremove(repo, pats, opts, similarity=sim/100.)
+    return cmdutil.addremove(repo, pats, opts, similarity=sim / 100.0)
 
 def annotate(ui, repo, *pats, **opts):
     """show changeset information by line for each file
@@ -95,15 +109,15 @@
              ('number', lambda x: str(x[0].rev())),
              ('changeset', lambda x: short(x[0].node())),
              ('date', getdate),
-             ('follow', lambda x: x[0].path()),
+             ('file', lambda x: x[0].path()),
             ]
 
-    if (not opts.get('user') and not opts.get('changeset') and not opts.get('date')
-        and not opts.get('follow')):
+    if (not opts.get('user') and not opts.get('changeset')
+        and not opts.get('date') and not opts.get('file')):
         opts['number'] = 1
 
     linenumber = opts.get('line_number') is not None
-    if (linenumber and (not opts.get('changeset')) and (not opts.get('number'))):
+    if linenumber and (not opts.get('changeset')) and (not opts.get('number')):
         raise util.Abort(_('at least one of -n/-c is required for -l'))
 
     funcmap = [func for op, func in opmap if opts.get(op)]
@@ -112,16 +126,15 @@
         funcmap[-1] = lambda x: "%s:%s" % (lastfunc(x), x[1])
 
     ctx = repo[opts.get('rev')]
-
     m = cmdutil.match(repo, pats, opts)
+    follow = not opts.get('no_follow')
     for abs in ctx.walk(m):
         fctx = ctx[abs]
         if not opts.get('text') and util.binary(fctx.data()):
             ui.write(_("%s: binary file\n") % ((pats and m.rel(abs)) or abs))
             continue
 
-        lines = fctx.annotate(follow=opts.get('follow'),
-                              linenumber=linenumber)
+        lines = fctx.annotate(follow=follow, linenumber=linenumber)
         pieces = []
 
         for f in funcmap:
@@ -173,7 +186,8 @@
         if kind == 'files':
             raise util.Abort(_('cannot archive plain files to stdout'))
         dest = sys.stdout
-        if not prefix: prefix = os.path.basename(repo.root) + '-%h'
+        if not prefix:
+            prefix = os.path.basename(repo.root) + '-%h'
     prefix = cmdutil.make_filename(repo, prefix, node)
     archival.archive(repo, dest, node, kind, not opts.get('no_decode'),
                      matchfn, prefix)
@@ -257,7 +271,8 @@
     if op1 != node:
         hg.clean(repo, op1, show_stats=False)
         if opts.get('merge'):
-            ui.status(_('merging with changeset %s\n') % nice(repo.changelog.tip()))
+            ui.status(_('merging with changeset %s\n')
+                      % nice(repo.changelog.tip()))
             hg.merge(repo, hex(repo.changelog.tip()))
         else:
             ui.status(_('the backout changeset is a new head - '
@@ -306,6 +321,7 @@
                         "bad revision could be any of:\n"))
             for n in nodes:
                 displayer.show(repo[n])
+        displayer.close()
 
     def check_state(state, interactive=True):
         if not state['good'] or not state['bad']:
@@ -484,8 +500,8 @@
     Generate a compressed changegroup file collecting changesets not
     known to be in another repository.
 
-    If no destination repository is specified the destination is
-    assumed to have all the nodes specified by one or more --base
+    If you omit the destination repository, then hg assumes the
+    destination will have all the nodes you specify with --base
     parameters. To create a bundle containing all changesets, use
     -a/--all (or --base null).
 
@@ -535,9 +551,10 @@
                         seen[p] = 1
                         visit.append(p)
     else:
-        dest, revs, checkout = hg.parseurl(
-            ui.expandpath(dest or 'default-push', dest or 'default'), revs)
+        dest = ui.expandpath(dest or 'default-push', dest or 'default')
+        dest, branches = hg.parseurl(dest, opts.get('branch'))
         other = hg.repository(cmdutil.remoteui(repo, opts), dest)
+        revs, checkout = hg.addbranchrevs(repo, other, branches, revs)
         o = repo.findoutgoing(other, force=opts.get('force'))
 
     if revs:
@@ -604,7 +621,9 @@
 
     a) the changeset, tag or branch specified with -u/--updaterev
     b) the changeset, tag or branch given with the first -r/--rev
-    c) the head of the default branch
+    c) the branch given with the first -b/--branch
+    d) the branch given with the url#branch source syntax
+    e) the head of the default branch
 
     Use 'hg clone -u . src dst' to checkout the source repository's
     parent changeset (applicable for local source repositories only).
@@ -647,7 +666,8 @@
              pull=opts.get('pull'),
              stream=opts.get('uncompressed'),
              rev=opts.get('rev'),
-             update=opts.get('updaterev') or not opts.get('noupdate'))
+             update=opts.get('updaterev') or not opts.get('noupdate'),
+             branch=opts.get('branch'))
 
 def commit(ui, repo, *pats, **opts):
     """commit the specified files or all outstanding changes
@@ -868,11 +888,14 @@
         if showdate:
             if ent[3] == -1:
                 # Pad or slice to locale representation
-                locale_len = len(time.strftime("%Y-%m-%d %H:%M:%S ", time.localtime(0)))
+                locale_len = len(time.strftime("%Y-%m-%d %H:%M:%S ",
+                                               time.localtime(0)))
                 timestr = 'unset'
-                timestr = timestr[:locale_len] + ' '*(locale_len - len(timestr))
+                timestr = (timestr[:locale_len] +
+                           ' ' * (locale_len - len(timestr)))
             else:
-                timestr = time.strftime("%Y-%m-%d %H:%M:%S ", time.localtime(ent[3]))
+                timestr = time.strftime("%Y-%m-%d %H:%M:%S ",
+                                        time.localtime(ent[3]))
         if ent[1] & 020000:
             mode = 'lnk'
         else:
@@ -884,7 +907,7 @@
 def debugsub(ui, repo, rev=None):
     if rev == '':
         rev = None
-    for k,v in sorted(repo[rev].substate.items()):
+    for k, v in sorted(repo[rev].substate.items()):
         ui.write('path %s\n' % k)
         ui.write(' source   %s\n' % v[0])
         ui.write(' revision %s\n' % v[1])
@@ -1133,8 +1156,9 @@
 
     Print the changeset header and diffs for one or more revisions.
 
-    The information shown in the changeset header is: author,
-    changeset hash, parent(s) and commit comment.
+    The information shown in the changeset header is: author, date,
+    branch name (if non-default), changeset hash, parent(s) and commit
+    comment.
 
     NOTE: export may generate unexpected diff output for merge
     changesets, as it will compare the merge changeset against its
@@ -1162,6 +1186,7 @@
     With the --switch-parent option, the diff will be against the
     second parent. It can be useful to review a merge.
     """
+    changesets += tuple(opts.get('rev', []))
     if not changesets:
         raise util.Abort(_("export requires at least one changeset"))
     revs = cmdutil.revrange(repo, changesets)
@@ -1380,71 +1405,76 @@
 def heads(ui, repo, *branchrevs, **opts):
     """show current repository heads or show branch heads
 
-    With no arguments, show all repository head changesets.
+    With no arguments, show all repository branch heads.
 
     Repository "heads" are changesets with no child changesets. They are
     where development generally takes place and are the usual targets
-    for update and merge operations.
-
-    If one or more REV is given, the "branch heads" will be shown for
-    the named branch associated with the specified changeset(s).
-
-    Branch heads are changesets on a named branch with no descendants on
-    the same branch. A branch head could be a "true" (repository) head,
-    or it could be the last changeset on that branch before it was
-    merged into another branch, or it could be the last changeset on the
-    branch before a new branch was created. If none of the branch heads
-    are true heads, the branch is considered inactive.
+    for update and merge operations. Branch heads are changesets that have
+    no child changeset on the same branch.
+
+    If one or more REVs are given, only branch heads on the branches
+    associated with the specified changesets are shown.
 
     If -c/--closed is specified, also show branch heads marked closed
     (see hg commit --close-branch).
 
     If STARTREV is specified, only those heads that are descendants of
     STARTREV will be displayed.
+
+    If -t/--topo is specified, named branch mechanics will be ignored and only
+    changesets without children will be shown.
     """
+
     if opts.get('rev'):
         start = repo.lookup(opts['rev'])
     else:
         start = None
-    closed = opts.get('closed')
-    hideinactive, _heads = opts.get('active'), None
-    if not branchrevs:
-        if closed:
-            raise error.Abort(_('you must specify a branch to use --closed'))
-        # Assume we're looking repo-wide heads if no revs were specified.
-        heads = repo.heads(start)
+
+    if opts.get('topo'):
+        heads = [repo[h] for h in repo.heads(start)]
     else:
-        if hideinactive:
-            _heads = repo.heads(start)
         heads = []
-        visitedset = set()
-        for branchrev in branchrevs:
-            branch = repo[encoding.fromlocal(branchrev)].branch()
-            encodedbranch = encoding.tolocal(branch)
-            if branch in visitedset:
+        for b, ls in repo.branchmap().iteritems():
+            if start is None:
+                heads += [repo[h] for h in ls]
                 continue
-            visitedset.add(branch)
-            bheads = repo.branchheads(branch, start, closed=closed)
-            if not bheads:
-                if not opts.get('rev'):
-                    ui.warn(_("no open branch heads on branch %s\n") % encodedbranch)
-                elif branch != branchrev:
-                    ui.warn(_("no changes on branch %s containing %s are "
-                              "reachable from %s\n")
-                            % (encodedbranch, branchrev, opts.get('rev')))
-                else:
-                    ui.warn(_("no changes on branch %s are reachable from %s\n")
-                            % (encodedbranch, opts.get('rev')))
-            if hideinactive:
-                bheads = [bhead for bhead in bheads if bhead in _heads]
-            heads.extend(bheads)
+            startrev = repo.changelog.rev(start)
+            descendants = set(repo.changelog.descendants(startrev))
+            descendants.add(startrev)
+            rev = repo.changelog.rev
+            heads += [repo[h] for h in ls if rev(h) in descendants]
+
+    if branchrevs:
+        decode, encode = encoding.fromlocal, encoding.tolocal
+        branches = set(repo[decode(br)].branch() for br in branchrevs)
+        heads = [h for h in heads if h.branch() in branches]
+
+    if not opts.get('closed'):
+        heads = [h for h in heads if not h.extra().get('close')]
+
+    if opts.get('active') and branchrevs:
+        dagheads = repo.heads(start)
+        heads = [h for h in heads if h.node() in dagheads]
+
+    if branchrevs:
+        haveheads = set(h.branch() for h in heads)
+        if branches - haveheads:
+            headless = ', '.join(encode(b) for b in branches - haveheads)
+            msg = _('no open branch heads found on branches %s')
+            if opts.get('rev'):
+                msg += _(' (started at %s)' % opts['rev'])
+            ui.warn((msg + '\n') % headless)
+
     if not heads:
         return 1
+
+    heads = sorted(heads, key=lambda x: -x.rev())
     displayer = cmdutil.show_changeset(ui, repo, opts)
-    for n in heads:
-        displayer.show(repo[n])
-
-def help_(ui, name=None, with_version=False):
+    for ctx in heads:
+        displayer.show(ctx)
+    displayer.close()
+
+def help_(ui, name=None, with_version=False, unknowncmd=False):
     """show help for a given topic or a help overview
 
     With no arguments, print a list of commands with short help messages.
@@ -1477,7 +1507,7 @@
             ui.write('\n')
 
         try:
-            aliases, i = cmdutil.findcmd(name, table, False)
+            aliases, entry = cmdutil.findcmd(name, table, strict=unknowncmd)
         except error.AmbiguousCommand, inst:
             # py3k fix: except vars can't be used outside the scope of the
             # except block, nor can be used inside a lambda. python issue4617
@@ -1486,12 +1516,18 @@
             helplist(_('list of commands:\n\n'), select)
             return
 
+        # check if it's an invalid alias and display its error if it is
+        if getattr(entry[0], 'badalias', False):
+            if not unknowncmd:
+                entry[0](ui)
+            return
+
         # synopsis
-        if len(i) > 2:
-            if i[2].startswith('hg'):
-                ui.write("%s\n" % i[2])
+        if len(entry) > 2:
+            if entry[2].startswith('hg'):
+                ui.write("%s\n" % entry[2])
             else:
-                ui.write('hg %s %s\n' % (aliases[0], i[2]))
+                ui.write('hg %s %s\n' % (aliases[0], entry[2]))
         else:
             ui.write('hg %s\n' % aliases[0])
 
@@ -1500,17 +1536,21 @@
             ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:]))
 
         # description
-        doc = gettext(i[0].__doc__)
+        doc = gettext(entry[0].__doc__)
         if not doc:
             doc = _("(no help text available)")
         if ui.quiet:
             doc = doc.splitlines()[0]
-        ui.write("\n%s\n" % minirst.format(doc, textwidth))
+        keep = ui.verbose and ['verbose'] or []
+        formatted, pruned = minirst.format(doc, textwidth, keep=keep)
+        ui.write("\n%s\n" % formatted)
+        if pruned:
+            ui.write(_('\nuse "hg -v help %s" to show verbose help\n') % name)
 
         if not ui.quiet:
             # options
-            if i[1]:
-                option_lists.append((_("options:\n"), i[1]))
+            if entry[1]:
+                option_lists.append((_("options:\n"), entry[1]))
 
             addglobalopts(False)
 
@@ -1574,10 +1614,13 @@
     def helpext(name):
         try:
             mod = extensions.find(name)
+            doc = gettext(mod.__doc__) or _('no help text available')
         except KeyError:
-            raise error.UnknownCommand(name)
-
-        doc = gettext(mod.__doc__) or _('no help text available')
+            mod = None
+            doc = extensions.disabledext(name)
+            if not doc:
+                raise error.UnknownCommand(name)
+
         if '\n' not in doc:
             head, tail = doc, ""
         else:
@@ -1587,17 +1630,36 @@
             ui.write(minirst.format(tail, textwidth))
             ui.status('\n\n')
 
-        try:
-            ct = mod.cmdtable
-        except AttributeError:
-            ct = {}
-
-        modcmds = set([c.split('|', 1)[0] for c in ct])
-        helplist(_('list of commands:\n\n'), modcmds.__contains__)
+        if mod:
+            try:
+                ct = mod.cmdtable
+            except AttributeError:
+                ct = {}
+            modcmds = set([c.split('|', 1)[0] for c in ct])
+            helplist(_('list of commands:\n\n'), modcmds.__contains__)
+        else:
+            ui.write(_('use "hg help extensions" for information on enabling '
+                       'extensions\n'))
+
+    def helpextcmd(name):
+        cmd, ext, mod = extensions.disabledcmd(name, ui.config('ui', 'strict'))
+        doc = gettext(mod.__doc__).splitlines()[0]
+
+        msg = help.listexts(_("'%s' is provided by the following "
+                              "extension:") % cmd, {ext: doc}, len(ext),
+                            indent=4)
+        ui.write(minirst.format(msg, textwidth))
+        ui.write('\n\n')
+        ui.write(_('use "hg help extensions" for information on enabling '
+                   'extensions\n'))
 
     if name and name != 'shortlist':
         i = None
-        for f in (helptopic, helpcmd, helpext):
+        if unknowncmd:
+            queries = (helpextcmd,)
+        else:
+            queries = (helptopic, helpcmd, helpext, helpextcmd)
+        for f in queries:
             try:
                 f(name)
                 i = None
@@ -1633,7 +1695,8 @@
     for title, options in option_lists:
         opt_output.append(("\n%s" % title, None))
         for shortopt, longopt, default, desc in options:
-            if _("DEPRECATED") in desc and not ui.verbose: continue
+            if _("DEPRECATED") in desc and not ui.verbose:
+                continue
             opt_output.append(("%2s%s" % (shortopt and "-%s" % shortopt,
                                           longopt and " --%s" % longopt),
                                "%s%s" % (desc,
@@ -1685,8 +1748,9 @@
 
     revs = []
     if source:
-        source, revs, checkout = hg.parseurl(ui.expandpath(source), [])
+        source, branches = hg.parseurl(ui.expandpath(source))
         repo = hg.repository(ui, source)
+        revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
 
     if not repo.local():
         if not rev and revs:
@@ -1787,9 +1851,83 @@
     d = opts["base"]
     strip = opts["strip"]
     wlock = lock = None
+
+    def tryone(ui, hunk):
+        tmpname, message, user, date, branch, nodeid, p1, p2 = \
+            patch.extract(ui, hunk)
+
+        if not tmpname:
+            return None
+        commitid = _('to working directory')
+
+        try:
+            cmdline_message = cmdutil.logmessage(opts)
+            if cmdline_message:
+                # pickup the cmdline msg
+                message = cmdline_message
+            elif message:
+                # pickup the patch msg
+                message = message.strip()
+            else:
+                # launch the editor
+                message = None
+            ui.debug('message:\n%s\n' % message)
+
+            wp = repo.parents()
+            if opts.get('exact'):
+                if not nodeid or not p1:
+                    raise util.Abort(_('not a Mercurial patch'))
+                p1 = repo.lookup(p1)
+                p2 = repo.lookup(p2 or hex(nullid))
+
+                if p1 != wp[0].node():
+                    hg.clean(repo, p1)
+                repo.dirstate.setparents(p1, p2)
+            elif p2:
+                try:
+                    p1 = repo.lookup(p1)
+                    p2 = repo.lookup(p2)
+                    if p1 == wp[0].node():
+                        repo.dirstate.setparents(p1, p2)
+                except error.RepoError:
+                    pass
+            if opts.get('exact') or opts.get('import_branch'):
+                repo.dirstate.setbranch(branch or 'default')
+
+            files = {}
+            try:
+                patch.patch(tmpname, ui, strip=strip, cwd=repo.root,
+                            files=files, eolmode=None)
+            finally:
+                files = patch.updatedir(ui, repo, files,
+                                        similarity=sim / 100.0)
+            if not opts.get('no_commit'):
+                if opts.get('exact'):
+                    m = None
+                else:
+                    m = cmdutil.matchfiles(repo, files or [])
+                n = repo.commit(message, opts.get('user') or user,
+                                opts.get('date') or date, match=m,
+                                editor=cmdutil.commiteditor)
+                if opts.get('exact'):
+                    if hex(n) != nodeid:
+                        repo.rollback()
+                        raise util.Abort(_('patch is damaged'
+                                           ' or loses information'))
+                # Force a dirstate write so that the next transaction
+                # backups an up-do-date file.
+                repo.dirstate.write()
+                if n:
+                    commitid = short(n)
+
+            return commitid
+        finally:
+            os.unlink(tmpname)
+
     try:
         wlock = repo.wlock()
         lock = repo.lock()
+        lastcommit = None
         for p in patches:
             pf = os.path.join(d, p)
 
@@ -1799,67 +1937,19 @@
             else:
                 ui.status(_("applying %s\n") % p)
                 pf = url.open(ui, pf)
-            data = patch.extract(ui, pf)
-            tmpname, message, user, date, branch, nodeid, p1, p2 = data
-
-            if tmpname is None:
+
+            haspatch = False
+            for hunk in patch.split(pf):
+                commitid = tryone(ui, hunk)
+                if commitid:
+                    haspatch = True
+                    if lastcommit:
+                        ui.status(_('applied %s\n') % lastcommit)
+                    lastcommit = commitid
+
+            if not haspatch:
                 raise util.Abort(_('no diffs found'))
 
-            try:
-                cmdline_message = cmdutil.logmessage(opts)
-                if cmdline_message:
-                    # pickup the cmdline msg
-                    message = cmdline_message
-                elif message:
-                    # pickup the patch msg
-                    message = message.strip()
-                else:
-                    # launch the editor
-                    message = None
-                ui.debug('message:\n%s\n' % message)
-
-                wp = repo.parents()
-                if opts.get('exact'):
-                    if not nodeid or not p1:
-                        raise util.Abort(_('not a Mercurial patch'))
-                    p1 = repo.lookup(p1)
-                    p2 = repo.lookup(p2 or hex(nullid))
-
-                    if p1 != wp[0].node():
-                        hg.clean(repo, p1)
-                    repo.dirstate.setparents(p1, p2)
-                elif p2:
-                    try:
-                        p1 = repo.lookup(p1)
-                        p2 = repo.lookup(p2)
-                        if p1 == wp[0].node():
-                            repo.dirstate.setparents(p1, p2)
-                    except error.RepoError:
-                        pass
-                if opts.get('exact') or opts.get('import_branch'):
-                    repo.dirstate.setbranch(branch or 'default')
-
-                files = {}
-                try:
-                    patch.patch(tmpname, ui, strip=strip, cwd=repo.root,
-                                files=files, eolmode=None)
-                finally:
-                    files = patch.updatedir(ui, repo, files, similarity=sim/100.)
-                if not opts.get('no_commit'):
-                    m = cmdutil.matchfiles(repo, files or [])
-                    n = repo.commit(message, opts.get('user') or user,
-                                    opts.get('date') or date, match=m,
-                                    editor=cmdutil.commiteditor)
-                    if opts.get('exact'):
-                        if hex(n) != nodeid:
-                            repo.rollback()
-                            raise util.Abort(_('patch is damaged'
-                                               ' or loses information'))
-                    # Force a dirstate write so that the next transaction
-                    # backups an up-do-date file.
-                    repo.dirstate.write()
-            finally:
-                os.unlink(tmpname)
     finally:
         release(lock, wlock)
 
@@ -1876,9 +1966,10 @@
     See pull for valid source format details.
     """
     limit = cmdutil.loglimit(opts)
-    source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
+    source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
     other = hg.repository(cmdutil.remoteui(repo, opts), source)
     ui.status(_('comparing with %s\n') % url.hidepassword(source))
+    revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
     if revs:
         revs = [other.lookup(rev) for rev in revs]
     common, incoming, rheads = repo.findcommonincoming(other, heads=revs,
@@ -1919,13 +2010,14 @@
         displayer = cmdutil.show_changeset(ui, other, opts)
         count = 0
         for n in o:
-            if count >= limit:
+            if limit is not None and count >= limit:
                 break
             parents = [p for p in other.changelog.parents(n) if p != nullid]
             if opts.get('no_merges') and len(parents) == 2:
                 continue
             count += 1
             displayer.show(other[n])
+        displayer.close()
     finally:
         if hasattr(other, 'close'):
             other.close()
@@ -1968,7 +2060,7 @@
 
     ret = 1
     m = cmdutil.match(repo, pats, opts, default='relglob')
-    m.bad = lambda x,y: False
+    m.bad = lambda x, y: False
     for abs in repo[rev].walk(m):
         if not rev and abs not in repo.dirstate:
             continue
@@ -2013,41 +2105,9 @@
     limit = cmdutil.loglimit(opts)
     count = 0
 
+    endrev = None
     if opts.get('copies') and opts.get('rev'):
         endrev = max(cmdutil.revrange(repo, opts.get('rev'))) + 1
-    else:
-        endrev = len(repo)
-    rcache = {}
-    ncache = {}
-    def getrenamed(fn, rev):
-        '''looks up all renames for a file (up to endrev) the first
-        time the file is given. It indexes on the changerev and only
-        parses the manifest if linkrev != changerev.
-        Returns rename info for fn at changerev rev.'''
-        if fn not in rcache:
-            rcache[fn] = {}
-            ncache[fn] = {}
-            fl = repo.file(fn)
-            for i in fl:
-                node = fl.node(i)
-                lr = fl.linkrev(i)
-                renamed = fl.renamed(node)
-                rcache[fn][lr] = renamed
-                if renamed:
-                    ncache[fn][node] = renamed
-                if lr >= endrev:
-                    break
-        if rev in rcache[fn]:
-            return rcache[fn][rev]
-
-        # If linkrev != rev (i.e. rev not found in rcache) fallback to
-        # filectx logic.
-
-        try:
-            return repo[rev][fn].renamed()
-        except error.LookupError:
-            pass
-        return None
 
     df = False
     if opts["date"]:
@@ -2077,8 +2137,10 @@
             else:
                 return
 
-        copies = []
+        copies = None
         if opts.get('copies') and rev:
+            copies = []
+            getrenamed = templatekw.getrenamedfn(repo, endrev=endrev)
             for fn in ctx.files():
                 rename = getrenamed(fn, rev)
                 if rename:
@@ -2091,6 +2153,7 @@
             break
         if displayer.flush(ctx.rev()):
             count += 1
+    displayer.close()
 
 def manifest(ui, repo, node=None, rev=None):
     """output the current or given revision of the project manifest
@@ -2144,16 +2207,19 @@
         branch = repo.changectx(None).branch()
         bheads = repo.branchheads(branch)
         if len(bheads) > 2:
-            raise util.Abort(_("branch '%s' has %d heads - "
-                               "please merge with an explicit rev") %
-                             (branch, len(bheads)))
+            ui.warn(_("abort: branch '%s' has %d heads - "
+                      "please merge with an explicit rev\n")
+                    % (branch, len(bheads)))
+            ui.status(_("(run 'hg heads .' to see heads)\n"))
+            return False
 
         parent = repo.dirstate.parents()[0]
         if len(bheads) == 1:
             if len(repo.heads()) > 1:
-                raise util.Abort(_("branch '%s' has one head - "
-                                   "please merge with an explicit rev") %
-                                 branch)
+                ui.warn(_("abort: branch '%s' has one head - "
+                          "please merge with an explicit rev\n" % branch))
+                ui.status(_("(run 'hg heads' to see all heads)\n"))
+                return False
             msg = _('there is nothing to merge')
             if parent != repo.lookup(repo[None].branch()):
                 msg = _('%s - use "hg update" instead') % msg
@@ -2173,22 +2239,24 @@
         for node in repo.changelog.nodesbetween(roots=roots, heads=heads)[0]:
             if node not in roots:
                 displayer.show(repo[node])
+        displayer.close()
         return 0
 
     return hg.merge(repo, node, force=opts.get('force'))
 
 def outgoing(ui, repo, dest=None, **opts):
-    """show changesets not found in destination
+    """show changesets not found in the destination
 
     Show changesets not found in the specified destination repository
     or the default push location. These are the changesets that would
     be pushed if a push was requested.
 
-    See pull for valid destination format details.
+    See pull for details of valid destination formats.
     """
     limit = cmdutil.loglimit(opts)
-    dest, revs, checkout = hg.parseurl(
-        ui.expandpath(dest or 'default-push', dest or 'default'), opts.get('rev'))
+    dest = ui.expandpath(dest or 'default-push', dest or 'default')
+    dest, branches = hg.parseurl(dest, opts.get('branch'))
+    revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
     if revs:
         revs = [repo.lookup(rev) for rev in revs]
 
@@ -2204,13 +2272,14 @@
     displayer = cmdutil.show_changeset(ui, repo, opts)
     count = 0
     for n in o:
-        if count >= limit:
+        if limit is not None and count >= limit:
             break
         parents = [p for p in repo.changelog.parents(n) if p != nullid]
         if opts.get('no_merges') and len(parents) == 2:
             continue
         count += 1
         displayer.show(repo[n])
+    displayer.close()
 
 def parents(ui, repo, file_=None, **opts):
     """show the parents of the working directory or revision
@@ -2251,6 +2320,7 @@
     for n in p:
         if n != nullid:
             displayer.show(repo[n])
+    displayer.close()
 
 def paths(ui, repo, search=None):
     """show aliases for remote repositories
@@ -2305,9 +2375,10 @@
     If SOURCE is omitted, the 'default' path will be used.
     See 'hg help urls' for more information.
     """
-    source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
+    source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
     other = hg.repository(cmdutil.remoteui(repo, opts), source)
     ui.status(_('pulling from %s\n') % url.hidepassword(source))
+    revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
     if revs:
         try:
             revs = [other.lookup(rev) for rev in revs]
@@ -2324,7 +2395,7 @@
 def push(ui, repo, dest=None, **opts):
     """push changes to the specified destination
 
-    Push changes from the local repository to the given destination.
+    Push changes from the local repository to the specified destination.
 
     This is the symmetrical operation for pull. It moves changes from
     the current repository to a different one. If the destination is
@@ -2341,8 +2412,9 @@
     Please see 'hg help urls' for important details about ``ssh://``
     URLs. If DESTINATION is omitted, a default path will be used.
     """
-    dest, revs, checkout = hg.parseurl(
-        ui.expandpath(dest or 'default-push', dest or 'default'), opts.get('rev'))
+    dest = ui.expandpath(dest or 'default-push', dest or 'default')
+    dest, branches = hg.parseurl(dest, opts.get('branch'))
+    revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
     other = hg.repository(cmdutil.remoteui(repo, opts), dest)
     ui.status(_('pushing to %s\n') % url.hidepassword(dest))
     if revs:
@@ -2523,8 +2595,8 @@
     to the contents they had in the parent of the working directory.
     This restores the contents of the affected files to an unmodified
     state and unschedules adds, removes, copies, and renames. If the
-    working directory has two parents, you must explicitly specify the
-    revision to revert to.
+    working directory has two parents, you must explicitly specify a
+    revision.
 
     Using the -r/--rev option, revert the given files or directories
     to their contents as of a specific revision. This can be helpful
@@ -2579,7 +2651,7 @@
         # walk dirstate.
 
         m = cmdutil.match(repo, pats, opts)
-        m.bad = lambda x,y: False
+        m.bad = lambda x, y: False
         for abs in repo.walk(m):
             names[abs] = m.rel(abs), m.exact(abs)
 
@@ -2652,7 +2724,8 @@
                         msg = msg(abs)
                     ui.status(msg % rel)
             for table, hitlist, misslist, backuphit, backupmiss in disptable:
-                if abs not in table: continue
+                if abs not in table:
+                    continue
                 # file has changed in dirstate
                 if mfentry:
                     handle(hitlist, backuphit)
@@ -2668,7 +2741,8 @@
                     continue
                 # file has not changed in dirstate
                 if node == parent:
-                    if exact: ui.warn(_('no changes needed to %s\n') % rel)
+                    if exact:
+                        ui.warn(_('no changes needed to %s\n') % rel)
                     continue
                 if pmf is None:
                     # only need parent manifest in this unlikely case,
@@ -2746,7 +2820,7 @@
     - commit
     - import
     - pull
-    - push (with this repository as destination)
+    - push (with this repository as the destination)
     - unbundle
 
     This command is not intended for use on public repositories. Once
@@ -2800,7 +2874,8 @@
             util.set_signal_handler()
             self.httpd = server.create_server(baseui, repo)
 
-            if not ui.verbose: return
+            if not ui.verbose:
+                return
 
             if self.httpd.prefix:
                 prefix = self.httpd.prefix.strip('/') + '/'
@@ -2850,7 +2925,8 @@
 
     If one revision is given, it is used as the base revision.
     If two revisions are given, the differences between them are
-    shown.
+    shown. The --change option can also be used as a shortcut to list
+    the changed files of a revision from its first parent.
 
     The codes used to show the status of files are::
 
@@ -2864,7 +2940,18 @@
         = origin of the previous file listed as A (added)
     """
 
-    node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
+    revs = opts.get('rev')
+    change = opts.get('change')
+
+    if revs and change:
+        msg = _('cannot specify --rev and --change at the same time')
+        raise util.Abort(msg)
+    elif change:
+        node2 = repo.lookup(change)
+        node1 = repo[node2].parents()[0].node()
+    else:
+        node1, node2 = cmdutil.revpair(repo, revs)
+
     cwd = (pats and repo.getcwd()) or ''
     end = opts.get('print0') and '\0' or '\n'
     copy = {}
@@ -2938,14 +3025,14 @@
     else:
         ui.status(m)
 
-    st = list(repo.status(unknown=True))[:7]
+    st = list(repo.status(unknown=True))[:6]
     ms = merge_.mergestate(repo)
-    st.append([f for f in ms if f == 'u'])
+    st.append([f for f in ms if ms[f] == 'u'])
     labels = [_('%d modified'), _('%d added'), _('%d removed'),
               _('%d deleted'), _('%d unknown'), _('%d ignored'),
               _('%d unresolved')]
     t = []
-    for s,l in zip(st, labels):
+    for s, l in zip(st, labels):
         if s:
             t.append(l % len(s))
 
@@ -2970,8 +3057,13 @@
     # all ancestors of branch heads - all ancestors of parent = new csets
     new = [0] * len(repo)
     cl = repo.changelog
+    for a in [cl.rev(n) for n in bheads]:
+        new[a] = 1
     for a in cl.ancestors(*[cl.rev(n) for n in bheads]):
         new[a] = 1
+    for a in [p.rev() for p in parents]:
+        if a >= 0:
+            new[a] = 0
     for a in cl.ancestors(*[p.rev() for p in parents]):
         new[a] = 0
     new = sum(new)
@@ -2986,9 +3078,9 @@
 
     if opts.get('remote'):
         t = []
-        source, revs, checkout = hg.parseurl(ui.expandpath('default'),
-                                             opts.get('rev'))
+        source, branches = hg.parseurl(ui.expandpath('default'))
         other = hg.repository(cmdutil.remoteui(repo, {}), source)
+        revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
         ui.debug('comparing with %s\n' % url.hidepassword(source))
         repo.ui.pushbuffer()
         common, incoming, rheads = repo.findcommonincoming(other)
@@ -2996,14 +3088,14 @@
         if incoming:
             t.append(_('1 or more incoming'))
 
-        dest, revs, checkout = hg.parseurl(
-            ui.expandpath('default-push', 'default'))
+        dest, branches = hg.parseurl(ui.expandpath('default-push', 'default'))
+        revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
         other = hg.repository(cmdutil.remoteui(repo, {}), dest)
         ui.debug('comparing with %s\n' % url.hidepassword(dest))
         repo.ui.pushbuffer()
         o = repo.findoutgoing(other)
         repo.ui.popbuffer()
-        o = repo.changelog.nodesbetween(o, revs)[0]
+        o = repo.changelog.nodesbetween(o, None)[0]
         if o:
             t.append(_('%d outgoing') % len(o))
 
@@ -3121,7 +3213,9 @@
     that repository becomes the current tip. The "tip" tag is special
     and cannot be renamed or assigned to a different changeset.
     """
-    cmdutil.show_changeset(ui, repo, opts).show(repo[len(repo) - 1])
+    displayer = cmdutil.show_changeset(ui, repo, opts)
+    displayer.show(repo[len(repo) - 1])
+    displayer.close()
 
 def unbundle(ui, repo, fname1, *fnames, **opts):
     """apply one or more changegroup files
@@ -3286,7 +3380,7 @@
 diffopts = [
     ('a', 'text', None, _('treat all files as text')),
     ('g', 'git', None, _('use git extended diff format')),
-    ('', 'nodates', None, _("don't include dates in diff headers"))
+    ('', 'nodates', None, _('omit dates from diff headers'))
 ]
 
 diffopts2 = [
@@ -3315,9 +3409,11 @@
     "^annotate|blame":
         (annotate,
          [('r', 'rev', '', _('annotate the specified revision')),
-          ('f', 'follow', None, _('follow file copies and renames')),
+          ('', 'follow', None, _('follow copies and renames (DEPRECATED)')),
+          ('', 'no-follow', None, _("don't follow copies and renames")),
           ('a', 'text', None, _('treat all files as text')),
           ('u', 'user', None, _('list the author (long with -v)')),
+          ('f', 'file', None, _('list the filename')),
           ('d', 'date', None, _('list the date (short with -q)')),
           ('n', 'number', None, _('list the revision number (default)')),
           ('c', 'changeset', None, _('list the changeset')),
@@ -3366,11 +3462,13 @@
     "bundle":
         (bundle,
          [('f', 'force', None,
-           _('run even when remote repository is unrelated')),
+           _('run even when the destination is unrelated')),
           ('r', 'rev', [],
-           _('a changeset up to which you would like to bundle')),
+           _('a changeset intended to be added to the destination')),
+          ('b', 'branch', [],
+           _('a specific branch you would like to bundle')),
           ('', 'base', [],
-           _('a base changeset to specify instead of a destination')),
+           _('a base changeset assumed to be available at the destination')),
           ('a', 'all', None, _('bundle all changesets in the repository')),
           ('t', 'type', 'bzip2', _('bundle compression type to use')),
          ] + remoteopts,
@@ -3385,11 +3483,13 @@
     "^clone":
         (clone,
          [('U', 'noupdate', None,
-          _('the clone will only contain a repository (no working copy)')),
+          _('the clone will include an empty working copy (only a repository)')),
           ('u', 'updaterev', '',
            _('revision, tag or branch to check out')),
           ('r', 'rev', [],
-           _('clone only the specified revisions and ancestors')),
+           _('include the specified changeset')),
+          ('b', 'branch', [],
+           _('clone only the specified branch')),
           ('', 'pull', None, _('use pull protocol to copy metadata')),
           ('', 'uncompressed', None,
            _('use uncompressed transfer (fast over LAN)')),
@@ -3454,7 +3554,8 @@
     "^export":
         (export,
          [('o', 'output', '', _('print output to file with formatted name')),
-          ('', 'switch-parent', None, _('diff against the second parent'))
+          ('', 'switch-parent', None, _('diff against the second parent')),
+          ('r', 'rev', [], _('revisions to export')),
           ] + diffopts,
          _('[OPTION]... [-o OUTFILESPEC] REV...')),
     "^forget":
@@ -3466,7 +3567,8 @@
          [('0', 'print0', None, _('end fields with NUL')),
           ('', 'all', None, _('print all revisions that match')),
           ('f', 'follow', None,
-           _('follow changeset history, or file history across copies and renames')),
+           _('follow changeset history,'
+             ' or file history across copies and renames')),
           ('i', 'ignore-case', None, _('ignore case when matching')),
           ('l', 'files-with-matches', None,
            _('print only filenames and revisions that match')),
@@ -3479,8 +3581,9 @@
     "heads":
         (heads,
          [('r', 'rev', '', _('show only heads which are descendants of REV')),
+          ('t', 'topo', False, _('show topological heads only')),
           ('a', 'active', False,
-           _('show only the active branch heads from open branches')),
+           _('show active branchheads only [DEPRECATED]')),
           ('c', 'closed', False,
            _('show normal and closed branch heads')),
          ] + templateopts,
@@ -3502,7 +3605,8 @@
           ('b', 'base', '', _('base path')),
           ('f', 'force', None,
            _('skip check for outstanding uncommitted changes')),
-          ('', 'no-commit', None, _("don't commit, just update the working directory")),
+          ('', 'no-commit', None,
+           _("don't commit, just update the working directory")),
           ('', 'exact', None,
            _('apply patch to the nodes from which it was generated')),
           ('', 'import-branch', None,
@@ -3512,11 +3616,13 @@
     "incoming|in":
         (incoming,
          [('f', 'force', None,
-           _('run even when remote repository is unrelated')),
+           _('run even if remote repository is unrelated')),
           ('n', 'newest-first', None, _('show newest record first')),
           ('', 'bundle', '', _('file to store the bundles into')),
           ('r', 'rev', [],
-           _('a specific remote revision up to which you would like to pull')),
+           _('a remote changeset intended to be added')),
+          ('b', 'branch', [],
+           _('a specific branch you would like to pull')),
          ] + logopts + remoteopts,
          _('[-p] [-n] [-M] [-f] [-r REV]...'
            ' [--bundle FILENAME] [SOURCE]')),
@@ -3526,7 +3632,7 @@
          _('[-e CMD] [--remotecmd CMD] [DEST]')),
     "locate":
         (locate,
-         [('r', 'rev', '', _('search the repository as it stood at REV')),
+         [('r', 'rev', '', _('search the repository as it is in REV')),
           ('0', 'print0', None,
            _('end filenames with NUL, for use with xargs')),
           ('f', 'fullpath', None,
@@ -3536,7 +3642,8 @@
     "^log|history":
         (log,
          [('f', 'follow', None,
-           _('follow changeset history, or file history across copies and renames')),
+           _('follow changeset history,'
+             ' or file history across copies and renames')),
           ('', 'follow-first', None,
            _('only follow the first parent of merge changesets')),
           ('d', 'date', '', _('show revisions matching date spec')),
@@ -3548,7 +3655,8 @@
           ('u', 'user', [], _('revisions committed by user')),
           ('b', 'only-branch', [],
             _('show only changesets within the given named branch')),
-          ('P', 'prune', [], _('do not display revision or any of its ancestors')),
+          ('P', 'prune', [],
+           _('do not display revision or any of its ancestors')),
          ] + logopts + walkopts,
          _('[OPTION]... [FILE]')),
     "manifest":
@@ -3565,15 +3673,17 @@
     "outgoing|out":
         (outgoing,
          [('f', 'force', None,
-           _('run even when remote repository is unrelated')),
+           _('run even when the destination is unrelated')),
           ('r', 'rev', [],
-           _('a specific revision up to which you would like to push')),
+           _('a changeset intended to be included in the destination')),
           ('n', 'newest-first', None, _('show newest record first')),
+          ('b', 'branch', [],
+           _('a specific branch you would like to push')),
          ] + logopts + remoteopts,
          _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')),
     "parents":
         (parents,
-         [('r', 'rev', '', _('show parents from the specified revision')),
+         [('r', 'rev', '', _('show parents of the specified revision')),
          ] + templateopts,
          _('[-r REV] [FILE]')),
     "paths": (paths, [], _('[NAME]')),
@@ -3584,14 +3694,18 @@
           ('f', 'force', None,
            _('run even when remote repository is unrelated')),
           ('r', 'rev', [],
-           _('a specific remote revision up to which you would like to pull')),
+           _('a remote changeset intended to be added')),
+          ('b', 'branch', [],
+           _('a specific branch you would like to pull')),
          ] + remoteopts,
          _('[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]')),
     "^push":
         (push,
          [('f', 'force', None, _('force push')),
           ('r', 'rev', [],
-           _('a specific revision up to which you would like to push')),
+           _('a changeset intended to be included in the destination')),
+          ('b', 'branch', [],
+           _('a specific branch you would like to push')),
          ] + remoteopts,
          _('[-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]')),
     "recover": (recover, []),
@@ -3622,7 +3736,7 @@
         (revert,
          [('a', 'all', None, _('revert all changes when no arguments given')),
           ('d', 'date', '', _('tipmost revision matching date')),
-          ('r', 'rev', '', _('revision to revert to')),
+          ('r', 'rev', '', _('revert to the specified revision')),
           ('', 'no-backup', None, _('do not save backup copies of files')),
          ] + walkopts + dryrunopts,
          _('[OPTION]... [-r REV] [NAME]...')),
@@ -3635,8 +3749,10 @@
           ('', 'daemon-pipefds', '', _('used internally by daemon mode')),
           ('E', 'errorlog', '', _('name of error log file to write to')),
           ('p', 'port', 0, _('port to listen on (default: 8000)')),
-          ('a', 'address', '', _('address to listen on (default: all interfaces)')),
-          ('', 'prefix', '', _('prefix path to serve from (default: server root)')),
+          ('a', 'address', '',
+           _('address to listen on (default: all interfaces)')),
+          ('', 'prefix', '',
+           _('prefix path to serve from (default: server root)')),
           ('n', 'name', '',
            _('name to show in web pages (default: working directory)')),
           ('', 'webdir-conf', '', _('name of the webdir config file'
@@ -3670,6 +3786,7 @@
           ('0', 'print0', None,
            _('end filenames with NUL, for use with xargs')),
           ('', 'rev', [], _('show difference from revision')),
+          ('', 'change', '', _('list the changed files of a revision')),
          ] + walkopts,
          _('[OPTION]... [FILE]...')),
     "tag":
--- a/mercurial/context.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/context.py	Sat Feb 13 23:50:38 2010 -0600
@@ -87,20 +87,33 @@
         for f in sorted(self._manifest):
             yield f
 
-    def changeset(self): return self._changeset
-    def manifest(self): return self._manifest
-    def manifestnode(self): return self._changeset[0]
+    def changeset(self):
+        return self._changeset
+    def manifest(self):
+        return self._manifest
+    def manifestnode(self):
+        return self._changeset[0]
 
-    def rev(self): return self._rev
-    def node(self): return self._node
-    def hex(self): return hex(self._node)
-    def user(self): return self._changeset[1]
-    def date(self): return self._changeset[2]
-    def files(self): return self._changeset[3]
-    def description(self): return self._changeset[4]
-    def branch(self): return self._changeset[5].get("branch")
-    def extra(self): return self._changeset[5]
-    def tags(self): return self._repo.nodetags(self._node)
+    def rev(self):
+        return self._rev
+    def node(self):
+        return self._node
+    def hex(self):
+        return hex(self._node)
+    def user(self):
+        return self._changeset[1]
+    def date(self):
+        return self._changeset[2]
+    def files(self):
+        return self._changeset[3]
+    def description(self):
+        return self._changeset[4]
+    def branch(self):
+        return self._changeset[5].get("branch")
+    def extra(self):
+        return self._changeset[5]
+    def tags(self):
+        return self._repo.nodetags(self._node)
 
     def parents(self):
         """return contexts for each parent changeset"""
@@ -283,10 +296,14 @@
         return filectx(self._repo, self._path, fileid=fileid,
                        filelog=self._filelog)
 
-    def filerev(self): return self._filerev
-    def filenode(self): return self._filenode
-    def flags(self): return self._changectx.flags(self._path)
-    def filelog(self): return self._filelog
+    def filerev(self):
+        return self._filerev
+    def filenode(self):
+        return self._filenode
+    def flags(self):
+        return self._changectx.flags(self._path)
+    def filelog(self):
+        return self._filelog
 
     def rev(self):
         if '_changectx' in self.__dict__:
@@ -295,23 +312,38 @@
             return self._changectx.rev()
         return self._filelog.linkrev(self._filerev)
 
-    def linkrev(self): return self._filelog.linkrev(self._filerev)
-    def node(self): return self._changectx.node()
-    def hex(self): return hex(self.node())
-    def user(self): return self._changectx.user()
-    def date(self): return self._changectx.date()
-    def files(self): return self._changectx.files()
-    def description(self): return self._changectx.description()
-    def branch(self): return self._changectx.branch()
-    def extra(self): return self._changectx.extra()
-    def manifest(self): return self._changectx.manifest()
-    def changectx(self): return self._changectx
+    def linkrev(self):
+        return self._filelog.linkrev(self._filerev)
+    def node(self):
+        return self._changectx.node()
+    def hex(self):
+        return hex(self.node())
+    def user(self):
+        return self._changectx.user()
+    def date(self):
+        return self._changectx.date()
+    def files(self):
+        return self._changectx.files()
+    def description(self):
+        return self._changectx.description()
+    def branch(self):
+        return self._changectx.branch()
+    def extra(self):
+        return self._changectx.extra()
+    def manifest(self):
+        return self._changectx.manifest()
+    def changectx(self):
+        return self._changectx
 
-    def data(self): return self._filelog.read(self._filenode)
-    def path(self): return self._path
-    def size(self): return self._filelog.size(self._filerev)
+    def data(self):
+        return self._filelog.read(self._filenode)
+    def path(self):
+        return self._path
+    def size(self):
+        return self._filelog.size(self._filerev)
 
-    def cmp(self, text): return self._filelog.cmp(self._filenode, text)
+    def cmp(self, text):
+        return self._filelog.cmp(self._filenode, text)
 
     def renamed(self):
         """check if file was actually renamed in this changeset revision
@@ -348,7 +380,7 @@
             pl[0] = (r[0], r[1], None)
 
         return [filectx(self._repo, p, fileid=n, filelog=l)
-                for p,n,l in pl if n != nullid]
+                for p, n, l in pl if n != nullid]
 
     def children(self):
         # hard for renames
@@ -433,19 +465,17 @@
         # sort by revision (per file) which is a topological order
         visit = []
         for f in files:
-            fn = [(n.rev(), n) for n in needed if n._path == f]
-            visit.extend(fn)
+            visit.extend(n for n in needed if n._path == f)
 
         hist = {}
-        for r, f in sorted(visit):
+        for f in sorted(visit, key=lambda x: x.rev()):
             curr = decorate(f.data(), f)
             for p in parents(f):
-                if p != nullid:
-                    curr = pair(hist[p], curr)
-                    # trim the history of unneeded revs
-                    needed[p] -= 1
-                    if not needed[p]:
-                        del hist[p]
+                curr = pair(hist[p], curr)
+                # trim the history of unneeded revs
+                needed[p] -= 1
+                if not needed[p]:
+                    del hist[p]
             hist[f] = curr
 
         return zip(hist[f][0], hist[f][1].splitlines(True))
@@ -596,22 +626,33 @@
         self._parents = [changectx(self._repo, x) for x in p]
         return self._parents
 
-    def manifest(self): return self._manifest
-
-    def user(self): return self._user or self._repo.ui.username()
-    def date(self): return self._date
-    def description(self): return self._text
+    def manifest(self):
+        return self._manifest
+    def user(self):
+        return self._user or self._repo.ui.username()
+    def date(self):
+        return self._date
+    def description(self):
+        return self._text
     def files(self):
         return sorted(self._status[0] + self._status[1] + self._status[2])
 
-    def modified(self): return self._status[0]
-    def added(self): return self._status[1]
-    def removed(self): return self._status[2]
-    def deleted(self): return self._status[3]
-    def unknown(self): return self._status[4]
-    def clean(self): return self._status[5]
-    def branch(self): return self._extra['branch']
-    def extra(self): return self._extra
+    def modified(self):
+        return self._status[0]
+    def added(self):
+        return self._status[1]
+    def removed(self):
+        return self._status[2]
+    def deleted(self):
+        return self._status[3]
+    def unknown(self):
+        return self._status[4]
+    def clean(self):
+        return self._status[5]
+    def branch(self):
+        return self._extra['branch']
+    def extra(self):
+        return self._extra
 
     def tags(self):
         t = []
@@ -651,7 +692,8 @@
         return self._parents[0].ancestor(c2) # punt on two parents for now
 
     def walk(self, match):
-        return sorted(self._repo.dirstate.walk(match, True, False))
+        return sorted(self._repo.dirstate.walk(match, self.substate.keys(),
+                                               True, False))
 
     def dirty(self, missing=False):
         "check whether a working directory is modified"
@@ -686,7 +728,8 @@
     def __str__(self):
         return "%s@%s" % (self.path(), self._changectx)
 
-    def data(self): return self._repo.wread(self._path)
+    def data(self):
+        return self._repo.wread(self._path)
     def renamed(self):
         rp = self._repo.dirstate.copied(self._path)
         if not rp:
@@ -712,21 +755,24 @@
             pl.append((path, filenode(pc, path), fl))
 
         return [filectx(self._repo, p, fileid=n, filelog=l)
-                for p,n,l in pl if n != nullid]
+                for p, n, l in pl if n != nullid]
 
     def children(self):
         return []
 
-    def size(self): return os.stat(self._repo.wjoin(self._path)).st_size
+    def size(self):
+        return os.stat(self._repo.wjoin(self._path)).st_size
     def date(self):
         t, tz = self._changectx.date()
         try:
             return (int(os.lstat(self._repo.wjoin(self._path)).st_mtime), tz)
         except OSError, err:
-            if err.errno != errno.ENOENT: raise
+            if err.errno != errno.ENOENT:
+                raise
             return (t, tz)
 
-    def cmp(self, text): return self._repo.wread(self._path) == text
+    def cmp(self, text):
+        return self._repo.wread(self._path) == text
 
 class memctx(object):
     """Use memctx to perform in-memory commits via localrepo.commitctx().
@@ -788,22 +834,37 @@
     def __getitem__(self, key):
         return self.filectx(key)
 
-    def p1(self): return self._parents[0]
-    def p2(self): return self._parents[1]
+    def p1(self):
+        return self._parents[0]
+    def p2(self):
+        return self._parents[1]
 
-    def user(self): return self._user or self._repo.ui.username()
-    def date(self): return self._date
-    def description(self): return self._text
-    def files(self): return self.modified()
-    def modified(self): return self._status[0]
-    def added(self): return self._status[1]
-    def removed(self): return self._status[2]
-    def deleted(self): return self._status[3]
-    def unknown(self): return self._status[4]
-    def clean(self): return self._status[5]
-    def branch(self): return self._extra['branch']
-    def extra(self): return self._extra
-    def flags(self, f): return self[f].flags()
+    def user(self):
+        return self._user or self._repo.ui.username()
+    def date(self):
+        return self._date
+    def description(self):
+        return self._text
+    def files(self):
+        return self.modified()
+    def modified(self):
+        return self._status[0]
+    def added(self):
+        return self._status[1]
+    def removed(self):
+        return self._status[2]
+    def deleted(self):
+        return self._status[3]
+    def unknown(self):
+        return self._status[4]
+    def clean(self):
+        return self._status[5]
+    def branch(self):
+        return self._extra['branch']
+    def extra(self):
+        return self._extra
+    def flags(self, f):
+        return self[f].flags()
 
     def parents(self):
         """return contexts for each parent changeset"""
@@ -833,11 +894,19 @@
         if copied:
             self._copied = (copied, nullid)
 
-    def __nonzero__(self): return True
-    def __str__(self): return "%s@%s" % (self.path(), self._changectx)
-    def path(self): return self._path
-    def data(self): return self._data
-    def flags(self): return self._flags
-    def isexec(self): return 'x' in self._flags
-    def islink(self): return 'l' in self._flags
-    def renamed(self): return self._copied
+    def __nonzero__(self):
+        return True
+    def __str__(self):
+        return "%s@%s" % (self.path(), self._changectx)
+    def path(self):
+        return self._path
+    def data(self):
+        return self._data
+    def flags(self):
+        return self._flags
+    def isexec(self):
+        return 'x' in self._flags
+    def islink(self):
+        return 'l' in self._flags
+    def renamed(self):
+        return self._copied
--- a/mercurial/copies.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/copies.py	Sat Feb 13 23:50:38 2010 -0600
@@ -154,7 +154,7 @@
                 break # no merge needed, quit early
             c2 = ctx(of, m2[of])
             cr = related(oc, c2, ca.rev())
-            if of == f or of == c2.path(): # non-divergent
+            if cr and (of == f or of == c2.path()): # non-divergent
                 copy[f] = of
                 of = None
                 break
@@ -190,8 +190,10 @@
         repo.ui.debug("  all copies found (* = to merge, ! = divergent):\n")
         for f in fullcopy:
             note = ""
-            if f in copy: note += "*"
-            if f in diverge2: note += "!"
+            if f in copy:
+                note += "*"
+            if f in diverge2:
+                note += "!"
             repo.ui.debug("   %s -> %s %s\n" % (f, fullcopy[f], note))
     del diverge2
 
--- a/mercurial/diffhelpers.c	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/diffhelpers.c	Sat Feb 13 23:50:38 2010 -0600
@@ -21,14 +21,19 @@
 	int hunksz = PyList_Size(hunk);
 	PyObject *s = PyList_GET_ITEM(hunk, hunksz-1);
 	char *l = PyString_AS_STRING(s);
-	int sz = PyString_GET_SIZE(s);
 	int alen = PyList_Size(a);
 	int blen = PyList_Size(b);
 	char c = l[0];
+	PyObject *hline;
+	int sz = PyString_GET_SIZE(s);
 
-	PyObject *hline = PyString_FromStringAndSize(l, sz-1);
+	if (sz > 1 && l[sz-2] == '\r')
+		/* tolerate CRLF in last line */
+		sz -= 1;
+	hline = PyString_FromStringAndSize(l, sz-1);
+
 	if (c == ' ' || c == '+') {
-		PyObject *rline = PyString_FromStringAndSize(l+1, sz-2);
+		PyObject *rline = PyString_FromStringAndSize(l + 1, sz - 2);
 		PyList_SetItem(b, blen-1, rline);
 	}
 	if (c == ' ' || c == '-') {
@@ -69,13 +74,13 @@
 	if (!PyArg_ParseTuple(args, "OOiiOO", &fp, &hunk, &lena, &lenb, &a, &b))
 		return NULL;
 
-	while(1) {
+	while (1) {
 		todoa = lena - PyList_Size(a);
 		todob = lenb - PyList_Size(b);
 		num = todoa > todob ? todoa : todob;
 		if (num == 0)
 		    break;
-		for (i = 0 ; i < num ; i++) {
+		for (i = 0; i < num; i++) {
 			x = PyFile_GetLine(fp, 0);
 			s = PyString_AS_STRING(x);
 			c = *s;
@@ -130,10 +135,10 @@
 	if (alen > blen - bstart) {
 		return Py_BuildValue("l", -1);
 	}
-	for (i = 0 ; i < alen ; i++) {
+	for (i = 0; i < alen; i++) {
 		sa = PyString_AS_STRING(PyList_GET_ITEM(a, i));
 		sb = PyString_AS_STRING(PyList_GET_ITEM(b, i + bstart));
-		if (strcmp(sa+1, sb) != 0)
+		if (strcmp(sa + 1, sb) != 0)
 			return Py_BuildValue("l", -1);
 	}
 	return Py_BuildValue("l", 0);
--- a/mercurial/dirstate.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/dirstate.py	Sat Feb 13 23:50:38 2010 -0600
@@ -38,9 +38,12 @@
 class dirstate(object):
 
     def __init__(self, opener, ui, root):
-        '''Create a new dirstate object.  opener is an open()-like callable
-        that can be used to open the dirstate file; root is the root of the
-        directory tracked by the dirstate.'''
+        '''Create a new dirstate object.
+
+        opener is an open()-like callable that can be used to open the
+        dirstate file; root is the root of the directory tracked by
+        the dirstate.
+        '''
         self._opener = opener
         self._root = root
         self._rootdir = os.path.join(root, '')
@@ -84,13 +87,14 @@
             elif l > 0 and l < 40:
                 raise util.Abort(_('working directory state appears damaged!'))
         except IOError, err:
-            if err.errno != errno.ENOENT: raise
+            if err.errno != errno.ENOENT:
+                raise
         return [nullid, nullid]
 
     @propertycache
     def _dirs(self):
         dirs = {}
-        for f,s in self._map.iteritems():
+        for f, s in self._map.iteritems():
             if s[0] != 'r':
                 _incdirs(dirs, f)
         return dirs
@@ -154,7 +158,8 @@
 
     def getcwd(self):
         cwd = os.getcwd()
-        if cwd == self._root: return ''
+        if cwd == self._root:
+            return ''
         # self._root ends with a path separator if self._root is '/' or 'C:\'
         rootsep = self._root
         if not util.endswithsep(rootsep):
@@ -175,6 +180,7 @@
 
     def __getitem__(self, key):
         '''Return the current state of key (a filename) in the dirstate.
+
         States are:
           n  normal
           m  needs merging
@@ -213,7 +219,8 @@
         try:
             st = self._opener("dirstate").read()
         except IOError, err:
-            if err.errno != errno.ENOENT: raise
+            if err.errno != errno.ENOENT:
+                raise
             return
         if not st:
             return
@@ -229,8 +236,7 @@
         self._dirty = False
 
     def copy(self, source, dest):
-        """Mark dest as a copy of source. Unmark dest if source is None.
-        """
+        """Mark dest as a copy of source. Unmark dest if source is None."""
         if source == dest:
             return
         self._dirty = True
@@ -268,7 +274,7 @@
             _incdirs(self._dirs, f)
 
     def normal(self, f):
-        'mark a file normal and clean'
+        '''Mark a file normal and clean.'''
         self._dirty = True
         self._addpath(f)
         s = os.lstat(self._join(f))
@@ -277,7 +283,7 @@
             del self._copymap[f]
 
     def normallookup(self, f):
-        'mark a file normal, but possibly dirty'
+        '''Mark a file normal, but possibly dirty.'''
         if self._pl[1] != nullid and f in self._map:
             # if there is a merge going on and the file was either
             # in state 'm' or dirty before being removed, restore that state.
@@ -300,7 +306,7 @@
             del self._copymap[f]
 
     def normaldirty(self, f):
-        'mark a file normal, but dirty'
+        '''Mark a file normal, but dirty.'''
         self._dirty = True
         self._addpath(f)
         self._map[f] = ('n', 0, -2, -1)
@@ -308,7 +314,7 @@
             del self._copymap[f]
 
     def add(self, f):
-        'mark a file added'
+        '''Mark a file added.'''
         self._dirty = True
         self._addpath(f, True)
         self._map[f] = ('a', 0, -1, -1)
@@ -316,7 +322,7 @@
             del self._copymap[f]
 
     def remove(self, f):
-        'mark a file removed'
+        '''Mark a file removed.'''
         self._dirty = True
         self._droppath(f)
         size = 0
@@ -331,7 +337,7 @@
             del self._copymap[f]
 
     def merge(self, f):
-        'mark a file merged'
+        '''Mark a file merged.'''
         self._dirty = True
         s = os.lstat(self._join(f))
         self._addpath(f)
@@ -340,7 +346,7 @@
             del self._copymap[f]
 
     def forget(self, f):
-        'forget a file'
+        '''Forget a file.'''
         self._dirty = True
         try:
             self._droppath(f)
@@ -362,7 +368,7 @@
     def clear(self):
         self._map = {}
         if "_dirs" in self.__dict__:
-            delattr(self, "_dirs");
+            delattr(self, "_dirs")
         self._copymap = {}
         self._pl = [nullid, nullid]
         self._dirty = True
@@ -424,7 +430,7 @@
                 return True
         return False
 
-    def walk(self, match, unknown, ignored):
+    def walk(self, match, subrepos, unknown, ignored):
         '''
         Walk recursively through the directory tree, finding all files
         matched by match.
@@ -439,11 +445,16 @@
 
         def badtype(mode):
             kind = _('unknown')
-            if stat.S_ISCHR(mode): kind = _('character device')
-            elif stat.S_ISBLK(mode): kind = _('block device')
-            elif stat.S_ISFIFO(mode): kind = _('fifo')
-            elif stat.S_ISSOCK(mode): kind = _('socket')
-            elif stat.S_ISDIR(mode): kind = _('directory')
+            if stat.S_ISCHR(mode):
+                kind = _('character device')
+            elif stat.S_ISBLK(mode):
+                kind = _('block device')
+            elif stat.S_ISFIFO(mode):
+                kind = _('fifo')
+            elif stat.S_ISSOCK(mode):
+                kind = _('socket')
+            elif stat.S_ISDIR(mode):
+                kind = _('directory')
             return _('unsupported file type (type is %s)') % kind
 
         ignore = self._ignore
@@ -485,7 +496,8 @@
         files = set(match.files())
         if not files or '.' in files:
             files = ['']
-        results = {'.hg': None}
+        results = dict.fromkeys(subrepos)
+        results['.hg'] = None
 
         # step 1: find all explicit files
         for ff in sorted(files):
@@ -563,11 +575,12 @@
                 if not st is None and not getkind(st.st_mode) in (regkind, lnkkind):
                     st = None
                 results[nf] = st
-
+        for s in subrepos:
+            del results[s]
         del results['.hg']
         return results
 
-    def status(self, match, ignored, clean, unknown):
+    def status(self, match, subrepos, ignored, clean, unknown):
         '''Determine the status of the working copy relative to the
         dirstate and return a tuple of lists (unsure, modified, added,
         removed, deleted, unknown, ignored, clean), where:
@@ -608,7 +621,8 @@
         dadd = deleted.append
         cadd = clean.append
 
-        for fn, st in self.walk(match, listunknown, listignored).iteritems():
+        for fn, st in self.walk(match, subrepos, listunknown,
+                                listignored).iteritems():
             if fn not in dmap:
                 if (listignored or match.exact(fn)) and self._dirignore(fn):
                     if listignored:
--- a/mercurial/dispatch.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/dispatch.py	Sat Feb 13 23:50:38 2010 -0600
@@ -35,7 +35,8 @@
 
     for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM':
         num = getattr(signal, name, None)
-        if num: signal.signal(num, catchterm)
+        if num:
+            signal.signal(num, catchterm)
 
     try:
         try:
@@ -92,7 +93,12 @@
         ui.warn(_("killed!\n"))
     except error.UnknownCommand, inst:
         ui.warn(_("hg: unknown command '%s'\n") % inst.args[0])
-        commands.help_(ui, 'shortlist')
+        try:
+            # check if the command is in a disabled extension
+            # (but don't check for extensions themselves)
+            commands.help_(ui, inst.args[0], unknowncmd=True)
+        except error.UnknownCommand:
+            commands.help_(ui, 'shortlist')
     except util.Abort, inst:
         ui.warn(_("abort: %s\n") % inst)
     except ImportError, inst:
@@ -156,14 +162,6 @@
 
     return -1
 
-def _findrepo(p):
-    while not os.path.isdir(os.path.join(p, ".hg")):
-        oldp, p = p, os.path.dirname(p)
-        if p == oldp:
-            return None
-
-    return p
-
 def aliasargs(fn):
     if hasattr(fn, 'args'):
         return fn.args
@@ -177,6 +175,7 @@
         self.opts = []
         self.help = ''
         self.norepo = True
+        self.badalias = False
 
         try:
             cmdutil.findcmd(self.name, cmdtable, True)
@@ -189,6 +188,7 @@
                 ui.warn(_("no definition for alias '%s'\n") % self.name)
                 return 1
             self.fn = fn
+            self.badalias = True
 
             return
 
@@ -205,18 +205,31 @@
             self.args = aliasargs(self.fn) + args
             if cmd not in commands.norepo.split(' '):
                 self.norepo = False
+            if self.help.startswith("hg " + cmd):
+                # drop prefix in old-style help lines so hg shows the alias
+                self.help = self.help[4 + len(cmd):]
+            self.__doc__ = _("alias for: hg %s\n\n%s") \
+                               % (definition, self.fn.__doc__)
+
         except error.UnknownCommand:
             def fn(ui, *args):
                 ui.warn(_("alias '%s' resolves to unknown command '%s'\n") \
                             % (self.name, cmd))
+                try:
+                    # check if the command is in a disabled extension
+                    commands.help_(ui, cmd, unknowncmd=True)
+                except error.UnknownCommand:
+                    pass
                 return 1
             self.fn = fn
+            self.badalias = True
         except error.AmbiguousCommand:
             def fn(ui, *args):
                 ui.warn(_("alias '%s' resolves to ambiguous command '%s'\n") \
                             % (self.name, cmd))
                 return 1
             self.fn = fn
+            self.badalias = True
 
     def __call__(self, ui, *args, **opts):
         if self.shadows:
@@ -245,14 +258,14 @@
 
     if args:
         cmd, args = args[0], args[1:]
-        aliases, i = cmdutil.findcmd(cmd, commands.table,
+        aliases, entry = cmdutil.findcmd(cmd, commands.table,
                                      ui.config("ui", "strict"))
         cmd = aliases[0]
-        args = aliasargs(i[0]) + args
+        args = aliasargs(entry[0]) + args
         defaults = ui.config("defaults", cmd)
         if defaults:
             args = map(util.expandpath, shlex.split(defaults)) + args
-        c = list(i[1])
+        c = list(entry[1])
     else:
         cmd = None
         c = []
@@ -272,7 +285,7 @@
         options[n] = cmdoptions[n]
         del cmdoptions[n]
 
-    return (cmd, cmd and i[0] or None, args, options, cmdoptions)
+    return (cmd, cmd and entry[0] or None, args, options, cmdoptions)
 
 def _parseconfig(ui, config):
     """parse the --config options from the command line"""
@@ -339,7 +352,7 @@
         os.chdir(cwd[-1])
 
     # read the local repository .hgrc into a local ui object
-    path = _findrepo(os.getcwd()) or ""
+    path = cmdutil.findrepo(os.getcwd()) or ""
     if not path:
         lui = ui
     else:
@@ -438,7 +451,7 @@
         except error.RepoError:
             if cmd not in commands.optionalrepo.split():
                 if args and not path: # try to infer -R from command args
-                    repos = map(_findrepo, args)
+                    repos = map(cmdutil.findrepo, args)
                     guess = repos[0]
                     if guess and repos.count(guess) == len(repos):
                         return _dispatch(ui, ['--repository', guess] + fullargs)
--- a/mercurial/encoding.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/encoding.py	Sat Feb 13 23:50:38 2010 -0600
@@ -62,7 +62,7 @@
     try:
         return s.decode(encoding, encodingmode).encode("utf-8")
     except UnicodeDecodeError, inst:
-        sub = s[max(0, inst.start-10):inst.start+10]
+        sub = s[max(0, inst.start - 10):inst.start + 10]
         raise error.Abort("decoding near '%s': %s!" % (sub, inst))
     except LookupError, k:
         raise error.Abort("%s, please check your locale settings" % k)
--- a/mercurial/extensions.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/extensions.py	Sat Feb 13 23:50:38 2010 -0600
@@ -6,7 +6,7 @@
 # GNU General Public License version 2 or any later version.
 
 import imp, os
-import util, cmdutil, help
+import util, cmdutil, help, error
 from i18n import _, gettext
 
 _extensions = {}
@@ -131,22 +131,18 @@
     setattr(container, funcname, wrap)
     return origfn
 
-def disabled():
-    '''find disabled extensions from hgext
-    returns a dict of {name: desc}, and the max name length'''
-
+def _disabledpaths(strip_init=False):
+    '''find paths of disabled extensions. returns a dict of {name: path}
+    removes /__init__.py from packages if strip_init is True'''
     import hgext
     extpath = os.path.dirname(os.path.abspath(hgext.__file__))
-
     try: # might not be a filesystem path
         files = os.listdir(extpath)
     except OSError:
-        return None, 0
+        return {}
 
     exts = {}
-    maxlength = 0
     for e in files:
-
         if e.endswith('.py'):
             name = e.rsplit('.', 1)[0]
             path = os.path.join(extpath, e)
@@ -155,28 +151,96 @@
             path = os.path.join(extpath, e, '__init__.py')
             if not os.path.exists(path):
                 continue
+            if strip_init:
+                path = os.path.dirname(path)
+        if name in exts or name in _order or name == '__init__':
+            continue
+        exts[name] = path
+    return exts
 
-        if name in exts or name in _order or name == '__init__':
+def _disabledhelp(path):
+    '''retrieve help synopsis of a disabled extension (without importing)'''
+    try:
+        file = open(path)
+    except IOError:
+        return
+    else:
+        doc = help.moduledoc(file)
+        file.close()
+
+    if doc: # extracting localized synopsis
+        return gettext(doc).splitlines()[0]
+    else:
+        return _('(no help text available)')
+
+def disabled():
+    '''find disabled extensions from hgext
+    returns a dict of {name: desc}, and the max name length'''
+
+    paths = _disabledpaths()
+    if not paths:
+        return None, 0
+
+    exts = {}
+    maxlength = 0
+    for name, path in paths.iteritems():
+        doc = _disabledhelp(path)
+        if not doc:
             continue
 
-        try:
-            file = open(path)
-        except IOError:
-            continue
-        else:
-            doc = help.moduledoc(file)
-            file.close()
-
-        if doc: # extracting localized synopsis
-            exts[name] = gettext(doc).splitlines()[0]
-        else:
-            exts[name] = _('(no help text available)')
-
+        exts[name] = doc
         if len(name) > maxlength:
             maxlength = len(name)
 
     return exts, maxlength
 
+def disabledext(name):
+    '''find a specific disabled extension from hgext. returns desc'''
+    paths = _disabledpaths()
+    if name in paths:
+        return _disabledhelp(paths[name])
+
+def disabledcmd(cmd, strict=False):
+    '''import disabled extensions until cmd is found.
+    returns (cmdname, extname, doc)'''
+
+    paths = _disabledpaths(strip_init=True)
+    if not paths:
+        raise error.UnknownCommand(cmd)
+
+    def findcmd(cmd, name, path):
+        try:
+            mod = loadpath(path, 'hgext.%s' % name)
+        except Exception:
+            return
+        try:
+            aliases, entry = cmdutil.findcmd(cmd,
+                getattr(mod, 'cmdtable', {}), strict)
+        except (error.AmbiguousCommand, error.UnknownCommand):
+            return
+        for c in aliases:
+            if c.startswith(cmd):
+                cmd = c
+                break
+        else:
+            cmd = aliases[0]
+        return (cmd, name, mod)
+
+    # first, search for an extension with the same name as the command
+    path = paths.pop(cmd, None)
+    if path:
+        ext = findcmd(cmd, cmd, path)
+        if ext:
+            return ext
+
+    # otherwise, interrogate each extension until there's a match
+    for name, path in paths.iteritems():
+        ext = findcmd(cmd, name, path)
+        if ext:
+            return ext
+
+    raise error.UnknownCommand(cmd)
+
 def enabled():
     '''return a dict of {name: desc} of extensions, and the max name length'''
     exts = {}
--- a/mercurial/fancyopts.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/fancyopts.py	Sat Feb 13 23:50:38 2010 -0600
@@ -16,7 +16,7 @@
     extraargs = []
     if '--' in args:
         stopindex = args.index('--')
-        extraargs = args[stopindex+1:]
+        extraargs = args[stopindex + 1:]
         args = args[:stopindex]
     opts, parseargs = getopt.getopt(args, options, longoptions)
     args = []
@@ -77,8 +77,10 @@
 
         # does it take a parameter?
         if not (default is None or default is True or default is False):
-            if short: short += ':'
-            if oname: oname += '='
+            if short:
+                short += ':'
+            if oname:
+                oname += '='
         if short:
             shortlist += short
         if name:
--- a/mercurial/filelog.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/filelog.py	Sat Feb 13 23:50:38 2010 -0600
@@ -17,7 +17,7 @@
         if not t.startswith('\1\n'):
             return t
         s = t.index('\1\n', 2)
-        return t[s+2:]
+        return t[s + 2:]
 
     def _readmeta(self, node):
         t = self.revision(node)
--- a/mercurial/filemerge.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/filemerge.py	Sat Feb 13 23:50:38 2010 -0600
@@ -60,24 +60,24 @@
     for pat, tool in ui.configitems("merge-patterns"):
         mf = match.match(repo.root, '', [pat])
         if mf(path) and check(tool, pat, symlink, False):
-                toolpath = _findtool(ui, tool)
-                return (tool, '"' + toolpath + '"')
+            toolpath = _findtool(ui, tool)
+            return (tool, '"' + toolpath + '"')
 
     # then merge tools
     tools = {}
-    for k,v in ui.configitems("merge-tools"):
+    for k, v in ui.configitems("merge-tools"):
         t = k.split('.')[0]
         if t not in tools:
             tools[t] = int(_toolstr(ui, t, "priority", "0"))
     names = tools.keys()
-    tools = sorted([(-p,t) for t,p in tools.items()])
+    tools = sorted([(-p, t) for t, p in tools.items()])
     uimerge = ui.config("ui", "merge")
     if uimerge:
         if uimerge not in names:
             return (uimerge, uimerge)
         tools.insert(0, (None, uimerge)) # highest priority
     tools.append((None, "hgmerge")) # the old default, if found
-    for p,t in tools:
+    for p, t in tools:
         if check(t, None, symlink, binary):
             toolpath = _findtool(ui, t)
             return (t, '"' + toolpath + '"')
--- a/mercurial/graphmod.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/graphmod.py	Sat Feb 13 23:50:38 2010 -0600
@@ -17,7 +17,6 @@
 Data depends on type.
 """
 
-import sys
 from mercurial.node import nullrev
 
 CHANGESET = 'C'
@@ -37,7 +36,7 @@
         yield (cur, CHANGESET, ctx, sorted(parents))
         cur -= 1
 
-def filerevs(repo, path, start, stop, limit=sys.maxint):
+def filerevs(repo, path, start, stop, limit=None):
     """file cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples
 
     This generator function walks through the revision history of a single
--- a/mercurial/help.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/help.py	Sat Feb 13 23:50:38 2010 -0600
@@ -13,17 +13,19 @@
 def moduledoc(file):
     '''return the top-level python documentation for the given file
 
-    Loosely inspired by pydoc.source_synopsis(), but rewritten to handle \'''
-    as well as """ and to return the whole text instead of just the synopsis'''
+    Loosely inspired by pydoc.source_synopsis(), but rewritten to
+    handle triple quotes and to return the whole text instead of just
+    the synopsis'''
     result = []
 
     line = file.readline()
     while line[:1] == '#' or not line.strip():
         line = file.readline()
-        if not line: break
+        if not line:
+            break
 
     start = line[:3]
-    if start == '"""' or start == "'''":
+    if start == '\"\"\"' or start == "\'\'\'":
         line = line[3:]
         while line:
             if line.rstrip().endswith(start):
@@ -40,13 +42,14 @@
 
     return ''.join(result)
 
-def listexts(header, exts, maxlength):
+def listexts(header, exts, maxlength, indent=1):
     '''return a text listing of the given extensions'''
     if not exts:
         return ''
     result = '\n%s\n\n' % header
     for name, desc in sorted(exts.iteritems()):
-        result += ' %-*s %s\n' % (maxlength + 2, ':%s:' % name, desc)
+        result += '%s%-*s %s\n' % (' ' * indent, maxlength + 2,
+                                   ':%s:' % name, desc)
     return result
 
 def extshelp():
@@ -83,11 +86,15 @@
     (["config"], _("Configuration Files"), loaddoc('config')),
     (["dates"], _("Date Formats"), loaddoc('dates')),
     (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
-    (['environment', 'env'], _('Environment Variables'), loaddoc('environment')),
-    (['revs', 'revisions'], _('Specifying Single Revisions'), loaddoc('revisions')),
-    (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), loaddoc('multirevs')),
+    (['environment', 'env'], _('Environment Variables'),
+     loaddoc('environment')),
+    (['revs', 'revisions'], _('Specifying Single Revisions'),
+     loaddoc('revisions')),
+    (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'),
+     loaddoc('multirevs')),
     (['diffs'], _('Diff Formats'), loaddoc('diffs')),
-    (['templating', 'templates'], _('Template Usage'), loaddoc('templates')),
+    (['templating', 'templates'], _('Template Usage'),
+     loaddoc('templates')),
     (['urls'], _('URL Paths'), loaddoc('urls')),
     (["extensions"], _("Using additional features"), extshelp),
 )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/config.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,37 @@
+Mercurial reads configuration data from several files, if they exist.
+Below we list the most specific file first.
+
+On Windows, these configuration files are read:
+
+- ``<repo>\.hg\hgrc``
+- ``%USERPROFILE%\.hgrc``
+- ``%USERPROFILE%\Mercurial.ini``
+- ``%HOME%\.hgrc``
+- ``%HOME%\Mercurial.ini``
+- ``C:\Mercurial\Mercurial.ini``
+- ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
+- ``<install-dir>\Mercurial.ini``
+
+On Unix, these files are read:
+
+- ``<repo>/.hg/hgrc``
+- ``$HOME/.hgrc``
+- ``/etc/mercurial/hgrc``
+- ``/etc/mercurial/hgrc.d/*.rc``
+- ``<install-root>/etc/mercurial/hgrc``
+- ``<install-root>/etc/mercurial/hgrc.d/*.rc``
+
+The configuration files for Mercurial use a simple ini-file format. A
+configuration file consists of sections, led by a ``[section]`` header
+and followed by ``name = value`` entries::
+
+  [ui]
+  username = Firstname Lastname <firstname.lastname@example.net>
+  verbose = True
+
+This above entries will be referred to as ``ui.username`` and
+``ui.verbose``, respectively. Please see the hgrc man page for a full
+description of the possible configuration values:
+
+- on Unix-like systems: ``man hgrc``
+- online: http://www.selenic.com/mercurial/hgrc.5.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/dates.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,36 @@
+Some commands allow the user to specify a date, e.g.:
+
+- backout, commit, import, tag: Specify the commit date.
+- log, revert, update: Select revision(s) by date.
+
+Many date formats are valid. Here are some examples:
+
+- ``Wed Dec 6 13:18:29 2006`` (local timezone assumed)
+- ``Dec 6 13:18 -0600`` (year assumed, time offset provided)
+- ``Dec 6 13:18 UTC`` (UTC and GMT are aliases for +0000)
+- ``Dec 6`` (midnight)
+- ``13:18`` (today assumed)
+- ``3:39`` (3:39AM assumed)
+- ``3:39pm`` (15:39)
+- ``2006-12-06 13:18:29`` (ISO 8601 format)
+- ``2006-12-6 13:18``
+- ``2006-12-6``
+- ``12-6``
+- ``12/6``
+- ``12/6/6`` (Dec 6 2006)
+
+Lastly, there is Mercurial's internal format:
+
+- ``1165432709 0`` (Wed Dec 6 13:18:29 2006 UTC)
+
+This is the internal representation format for dates. unixtime is the
+number of seconds since the epoch (1970-01-01 00:00 UTC). offset is
+the offset of the local timezone, in seconds west of UTC (negative if
+the timezone is east of UTC).
+
+The log command also accepts date ranges:
+
+- ``<{datetime}`` - at or before a given date/time
+- ``>{datetime}`` - on or after a given date/time
+- ``{datetime} to {datetime}`` - a date range, inclusive
+- ``-{days}`` - within a given number of days of today
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/diffs.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,29 @@
+Mercurial's default format for showing changes between two versions of
+a file is compatible with the unified format of GNU diff, which can be
+used by GNU patch and many other standard tools.
+
+While this standard format is often enough, it does not encode the
+following information:
+
+- executable status and other permission bits
+- copy or rename information
+- changes in binary files
+- creation or deletion of empty files
+
+Mercurial also supports the extended diff format from the git VCS
+which addresses these limitations. The git diff format is not produced
+by default because a few widespread tools still do not understand this
+format.
+
+This means that when generating diffs from a Mercurial repository
+(e.g. with "hg export"), you should be careful about things like file
+copies and renames or other things mentioned above, because when
+applying a standard diff to a different repository, this extra
+information is lost. Mercurial's internal operations (like push and
+pull) are not affected by this, because they use an internal binary
+format for communicating changes.
+
+To make Mercurial produce the git extended diff format, use the --git
+option available for many commands, or set 'git = True' in the [diff]
+section of your hgrc. You do not need to set this option when
+importing diffs in this format or using them in the mq extension.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/environment.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,86 @@
+HG
+    Path to the 'hg' executable, automatically passed when running
+    hooks, extensions or external tools. If unset or empty, this is
+    the hg executable's name if it's frozen, or an executable named
+    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on
+    Windows) is searched.
+
+HGEDITOR
+    This is the name of the editor to run when committing. See EDITOR.
+
+    (deprecated, use .hgrc)
+
+HGENCODING
+    This overrides the default locale setting detected by Mercurial.
+    This setting is used to convert data including usernames,
+    changeset descriptions, tag names, and branches. This setting can
+    be overridden with the --encoding command-line option.
+
+HGENCODINGMODE
+    This sets Mercurial's behavior for handling unknown characters
+    while transcoding user input. The default is "strict", which
+    causes Mercurial to abort if it can't map a character. Other
+    settings include "replace", which replaces unknown characters, and
+    "ignore", which drops them. This setting can be overridden with
+    the --encodingmode command-line option.
+
+HGMERGE
+    An executable to use for resolving merge conflicts. The program
+    will be executed with three arguments: local file, remote file,
+    ancestor file.
+
+    (deprecated, use .hgrc)
+
+HGRCPATH
+    A list of files or directories to search for hgrc files. Item
+    separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
+    platform default search path is used. If empty, only the .hg/hgrc
+    from the current repository is read.
+
+    For each element in HGRCPATH:
+
+    - if it's a directory, all files ending with .rc are added
+    - otherwise, the file itself will be added
+
+HGPLAIN
+    When set, this disables any options in .hgrc that might change
+    Mercurial's default output. This includes encoding, defaults,
+    verbose mode, debug mode, quiet mode, tracebacks, and
+    localization. This can be useful when scripting against Mercurial
+    in the face of existing user configuration.
+
+    Equivalent options set via command line flags or environment
+    variables are not overridden.
+
+HGUSER
+    This is the string used as the author of a commit. If not set,
+    available values will be considered in this order:
+
+    - HGUSER (deprecated)
+    - hgrc files from the HGRCPATH
+    - EMAIL
+    - interactive prompt
+    - LOGNAME (with ``@hostname`` appended)
+
+    (deprecated, use .hgrc)
+
+EMAIL
+    May be used as the author of a commit; see HGUSER.
+
+LOGNAME
+    May be used as the author of a commit; see HGUSER.
+
+VISUAL
+    This is the name of the editor to use when committing. See EDITOR.
+
+EDITOR
+    Sometimes Mercurial needs to open a text file in an editor for a
+    user to modify, for example when writing commit messages. The
+    editor it uses is determined by looking at the environment
+    variables HGEDITOR, VISUAL and EDITOR, in that order. The first
+    non-empty one is chosen. If all of them are empty, the editor
+    defaults to 'vi'.
+
+PYTHONPATH
+    This is used by Python to find imported modules and may need to be
+    set appropriately if this Mercurial is not installed system-wide.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/extensions.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,33 @@
+Mercurial has the ability to add new features through the use of
+extensions. Extensions may add new commands, add options to
+existing commands, change the default behavior of commands, or
+implement hooks.
+
+Extensions are not loaded by default for a variety of reasons:
+they can increase startup overhead; they may be meant for advanced
+usage only; they may provide potentially dangerous abilities (such
+as letting you destroy or modify history); they might not be ready
+for prime time; or they may alter some usual behaviors of stock
+Mercurial. It is thus up to the user to activate extensions as
+needed.
+
+To enable the "foo" extension, either shipped with Mercurial or in
+the Python search path, create an entry for it in your hgrc, like
+this::
+
+  [extensions]
+  foo =
+
+You may also specify the full path to an extension::
+
+  [extensions]
+  myfeature = ~/.hgext/myfeature.py
+
+To explicitly disable an extension enabled in an hgrc of broader
+scope, prepend its path with !::
+
+  [extensions]
+  # disabling extension bar residing in /path/to/extension/bar.py
+  bar = !/path/to/extension/bar.py
+  # ditto, but no path was supplied for extension baz
+  baz = !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/multirevs.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,13 @@
+When Mercurial accepts more than one revision, they may be specified
+individually, or provided as a topologically continuous range,
+separated by the ":" character.
+
+The syntax of range notation is [BEGIN]:[END], where BEGIN and END are
+revision identifiers. Both BEGIN and END are optional. If BEGIN is not
+specified, it defaults to revision number 0. If END is not specified,
+it defaults to the tip. The range ":" thus means "all revisions".
+
+If BEGIN is greater than END, revisions are treated in reverse order.
+
+A range acts as a closed interval. This means that a range of 3:5
+gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/patterns.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,41 @@
+Mercurial accepts several notations for identifying one or more files
+at a time.
+
+By default, Mercurial treats filenames as shell-style extended glob
+patterns.
+
+Alternate pattern notations must be specified explicitly.
+
+To use a plain path name without any pattern matching, start it with
+``path:``. These path names must completely match starting at the
+current repository root.
+
+To use an extended glob, start a name with ``glob:``. Globs are rooted
+at the current directory; a glob such as ``*.c`` will only match files
+in the current directory ending with ``.c``.
+
+The supported glob syntax extensions are ``**`` to match any string
+across path separators and ``{a,b}`` to mean "a or b".
+
+To use a Perl/Python regular expression, start a name with ``re:``.
+Regexp pattern matching is anchored at the root of the repository.
+
+Plain examples::
+
+  path:foo/bar   a name bar in a directory named foo in the root
+                 of the repository
+  path:path:name a file or directory named "path:name"
+
+Glob examples::
+
+  glob:*.c       any name ending in ".c" in the current directory
+  *.c            any name ending in ".c" in the current directory
+  **.c           any name ending in ".c" in any subdirectory of the
+                 current directory including itself.
+  foo/*.c        any name ending in ".c" in the directory foo
+  foo/**.c       any name ending in ".c" in any subdirectory of foo
+                 including itself.
+
+Regexp examples::
+
+  re:.*\.c$      any name ending in ".c", anywhere in the repository
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/revisions.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,29 @@
+Mercurial supports several ways to specify individual revisions.
+
+A plain integer is treated as a revision number. Negative integers are
+treated as sequential offsets from the tip, with -1 denoting the tip,
+-2 denoting the revision prior to the tip, and so forth.
+
+A 40-digit hexadecimal string is treated as a unique revision
+identifier.
+
+A hexadecimal string less than 40 characters long is treated as a
+unique revision identifier and is referred to as a short-form
+identifier. A short-form identifier is only valid if it is the prefix
+of exactly one full-length identifier.
+
+Any other string is treated as a tag or branch name. A tag name is a
+symbolic name associated with a revision identifier. A branch name
+denotes the tipmost revision of that branch. Tag and branch names must
+not contain the ":" character.
+
+The reserved name "tip" is a special tag that always identifies the
+most recent revision.
+
+The reserved name "null" indicates the null revision. This is the
+revision of an empty repository, and the parent of revision 0.
+
+The reserved name "." indicates the working directory parent. If no
+working directory is checked out, it is equivalent to null. If an
+uncommitted merge is in progress, "." is the revision of the first
+parent.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/templates.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,149 @@
+Mercurial allows you to customize output of commands through
+templates. You can either pass in a template from the command
+line, via the --template option, or select an existing
+template-style (--style).
+
+You can customize output for any "log-like" command: log,
+outgoing, incoming, tip, parents, heads and glog.
+
+Three styles are packaged with Mercurial: default (the style used
+when no explicit preference is passed), compact and changelog.
+Usage::
+
+    $ hg log -r1 --style changelog
+
+A template is a piece of text, with markup to invoke variable
+expansion::
+
+    $ hg log -r1 --template "{node}\n"
+    b56ce7b07c52de7d5fd79fb89701ea538af65746
+
+Strings in curly braces are called keywords. The availability of
+keywords depends on the exact context of the templater. These
+keywords are usually available for templating a log-like command:
+
+:author: String. The unmodified author of the changeset.
+
+:branches: String. The name of the branch on which the changeset was
+    committed. Will be empty if the branch name was default.
+
+:date: Date information. The date when the changeset was committed.
+
+:desc: String. The text of the changeset description.
+
+:diffstat: String. Statistics of changes with the following format:
+    "modified files: +added/-removed lines"
+
+:files: List of strings. All files modified, added, or removed by this
+    changeset.
+
+:file_adds: List of strings. Files added by this changeset.
+
+:file_copies: List of strings. Files copied in this changeset with
+    their sources.
+
+:file_copies_switch: List of strings. Like "file_copies" but displayed
+    only if the --copied switch is set.
+
+:file_mods: List of strings. Files modified by this changeset.
+
+:file_dels: List of strings. Files removed by this changeset.
+
+:node: String. The changeset identification hash, as a 40-character
+    hexadecimal string.
+
+:parents: List of strings. The parents of the changeset.
+
+:rev: Integer. The repository-local changeset revision number.
+
+:tags: List of strings. Any tags associated with the changeset.
+
+:latesttag: String. Most recent global tag in the ancestors of this
+    changeset.
+
+:latesttagdistance: Integer. Longest path to the latest tag.
+
+The "date" keyword does not produce human-readable output. If you
+want to use a date in your output, you can use a filter to process
+it. Filters are functions which return a string based on the input
+variable. You can also use a chain of filters to get the desired
+output::
+
+   $ hg tip --template "{date|isodate}\n"
+   2008-08-21 18:22 +0000
+
+List of filters:
+
+:addbreaks: Any text. Add an XHTML "<br />" tag before the end of
+    every line except the last.
+
+:age: Date. Returns a human-readable date/time difference between the
+    given date/time and the current date/time.
+
+:basename: Any text. Treats the text as a path, and returns the last
+    component of the path after splitting by the path separator
+    (ignoring trailing separators). For example, "foo/bar/baz" becomes
+    "baz" and "foo/bar//" becomes "bar".
+
+:stripdir: Treat the text as path and strip a directory level, if
+    possible. For example, "foo" and "foo/bar" becomes "foo".
+
+:date: Date. Returns a date in a Unix date format, including the
+    timezone: "Mon Sep 04 15:13:13 2006 0700".
+
+:domain: Any text. Finds the first string that looks like an email
+    address, and extracts just the domain component. Example: ``User
+    <user@example.com>`` becomes ``example.com``.
+
+:email: Any text. Extracts the first string that looks like an email
+    address. Example: ``User <user@example.com>`` becomes
+    ``user@example.com``.
+
+:escape: Any text. Replaces the special XML/XHTML characters "&", "<"
+    and ">" with XML entities.
+
+:fill68: Any text. Wraps the text to fit in 68 columns.
+
+:fill76: Any text. Wraps the text to fit in 76 columns.
+
+:firstline: Any text. Returns the first line of text.
+
+:nonempty: Any text. Returns '(none)' if the string is empty.
+
+:hgdate: Date. Returns the date as a pair of numbers: "1157407993
+    25200" (Unix timestamp, timezone offset).
+
+:isodate: Date. Returns the date in ISO 8601 format: "2009-08-18 13:00
+    +0200".
+
+:isodatesec: Date. Returns the date in ISO 8601 format, including
+    seconds: "2009-08-18 13:00:13 +0200". See also the rfc3339date
+    filter.
+
+:localdate: Date. Converts a date to local date.
+
+:obfuscate: Any text. Returns the input text rendered as a sequence of
+    XML entities.
+
+:person: Any text. Returns the text before an email address.
+
+:rfc822date: Date. Returns a date using the same format used in email
+    headers: "Tue, 18 Aug 2009 13:00:13 +0200".
+
+:rfc3339date: Date. Returns a date using the Internet date format
+    specified in RFC 3339: "2009-08-18T13:00:13+02:00".
+
+:short: Changeset hash. Returns the short form of a changeset hash,
+    i.e. a 12-byte hexadecimal string.
+
+:shortdate: Date. Returns a date like "2006-09-18".
+
+:strip: Any text. Strips all leading and trailing whitespace.
+
+:tabindent: Any text. Returns the text, with every line except the
+     first starting with a tab character.
+
+:urlescape: Any text. Escapes all "special" characters. For example,
+    "foo bar" becomes "foo%20bar".
+
+:user: Any text. Returns the user portion of an email address.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/help/urls.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,63 @@
+Valid URLs are of the form::
+
+  local/filesystem/path[#revision]
+  file://local/filesystem/path[#revision]
+  http://[user[:pass]@]host[:port]/[path][#revision]
+  https://[user[:pass]@]host[:port]/[path][#revision]
+  ssh://[user[:pass]@]host[:port]/[path][#revision]
+
+Paths in the local filesystem can either point to Mercurial
+repositories or to bundle files (as created by 'hg bundle' or 'hg
+incoming --bundle').
+
+An optional identifier after # indicates a particular branch, tag, or
+changeset to use from the remote repository. See also 'hg help
+revisions'.
+
+Some features, such as pushing to http:// and https:// URLs are only
+possible if the feature is explicitly enabled on the remote Mercurial
+server.
+
+Some notes about using SSH with Mercurial:
+
+- SSH requires an accessible shell account on the destination machine
+  and a copy of hg in the remote path or specified with as remotecmd.
+- path is relative to the remote user's home directory by default. Use
+  an extra slash at the start of a path to specify an absolute path::
+
+    ssh://example.com//tmp/repository
+
+- Mercurial doesn't use its own compression via SSH; the right thing
+  to do is to configure it in your ~/.ssh/config, e.g.::
+
+    Host *.mylocalnetwork.example.com
+      Compression no
+    Host *
+      Compression yes
+
+  Alternatively specify "ssh -C" as your ssh command in your hgrc or
+  with the --ssh command line option.
+
+These URLs can all be stored in your hgrc with path aliases under the
+[paths] section like so::
+
+  [paths]
+  alias1 = URL1
+  alias2 = URL2
+  ...
+
+You can then use the alias for any command that uses a URL (for
+example 'hg pull alias1' will be treated as 'hg pull URL1').
+
+Two path aliases are special because they are used as defaults when
+you do not provide the URL to a command:
+
+default:
+  When you create a repository with hg clone, the clone command saves
+  the location of the source repository as the new repository's
+  'default' path. This is then used when you omit path from push- and
+  pull-like commands (including incoming and outgoing).
+
+default-push:
+  The push command will look for a path named 'default-push', and
+  prefer it over 'default' if both are defined.
--- a/mercurial/hg.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/hg.py	Sat Feb 13 23:50:38 2010 -0600
@@ -9,7 +9,7 @@
 from i18n import _
 from lock import release
 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
-import lock, util, extensions, error, encoding
+import lock, util, extensions, error, encoding, node
 import merge as _merge
 import verify as _verify
 import errno, os, shutil
@@ -18,15 +18,34 @@
     return (os.path.isfile(util.drop_scheme('file', path)) and
             bundlerepo or localrepo)
 
-def parseurl(url, revs=[]):
-    '''parse url#branch, returning url, branch + revs'''
+def addbranchrevs(lrepo, repo, branches, revs):
+    if not branches:
+        return revs or None, revs and revs[0] or None
+    revs = revs and list(revs) or []
+    if not repo.capable('branchmap'):
+        revs.extend(branches)
+        return revs, revs[0]
+    branchmap = repo.branchmap()
+    for branch in branches:
+        if branch == '.':
+            if not lrepo or not lrepo.local():
+                raise util.Abort(_("dirstate branch not accessible"))
+            revs.append(lrepo.dirstate.branch())
+        else:
+            butf8 = encoding.fromlocal(branch)
+            if butf8 in branchmap:
+                revs.extend(node.hex(r) for r in reversed(branchmap[butf8]))
+            else:
+                revs.append(branch)
+    return revs, revs[0]
+
+def parseurl(url, branches=None):
+    '''parse url#branch, returning url, branches+[branch]'''
 
     if '#' not in url:
-        return url, (revs or None), revs and revs[-1] or None
-
+        return url, branches or []
     url, branch = url.split('#', 1)
-    checkout = revs and revs[-1] or branch
-    return url, (revs or []) + [branch], checkout
+    return url, (branches or []) + [branch]
 
 schemes = {
     'bundle': bundlerepo,
@@ -94,8 +113,9 @@
 
     if isinstance(source, str):
         origsource = ui.expandpath(source)
-        source, rev, checkout = parseurl(origsource, '')
+        source, branches = parseurl(origsource)
         srcrepo = repository(ui, source)
+        rev, checkout = addbranchrevs(srcrepo, srcrepo, branches, None)
     else:
         srcrepo = source
         origsource = source = srcrepo.url()
@@ -147,7 +167,7 @@
         _update(r, uprev)
 
 def clone(ui, source, dest=None, pull=False, rev=None, update=True,
-          stream=False):
+          stream=False, branch=None):
     """Make a copy of an existing repository.
 
     Create a copy of an existing repository in a new directory.  The
@@ -179,16 +199,18 @@
     update: update working directory after clone completes, if
     destination is local repository (True means update to default rev,
     anything else is treated as a revision)
+
+    branch: branches to clone
     """
 
     if isinstance(source, str):
         origsource = ui.expandpath(source)
-        source, rev, checkout = parseurl(origsource, rev)
+        source, branch = parseurl(origsource, branch)
         src_repo = repository(ui, source)
     else:
         src_repo = source
         origsource = source = src_repo.url()
-        checkout = rev and rev[-1] or None
+    rev, checkout = addbranchrevs(src_repo, src_repo, branch, rev)
 
     if dest is None:
         dest = defaultdest(source)
@@ -348,7 +370,8 @@
 def clean(repo, node, show_stats=True):
     """forcibly switch the working directory to node, clobbering changes"""
     stats = _merge.update(repo, node, False, True, None)
-    if show_stats: _showstats(repo, stats)
+    if show_stats:
+        _showstats(repo, stats)
     return stats[3] > 0
 
 def merge(repo, node, force=None, remind=True):
--- a/mercurial/hgweb/common.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/hgweb/common.py	Sat Feb 13 23:50:38 2010 -0600
@@ -16,6 +16,58 @@
 HTTP_METHOD_NOT_ALLOWED = 405
 HTTP_SERVER_ERROR = 500
 
+# Hooks for hgweb permission checks; extensions can add hooks here. Each hook
+# is invoked like this: hook(hgweb, request, operation), where operation is
+# either read, pull or push. Hooks should either raise an ErrorResponse
+# exception, or just return.
+# It is possible to do both authentication and authorization through this.
+permhooks = []
+
+def checkauthz(hgweb, req, op):
+    '''Check permission for operation based on request data (including
+    authentication info). Return if op allowed, else raise an ErrorResponse
+    exception.'''
+
+    user = req.env.get('REMOTE_USER')
+
+    deny_read = hgweb.configlist('web', 'deny_read')
+    if deny_read and (not user or deny_read == ['*'] or user in deny_read):
+        raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
+
+    allow_read = hgweb.configlist('web', 'allow_read')
+    result = (not allow_read) or (allow_read == ['*'])
+    if not (result or user in allow_read):
+        raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
+
+    if op == 'pull' and not hgweb.allowpull:
+        raise ErrorResponse(HTTP_UNAUTHORIZED, 'pull not authorized')
+    elif op == 'pull' or op is None: # op is None for interface requests
+        return
+
+    # enforce that you can only push using POST requests
+    if req.env['REQUEST_METHOD'] != 'POST':
+        msg = 'push requires POST request'
+        raise ErrorResponse(HTTP_METHOD_NOT_ALLOWED, msg)
+
+    # require ssl by default for pushing, auth info cannot be sniffed
+    # and replayed
+    scheme = req.env.get('wsgi.url_scheme')
+    if hgweb.configbool('web', 'push_ssl', True) and scheme != 'https':
+        raise ErrorResponse(HTTP_OK, 'ssl required')
+
+    deny = hgweb.configlist('web', 'deny_push')
+    if deny and (not user or deny == ['*'] or user in deny):
+        raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized')
+
+    allow = hgweb.configlist('web', 'allow_push')
+    result = allow and (allow == ['*'] or user in allow)
+    if not result:
+        raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized')
+
+# Add the default permhook, which provides simple authorization.
+permhooks.append(checkauthz)
+
+
 class ErrorResponse(Exception):
     def __init__(self, code, message=None, headers=[]):
         Exception.__init__(self)
@@ -34,15 +86,12 @@
 def statusmessage(code, message=None):
     return '%d %s' % (code, message or _statusmessage(code))
 
-def get_mtime(repo_path):
-    store_path = os.path.join(repo_path, ".hg")
-    if not os.path.isdir(os.path.join(store_path, "data")):
-        store_path = os.path.join(store_path, "store")
-    cl_path = os.path.join(store_path, "00changelog.i")
+def get_mtime(spath):
+    cl_path = os.path.join(spath, "00changelog.i")
     if os.path.exists(cl_path):
         return os.stat(cl_path).st_mtime
     else:
-        return os.stat(store_path).st_mtime
+        return os.stat(spath).st_mtime
 
 def staticfile(directory, fname, req):
     """return a file inside directory with guessed Content-Type header
--- a/mercurial/hgweb/hgweb_mod.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Sat Feb 13 23:50:38 2010 -0600
@@ -8,7 +8,7 @@
 
 import os
 from mercurial import ui, hg, hook, error, encoding, templater
-from common import get_mtime, ErrorResponse
+from common import get_mtime, ErrorResponse, permhooks
 from common import HTTP_OK, HTTP_BAD_REQUEST, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
 from common import HTTP_UNAUTHORIZED, HTTP_METHOD_NOT_ALLOWED
 from request import wsgirequest
@@ -54,8 +54,10 @@
         return self.repo.ui.configlist(section, name, default,
                                        untrusted=untrusted)
 
-    def refresh(self):
-        mtime = get_mtime(self.repo.root)
+    def refresh(self, request=None):
+        if request:
+            self.repo.ui.environ = request.env
+        mtime = get_mtime(self.repo.spath)
         if mtime != self.mtime:
             self.mtime = mtime
             self.repo = hg.repository(self.repo.ui, self.repo.root)
@@ -80,7 +82,7 @@
 
     def run_wsgi(self, req):
 
-        self.refresh()
+        self.refresh(req)
 
         # work with CGI variables to create coherent structure
         # use SCRIPT_NAME, PATH_INFO and QUERY_STRING as well as our REPO_NAME
@@ -134,7 +136,7 @@
             style = cmd.rfind('-')
             if style != -1:
                 req.form['style'] = [cmd[:style]]
-                cmd = cmd[style+1:]
+                cmd = cmd[style + 1:]
 
             # avoid accepting e.g. style parameter as command
             if hasattr(webcommands, cmd):
@@ -281,42 +283,5 @@
         }
 
     def check_perm(self, req, op):
-        '''Check permission for operation based on request data (including
-        authentication info). Return if op allowed, else raise an ErrorResponse
-        exception.'''
-
-        user = req.env.get('REMOTE_USER')
-
-        deny_read = self.configlist('web', 'deny_read')
-        if deny_read and (not user or deny_read == ['*'] or user in deny_read):
-            raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
-
-        allow_read = self.configlist('web', 'allow_read')
-        result = (not allow_read) or (allow_read == ['*'])
-        if not (result or user in allow_read):
-            raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
-
-        if op == 'pull' and not self.allowpull:
-            raise ErrorResponse(HTTP_UNAUTHORIZED, 'pull not authorized')
-        elif op == 'pull' or op is None: # op is None for interface requests
-            return
-
-        # enforce that you can only push using POST requests
-        if req.env['REQUEST_METHOD'] != 'POST':
-            msg = 'push requires POST request'
-            raise ErrorResponse(HTTP_METHOD_NOT_ALLOWED, msg)
-
-        # require ssl by default for pushing, auth info cannot be sniffed
-        # and replayed
-        scheme = req.env.get('wsgi.url_scheme')
-        if self.configbool('web', 'push_ssl', True) and scheme != 'https':
-            raise ErrorResponse(HTTP_OK, 'ssl required')
-
-        deny = self.configlist('web', 'deny_push')
-        if deny and (not user or deny == ['*'] or user in deny):
-            raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized')
-
-        allow = self.configlist('web', 'allow_push')
-        result = allow and (allow == ['*'] or user in allow)
-        if not result:
-            raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized')
+        for hook in permhooks:
+            hook(self, req, op)
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sat Feb 13 23:50:38 2010 -0600
@@ -10,7 +10,7 @@
 from mercurial.i18n import _
 from mercurial import ui, hg, util, templater
 from mercurial import error, encoding
-from common import ErrorResponse, get_mtime, staticfile, paritygen,\
+from common import ErrorResponse, get_mtime, staticfile, paritygen, \
                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
 from hgweb_mod import hgweb
 from request import wsgirequest
@@ -235,7 +235,8 @@
 
                 # update time with local timezone
                 try:
-                    d = (get_mtime(path), util.makedate()[1])
+                    r = hg.repository(self.ui, path)
+                    d = (get_mtime(r.spath), util.makedate()[1])
                 except OSError:
                     continue
 
@@ -323,7 +324,7 @@
         style, mapfile = templater.stylemap(styles)
         if style == styles[0]:
             vars['style'] = style
-        
+
         start = url[-1] == '?' and '&' or '?'
         sessionvars = webutil.sessionvars(vars, start)
         staticurl = config('web', 'staticurl') or url + 'static/'
--- a/mercurial/hgweb/protocol.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/hgweb/protocol.py	Sat Feb 13 23:50:38 2010 -0600
@@ -111,7 +111,7 @@
 
 def capabilities(repo, req):
     caps = copy.copy(basecaps)
-    if repo.ui.configbool('server', 'uncompressed', untrusted=True):
+    if streamclone.allowed(repo.ui):
         caps.append('stream=%d' % repo.changelog.version)
     if changegroupmod.bundlepriority:
         caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority))
@@ -202,7 +202,7 @@
 def stream_out(repo, req):
     req.respond(HTTP_OK, HGTYPE)
     try:
-        for chunk in streamclone.stream_out(repo, untrusted=True):
+        for chunk in streamclone.stream_out(repo):
             yield chunk
     except streamclone.StreamException, inst:
         yield str(inst)
--- a/mercurial/hgweb/webcommands.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/hgweb/webcommands.py	Sat Feb 13 23:50:38 2010 -0600
@@ -98,7 +98,20 @@
         except ErrorResponse:
             raise inst
 
-def _search(web, tmpl, query):
+def _search(web, req, tmpl):
+
+    query = req.form['rev'][0]
+    revcount = web.maxchanges
+    if 'revcount' in req.form:
+        revcount = int(req.form.get('revcount', [revcount])[0])
+        tmpl.defaults['sessionvars']['revcount'] = revcount
+
+    lessvars = copy.copy(tmpl.defaults['sessionvars'])
+    lessvars['revcount'] = revcount / 2
+    lessvars['rev'] = query
+    morevars = copy.copy(tmpl.defaults['sessionvars'])
+    morevars['revcount'] = revcount * 2
+    morevars['rev'] = query
 
     def changelist(**map):
         cl = web.repo.changelog
@@ -146,19 +159,18 @@
                        inbranch=webutil.nodeinbranch(web.repo, ctx),
                        branches=webutil.nodebranchdict(web.repo, ctx))
 
-            if count >= web.maxchanges:
+            if count >= revcount:
                 break
 
     cl = web.repo.changelog
     parity = paritygen(web.stripecount)
 
-    return tmpl('search',
-                query=query,
-                node=hex(cl.tip()),
-                entries=changelist,
-                archives=web.archivelist("tip"))
+    return tmpl('search', query=query, node=hex(cl.tip()),
+                entries=changelist, archives=web.archivelist("tip"),
+                morevars=morevars, lessvars=lessvars)
 
-def changelog(web, req, tmpl, shortlog = False):
+def changelog(web, req, tmpl, shortlog=False):
+
     if 'node' in req.form:
         ctx = webutil.changectx(web.repo, req)
     else:
@@ -169,7 +181,7 @@
         try:
             ctx = web.repo[hi]
         except error.RepoError:
-            return _search(web, tmpl, hi) # XXX redirect to 404 page?
+            return _search(web, req, tmpl) # XXX redirect to 404 page?
 
     def changelist(limit=0, **map):
         l = [] # build a list in forward order for efficiency
@@ -200,24 +212,32 @@
         for e in l:
             yield e
 
-    maxchanges = shortlog and web.maxshortchanges or web.maxchanges
+    revcount = shortlog and web.maxshortchanges or web.maxchanges
+    if 'revcount' in req.form:
+        revcount = int(req.form.get('revcount', [revcount])[0])
+        tmpl.defaults['sessionvars']['revcount'] = revcount
+
+    lessvars = copy.copy(tmpl.defaults['sessionvars'])
+    lessvars['revcount'] = revcount / 2
+    morevars = copy.copy(tmpl.defaults['sessionvars'])
+    morevars['revcount'] = revcount * 2
+
     cl = web.repo.changelog
     count = len(cl)
     pos = ctx.rev()
-    start = max(0, pos - maxchanges + 1)
-    end = min(count, start + maxchanges)
+    start = max(0, pos - revcount + 1)
+    end = min(count, start + revcount)
     pos = end - 1
-    parity = paritygen(web.stripecount, offset=start-end)
+    parity = paritygen(web.stripecount, offset=start - end)
 
-    changenav = webutil.revnavgen(pos, maxchanges, count, web.repo.changectx)
+    changenav = webutil.revnavgen(pos, revcount, count, web.repo.changectx)
 
-    return tmpl(shortlog and 'shortlog' or 'changelog',
-                changenav=changenav,
-                node=hex(ctx.node()),
-                rev=pos, changesets=count,
+    return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav,
+                node=hex(ctx.node()), rev=pos, changesets=count,
                 entries=lambda **x: changelist(limit=0,**x),
                 latestentry=lambda **x: changelist(limit=1,**x),
-                archives=web.archivelist("tip"))
+                archives=web.archivelist("tip"), revcount=revcount,
+                morevars=morevars, lessvars=lessvars)
 
 def shortlog(web, req, tmpl):
     return changelog(web, req, tmpl, shortlog = True)
@@ -314,7 +334,7 @@
             emptydirs = []
             h = dirs[d]
             while isinstance(h, dict) and len(h) == 1:
-                k,v = h.items()[0]
+                k, v = h.items()[0]
                 if v:
                     emptydirs.append(k)
                 h = v
@@ -358,9 +378,9 @@
 
     return tmpl("tags",
                 node=hex(web.repo.changelog.tip()),
-                entries=lambda **x: entries(False,0, **x),
-                entriesnotip=lambda **x: entries(True,0, **x),
-                latestentry=lambda **x: entries(True,1, **x))
+                entries=lambda **x: entries(False, 0, **x),
+                entriesnotip=lambda **x: entries(True, 0, **x),
+                latestentry=lambda **x: entries(True, 1, **x))
 
 def branches(web, req, tmpl):
     b = web.repo.branchtags()
@@ -417,14 +437,14 @@
 
         b = web.repo.branchtags()
         l = [(-web.repo.changelog.rev(n), n, t) for t, n in b.iteritems()]
-        for r,n,t in sorted(l):
+        for r, n, t in sorted(l):
             yield {'parity': parity.next(),
                    'branch': t,
                    'node': hex(n),
                    'date': web.repo[n].date()}
 
     def changelist(**map):
-        parity = paritygen(web.stripecount, offset=start-end)
+        parity = paritygen(web.stripecount, offset=start - end)
         l = [] # build a list in forward order for efficiency
         for i in xrange(start, end):
             ctx = web.repo[i]
@@ -567,11 +587,20 @@
             frev -= 1
         fctx = web.repo.filectx(f, fl.linkrev(frev))
 
+    revcount = web.maxshortchanges
+    if 'revcount' in req.form:
+        revcount = int(req.form.get('revcount', [revcount])[0])
+        tmpl.defaults['sessionvars']['revcount'] = revcount
+
+    lessvars = copy.copy(tmpl.defaults['sessionvars'])
+    lessvars['revcount'] = revcount / 2
+    morevars = copy.copy(tmpl.defaults['sessionvars'])
+    morevars['revcount'] = revcount * 2
+
     count = fctx.filerev() + 1
-    pagelen = web.maxshortchanges
-    start = max(0, fctx.filerev() - pagelen + 1) # first rev on this page
-    end = min(count, start + pagelen) # last rev on this page
-    parity = paritygen(web.stripecount, offset=start-end)
+    start = max(0, fctx.filerev() - revcount + 1) # first rev on this page
+    end = min(count, start + revcount) # last rev on this page
+    parity = paritygen(web.stripecount, offset=start - end)
 
     def entries(limit=0, **map):
         l = []
@@ -602,11 +631,11 @@
             yield e
 
     nodefunc = lambda x: fctx.filectx(fileid=x)
-    nav = webutil.revnavgen(end - 1, pagelen, count, nodefunc)
+    nav = webutil.revnavgen(end - 1, revcount, count, nodefunc)
     return tmpl("filelog", file=f, node=hex(fctx.node()), nav=nav,
                 entries=lambda **x: entries(limit=0, **x),
-                latestentry=lambda **x: entries(limit=1, **x))
-
+                latestentry=lambda **x: entries(limit=1, **x),
+                revcount=revcount, morevars=morevars, lessvars=lessvars)
 
 def archive(web, req, tmpl):
     type_ = req.form.get('type', [None])[0]
@@ -654,10 +683,10 @@
     return [staticfile(static, fname, req)]
 
 def graph(web, req, tmpl):
+
     rev = webutil.changectx(web.repo, req).rev()
     bg_height = 39
-
-    revcount = 25
+    revcount = web.maxshortchanges
     if 'revcount' in req.form:
         revcount = int(req.form.get('revcount', [revcount])[0])
         tmpl.defaults['sessionvars']['revcount'] = revcount
@@ -678,7 +707,7 @@
 
     dag = graphmod.revisions(web.repo, rev, downrev)
     tree = list(graphmod.colored(dag))
-    canvasheight = (len(tree) + 1) * bg_height - 27;
+    canvasheight = (len(tree) + 1) * bg_height - 27
     data = []
     for (id, type, ctx, vtx, edges) in tree:
         if type != graphmod.CHANGESET:
--- a/mercurial/hgweb/webutil.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/hgweb/webutil.py	Sat Feb 13 23:50:38 2010 -0600
@@ -32,31 +32,34 @@
         for f in seq(factor * 10):
             yield f
 
-    def nav(**map):
-        l = []
-        last = 0
-        for f in seq(1, pagelen):
-            if f < pagelen or f <= last:
-                continue
-            if f > limit:
-                break
-            last = f
-            if pos + f < limit:
-                l.append(("+%d" % f, hex(nodefunc(pos + f).node())))
-            if pos - f >= 0:
-                l.insert(0, ("-%d" % f, hex(nodefunc(pos - f).node())))
+    navbefore = []
+    navafter = []
 
-        try:
-            yield {"label": "(0)", "node": hex(nodefunc('0').node())}
+    last = 0
+    for f in seq(1, pagelen):
+        if f < pagelen or f <= last:
+            continue
+        if f > limit:
+            break
+        last = f
+        if pos + f < limit:
+            navafter.append(("+%d" % f, hex(nodefunc(pos + f).node())))
+        if pos - f >= 0:
+            navbefore.insert(0, ("-%d" % f, hex(nodefunc(pos - f).node())))
 
+    navafter.append(("tip", "tip"))
+    try:
+        navbefore.insert(0, ("(0)", hex(nodefunc('0').node())))
+    except error.RepoError:
+        pass
+
+    def gen(l):
+        def f(**map):
             for label, node in l:
                 yield {"label": label, "node": node}
+        return f
 
-            yield {"label": "tip", "node": "tip"}
-        except error.RepoError:
-            pass
-
-    return nav
+    return (dict(before=gen(navbefore), after=gen(navafter)),)
 
 def _siblings(siblings=[], hiderev=None):
     siblings = [s for s in siblings if s.node() != nullid]
--- a/mercurial/hgweb/wsgicgi.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/hgweb/wsgicgi.py	Sat Feb 13 23:50:38 2010 -0600
@@ -30,7 +30,7 @@
     environ['wsgi.multiprocess'] = True
     environ['wsgi.run_once'] = True
 
-    if environ.get('HTTPS','off').lower() in ('on','1','yes'):
+    if environ.get('HTTPS', 'off').lower() in ('on', '1', 'yes'):
         environ['wsgi.url_scheme'] = 'https'
     else:
         environ['wsgi.url_scheme'] = 'http'
--- a/mercurial/httprepo.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/httprepo.py	Sat Feb 13 23:50:38 2010 -0600
@@ -93,9 +93,9 @@
         resp_url = resp.geturl()
         if resp_url.endswith(qs):
             resp_url = resp_url[:-len(qs)]
-        if self._url != resp_url:
+        if self._url.rstrip('/') != resp_url.rstrip('/'):
             self.ui.status(_('real URL is %s\n') % resp_url)
-            self._url = resp_url
+        self._url = resp_url
         try:
             proto = resp.getheader('content-type')
         except AttributeError:
@@ -107,9 +107,10 @@
                 proto.startswith('text/plain') or
                 proto.startswith('application/hg-changegroup')):
             self.ui.debug("requested URL: '%s'\n" % url.hidepassword(cu))
-            raise error.RepoError(_("'%s' does not appear to be an hg repository:\n"
-                                    "---%%<--- (%s)\n%s\n---%%<---\n")
-                                  % (safeurl, proto, resp.read()))
+            raise error.RepoError(
+                _("'%s' does not appear to be an hg repository:\n"
+                  "---%%<--- (%s)\n%s\n---%%<---\n")
+                % (safeurl, proto, resp.read()))
 
         if proto.startswith('application/mercurial-'):
             try:
@@ -171,7 +172,7 @@
         n = " ".join(map(hex, nodes))
         d = self.do_read("branches", nodes=n)
         try:
-            br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]
+            br = [tuple(map(bin, b.split(" "))) for b in d.splitlines()]
             return br
         except:
             raise error.ResponseError(_("unexpected response:"), d)
@@ -183,7 +184,8 @@
             n = " ".join(["-".join(map(hex, p)) for p in pairs[i:i + batch]])
             d = self.do_read("between", pairs=n)
             try:
-                r += [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ]
+                r += [l and map(bin, l.split(" ")) or []
+                      for l in d.splitlines()]
             except:
                 raise error.ResponseError(_("unexpected response:"), d)
         return r
--- a/mercurial/i18n.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/i18n.py	Sat Feb 13 23:50:38 2010 -0600
@@ -48,5 +48,8 @@
         # An unknown encoding results in a LookupError.
         return message
 
-_ = gettext
+if 'HGPLAIN' in os.environ:
+    _ = lambda message: message
+else:
+    _ = gettext
 
--- a/mercurial/keepalive.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/keepalive.py	Sat Feb 13 23:50:38 2010 -0600
@@ -120,7 +120,8 @@
 DEBUG = None
 
 import sys
-if sys.version_info < (2, 4): HANDLE_ERRORS = 1
+if sys.version_info < (2, 4):
+    HANDLE_ERRORS = 1
 else: HANDLE_ERRORS = 0
 
 class ConnectionManager:
@@ -137,7 +138,8 @@
     def add(self, host, connection, ready):
         self._lock.acquire()
         try:
-            if not host in self._hostmap: self._hostmap[host] = []
+            if not host in self._hostmap:
+                self._hostmap[host] = []
             self._hostmap[host].append(connection)
             self._connmap[connection] = host
             self._readymap[connection] = ready
@@ -160,8 +162,10 @@
             self._lock.release()
 
     def set_ready(self, connection, ready):
-        try: self._readymap[connection] = ready
-        except KeyError: pass
+        try:
+            self._readymap[connection] = ready
+        except KeyError:
+            pass
 
     def get_ready_conn(self, host):
         conn = None
@@ -214,7 +218,8 @@
         self._cm.set_ready(connection, 1)
 
     def _remove_connection(self, host, connection, close=0):
-        if close: connection.close()
+        if close:
+            connection.close()
         self._cm.remove(connection)
 
     #### Transaction Execution
@@ -233,7 +238,8 @@
 
                 # if this response is non-None, then it worked and we're
                 # done.  Break out, skipping the else block.
-                if r: break
+                if r:
+                    break
 
                 # connection is bad - possibly closed by server
                 # discard it and ask for the next free connection
@@ -243,8 +249,9 @@
             else:
                 # no (working) free connections were found.  Create a new one.
                 h = http_class(host)
-                if DEBUG: DEBUG.info("creating new connection to %s (%d)",
-                                     host, id(h))
+                if DEBUG:
+                    DEBUG.info("creating new connection to %s (%d)",
+                               host, id(h))
                 self._cm.add(host, h, 0)
                 self._start_transaction(h, req)
                 r = h.getresponse()
@@ -252,9 +259,11 @@
             raise urllib2.URLError(err)
 
         # if not a persistent connection, don't try to reuse it
-        if r.will_close: self._cm.remove(h)
+        if r.will_close:
+            self._cm.remove(h)
 
-        if DEBUG: DEBUG.info("STATUS: %s, %s", r.status, r.reason)
+        if DEBUG:
+            DEBUG.info("STATUS: %s, %s", r.status, r.reason)
         r._handler = self
         r._host = host
         r._url = req.get_full_url()
@@ -293,8 +302,9 @@
             # same exception was raised, etc.  The tradeoff is
             # that it's now possible this call will raise
             # a DIFFERENT exception
-            if DEBUG: DEBUG.error("unexpected exception - closing " + \
-                                  "connection to %s (%d)", host, id(h))
+            if DEBUG:
+                DEBUG.error("unexpected exception - closing "
+                            "connection to %s (%d)", host, id(h))
             self._cm.remove(h)
             h.close()
             raise
@@ -304,11 +314,13 @@
             # bad header back.  This is most likely to happen if
             # the socket has been closed by the server since we
             # last used the connection.
-            if DEBUG: DEBUG.info("failed to re-use connection to %s (%d)",
-                                 host, id(h))
+            if DEBUG:
+                DEBUG.info("failed to re-use connection to %s (%d)",
+                           host, id(h))
             r = None
         else:
-            if DEBUG: DEBUG.info("re-using connection to %s (%d)", host, id(h))
+            if DEBUG:
+                DEBUG.info("re-using connection to %s (%d)", host, id(h))
 
         return r
 
@@ -319,7 +331,7 @@
         if sys.version_info >= (2, 4):
             headers.update(req.unredirected_hdrs)
         headers.update(self.parent.addheaders)
-        headers = dict((n.lower(), v) for n,v in headers.items())
+        headers = dict((n.lower(), v) for n, v in headers.items())
         skipheaders = {}
         for n in ('host', 'accept-encoding'):
             if n in headers:
@@ -477,13 +489,18 @@
         i = self._rbuf.find('\n')
         while i < 0 and not (0 < limit <= len(self._rbuf)):
             new = self._raw_read(self._rbufsize)
-            if not new: break
+            if not new:
+                break
             i = new.find('\n')
-            if i >= 0: i = i + len(self._rbuf)
+            if i >= 0:
+                i = i + len(self._rbuf)
             self._rbuf = self._rbuf + new
-        if i < 0: i = len(self._rbuf)
-        else: i = i+1
-        if 0 <= limit < len(self._rbuf): i = limit
+        if i < 0:
+            i = len(self._rbuf)
+        else:
+            i = i + 1
+        if 0 <= limit < len(self._rbuf):
+            i = limit
         data, self._rbuf = self._rbuf[:i], self._rbuf[i:]
         return data
 
@@ -492,7 +509,8 @@
         list = []
         while 1:
             line = self.readline()
-            if not line: break
+            if not line:
+                break
             list.append(line)
             total += len(line)
             if sizehint and total >= sizehint:
@@ -528,13 +546,14 @@
     if self.debuglevel > 0:
         print "send:", repr(str)
     try:
-        blocksize=8192
+        blocksize = 8192
         if hasattr(str,'read') :
-            if self.debuglevel > 0: print "sendIng a read()able"
-            data=str.read(blocksize)
+            if self.debuglevel > 0:
+                print "sendIng a read()able"
+            data = str.read(blocksize)
             while data:
                 self.sock.sendall(data)
-                data=str.read(blocksize)
+                data = str.read(blocksize)
         else:
             self.sock.sendall(str)
     except socket.error, v:
@@ -588,8 +607,10 @@
             fo = urllib2.urlopen(url)
             fo.read()
             fo.close()
-            try: status, reason = fo.status, fo.reason
-            except AttributeError: status, reason = None, None
+            try:
+                status, reason = fo.status, fo.reason
+            except AttributeError:
+                status, reason = None, None
         except IOError, e:
             print "  EXCEPTION: %s" % e
             raise
@@ -635,7 +656,8 @@
     foo = ''
     while 1:
         f = fo.readline()
-        if f: foo = foo + f
+        if f:
+            foo = foo + f
         else: break
     fo.close()
     m = md5.new(foo)
@@ -657,14 +679,15 @@
     urllib2.install_opener(opener)
     t2 = fetch(N, url)
     print '  TIME: %.3f s' % t2
-    print '  improvement factor: %.2f' % (t1/t2, )
+    print '  improvement factor: %.2f' % (t1 / t2)
 
 def fetch(N, url, delay=0):
     import time
     lens = []
     starttime = time.time()
     for i in range(N):
-        if delay and i > 0: time.sleep(delay)
+        if delay and i > 0:
+            time.sleep(delay)
         fo = urllib2.urlopen(url)
         foo = fo.read()
         fo.close()
@@ -683,7 +706,8 @@
     global DEBUG
     dbbackup = DEBUG
     class FakeLogger:
-        def debug(self, msg, *args): print msg % args
+        def debug(self, msg, *args):
+            print msg % args
         info = warning = error = debug
     DEBUG = FakeLogger()
     print "  fetching the file to establish a connection"
--- a/mercurial/localrepo.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/localrepo.py	Sat Feb 13 23:50:38 2010 -0600
@@ -89,6 +89,7 @@
         self.sopener = self.store.opener
         self.sjoin = self.store.join
         self.opener.createmode = self.store.createmode
+        self.sopener.options = {}
 
         # These two define the set of tags for this repository.  _tags
         # maps tag name to node; _tagtypes maps tag name to 'global' or
@@ -112,7 +113,7 @@
             p = os.environ['HG_PENDING']
             if p.startswith(self.root):
                 c.readpending('00changelog.i.a')
-        self.sopener.defversion = c.version
+        self.sopener.options['defversion'] = c.version
         return c
 
     @propertycache
@@ -128,6 +129,12 @@
             return context.workingctx(self)
         return context.changectx(self, changeid)
 
+    def __contains__(self, changeid):
+        try:
+            return bool(self.lookup(changeid))
+        except error.RepoLookupError:
+            return False
+
     def __nonzero__(self):
         return True
 
@@ -313,12 +320,13 @@
         # TODO: rename this function?
         tiprev = len(self) - 1
         if lrev != tiprev:
-            self._updatebranchcache(partial, lrev+1, tiprev+1)
+            self._updatebranchcache(partial, lrev + 1, tiprev + 1)
             self._writebranchcache(partial, self.changelog.tip(), tiprev)
 
         return partial
 
     def branchmap(self):
+        '''returns a dictionary {branch: [branchheads]}'''
         tip = self.changelog.tip()
         if self._branchcache is not None and self._branchcachetip == tip:
             return self._branchcache
@@ -342,16 +350,12 @@
         the branch, open heads come before closed'''
         bt = {}
         for bn, heads in self.branchmap().iteritems():
-            head = None
-            for i in range(len(heads)-1, -1, -1):
-                h = heads[i]
+            tip = heads[-1]
+            for h in reversed(heads):
                 if 'close' not in self.changelog.read(h)[5]:
-                    head = h
+                    tip = h
                     break
-            # no open heads were found
-            if head is None:
-                head = heads[-1]
-            bt[bn] = head
+            bt[bn] = tip
         return bt
 
 
@@ -371,7 +375,8 @@
                 # invalidate the cache
                 raise ValueError('invalidating branch cache (tip differs)')
             for l in lines:
-                if not l: continue
+                if not l:
+                    continue
                 node, label = l.split(" ", 1)
                 partial.setdefault(label.strip(), []).append(bin(node))
         except KeyboardInterrupt:
@@ -556,7 +561,8 @@
 
         # abort here if the journal already exists
         if os.path.exists(self.sjoin("journal")):
-            raise error.RepoError(_("abandoned transaction found - run hg recover"))
+            raise error.RepoError(
+                _("abandoned transaction found - run hg recover"))
 
         # save dirstate for rollback
         try:
@@ -581,7 +587,8 @@
         try:
             if os.path.exists(self.sjoin("journal")):
                 self.ui.status(_("rolling back interrupted transaction\n"))
-                transaction.rollback(self.sopener, self.sjoin("journal"), self.ui.warn)
+                transaction.rollback(self.sopener, self.sjoin("journal"),
+                                     self.ui.warn)
                 self.invalidate()
                 return True
             else:
@@ -597,7 +604,8 @@
             lock = self.lock()
             if os.path.exists(self.sjoin("undo")):
                 self.ui.status(_("rolling back last transaction\n"))
-                transaction.rollback(self.sopener, self.sjoin("undo"), self.ui.warn)
+                transaction.rollback(self.sopener, self.sjoin("undo"),
+                                     self.ui.warn)
                 util.rename(self.join("undo.dirstate"), self.join("dirstate"))
                 try:
                     branch = self.opener("undo.branch").read()
@@ -738,7 +746,7 @@
             return flog.add(text, meta, tr, linkrev, fparent1, fparent2)
 
         # are just the flags changed during merge?
-        if fparent1 !=  fparent2o and manifest1.flags(fname) != fctx.flags():
+        if fparent1 != fparent2o and manifest1.flags(fname) != fctx.flags():
             changelist.append(fname)
 
         return fparent1
@@ -819,6 +827,7 @@
                                       extra, changes)
             if editor:
                 cctx._text = editor(self, cctx, subs)
+            edited = (text != cctx._text)
 
             # commit subs
             if subs:
@@ -829,7 +838,21 @@
                     state[s] = (state[s][0], sr)
                 subrepo.writestate(self, state)
 
-            ret = self.commitctx(cctx, True)
+            # Save commit message in case this transaction gets rolled back
+            # (e.g. by a pretxncommit hook).  Leave the content alone on
+            # the assumption that the user will use the same editor again.
+            msgfile = self.opener('last-message.txt', 'wb')
+            msgfile.write(cctx._text)
+            msgfile.close()
+
+            try:
+                ret = self.commitctx(cctx, True)
+            except:
+                if edited:
+                    msgfn = self.pathto(msgfile.name[len(self.root)+1:])
+                    self.ui.write(
+                        _('note: commit message saved in %s\n') % msgfn)
+                raise
 
             # update dirstate and mergestate
             for f in changes[0] + changes[1]:
@@ -983,7 +1006,9 @@
             match.bad = bad
 
         if working: # we need to scan the working dir
-            s = self.dirstate.status(match, listignored, listclean, listunknown)
+            subrepos = ctx1.substate.keys()
+            s = self.dirstate.status(match, subrepos, listignored,
+                                     listclean, listunknown)
             cmp, modified, added, removed, deleted, unknown, ignored, clean = s
 
             # check for any possibly clean files
@@ -1317,10 +1342,11 @@
 
             if r:
                 reqcnt += 1
+                self.ui.progress('searching', reqcnt, unit='queries')
                 self.ui.debug("request %d: %s\n" %
                             (reqcnt, " ".join(map(short, r))))
                 for p in xrange(0, len(r), 10):
-                    for b in remote.branches(r[p:p+10]):
+                    for b in remote.branches(r[p:p + 10]):
                         self.ui.debug("received %s:%s\n" %
                                       (short(b[0]), short(b[1])))
                         unknown.append(b)
@@ -1329,6 +1355,7 @@
         while search:
             newsearch = []
             reqcnt += 1
+            self.ui.progress('searching', reqcnt, unit='queries')
             for n, l in zip(search, remote.between(search)):
                 l.append(n[1])
                 p = n[0]
@@ -1364,6 +1391,7 @@
         self.ui.debug("found new changesets starting at " +
                      " ".join([short(f) for f in fetch]) + "\n")
 
+        self.ui.progress('searching', None, unit='queries')
         self.ui.debug("%d total queries\n" % reqcnt)
 
         return base.keys(), list(fetch), heads
@@ -1470,7 +1498,7 @@
         update, updated_heads = self.findoutgoing(remote, common, remote_heads)
         msng_cl, bases, heads = self.changelog.nodesbetween(update, revs)
 
-        def checkbranch(lheads, rheads, updatelb):
+        def checkbranch(lheads, rheads, updatelb, branchname=None):
             '''
             check whether there are more local heads than remote heads on
             a specific branch.
@@ -1506,15 +1534,18 @@
                     warn = 1
 
             if warn:
-                if not rheads: # new branch requires --force
-                    self.ui.warn(_("abort: push creates new"
-                                   " remote branch '%s'!\n") %
-                                   self[lheads[0]].branch())
+                if branchname is not None:
+                    msg = _("abort: push creates new remote heads"
+                            " on branch '%s'!\n") % branchname
                 else:
-                    self.ui.warn(_("abort: push creates new remote heads!\n"))
-
-                self.ui.status(_("(did you forget to merge?"
-                                 " use push -f to force)\n"))
+                    msg = _("abort: push creates new remote heads!\n")
+                self.ui.warn(msg)
+                if len(lheads) > len(rheads):
+                    self.ui.status(_("(did you forget to merge?"
+                                     " use push -f to force)\n"))
+                else:
+                    self.ui.status(_("(you should pull and merge or"
+                                     " use push -f to force)\n"))
                 return False
             return True
 
@@ -1533,27 +1564,30 @@
 
             if remote_heads != [nullid]:
                 if remote.capable('branchmap'):
-                    localhds = {}
+                    remotebrheads = remote.branchmap()
+
                     if not revs:
-                        localhds = self.branchmap()
+                        localbrheads = self.branchmap()
                     else:
+                        localbrheads = {}
                         for n in heads:
                             branch = self[n].branch()
-                            if branch in localhds:
-                                localhds[branch].append(n)
-                            else:
-                                localhds[branch] = [n]
-
-                    remotehds = remote.branchmap()
+                            localbrheads.setdefault(branch, []).append(n)
 
-                    for lh in localhds:
-                        if lh in remotehds:
-                            rheads = remotehds[lh]
-                        else:
-                            rheads = []
-                        lheads = localhds[lh]
-                        if not checkbranch(lheads, rheads, update):
-                            return None, 0
+                    newbranches = list(set(localbrheads) - set(remotebrheads))
+                    if newbranches: # new branch requires --force
+                        branchnames = ', '.join("%s" % b for b in newbranches)
+                        self.ui.warn(_("abort: push creates "
+                                       "new remote branches: %s!\n")
+                                     % branchnames)
+                        # propose 'push -b .' in the msg too?
+                        self.ui.status(_("(use 'hg push -f' to force)\n"))
+                        return None, 0
+                    for branch, lheads in localbrheads.iteritems():
+                        if branch in remotebrheads:
+                            rheads = remotebrheads[branch]
+                            if not checkbranch(lheads, rheads, update, branch):
+                                return None, 0
                 else:
                     if not checkbranch(heads, remote_heads, update):
                         return None, 0
@@ -1590,7 +1624,8 @@
         ret = self.prepush(remote, force, revs)
         if ret[0] is not None:
             cg, remote_heads = ret
-            if force: remote_heads = ['force']
+            if force:
+                remote_heads = ['force']
             return remote.unbundle(cg, remote_heads, 'push')
         return ret[1]
 
@@ -1690,54 +1725,8 @@
         # also assume the recipient will have all the parents.  This function
         # prunes them from the set of missing nodes.
         def prune_parents(revlog, hasset, msngset):
-            haslst = list(hasset)
-            haslst.sort(key=revlog.rev)
-            for node in haslst:
-                parentlst = [p for p in revlog.parents(node) if p != nullid]
-                while parentlst:
-                    n = parentlst.pop()
-                    if n not in hasset:
-                        hasset.add(n)
-                        p = [p for p in revlog.parents(n) if p != nullid]
-                        parentlst.extend(p)
-            for n in hasset:
-                msngset.pop(n, None)
-
-        # This is a function generating function used to set up an environment
-        # for the inner function to execute in.
-        def manifest_and_file_collector(changedfileset):
-            # This is an information gathering function that gathers
-            # information from each changeset node that goes out as part of
-            # the changegroup.  The information gathered is a list of which
-            # manifest nodes are potentially required (the recipient may
-            # already have them) and total list of all files which were
-            # changed in any changeset in the changegroup.
-            #
-            # We also remember the first changenode we saw any manifest
-            # referenced by so we can later determine which changenode 'owns'
-            # the manifest.
-            def collect_manifests_and_files(clnode):
-                c = cl.read(clnode)
-                for f in c[3]:
-                    # This is to make sure we only have one instance of each
-                    # filename string for each filename.
-                    changedfileset.setdefault(f, f)
-                msng_mnfst_set.setdefault(c[0], clnode)
-            return collect_manifests_and_files
-
-        # Figure out which manifest nodes (of the ones we think might be part
-        # of the changegroup) the recipient must know about and remove them
-        # from the changegroup.
-        def prune_manifests():
-            has_mnfst_set = set()
-            for n in msng_mnfst_set:
-                # If a 'missing' manifest thinks it belongs to a changenode
-                # the recipient is assumed to have, obviously the recipient
-                # must have that manifest.
-                linknode = cl.node(mnfst.linkrev(mnfst.rev(n)))
-                if linknode in has_cl_set:
-                    has_mnfst_set.add(n)
-            prune_parents(mnfst, has_mnfst_set, msng_mnfst_set)
+            for r in revlog.ancestors(*[revlog.rev(n) for n in hasset]):
+                msngset.pop(revlog.node(r), None)
 
         # Use the information collected in collect_manifests_and_files to say
         # which changenode any manifestnode belongs to.
@@ -1747,7 +1736,6 @@
         # A function generating function that sets up the initial environment
         # the inner function.
         def filenode_collector(changedfiles):
-            next_rev = [0]
             # This gathers information from each manifestnode included in the
             # changegroup about which filenodes the manifest node references
             # so we can include those in the changegroup too.
@@ -1757,8 +1745,8 @@
             # the first manifest that references it belongs to.
             def collect_msng_filenodes(mnfstnode):
                 r = mnfst.rev(mnfstnode)
-                if r == next_rev[0]:
-                    # If the last rev we looked at was the one just previous,
+                if r - 1 in mnfst.parentrevs(r):
+                    # If the previous rev is one of the parents,
                     # we only need to see a diff.
                     deltamf = mnfst.readdelta(mnfstnode)
                     # For each line in the delta
@@ -1787,8 +1775,6 @@
                             clnode = msng_mnfst_set[mnfstnode]
                             ndset = msng_filenode_set.setdefault(f, {})
                             ndset.setdefault(fnode, clnode)
-                # Remember the revision we hope to see next.
-                next_rev[0] = r + 1
             return collect_msng_filenodes
 
         # We have a list of filenodes we think we need for a file, lets remove
@@ -1828,16 +1814,31 @@
         def gengroup():
             # The set of changed files starts empty.
             changedfiles = {}
+            collect = changegroup.collector(cl, msng_mnfst_set, changedfiles)
+
             # Create a changenode group generator that will call our functions
             # back to lookup the owning changenode and collect information.
-            group = cl.group(msng_cl_lst, identity,
-                             manifest_and_file_collector(changedfiles))
+            group = cl.group(msng_cl_lst, identity, collect)
+            cnt = 0
             for chnk in group:
                 yield chnk
+                self.ui.progress('bundle changes', cnt, unit='chunks')
+                cnt += 1
+            self.ui.progress('bundle changes', None, unit='chunks')
 
-            # The list of manifests has been collected by the generator
-            # calling our functions back.
-            prune_manifests()
+
+            # Figure out which manifest nodes (of the ones we think might be
+            # part of the changegroup) the recipient must know about and
+            # remove them from the changegroup.
+            has_mnfst_set = set()
+            for n in msng_mnfst_set:
+                # If a 'missing' manifest thinks it belongs to a changenode
+                # the recipient is assumed to have, obviously the recipient
+                # must have that manifest.
+                linknode = cl.node(mnfst.linkrev(mnfst.rev(n)))
+                if linknode in has_cl_set:
+                    has_mnfst_set.add(n)
+            prune_parents(mnfst, has_mnfst_set, msng_mnfst_set)
             add_extra_nodes(1, msng_mnfst_set)
             msng_mnfst_lst = msng_mnfst_set.keys()
             # Sort the manifestnodes by revision number.
@@ -1846,8 +1847,12 @@
             # and data collection functions back.
             group = mnfst.group(msng_mnfst_lst, lookup_manifest_link,
                                 filenode_collector(changedfiles))
+            cnt = 0
             for chnk in group:
                 yield chnk
+                self.ui.progress('bundle manifests', cnt, unit='chunks')
+                cnt += 1
+            self.ui.progress('bundle manifests', None, unit='chunks')
 
             # These are no longer needed, dereference and toss the memory for
             # them.
@@ -1861,6 +1866,7 @@
                     msng_filenode_set.setdefault(fname, {})
                     changedfiles[fname] = 1
             # Go through all our files in order sorted by name.
+            cnt = 0
             for fname in sorted(changedfiles):
                 filerevlog = self.file(fname)
                 if not len(filerevlog):
@@ -1886,12 +1892,16 @@
                     group = filerevlog.group(msng_filenode_lst,
                                              lookup_filenode_link_func(fname))
                     for chnk in group:
+                        self.ui.progress(
+                            'bundle files', cnt, item=fname, unit='chunks')
+                        cnt += 1
                         yield chnk
                 if fname in msng_filenode_set:
                     # Don't need this anymore, toss it to free memory.
                     del msng_filenode_set[fname]
             # Signal that no more groups are left.
             yield changegroup.closechunk()
+            self.ui.progress('bundle files', None, unit='chunks')
 
             if msng_cl_lst:
                 self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source)
@@ -1926,12 +1936,6 @@
                 if log.linkrev(r) in revset:
                     yield log.node(r)
 
-        def changed_file_collector(changedfileset):
-            def collect_changed_files(clnode):
-                c = cl.read(clnode)
-                changedfileset.update(c[3])
-            return collect_changed_files
-
         def lookuprevlink_func(revlog):
             def lookuprevlink(n):
                 return cl.node(revlog.linkrev(revlog.rev(n)))
@@ -1940,17 +1944,27 @@
         def gengroup():
             '''yield a sequence of changegroup chunks (strings)'''
             # construct a list of all changed files
-            changedfiles = set()
+            changedfiles = {}
+            mmfs = {}
+            collect = changegroup.collector(cl, mmfs, changedfiles)
 
-            for chnk in cl.group(nodes, identity,
-                                 changed_file_collector(changedfiles)):
+            cnt = 0
+            for chnk in cl.group(nodes, identity, collect):
+                self.ui.progress('bundle changes', cnt, unit='chunks')
+                cnt += 1
                 yield chnk
+            self.ui.progress('bundle changes', None, unit='chunks')
 
             mnfst = self.manifest
             nodeiter = gennodelst(mnfst)
+            cnt = 0
             for chnk in mnfst.group(nodeiter, lookuprevlink_func(mnfst)):
+                self.ui.progress('bundle manifests', cnt, unit='chunks')
+                cnt += 1
                 yield chnk
+            self.ui.progress('bundle manifests', None, unit='chunks')
 
+            cnt = 0
             for fname in sorted(changedfiles):
                 filerevlog = self.file(fname)
                 if not len(filerevlog):
@@ -1962,7 +1976,11 @@
                     yield fname
                     lookup = lookuprevlink_func(filerevlog)
                     for chnk in filerevlog.group(nodeiter, lookup):
+                        self.ui.progress(
+                            'bundle files', cnt, item=fname, unit='chunks')
+                        cnt += 1
                         yield chnk
+            self.ui.progress('bundle files', None, unit='chunks')
 
             yield changegroup.closechunk()
 
@@ -2006,23 +2024,47 @@
             # pull off the changeset group
             self.ui.status(_("adding changesets\n"))
             clstart = len(cl)
-            chunkiter = changegroup.chunkiter(source)
+            class prog(object):
+                step = 'changesets'
+                count = 1
+                ui = self.ui
+                def __call__(self):
+                    self.ui.progress(self.step, self.count, unit='chunks')
+                    self.count += 1
+            pr = prog()
+            chunkiter = changegroup.chunkiter(source, progress=pr)
             if cl.addgroup(chunkiter, csmap, trp) is None and not emptyok:
                 raise util.Abort(_("received changelog group is empty"))
             clend = len(cl)
             changesets = clend - clstart
+            self.ui.progress('changesets', None)
 
             # pull off the manifest group
             self.ui.status(_("adding manifests\n"))
-            chunkiter = changegroup.chunkiter(source)
+            pr.step = 'manifests'
+            pr.count = 1
+            chunkiter = changegroup.chunkiter(source, progress=pr)
             # no need to check for empty manifest group here:
             # if the result of the merge of 1 and 2 is the same in 3 and 4,
             # no new manifest will be created and the manifest group will
             # be empty during the pull
             self.manifest.addgroup(chunkiter, revmap, trp)
+            self.ui.progress('manifests', None)
+
+            needfiles = {}
+            if self.ui.configbool('server', 'validate', default=False):
+                # validate incoming csets have their manifests
+                for cset in xrange(clstart, clend):
+                    mfest = self.changelog.read(self.changelog.node(cset))[0]
+                    mfest = self.manifest.readdelta(mfest)
+                    # store file nodes we must see
+                    for f, n in mfest.iteritems():
+                        needfiles.setdefault(f, set()).add(n)
 
             # process the files
             self.ui.status(_("adding file changes\n"))
+            pr.step = 'files'
+            pr.count = 1
             while 1:
                 f = changegroup.getchunk(source)
                 if not f:
@@ -2030,11 +2072,30 @@
                 self.ui.debug("adding %s revisions\n" % f)
                 fl = self.file(f)
                 o = len(fl)
-                chunkiter = changegroup.chunkiter(source)
+                chunkiter = changegroup.chunkiter(source, progress=pr)
                 if fl.addgroup(chunkiter, revmap, trp) is None:
                     raise util.Abort(_("received file revlog group is empty"))
                 revisions += len(fl) - o
                 files += 1
+                if f in needfiles:
+                    needs = needfiles[f]
+                    for new in xrange(o, len(fl)):
+                        n = fl.node(new)
+                        if n in needs:
+                            needs.remove(n)
+                    if not needs:
+                        del needfiles[f]
+            self.ui.progress('files', None)
+
+            for f, needs in needfiles.iteritems():
+                fl = self.file(f)
+                for n in needs:
+                    try:
+                        fl.rev(n)
+                    except error.LookupError:
+                        raise util.Abort(
+                            _('missing file data for %s:%s - run hg verify') %
+                            (f, hex(n)))
 
             newheads = len(cl.heads())
             heads = ""
--- a/mercurial/lsprof.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/lsprof.py	Sat Feb 13 23:50:38 2010 -0600
@@ -96,7 +96,7 @@
                 mname = _fn2mod[code.co_filename] = k
                 break
         else:
-            mname = _fn2mod[code.co_filename] = '<%s>'%code.co_filename
+            mname = _fn2mod[code.co_filename] = '<%s>' % code.co_filename
 
     return '%s:%d(%s)' % (mname, code.co_firstlineno, code.co_name)
 
--- a/mercurial/mail.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/mail.py	Sat Feb 13 23:50:38 2010 -0600
@@ -160,11 +160,7 @@
         return str(email.Header.Header(s, cs))
     return s
 
-def addressencode(ui, address, charsets=None, display=False):
-    '''Turns address into RFC-2047 compliant header.'''
-    if display or not address:
-        return address or ''
-    name, addr = email.Utils.parseaddr(address)
+def _addressencode(ui, name, addr, charsets=None):
     name = headencode(ui, name, charsets)
     try:
         acc, dom = addr.split('@')
@@ -181,6 +177,26 @@
             raise util.Abort(_('invalid local address: %s') % addr)
     return email.Utils.formataddr((name, addr))
 
+def addressencode(ui, address, charsets=None, display=False):
+    '''Turns address into RFC-2047 compliant header.'''
+    if display or not address:
+        return address or ''
+    name, addr = email.Utils.parseaddr(address)
+    return _addressencode(ui, name, addr, charsets)
+
+def addrlistencode(ui, addrs, charsets=None, display=False):
+    '''Turns a list of addresses into a list of RFC-2047 compliant headers.
+    A single element of input list may contain multiple addresses, but output
+    always has one address per item'''
+    if display:
+        return [a.strip() for a in addrs if a.strip()]
+
+    result = []
+    for name, addr in email.Utils.getaddresses(addrs):
+        if name or addr:
+            result.append(_addressencode(ui, name, addr, charsets))
+    return result
+
 def mimeencode(ui, s, charsets=None, display=False):
     '''creates mime text object, encodes it if needed, and sets
     charset and transfer-encoding accordingly.'''
--- a/mercurial/manifest.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/manifest.py	Sat Feb 13 23:50:38 2010 -0600
@@ -11,8 +11,10 @@
 
 class manifestdict(dict):
     def __init__(self, mapping=None, flags=None):
-        if mapping is None: mapping = {}
-        if flags is None: flags = {}
+        if mapping is None:
+            mapping = {}
+        if flags is None:
+            flags = {}
         dict.__init__(self, mapping)
         self._flags = flags
     def flags(self, f):
@@ -70,7 +72,7 @@
         while lo < hi:
             mid = (lo + hi) // 2
             start = mid
-            while start > 0 and m[start-1] != '\n':
+            while start > 0 and m[start - 1] != '\n':
                 start -= 1
             end = advance(start, '\0')
             if m[start:end] < s:
@@ -85,7 +87,7 @@
         if cmp(s, found) == 0:
             # we know that after the null there are 40 bytes of sha1
             end = advance(end + 40, '\n')
-            return (lo, end+1)
+            return (lo, end + 1)
         else:
             return (lo, lo)
 
--- a/mercurial/match.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/match.py	Sat Feb 13 23:50:38 2010 -0600
@@ -125,10 +125,11 @@
     res = ''
     group = 0
     escape = re.escape
-    def peek(): return i < n and pat[i]
+    def peek():
+        return i < n and pat[i]
     while i < n:
         c = pat[i]
-        i = i+1
+        i += 1
         if c not in '*?[{},\\':
             res += escape(c)
         elif c == '*':
--- a/mercurial/mdiff.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/mdiff.py	Sat Feb 13 23:50:38 2010 -0600
@@ -27,7 +27,9 @@
     nodates removes dates from diff headers
     ignorews ignores all whitespace changes in the diff
     ignorewsamount ignores changes in the amount of whitespace
-    ignoreblanklines ignores changes whose lines are all blank'''
+    ignoreblanklines ignores changes whose lines are all blank
+    upgrade generates git diffs to avoid data loss
+    '''
 
     defaults = {
         'context': 3,
@@ -38,6 +40,7 @@
         'ignorews': False,
         'ignorewsamount': False,
         'ignoreblanklines': False,
+        'upgrade': False,
         }
 
     __slots__ = defaults.keys()
@@ -93,7 +96,8 @@
             return '\t\n'
         return '\n'
 
-    if not a and not b: return ""
+    if not a and not b:
+        return ""
     epoch = util.datestr((0, 0))
 
     if not opts.text and (util.binary(a) or util.binary(b)):
@@ -122,7 +126,8 @@
         al = splitnewlines(a)
         bl = splitnewlines(b)
         l = list(bunidiff(a, b, al, bl, "a/" + fn1, "b/" + fn2, opts=opts))
-        if not l: return ""
+        if not l:
+            return ""
         # difflib uses a space, rather than a tab
         l[0] = "%s%s" % (l[0][:-2], datetag(ad))
         l[1] = "%s%s" % (l[1][:-2], datetag(bd))
@@ -179,7 +184,7 @@
         for x in xrange(a2, aend):
             yield ' ' + l1[x]
 
-    header = [ "--- %s\t\n" % header1, "+++ %s\t\n" % header2 ]
+    header = ["--- %s\t\n" % header1, "+++ %s\t\n" % header2]
 
     if opts.showfunc:
         funcre = re.compile('\w')
@@ -200,7 +205,7 @@
         # in the file.  If it starts later, old and new below will both be
         # empty and we'll continue to the next match.
         if i > 0:
-            s = diff[i-1]
+            s = diff[i - 1]
         else:
             s = [0, 0, 0, 0]
         delta = []
@@ -243,11 +248,11 @@
             delta = hunk[4]
         else:
             # create a new hunk
-            hunk = [ astart, a2, bstart, b2, delta ]
+            hunk = [astart, a2, bstart, b2, delta]
 
-        delta[len(delta):] = [ ' ' + x for x in l1[astart:a1] ]
-        delta[len(delta):] = [ '-' + x for x in old ]
-        delta[len(delta):] = [ '+' + x for x in new ]
+        delta[len(delta):] = [' ' + x for x in l1[astart:a1]]
+        delta[len(delta):] = ['-' + x for x in old]
+        delta[len(delta):] = ['+' + x for x in new]
 
     if hunk:
         for x in yieldhunk(hunk, header):
--- a/mercurial/merge.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/merge.py	Sat Feb 13 23:50:38 2010 -0600
@@ -135,8 +135,10 @@
                 _(" conflicting flags for %s\n"
                   "(n)one, e(x)ec or sym(l)ink?") % f,
                 (_("&None"), _("E&xec"), _("Sym&link")), 0)
-            if r == 1: return "x" # Exec
-            if r == 2: return "l" # Symlink
+            if r == 1:
+                return "x" # Exec
+            if r == 2:
+                return "l" # Symlink
             return ""
         if m and m != a: # changed from a to m
             return m
@@ -253,6 +255,7 @@
     substate = wctx.substate # prime
 
     # prescan for merges
+    u = repo.ui
     for a in action:
         f, m = a[:2]
         if m == 'm': # merge
@@ -275,8 +278,10 @@
 
     audit_path = util.path_auditor(repo.root)
 
-    for a in action:
+    numupdates = len(action)
+    for i, a in enumerate(action):
         f, m = a[:2]
+        u.progress('update', i + 1, item=f, total=numupdates, unit='files')
         if f and f[0] == "/":
             continue
         if m == "r": # remove
@@ -336,6 +341,7 @@
         elif m == "e": # exec
             flags = a[2]
             util.set_flags(repo.wjoin(f), 'l' in flags, 'x' in flags)
+    u.progress('update', None, total=numupdates, unit='files')
 
     return updated, merged, removed, unresolved
 
--- a/mercurial/minirst.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/minirst.py	Sat Feb 13 23:50:38 2010 -0600
@@ -1,6 +1,6 @@
 # minirst.py - minimal reStructuredText parser
 #
-# Copyright 2009 Matt Mackall <mpm@selenic.com> and others
+# Copyright 2009, 2010 Matt Mackall <mpm@selenic.com> and others
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
@@ -78,9 +78,9 @@
         #    | indented literal block    |
         #    +---------------------------+
         blocks[i]['type'] = 'paragraph'
-        if blocks[i]['lines'][-1].endswith('::') and i+1 < len(blocks):
+        if blocks[i]['lines'][-1].endswith('::') and i + 1 < len(blocks):
             indent = blocks[i]['indent']
-            adjustment = blocks[i+1]['indent'] - indent
+            adjustment = blocks[i + 1]['indent'] - indent
 
             if blocks[i]['lines'] == ['::']:
                 # Expanded form: remove block
@@ -104,16 +104,16 @@
                 adjustment -= m.end()
 
             # Mark the following indented blocks.
-            while i+1 < len(blocks) and blocks[i+1]['indent'] > indent:
-                blocks[i+1]['type'] = 'literal'
-                blocks[i+1]['indent'] -= adjustment
+            while i + 1 < len(blocks) and blocks[i + 1]['indent'] > indent:
+                blocks[i + 1]['type'] = 'literal'
+                blocks[i + 1]['indent'] -= adjustment
                 i += 1
         i += 1
     return blocks
 
-_bulletre = re.compile(r'(-|[0-9A-Za-z]+\.|\(?[0-9A-Za-z]+\)) ')
+_bulletre = re.compile(r'(-|[0-9A-Za-z]+\.|\(?[0-9A-Za-z]+\)|\|) ')
 _optionre = re.compile(r'^(--[a-z-]+)((?:[ =][a-zA-Z][\w-]*)?  +)(.*)$')
-_fieldre = re.compile(r':(?![: ])([^:]*)(?<! ):( +)(.*)')
+_fieldre = re.compile(r':(?![: ])([^:]*)(?<! ):[ ]+(.*)')
 _definitionre = re.compile(r'[^ ]')
 
 def splitparagraphs(blocks):
@@ -133,7 +133,7 @@
         item (but only if singleline is True).
         """
         line1 = lines[i]
-        line2 = i+1 < len(lines) and lines[i+1] or ''
+        line2 = i + 1 < len(lines) and lines[i + 1] or ''
         if not itemre.match(line1):
             return False
         if singleline:
@@ -153,12 +153,78 @@
                             items.append(dict(type=type, lines=[],
                                               indent=blocks[i]['indent']))
                         items[-1]['lines'].append(line)
-                    blocks[i:i+1] = items
+                    blocks[i:i + 1] = items
                     break
         i += 1
     return blocks
 
 
+_fieldwidth = 12
+
+def updatefieldlists(blocks):
+    """Find key and maximum key width for field lists."""
+    i = 0
+    while i < len(blocks):
+        if blocks[i]['type'] != 'field':
+            i += 1
+            continue
+
+        keywidth = 0
+        j = i
+        while j < len(blocks) and blocks[j]['type'] == 'field':
+            m = _fieldre.match(blocks[j]['lines'][0])
+            key, rest = m.groups()
+            blocks[j]['lines'][0] = rest
+            blocks[j]['key'] = key
+            keywidth = max(keywidth, len(key))
+            j += 1
+
+        for block in blocks[i:j]:
+            block['keywidth'] = keywidth
+        i = j + 1
+
+    return blocks
+
+
+def prunecontainers(blocks, keep):
+    """Prune unwanted containers.
+
+    The blocks must have a 'type' field, i.e., they should have been
+    run through findliteralblocks first.
+    """
+    pruned = []
+    i = 0
+    while i + 1 < len(blocks):
+        # Searching for a block that looks like this:
+        #
+        # +-------+---------------------------+
+        # | ".. container ::" type            |
+        # +---+                               |
+        #     | blocks                        |
+        #     +-------------------------------+
+        if (blocks[i]['type'] == 'paragraph' and
+            blocks[i]['lines'][0].startswith('.. container::')):
+            indent = blocks[i]['indent']
+            adjustment = blocks[i + 1]['indent'] - indent
+            containertype = blocks[i]['lines'][0][15:]
+            prune = containertype not in keep
+            if prune:
+                pruned.append(containertype)
+
+            # Always delete "..container:: type" block
+            del blocks[i]
+            j = i
+            while j < len(blocks) and blocks[j]['indent'] > indent:
+                if prune:
+                    del blocks[j]
+                    i -= 1 # adjust outer index
+                else:
+                    blocks[j]['indent'] -= adjustment
+                    j += 1
+        i += 1
+    return blocks, pruned
+
+
 def findsections(blocks):
     """Finds sections.
 
@@ -194,7 +260,7 @@
     """
     i = 1
     while i < len(blocks):
-        if (blocks[i]['type'] == blocks[i-1]['type'] and
+        if (blocks[i]['type'] == blocks[i - 1]['type'] and
             blocks[i]['type'] in ('bullet', 'option', 'field', 'definition')):
             i += 1
         else:
@@ -225,21 +291,33 @@
                                                subsequent_indent=defindent))
     initindent = subindent = indent
     if block['type'] == 'bullet':
-        m = _bulletre.match(block['lines'][0])
-        if m:
+        if block['lines'][0].startswith('| '):
+            # Remove bullet for line blocks and add no extra
+            # indention.
+            block['lines'][0] = block['lines'][0][2:]
+        else:
+            m = _bulletre.match(block['lines'][0])
             subindent = indent + m.end() * ' '
     elif block['type'] == 'field':
-        m = _fieldre.match(block['lines'][0])
-        if m:
-            key, spaces, rest = m.groups()
-            # Turn ":foo: bar" into "foo   bar".
-            block['lines'][0] = '%s  %s%s' % (key, spaces, rest)
-            subindent = indent + (2 + len(key) + len(spaces)) * ' '
+        keywidth = block['keywidth']
+        key = block['key']
+
+        subindent = indent + _fieldwidth * ' '
+        if len(key) + 2 > _fieldwidth:
+            # key too large, use full line width
+            key = key.ljust(width)
+        elif keywidth + 2 < _fieldwidth:
+            # all keys are small, add only two spaces
+            key = key.ljust(keywidth + 2)
+            subindent = indent + (keywidth + 2) * ' '
+        else:
+            # mixed sizes, use fieldwidth for this one
+            key = key.ljust(_fieldwidth)
+        block['lines'][0] = key + block['lines'][0]
     elif block['type'] == 'option':
         m = _optionre.match(block['lines'][0])
-        if m:
-            option, arg, rest = m.groups()
-            subindent = indent + (len(option) + len(arg)) * ' '
+        option, arg, rest = m.groups()
+        subindent = indent + (len(option) + len(arg)) * ' '
 
     text = ' '.join(map(str.strip, block['lines']))
     return textwrap.fill(text, width=width,
@@ -247,24 +325,30 @@
                          subsequent_indent=subindent)
 
 
-def format(text, width, indent=0):
+def format(text, width, indent=0, keep=None):
     """Parse and format the text according to width."""
     blocks = findblocks(text)
     for b in blocks:
         b['indent'] += indent
     blocks = findliteralblocks(blocks)
+    blocks, pruned = prunecontainers(blocks, keep or [])
     blocks = inlineliterals(blocks)
     blocks = splitparagraphs(blocks)
+    blocks = updatefieldlists(blocks)
     blocks = findsections(blocks)
     blocks = addmargins(blocks)
-    return '\n'.join(formatblock(b, width) for b in blocks)
+    text = '\n'.join(formatblock(b, width) for b in blocks)
+    if keep is None:
+        return text
+    else:
+        return text, pruned
 
 
 if __name__ == "__main__":
     from pprint import pprint
 
-    def debug(func, blocks):
-        blocks = func(blocks)
+    def debug(func, *args):
+        blocks = func(*args)
         print "*** after %s:" % func.__name__
         pprint(blocks)
         print
@@ -273,7 +357,10 @@
     text = open(sys.argv[1]).read()
     blocks = debug(findblocks, text)
     blocks = debug(findliteralblocks, blocks)
+    blocks = debug(prunecontainers, blocks, sys.argv[2:])
+    blocks = debug(inlineliterals, blocks)
     blocks = debug(splitparagraphs, blocks)
+    blocks = debug(updatefieldlists, blocks)
     blocks = debug(findsections, blocks)
     blocks = debug(addmargins, blocks)
     print '\n'.join(formatblock(b, 30) for b in blocks)
--- a/mercurial/mpatch.c	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/mpatch.c	Sat Feb 13 23:50:38 2010 -0600
@@ -35,13 +35,13 @@
 #endif
 
 #ifdef _WIN32
-# ifdef _MSC_VER
+#ifdef _MSC_VER
 /* msvc 6.0 has problems */
-#  define inline __inline
+#define inline __inline
 typedef unsigned long uint32_t;
-# else
-#  include <stdint.h>
-# endif
+#else
+#include <stdint.h>
+#endif
 static uint32_t ntohl(uint32_t x)
 {
 	return ((x & 0x000000ffUL) << 24) |
@@ -51,13 +51,13 @@
 }
 #else
 /* not windows */
-# include <sys/types.h>
-# if defined __BEOS__ && !defined __HAIKU__
-#  include <ByteOrder.h>
-# else
-#  include <arpa/inet.h>
-# endif
-# include <inttypes.h>
+#include <sys/types.h>
+#if defined __BEOS__ && !defined __HAIKU__
+#include <ByteOrder.h>
+#else
+#include <arpa/inet.h>
+#endif
+#include <inttypes.h>
 #endif
 
 static char mpatch_doc[] = "Efficient binary patching.";
--- a/mercurial/osutil.c	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/osutil.c	Sat Feb 13 23:50:38 2010 -0600
@@ -14,13 +14,13 @@
 #include <string.h>
 
 #ifdef _WIN32
-# include <windows.h>
-# include <io.h>
+#include <windows.h>
+#include <io.h>
 #else
-# include <dirent.h>
-# include <sys/stat.h>
-# include <sys/types.h>
-# include <unistd.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 #endif
 
 /* some platforms lack the PATH_MAX definition (eg. GNU/Hurd) */
@@ -174,7 +174,7 @@
 	stp->st_mtime = to_python_time(&fd->ftLastWriteTime);
 	stp->st_ctime = to_python_time(&fd->ftCreationTime);
 	if (kind == _S_IFREG)
-		stp->st_size =	((__int64)fd->nFileSizeHigh << 32)
+		stp->st_size = ((__int64)fd->nFileSizeHigh << 32)
 				+ fd->nFileSizeLow;
 	return Py_BuildValue("siN", fd->cFileName,
 		kind, py_st);
@@ -189,7 +189,7 @@
 	char *pattern;
 
 	/* build the path + \* pattern string */
-	pattern = malloc(plen+3); /* path + \* + \0 */
+	pattern = malloc(plen + 3); /* path + \* + \0 */
 	if (!pattern) {
 		PyErr_NoMemory();
 		goto error_nomem;
@@ -485,7 +485,7 @@
 		goto bail;
 	}
 
-	fd = _open_osfhandle((intptr_t) handle, flags);
+	fd = _open_osfhandle((intptr_t)handle, flags);
 	if (fd == -1) {
 		CloseHandle(handle);
 		PyErr_SetFromErrnoWithFilename(PyExc_IOError, name);
--- a/mercurial/parsers.c	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/parsers.c	Sat Feb 13 23:50:38 2010 -0600
@@ -131,14 +131,14 @@
 }
 
 #ifdef _WIN32
-# ifdef _MSC_VER
+#ifdef _MSC_VER
 /* msvc 6.0 has problems */
-#  define inline __inline
+#define inline __inline
 typedef unsigned long uint32_t;
 typedef unsigned __int64 uint64_t;
-# else
-#  include <stdint.h>
-# endif
+#else
+#include <stdint.h>
+#endif
 static uint32_t ntohl(uint32_t x)
 {
 	return ((x & 0x000000ffUL) << 24) |
@@ -148,13 +148,13 @@
 }
 #else
 /* not windows */
-# include <sys/types.h>
-# if defined __BEOS__ && !defined __HAIKU__
-#  include <ByteOrder.h>
-# else
-#  include <arpa/inet.h>
-# endif
-# include <inttypes.h>
+#include <sys/types.h>
+#if defined __BEOS__ && !defined __HAIKU__
+#include <ByteOrder.h>
+#else
+#include <arpa/inet.h>
+#endif
+#include <inttypes.h>
 #endif
 
 static PyObject *parse_dirstate(PyObject *self, PyObject *args)
@@ -194,7 +194,7 @@
 		mtime = ntohl(*(uint32_t *)(decode + 8));
 		flen = ntohl(*(uint32_t *)(decode + 12));
 		cur += 17;
-		if (flen > end - cur) {
+		if (cur + flen > end || cur + flen < cur) {
 			PyErr_SetString(PyExc_ValueError, "overflow in dirstate");
 			goto quit;
 		}
@@ -303,16 +303,16 @@
 		if (n == 0) /* mask out version number for the first entry */
 			offset_flags &= 0xFFFF;
 		else {
-			uint32_t offset_high =  ntohl(*((uint32_t *) decode));
-			offset_flags |= ((uint64_t) offset_high) << 32;
+			uint32_t offset_high =  ntohl(*((uint32_t *)decode));
+			offset_flags |= ((uint64_t)offset_high) << 32;
 		}
 
-		comp_len = ntohl(*((uint32_t *) (decode + 8)));
-		uncomp_len = ntohl(*((uint32_t *) (decode + 12)));
-		base_rev = ntohl(*((uint32_t *) (decode + 16)));
-		link_rev = ntohl(*((uint32_t *) (decode + 20)));
-		parent_1 = ntohl(*((uint32_t *) (decode + 24)));
-		parent_2 = ntohl(*((uint32_t *) (decode + 28)));
+		comp_len = ntohl(*((uint32_t *)(decode + 8)));
+		uncomp_len = ntohl(*((uint32_t *)(decode + 12)));
+		base_rev = ntohl(*((uint32_t *)(decode + 16)));
+		link_rev = ntohl(*((uint32_t *)(decode + 20)));
+		parent_1 = ntohl(*((uint32_t *)(decode + 24)));
+		parent_2 = ntohl(*((uint32_t *)(decode + 28)));
 		c_node_id = decode + 32;
 
 		entry = _build_idx_entry(nodemap, n, offset_flags,
@@ -332,7 +332,7 @@
 
 		n++;
 		step = 64 + (inlined ? comp_len : 0);
-		if (end - data < step)
+		if (data + step > end || data + step < data)
 			break;
 		data += step;
 	}
--- a/mercurial/patch.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/patch.py	Sat Feb 13 23:50:38 2010 -0600
@@ -41,6 +41,130 @@
 
 # public functions
 
+def split(stream):
+    '''return an iterator of individual patches from a stream'''
+    def isheader(line, inheader):
+        if inheader and line[0] in (' ', '\t'):
+            # continuation
+            return True
+        l = line.split(': ', 1)
+        return len(l) == 2 and ' ' not in l[0]
+
+    def chunk(lines):
+        return cStringIO.StringIO(''.join(lines))
+
+    def hgsplit(stream, cur):
+        inheader = True
+
+        for line in stream:
+            if not line.strip():
+                inheader = False
+            if not inheader and line.startswith('# HG changeset patch'):
+                yield chunk(cur)
+                cur = []
+                inheader = True
+
+            cur.append(line)
+
+        if cur:
+            yield chunk(cur)
+
+    def mboxsplit(stream, cur):
+        for line in stream:
+            if line.startswith('From '):
+                for c in split(chunk(cur[1:])):
+                    yield c
+                cur = []
+
+            cur.append(line)
+
+        if cur:
+            for c in split(chunk(cur[1:])):
+                yield c
+
+    def mimesplit(stream, cur):
+        def msgfp(m):
+            fp = cStringIO.StringIO()
+            g = email.Generator.Generator(fp, mangle_from_=False)
+            g.flatten(m)
+            fp.seek(0)
+            return fp
+
+        for line in stream:
+            cur.append(line)
+        c = chunk(cur)
+
+        m = email.Parser.Parser().parse(c)
+        if not m.is_multipart():
+            yield msgfp(m)
+        else:
+            ok_types = ('text/plain', 'text/x-diff', 'text/x-patch')
+            for part in m.walk():
+                ct = part.get_content_type()
+                if ct not in ok_types:
+                    continue
+                yield msgfp(part)
+
+    def headersplit(stream, cur):
+        inheader = False
+
+        for line in stream:
+            if not inheader and isheader(line, inheader):
+                yield chunk(cur)
+                cur = []
+                inheader = True
+            if inheader and not isheader(line, inheader):
+                inheader = False
+
+            cur.append(line)
+
+        if cur:
+            yield chunk(cur)
+
+    def remainder(cur):
+        yield chunk(cur)
+
+    class fiter(object):
+        def __init__(self, fp):
+            self.fp = fp
+
+        def __iter__(self):
+            return self
+
+        def next(self):
+            l = self.fp.readline()
+            if not l:
+                raise StopIteration
+            return l
+
+    inheader = False
+    cur = []
+
+    mimeheaders = ['content-type']
+
+    if not hasattr(stream, 'next'):
+        # http responses, for example, have readline but not next
+        stream = fiter(stream)
+
+    for line in stream:
+        cur.append(line)
+        if line.startswith('# HG changeset patch'):
+            return hgsplit(stream, cur)
+        elif line.startswith('From '):
+            return mboxsplit(stream, cur)
+        elif isheader(line, inheader):
+            inheader = True
+            if line.split(':', 1)[0].lower() in mimeheaders:
+                # let email parser handle this
+                return mimesplit(stream, cur)
+        elif inheader:
+            # No evil headers seen, split by hand
+            return headersplit(stream, cur)
+        # Not enough info, keep reading
+
+    # if we are here, we have a very plain patch
+    return remainder(cur)
+
 def extract(ui, fileobj):
     '''extract patch from data read from fileobj.
 
@@ -78,7 +202,7 @@
             if subject.startswith('[PATCH'):
                 pend = subject.find(']')
                 if pend >= 0:
-                    subject = subject[pend+1:].lstrip()
+                    subject = subject[pend + 1:].lstrip()
             subject = subject.replace('\n\t', ' ')
             ui.debug('Subject: %s\n' % subject)
         if user:
@@ -239,6 +363,7 @@
         self.fp = fp
         self.buf = []
         self.textmode = textmode
+        self.eol = None
 
     def push(self, line):
         if line is not None:
@@ -250,6 +375,11 @@
             del self.buf[0]
             return l
         l = self.fp.readline()
+        if not self.eol:
+            if l.endswith('\r\n'):
+                self.eol = '\r\n'
+            elif l.endswith('\n'):
+                self.eol = '\n'
         if self.textmode and l.endswith('\r\n'):
             l = l[:-2] + '\n'
         return l
@@ -264,11 +394,13 @@
 # @@ -start,len +start,len @@ or @@ -start +start @@ if len is 1
 unidesc = re.compile('@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@')
 contextdesc = re.compile('(---|\*\*\*) (\d+)(,(\d+))? (---|\*\*\*)')
+eolmodes = ['strict', 'crlf', 'lf', 'auto']
 
 class patchfile(object):
-    def __init__(self, ui, fname, opener, missing=False, eol=None):
+    def __init__(self, ui, fname, opener, missing=False, eolmode='strict'):
         self.fname = fname
-        self.eol = eol
+        self.eolmode = eolmode
+        self.eol = None
         self.opener = opener
         self.ui = ui
         self.lines = []
@@ -297,7 +429,10 @@
             return [os.readlink(fname)]
         fp = self.opener(fname, 'r')
         try:
-            return list(linereader(fp, self.eol is not None))
+            lr = linereader(fp, self.eolmode != 'strict')
+            lines = list(lr)
+            self.eol = lr.eol
+            return lines
         finally:
             fp.close()
 
@@ -311,10 +446,17 @@
         else:
             fp = self.opener(fname, 'w')
         try:
-            if self.eol and self.eol != '\n':
+            if self.eolmode == 'auto':
+                eol = self.eol
+            elif self.eolmode == 'crlf':
+                eol = '\r\n'
+            else:
+                eol = '\n'
+
+            if self.eolmode != 'strict' and eol and eol != '\n':
                 for l in lines:
                     if l and l[-1] == '\n':
-                        l = l[:-1] + self.eol
+                        l = l[:-1] + eol
                     fp.write(l)
             else:
                 fp.writelines(lines)
@@ -416,6 +558,14 @@
                 self.dirty = 1
             return 0
 
+        horig = h
+        if (self.eolmode in ('crlf', 'lf')
+            or self.eolmode == 'auto' and self.eol):
+            # If new eols are going to be normalized, then normalize
+            # hunk data before patching. Otherwise, preserve input
+            # line-endings.
+            h = h.getnormalized()
+
         # fast case first, no offsets, no fuzz
         old = h.old()
         # patch starts counting at 1 unless we are adding the file
@@ -446,7 +596,7 @@
             search_start = orig_start + self.skew
 
         for fuzzlen in xrange(3):
-            for toponly in [ True, False ]:
+            for toponly in [True, False]:
                 old = h.old(fuzzlen, toponly)
 
                 cand = self.findlines(old[0][1:], search_start)
@@ -471,29 +621,55 @@
                         else:
                             msg = _("Hunk #%d succeeded at %d %s"
                                     "(offset %d lines).\n")
-                        f(msg % (h.number, l+1, fuzzstr, offset))
+                        f(msg % (h.number, l + 1, fuzzstr, offset))
                         return fuzzlen
         self.printfile(True)
         self.ui.warn(_("Hunk #%d FAILED at %d\n") % (h.number, orig_start))
-        self.rej.append(h)
+        self.rej.append(horig)
         return -1
 
 class hunk(object):
     def __init__(self, desc, num, lr, context, create=False, remove=False):
         self.number = num
         self.desc = desc
-        self.hunk = [ desc ]
+        self.hunk = [desc]
         self.a = []
         self.b = []
         self.starta = self.lena = None
         self.startb = self.lenb = None
-        if context:
-            self.read_context_hunk(lr)
-        else:
-            self.read_unified_hunk(lr)
+        if lr is not None:
+            if context:
+                self.read_context_hunk(lr)
+            else:
+                self.read_unified_hunk(lr)
         self.create = create
         self.remove = remove and not create
 
+    def getnormalized(self):
+        """Return a copy with line endings normalized to LF."""
+
+        def normalize(lines):
+            nlines = []
+            for line in lines:
+                if line.endswith('\r\n'):
+                    line = line[:-2] + '\n'
+                nlines.append(line)
+            return nlines
+
+        # Dummy object, it is rebuilt manually
+        nh = hunk(self.desc, self.number, None, None, False, False)
+        nh.number = self.number
+        nh.desc = self.desc
+        nh.a = normalize(self.a)
+        nh.b = normalize(self.b)
+        nh.starta = self.starta
+        nh.startb = self.startb
+        nh.lena = self.lena
+        nh.lenb = self.lenb
+        nh.create = self.create
+        nh.remove = self.remove
+        return nh
+
     def read_unified_hunk(self, lr):
         m = unidesc.match(self.desc)
         if not m:
@@ -569,7 +745,7 @@
             if l.startswith('\ '):
                 s = self.b[-1][:-1]
                 self.b[-1] = s
-                self.hunk[hunki-1] = s
+                self.hunk[hunki - 1] = s
                 continue
             if not l:
                 lr.push(l)
@@ -598,7 +774,7 @@
                 elif h.startswith('-'):
                     continue
                 else:
-                    self.hunk.insert(hunki-1, u)
+                    self.hunk.insert(hunki - 1, u)
                     break
 
         if not self.a:
@@ -637,15 +813,15 @@
             top = 0
             bot = 0
             hlen = len(self.hunk)
-            for x in xrange(hlen-1):
+            for x in xrange(hlen - 1):
                 # the hunk starts with the @@ line, so use x+1
-                if self.hunk[x+1][0] == ' ':
+                if self.hunk[x + 1][0] == ' ':
                     top += 1
                 else:
                     break
             if not toponly:
-                for x in xrange(hlen-1):
-                    if self.hunk[hlen-bot-1][0] == ' ':
+                for x in xrange(hlen - 1):
+                    if self.hunk[hlen - bot - 1][0] == ' ':
                         bot += 1
                     else:
                         break
@@ -668,14 +844,6 @@
     def old(self, fuzz=0, toponly=False):
         return self.fuzzit(self.a, fuzz, toponly)
 
-    def newctrl(self):
-        res = []
-        for x in self.hunk:
-            c = x[0]
-            if c == ' ' or c == '+':
-                res.append(x)
-        return res
-
     def new(self, fuzz=0, toponly=False):
         return self.fuzzit(self.b, fuzz, toponly)
 
@@ -822,15 +990,13 @@
     fp.seek(pos)
     return dopatch, gitpatches
 
-def iterhunks(ui, fp, sourcefile=None, textmode=False):
+def iterhunks(ui, fp, sourcefile=None):
     """Read a patch and yield the following events:
     - ("file", afile, bfile, firsthunk): select a new target file.
     - ("hunk", hunk): a new hunk is ready to be applied, follows a
     "file" event.
     - ("git", gitchanges): current diff is in git format, gitchanges
     maps filenames to gitpatch records. Unique event.
-
-    If textmode is True, input line-endings are normalized to LF.
     """
     changed = {}
     current_hunk = None
@@ -844,7 +1010,7 @@
     # our states
     BFILE = 1
     context = None
-    lr = linereader(fp, textmode)
+    lr = linereader(fp)
     dopatch = True
     # gitworkdone is True if a git operation (copy, rename, ...) was
     # performed already for the current file. Useful when the file
@@ -944,7 +1110,7 @@
     if hunknum == 0 and dopatch and not gitworkdone:
         raise NoHunks
 
-def applydiff(ui, fp, changed, strip=1, sourcefile=None, eol=None):
+def applydiff(ui, fp, changed, strip=1, sourcefile=None, eolmode='strict'):
     """
     Reads a patch from fp and tries to apply it.
 
@@ -952,16 +1118,15 @@
     by the patch. Returns 0 for a clean patch, -1 if any rejects were
     found and 1 if there was any fuzz.
 
-    If 'eol' is None, the patch content and patched file are read in
-    binary mode. Otherwise, line endings are ignored when patching then
-    normalized to 'eol' (usually '\n' or \r\n').
+    If 'eolmode' is 'strict', the patch content and patched file are
+    read in binary mode. Otherwise, line endings are ignored when
+    patching then normalized according to 'eolmode'.
     """
     rejects = 0
     err = 0
     current_file = None
     gitpatches = None
     opener = util.opener(os.getcwd())
-    textmode = eol is not None
 
     def closefile():
         if not current_file:
@@ -969,7 +1134,7 @@
         current_file.close()
         return len(current_file.rej)
 
-    for state, values in iterhunks(ui, fp, sourcefile, textmode):
+    for state, values in iterhunks(ui, fp, sourcefile):
         if state == 'hunk':
             if not current_file:
                 continue
@@ -984,11 +1149,13 @@
             afile, bfile, first_hunk = values
             try:
                 if sourcefile:
-                    current_file = patchfile(ui, sourcefile, opener, eol=eol)
+                    current_file = patchfile(ui, sourcefile, opener,
+                                             eolmode=eolmode)
                 else:
-                    current_file, missing = selectfile(afile, bfile, first_hunk,
-                                            strip)
-                    current_file = patchfile(ui, current_file, opener, missing, eol)
+                    current_file, missing = selectfile(afile, bfile,
+                                                       first_hunk, strip)
+                    current_file = patchfile(ui, current_file, opener,
+                                             missing, eolmode)
             except PatchError, err:
                 ui.warn(str(err) + '\n')
                 current_file, current_hunk = None, None
@@ -1109,10 +1276,9 @@
         files = {}
     if eolmode is None:
         eolmode = ui.config('patch', 'eol', 'strict')
-    try:
-        eol = {'strict': None, 'crlf': '\r\n', 'lf': '\n'}[eolmode.lower()]
-    except KeyError:
+    if eolmode.lower() not in eolmodes:
         raise util.Abort(_('Unsupported line endings type: %s') % eolmode)
+    eolmode = eolmode.lower()
 
     try:
         fp = open(patchobj, 'rb')
@@ -1122,7 +1288,7 @@
         curdir = os.getcwd()
         os.chdir(cwd)
     try:
-        ret = applydiff(ui, fp, files, strip=strip, eol=eol)
+        ret = applydiff(ui, fp, files, strip=strip, eolmode=eolmode)
     finally:
         if cwd:
             os.chdir(curdir)
@@ -1156,7 +1322,8 @@
             try:
                 return internalpatch(patchname, ui, strip, cwd, files, eolmode)
             except NoHunks:
-                patcher = util.find_exe('gpatch') or util.find_exe('patch') or 'patch'
+                patcher = (util.find_exe('gpatch') or util.find_exe('patch')
+                           or 'patch')
                 ui.debug('no valid hunks found; trying with %r instead\n' %
                          patcher)
                 if util.needbinarypatch():
@@ -1192,7 +1359,7 @@
         l = len(text)
         i = 0
         while i < l:
-            yield text[i:i+csize]
+            yield text[i:i + csize]
             i += csize
 
     tohash = gitindex(to)
@@ -1208,17 +1375,25 @@
     ret.append('\n')
     return ''.join(ret)
 
-def _addmodehdr(header, omode, nmode):
-    if omode != nmode:
-        header.append('old mode %s\n' % omode)
-        header.append('new mode %s\n' % nmode)
+class GitDiffRequired(Exception):
+    pass
 
-def diff(repo, node1=None, node2=None, match=None, changes=None, opts=None):
+def diff(repo, node1=None, node2=None, match=None, changes=None, opts=None,
+         losedatafn=None):
     '''yields diff of changes to files between two nodes, or node and
     working directory.
 
     if node1 is None, use first dirstate parent instead.
-    if node2 is None, compare node1 with working directory.'''
+    if node2 is None, compare node1 with working directory.
+
+    losedatafn(**kwarg) is a callable run when opts.upgrade=True and
+    every time some change cannot be represented with the current
+    patch format. Return False to upgrade to git patch format, True to
+    accept the loss or raise an exception to abort the diff. It is
+    called with the name of current file being diffed as 'fn'. If set
+    to None, patches will always be upgraded to git format when
+    necessary.
+    '''
 
     if opts is None:
         opts = mdiff.defaultopts
@@ -1250,25 +1425,50 @@
     modified, added, removed = changes[:3]
 
     if not modified and not added and not removed:
-        return
+        return []
+
+    revs = None
+    if not repo.ui.quiet:
+        hexfunc = repo.ui.debugflag and hex or short
+        revs = [hexfunc(node) for node in [node1, node2] if node]
+
+    copy = {}
+    if opts.git or opts.upgrade:
+        copy = copies.copies(repo, ctx1, ctx2, repo[nullid])[0]
+        copy = copy.copy()
+        for k, v in copy.items():
+            copy[v] = k
+
+    difffn = lambda opts, losedata: trydiff(repo, revs, ctx1, ctx2,
+                 modified, added, removed, copy, getfilectx, opts, losedata)
+    if opts.upgrade and not opts.git:
+        try:
+            def losedata(fn):
+                if not losedatafn or not losedatafn(fn=fn):
+                    raise GitDiffRequired()
+            # Buffer the whole output until we are sure it can be generated
+            return list(difffn(opts.copy(git=False), losedata))
+        except GitDiffRequired:
+            return difffn(opts.copy(git=True), None)
+    else:
+        return difffn(opts, None)
+
+def _addmodehdr(header, omode, nmode):
+    if omode != nmode:
+        header.append('old mode %s\n' % omode)
+        header.append('new mode %s\n' % nmode)
+
+def trydiff(repo, revs, ctx1, ctx2, modified, added, removed,
+            copy, getfilectx, opts, losedatafn):
 
     date1 = util.datestr(ctx1.date())
     man1 = ctx1.manifest()
 
-    if repo.ui.quiet:
-        r = None
-    else:
-        hexfunc = repo.ui.debugflag and hex or short
-        r = [hexfunc(node) for node in [node1, node2] if node]
+    gone = set()
+    gitmode = {'l': '120000', 'x': '100755', '': '100644'}
 
     if opts.git:
-        copy, diverge = copies.copies(repo, ctx1, ctx2, repo[nullid])
-        copy = copy.copy()
-        for k, v in copy.items():
-            copy[v] = k
-
-    gone = set()
-    gitmode = {'l': '120000', 'x': '100755', '': '100644'}
+        revs = None
 
     for f in sorted(modified + added + removed):
         to = None
@@ -1280,40 +1480,61 @@
         if f not in removed:
             tn = getfilectx(f, ctx2).data()
         a, b = f, f
-        if opts.git:
+        if opts.git or losedatafn:
             if f in added:
                 mode = gitmode[ctx2.flags(f)]
                 if f in copy:
-                    a = copy[f]
-                    omode = gitmode[man1.flags(a)]
-                    _addmodehdr(header, omode, mode)
-                    if a in removed and a not in gone:
-                        op = 'rename'
-                        gone.add(a)
+                    if opts.git:
+                        a = copy[f]
+                        omode = gitmode[man1.flags(a)]
+                        _addmodehdr(header, omode, mode)
+                        if a in removed and a not in gone:
+                            op = 'rename'
+                            gone.add(a)
+                        else:
+                            op = 'copy'
+                        header.append('%s from %s\n' % (op, a))
+                        header.append('%s to %s\n' % (op, f))
+                        to = getfilectx(a, ctx1).data()
                     else:
-                        op = 'copy'
-                    header.append('%s from %s\n' % (op, a))
-                    header.append('%s to %s\n' % (op, f))
-                    to = getfilectx(a, ctx1).data()
+                        losedatafn(f)
                 else:
-                    header.append('new file mode %s\n' % mode)
+                    if opts.git:
+                        header.append('new file mode %s\n' % mode)
+                    elif ctx2.flags(f):
+                        losedatafn(f)
                 if util.binary(tn):
-                    dodiff = 'binary'
+                    if opts.git:
+                        dodiff = 'binary'
+                    else:
+                        losedatafn(f)
+                if not opts.git and not tn:
+                    # regular diffs cannot represent new empty file
+                    losedatafn(f)
             elif f in removed:
-                # have we already reported a copy above?
-                if f in copy and copy[f] in added and copy[copy[f]] == f:
-                    dodiff = False
-                else:
-                    header.append('deleted file mode %s\n' %
-                                  gitmode[man1.flags(f)])
+                if opts.git:
+                    # have we already reported a copy above?
+                    if f in copy and copy[f] in added and copy[copy[f]] == f:
+                        dodiff = False
+                    else:
+                        header.append('deleted file mode %s\n' %
+                                      gitmode[man1.flags(f)])
+                elif not to:
+                    # regular diffs cannot represent empty file deletion
+                    losedatafn(f)
             else:
-                omode = gitmode[man1.flags(f)]
-                nmode = gitmode[ctx2.flags(f)]
-                _addmodehdr(header, omode, nmode)
-                if util.binary(to) or util.binary(tn):
-                    dodiff = 'binary'
-            r = None
-            header.insert(0, mdiff.diffline(r, a, b, opts))
+                oflag = man1.flags(f)
+                nflag = ctx2.flags(f)
+                binary = util.binary(to) or util.binary(tn)
+                if opts.git:
+                    _addmodehdr(header, gitmode[oflag], gitmode[nflag])
+                    if binary:
+                        dodiff = 'binary'
+                elif binary or nflag != oflag:
+                    losedatafn(f)
+            if opts.git:
+                header.insert(0, mdiff.diffline(revs, a, b, opts))
+
         if dodiff:
             if dodiff == 'binary':
                 text = b85diff(to, tn)
@@ -1321,7 +1542,7 @@
                 text = mdiff.unidiff(to, date1,
                                     # ctx2 date may be dynamic
                                     tn, util.datestr(ctx2.date()),
-                                    a, b, r, opts=opts)
+                                    a, b, revs, opts=opts)
             if header and (text or len(header) > 1):
                 yield ''.join(header)
             if text:
@@ -1366,7 +1587,7 @@
             fp.write(chunk)
 
     for seqno, rev in enumerate(revs):
-        single(rev, seqno+1, fp)
+        single(rev, seqno + 1, fp)
 
 def diffstatdata(lines):
     filename, adds, removes = None, 0, 0
@@ -1401,7 +1622,7 @@
         totaladds += adds
         totalremoves += removes
         maxname = max(maxname, len(filename))
-        maxtotal = max(maxtotal, adds+removes)
+        maxtotal = max(maxtotal, adds + removes)
         if isbinary:
             hasbinary = True
 
--- a/mercurial/posix.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/posix.py	Sat Feb 13 23:50:38 2010 -0600
@@ -257,3 +257,10 @@
         return grp.getgrgid(gid)[0]
     except KeyError:
         return str(gid)
+
+def spawndetached(args):
+    return os.spawnvp(os.P_NOWAIT | getattr(os, 'P_DETACH', 0),
+                      args[0], args)
+
+def gethgcmd():
+    return sys.argv[:1]
--- a/mercurial/pure/base85.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/pure/base85.py	Sat Feb 13 23:50:38 2010 -0600
@@ -48,7 +48,7 @@
     l = len(text)
     out = []
     for i in range(0, len(text), 5):
-        chunk = text[i:i+5]
+        chunk = text[i:i + 5]
         acc = 0
         for j, c in enumerate(chunk):
             try:
--- a/mercurial/pure/bdiff.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/pure/bdiff.py	Sat Feb 13 23:50:38 2010 -0600
@@ -33,13 +33,15 @@
         a2end = a2 + l2
         b2end = b2 + l2
         if a1end == a2:
-            while a1end+shift < a2end and a[a1end+shift] == b[b1end+shift]:
+            while (a1end + shift < a2end and
+                   a[a1end + shift] == b[b1end + shift]):
                 shift += 1
         elif b1end == b2:
-            while b1end+shift < b2end and a[a1end+shift] == b[b1end+shift]:
+            while (b1end + shift < b2end and
+                   a[a1end + shift] == b[b1end + shift]):
                 shift += 1
-        yield a1, b1, l1+shift
-        prev = a2+shift, b2+shift, l2-shift
+        yield a1, b1, l1 + shift
+        prev = a2 + shift, b2 + shift, l2 - shift
     yield prev
 
 def bdiff(a, b):
--- a/mercurial/pure/mpatch.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/pure/mpatch.py	Sat Feb 13 23:50:38 2010 -0600
@@ -22,7 +22,8 @@
 # temporary string buffers.
 
 def patches(a, bins):
-    if not bins: return a
+    if not bins:
+        return a
 
     plens = [len(x) for x in bins]
     pl = sum(plens)
@@ -30,7 +31,8 @@
     tl = bl + bl + pl # enough for the patches and two working texts
     b1, b2 = 0, bl
 
-    if not tl: return a
+    if not tl:
+        return a
 
     m = StringIO()
     def move(dest, src, count):
--- a/mercurial/pure/osutil.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/pure/osutil.py	Sat Feb 13 23:50:38 2010 -0600
@@ -11,13 +11,20 @@
 posixfile = open
 
 def _mode_to_kind(mode):
-    if _stat.S_ISREG(mode): return _stat.S_IFREG
-    if _stat.S_ISDIR(mode): return _stat.S_IFDIR
-    if _stat.S_ISLNK(mode): return _stat.S_IFLNK
-    if _stat.S_ISBLK(mode): return _stat.S_IFBLK
-    if _stat.S_ISCHR(mode): return _stat.S_IFCHR
-    if _stat.S_ISFIFO(mode): return _stat.S_IFIFO
-    if _stat.S_ISSOCK(mode): return _stat.S_IFSOCK
+    if _stat.S_ISREG(mode):
+        return _stat.S_IFREG
+    if _stat.S_ISDIR(mode):
+        return _stat.S_IFDIR
+    if _stat.S_ISLNK(mode):
+        return _stat.S_IFLNK
+    if _stat.S_ISBLK(mode):
+        return _stat.S_IFBLK
+    if _stat.S_ISCHR(mode):
+        return _stat.S_IFCHR
+    if _stat.S_ISFIFO(mode):
+        return _stat.S_IFIFO
+    if _stat.S_ISSOCK(mode):
+        return _stat.S_IFSOCK
     return mode
 
 def listdir(path, stat=False, skip=None):
--- a/mercurial/revlog.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/revlog.py	Sat Feb 13 23:50:38 2010 -0600
@@ -127,7 +127,7 @@
         self.dataf = dataf
         self.s = struct.calcsize(indexformatng)
         self.datasize = size
-        self.l = size/self.s
+        self.l = size / self.s
         self.index = [None] * self.l
         self.map = {nullid: nullrev}
         self.allmap = 0
@@ -343,6 +343,8 @@
         return index, nodemap, None
 
     def packentry(self, entry, node, version, rev):
+        if gettype(entry[0]):
+            raise RevlogError(_("index entry flags need RevlogNG"))
         e2 = (getoffset(entry[0]), entry[1], entry[3], entry[4],
               node(entry[5]), node(entry[6]), entry[7])
         return _pack(indexformatv0, *e2)
@@ -431,8 +433,8 @@
         self.index = []
 
         v = REVLOG_DEFAULT_VERSION
-        if hasattr(opener, "defversion"):
-            v = opener.defversion
+        if hasattr(opener, 'options') and 'defversion' in opener.options:
+            v = opener.options['defversion']
             if v & REVLOGNG:
                 v |= REVLOGNGINLINEDATA
 
@@ -535,26 +537,6 @@
         t = self.revision(self.node(rev))
         return len(t)
 
-        # Alternate implementation. The advantage to this code is it
-        # will be faster for a single revision. However, the results
-        # are not cached, so finding the size of every revision will
-        # be slower.
-        #
-        # if self.cache and self.cache[1] == rev:
-        #     return len(self.cache[2])
-        #
-        # base = self.base(rev)
-        # if self.cache and self.cache[1] >= base and self.cache[1] < rev:
-        #     base = self.cache[1]
-        #     text = self.cache[2]
-        # else:
-        #     text = self.revision(self.node(base))
-        #
-        # l = len(text)
-        # for x in xrange(base + 1, rev + 1):
-        #     l = mdiff.patchedsize(l, self._chunk(x))
-        # return l
-
     def reachable(self, node, stop=None):
         """return the set of all nodes ancestral to a given node, including
          the node itself, stopping when stop is matched"""
@@ -902,7 +884,7 @@
             try:
                 # hex(node)[:...]
                 l = len(id) // 2  # grab an even number of digits
-                bin_id = bin(id[:l*2])
+                bin_id = bin(id[:l * 2])
                 nl = [n for n in self.nodemap if n[:l] == bin_id]
                 nl = [n for n in nl if hex(n).startswith(id)]
                 if len(nl) > 0:
@@ -1137,13 +1119,27 @@
             self._cache = (node, curr, text)
         return node
 
+    def descendant(self, start, end):
+        for i in self.descendants(start):
+            if i == end:
+                return True
+            elif i > end:
+                break
+        return False
+
     def ancestor(self, a, b):
         """calculate the least common ancestor of nodes a and b"""
 
+        # fast path, check if it is a descendant
+        a, b = self.rev(a), self.rev(b)
+        start, end = sorted((a, b))
+        if self.descendant(start, end):
+            return self.node(start)
+
         def parents(rev):
             return [p for p in self.parentrevs(rev) if p != nullrev]
 
-        c = ancestor.ancestor(self.rev(a), self.rev(b), parents)
+        c = ancestor.ancestor(a, b, parents)
         if c is None:
             return nullid
 
@@ -1394,7 +1390,7 @@
         return (dd, di)
 
     def files(self):
-        res = [ self.indexfile ]
+        res = [self.indexfile]
         if not self._inline:
             res.append(self.datafile)
         return res
--- a/mercurial/simplemerge.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/simplemerge.py	Sat Feb 13 23:50:38 2010 -0600
@@ -50,7 +50,7 @@
 def compare_range(a, astart, aend, b, bstart, bend):
     """Compare a[astart:aend] == b[bstart:bend], without slicing.
     """
-    if (aend-astart) != (bend-bstart):
+    if (aend - astart) != (bend - bstart):
         return False
     for ia, ib in zip(xrange(astart, aend), xrange(bstart, bend)):
         if a[ia] != b[ib]:
@@ -303,7 +303,7 @@
                                            region_ib)
                 if reg is not None:
                     yield reg
-                yield 'same', region_ia, region_len+region_ia
+                yield 'same', region_ia, region_len + region_ia
                 next_a = region_ia + region_len
                 next_b = region_ib + region_len
             reg = self.mismatch_region(next_a, amatch, next_b, bmatch)
@@ -336,7 +336,7 @@
 
             # there is an unconflicted block at i; how long does it
             # extend?  until whichever one ends earlier.
-            i = intersect((abase, abase+alen), (bbase, bbase+blen))
+            i = intersect((abase, abase + alen), (bbase, bbase + blen))
             if i:
                 intbase = i[0]
                 intend = i[1]
--- a/mercurial/sshrepo.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/sshrepo.py	Sat Feb 13 23:50:38 2010 -0600
@@ -90,9 +90,11 @@
     def readerr(self):
         while 1:
             size = util.fstat(self.pipee).st_size
-            if size == 0: break
+            if size == 0:
+                break
             l = self.pipee.readline()
-            if not l: break
+            if not l:
+                break
             self.ui.status(_("remote: "), l)
 
     def abort(self, exception):
@@ -190,7 +192,7 @@
         n = " ".join(map(hex, nodes))
         d = self.call("branches", nodes=n)
         try:
-            br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]
+            br = [tuple(map(bin, b.split(" "))) for b in d.splitlines()]
             return br
         except:
             self.abort(error.ResponseError(_("unexpected response:"), d))
@@ -199,7 +201,7 @@
         n = " ".join(["-".join(map(hex, p)) for p in pairs])
         d = self.call("between", pairs=n)
         try:
-            p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ]
+            p = [l and map(bin, l.split(" ")) or [] for l in d.splitlines()]
             return p
         except:
             self.abort(error.ResponseError(_("unexpected response:"), d))
--- a/mercurial/sshserver.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/sshserver.py	Sat Feb 13 23:50:38 2010 -0600
@@ -42,7 +42,8 @@
 
     def serve_forever(self):
         try:
-            while self.serve_one(): pass
+            while self.serve_one():
+                pass
         finally:
             if self.lock is not None:
                 self.lock.release()
@@ -52,7 +53,8 @@
         cmd = self.fin.readline()[:-1]
         if cmd:
             impl = getattr(self, 'do_' + cmd, None)
-            if impl: impl()
+            if impl:
+                impl()
             else: self.respond("")
         return cmd != ''
 
@@ -89,7 +91,7 @@
         capabilities: space separated list of tokens
         '''
         caps = copy.copy(self.caps)
-        if self.ui.configbool('server', 'uncompressed'):
+        if streamclone.allowed(self.repo.ui):
             caps.append('stream=%d' % self.repo.changelog.version)
         self.respond("capabilities: %s\n" % (' '.join(caps),))
 
--- a/mercurial/store.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/store.py	Sat Feb 13 23:50:38 2010 -0600
@@ -32,7 +32,7 @@
 def _buildencodefun():
     e = '_'
     win_reserved = [ord(x) for x in '\\:*?"<>|']
-    cmap = dict([ (chr(x), chr(x)) for x in xrange(127) ])
+    cmap = dict([(chr(x), chr(x)) for x in xrange(127)])
     for x in (range(32) + range(126, 256) + win_reserved):
         cmap[chr(x)] = "~%02x" % x
     for x in range(ord("A"), ord("Z")+1) + [ord(e)]:
@@ -45,7 +45,7 @@
         while i < len(s):
             for l in xrange(1, 4):
                 try:
-                    yield dmap[s[i:i+l]]
+                    yield dmap[s[i:i + l]]
                     i += l
                     break
                 except KeyError:
@@ -59,7 +59,7 @@
 
 def _build_lower_encodefun():
     win_reserved = [ord(x) for x in '\\:*?"<>|']
-    cmap = dict([ (chr(x), chr(x)) for x in xrange(127) ])
+    cmap = dict([(chr(x), chr(x)) for x in xrange(127)])
     for x in (range(32) + range(126, 256) + win_reserved):
         cmap[chr(x)] = "~%02x" % x
     for x in range(ord("A"), ord("Z")+1):
@@ -293,7 +293,7 @@
             if (mode not in ('r', 'rb')
                 and path.startswith('data/')
                 and path not in fnc):
-                    fnc.add(path)
+                fnc.add(path)
             return op(hybridencode(path), mode, *args, **kw)
         self.opener = fncacheopener
 
--- a/mercurial/streamclone.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/streamclone.py	Sat Feb 13 23:50:38 2010 -0600
@@ -33,11 +33,14 @@
 #
 #   server writes out raw file data.
 
-def stream_out(repo, untrusted=False):
+def allowed(ui):
+    return ui.configbool('server', 'uncompressed', True, untrusted=True)
+
+def stream_out(repo):
     '''stream out all metadata files in repository.
     writes to file-like object, must support write() and optional flush().'''
 
-    if not repo.ui.configbool('server', 'uncompressed', untrusted=untrusted):
+    if not allowed(repo.ui):
         raise StreamException(1)
 
     entries = []
--- a/mercurial/subrepo.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/subrepo.py	Sat Feb 13 23:50:38 2010 -0600
@@ -1,27 +1,27 @@
 # subrepo.py - sub-repository handling for Mercurial
 #
-# Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
+# Copyright 2009-2010 Matt Mackall <mpm@selenic.com>
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-import errno, os
+import errno, os, re, xml.dom.minidom, shutil
 from i18n import _
 import config, util, node, error
 hg = None
 
-nullstate = ('', '')
+nullstate = ('', '', 'empty')
 
 def state(ctx):
     p = config.config()
     def read(f, sections=None, remap=None):
         if f in ctx:
-            try:
-                p.parse(f, ctx[f].data(), sections, remap)
-            except IOError, err:
-                if err.errno != errno.ENOENT:
-                    raise
-    read('.hgsub')
+            p.parse(f, ctx[f].data(), sections, remap, read)
+        else:
+            raise util.Abort(_("subrepo spec file %s not found") % f)
+
+    if '.hgsub' in ctx:
+        read('.hgsub')
 
     rev = {}
     if '.hgsubstate' in ctx:
@@ -35,7 +35,13 @@
 
     state = {}
     for path, src in p[''].items():
-        state[path] = (src, rev.get(path, ''))
+        kind = 'hg'
+        if src.startswith('['):
+            if ']' not in src:
+                raise util.Abort(_('missing ] in subrepo source'))
+            kind, src = src.split(']', 1)
+            kind = kind[1:]
+        state[path] = (src, rev.get(path, ''), kind)
 
     return state
 
@@ -45,6 +51,7 @@
                          for s in sorted(state)]), '')
 
 def submerge(repo, wctx, mctx, actx):
+    # working context, merging context, ancestor context
     if mctx == actx: # backwards?
         actx = wctx.p1()
     s1 = wctx.substate
@@ -56,7 +63,7 @@
 
     def debug(s, msg, r=""):
         if r:
-            r = "%s:%s" % r
+            r = "%s:%s:%s" % r
         repo.ui.debug("  subrepo %s: %s %s\n" % (s, msg, r))
 
     for s, l in s1.items():
@@ -105,7 +112,7 @@
             continue
         elif s not in sa:
             debug(s, "remote added, get", r)
-            wctx.sub(s).get(r)
+            mctx.sub(s).get(r)
             sm[s] = r
         elif r != sa[s]:
             if repo.ui.promptchoice(
@@ -145,9 +152,24 @@
 
     util.path_auditor(ctx._repo.root)(path)
     state = ctx.substate.get(path, nullstate)
-    if state[0].startswith('['): # future expansion
-        raise error.Abort('unknown subrepo source %s' % state[0])
-    return hgsubrepo(ctx, path, state)
+    if state[2] not in types:
+        raise util.Abort(_('unknown subrepo type %s') % state[2])
+    return types[state[2]](ctx, path, state[:2])
+
+# subrepo classes need to implement the following methods:
+# __init__(self, ctx, path, state)
+# dirty(self): returns true if the dirstate of the subrepo
+#   does not match current stored state
+# commit(self, text, user, date): commit the current changes
+#   to the subrepo with the given log message. Use given
+#   user and date if possible. Return the new state of the subrepo.
+# remove(self): remove the subrepo (should verify the dirstate
+#   is not dirty first)
+# get(self, state): run whatever commands are needed to put the
+#   subrepo into this state
+# merge(self, state): merge currently-saved state with the new state.
+# push(self, force): perform whatever action is analagous to 'hg push'
+#   This may be a no-op on some systems.
 
 class hgsubrepo(object):
     def __init__(self, ctx, path, state):
@@ -161,7 +183,8 @@
             util.makedirs(root)
             self._repo = hg.repository(r.ui, root, create=True)
             f = file(os.path.join(root, '.hg', 'hgrc'), 'w')
-            f.write('[paths]\ndefault = %s\n' % state[0])
+            f.write('[paths]\ndefault = %s\n' % os.path.join(
+                _abssource(ctx._repo), path))
             f.close()
         self._repo._subparent = r
         self._repo._subsource = state[0]
@@ -189,7 +212,7 @@
         hg.clean(self._repo, node.nullid, False)
 
     def _get(self, state):
-        source, revision = state
+        source, revision, kind = state
         try:
             self._repo.lookup(revision)
         except error.RepoError:
@@ -201,7 +224,7 @@
 
     def get(self, state):
         self._get(state)
-        source, revision = state
+        source, revision, kind = state
         self._repo.ui.debug("getting subrepo %s\n" % self._path)
         hg.clean(self._repo, revision, False)
 
@@ -230,3 +253,109 @@
         dsturl = _abssource(self._repo, True)
         other = hg.repository(self._repo.ui, dsturl)
         self._repo.push(other, force)
+
+class svnsubrepo(object):
+    def __init__(self, ctx, path, state):
+        self._path = path
+        self._state = state
+        self._ctx = ctx
+        self._ui = ctx._repo.ui
+
+    def _svncommand(self, commands):
+        cmd = ['svn'] + commands + [self._path]
+        cmd = [util.shellquote(arg) for arg in cmd]
+        cmd = util.quotecommand(' '.join(cmd))
+        env = dict(os.environ)
+        # Avoid localized output, preserve current locale for everything else.
+        env['LC_MESSAGES'] = 'C'
+        write, read, err = util.popen3(cmd, env=env, newlines=True)
+        retdata = read.read()
+        err = err.read().strip()
+        if err:
+            raise util.Abort(err)
+        return retdata
+
+    def _wcrev(self):
+        output = self._svncommand(['info', '--xml'])
+        doc = xml.dom.minidom.parseString(output)
+        entries = doc.getElementsByTagName('entry')
+        if not entries:
+            return 0
+        return int(entries[0].getAttribute('revision') or 0)
+
+    def _wcchanged(self):
+        """Return (changes, extchanges) where changes is True
+        if the working directory was changed, and extchanges is
+        True if any of these changes concern an external entry.
+        """
+        output = self._svncommand(['status', '--xml'])
+        externals, changes = [], []
+        doc = xml.dom.minidom.parseString(output)
+        for e in doc.getElementsByTagName('entry'):
+            s = e.getElementsByTagName('wc-status')
+            if not s:
+                continue
+            item = s[0].getAttribute('item')
+            props = s[0].getAttribute('props')
+            path = e.getAttribute('path')
+            if item == 'external':
+                externals.append(path)
+            if (item not in ('', 'normal', 'unversioned', 'external')
+                or props not in ('', 'none')):
+                changes.append(path)
+        for path in changes:
+            for ext in externals:
+                if path == ext or path.startswith(ext + os.sep):
+                    return True, True
+        return bool(changes), False
+
+    def dirty(self):
+        if self._wcrev() == self._state[1] and not self._wcchanged()[0]:
+            return False
+        return True
+
+    def commit(self, text, user, date):
+        # user and date are out of our hands since svn is centralized
+        changed, extchanged = self._wcchanged()
+        if not changed:
+            return self._wcrev()
+        if extchanged:
+            # Do not try to commit externals
+            raise util.Abort(_('cannot commit svn externals'))
+        commitinfo = self._svncommand(['commit', '-m', text])
+        self._ui.status(commitinfo)
+        newrev = re.search('Committed revision ([\d]+).', commitinfo)
+        if not newrev:
+            raise util.Abort(commitinfo.splitlines()[-1])
+        newrev = newrev.groups()[0]
+        self._ui.status(self._svncommand(['update', '-r', newrev]))
+        return newrev
+
+    def remove(self):
+        if self.dirty():
+            self._ui.warn(_('not removing repo %s because '
+                            'it has changes.\n' % self._path))
+            return
+        self._ui.note('removing subrepo %s\n' % self._path)
+        shutil.rmtree(self._ctx.repo.join(self._path))
+
+    def get(self, state):
+        status = self._svncommand(['checkout', state[0], '--revision', state[1]])
+        if not re.search('Checked out revision [\d]+.', status):
+            raise util.Abort(status.splitlines()[-1])
+        self._ui.status(status)
+
+    def merge(self, state):
+        old = int(self._state[1])
+        new = int(state[1])
+        if new > old:
+            self.get(state)
+
+    def push(self, force):
+        # nothing for svn
+        pass
+
+types = {
+    'hg': hgsubrepo,
+    'svn': svnsubrepo,
+    }
--- a/mercurial/templatefilters.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/templatefilters.py	Sat Feb 13 23:50:38 2010 -0600
@@ -64,7 +64,8 @@
             m = para_re.search(text, start)
             if not m:
                 w = len(text)
-                while w > start and text[w-1].isspace(): w -= 1
+                while w > start and text[w - 1].isspace():
+                    w -= 1
                 yield text[start:w], text[w:]
                 break
             yield text[start:m.start(0)], m.group(1)
@@ -91,17 +92,21 @@
 def domain(author):
     '''get domain of author, or empty string if none.'''
     f = author.find('@')
-    if f == -1: return ''
-    author = author[f+1:]
+    if f == -1:
+        return ''
+    author = author[f + 1:]
     f = author.find('>')
-    if f >= 0: author = author[:f]
+    if f >= 0:
+        author = author[:f]
     return author
 
 def person(author):
     '''get name of author, or else username.'''
-    if not '@' in author: return author
+    if not '@' in author:
+        return author
     f = author.find('<')
-    if f == -1: return util.shortuser(author)
+    if f == -1:
+        return util.shortuser(author)
     return author[:f].rstrip()
 
 def indent(text, prefix):
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templatekw.py	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,265 @@
+# templatekw.py - common changeset template keywords
+#
+# Copyright 2005-2009 Matt Mackall <mpm@selenic.com>
+#
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2 or any later version.
+
+from node import hex
+import encoding, patch, util, error
+
+def showlist(name, values, plural=None, **args):
+    '''expand set of values.
+    name is name of key in template map.
+    values is list of strings or dicts.
+    plural is plural of name, if not simply name + 's'.
+
+    expansion works like this, given name 'foo'.
+
+    if values is empty, expand 'no_foos'.
+
+    if 'foo' not in template map, return values as a string,
+    joined by space.
+
+    expand 'start_foos'.
+
+    for each value, expand 'foo'. if 'last_foo' in template
+    map, expand it instead of 'foo' for last key.
+
+    expand 'end_foos'.
+    '''
+    templ = args['templ']
+    if plural:
+        names = plural
+    else: names = name + 's'
+    if not values:
+        noname = 'no_' + names
+        if noname in templ:
+            yield templ(noname, **args)
+        return
+    if name not in templ:
+        if isinstance(values[0], str):
+            yield ' '.join(values)
+        else:
+            for v in values:
+                yield dict(v, **args)
+        return
+    startname = 'start_' + names
+    if startname in templ:
+        yield templ(startname, **args)
+    vargs = args.copy()
+    def one(v, tag=name):
+        try:
+            vargs.update(v)
+        except (AttributeError, ValueError):
+            try:
+                for a, b in v:
+                    vargs[a] = b
+            except ValueError:
+                vargs[name] = v
+        return templ(tag, **vargs)
+    lastname = 'last_' + name
+    if lastname in templ:
+        last = values.pop()
+    else:
+        last = None
+    for v in values:
+        yield one(v)
+    if last is not None:
+        yield one(last, tag=lastname)
+    endname = 'end_' + names
+    if endname in templ:
+        yield templ(endname, **args)
+
+def getfiles(repo, ctx, revcache):
+    if 'files' not in revcache:
+        revcache['files'] = repo.status(ctx.parents()[0].node(),
+                                        ctx.node())[:3]
+    return revcache['files']
+
+def getlatesttags(repo, ctx, cache):
+    '''return date, distance and name for the latest tag of rev'''
+
+    if 'latesttags' not in cache:
+        # Cache mapping from rev to a tuple with tag date, tag
+        # distance and tag name
+        cache['latesttags'] = {-1: (0, 0, 'null')}
+    latesttags = cache['latesttags']
+
+    rev = ctx.rev()
+    todo = [rev]
+    while todo:
+        rev = todo.pop()
+        if rev in latesttags:
+            continue
+        ctx = repo[rev]
+        tags = [t for t in ctx.tags() if repo.tagtype(t) == 'global']
+        if tags:
+            latesttags[rev] = ctx.date()[0], 0, ':'.join(sorted(tags))
+            continue
+        try:
+            # The tuples are laid out so the right one can be found by
+            # comparison.
+            pdate, pdist, ptag = max(
+                latesttags[p.rev()] for p in ctx.parents())
+        except KeyError:
+            # Cache miss - recurse
+            todo.append(rev)
+            todo.extend(p.rev() for p in ctx.parents())
+            continue
+        latesttags[rev] = pdate, pdist + 1, ptag
+    return latesttags[rev]
+
+def getrenamedfn(repo, endrev=None):
+    rcache = {}
+    if endrev is None:
+        endrev = len(repo)
+
+    def getrenamed(fn, rev):
+        '''looks up all renames for a file (up to endrev) the first
+        time the file is given. It indexes on the changerev and only
+        parses the manifest if linkrev != changerev.
+        Returns rename info for fn at changerev rev.'''
+        if fn not in rcache:
+            rcache[fn] = {}
+            fl = repo.file(fn)
+            for i in fl:
+                lr = fl.linkrev(i)
+                renamed = fl.renamed(fl.node(i))
+                rcache[fn][lr] = renamed
+                if lr >= endrev:
+                    break
+        if rev in rcache[fn]:
+            return rcache[fn][rev]
+
+        # If linkrev != rev (i.e. rev not found in rcache) fallback to
+        # filectx logic.
+        try:
+            return repo[rev][fn].renamed()
+        except error.LookupError:
+            return None
+
+    return getrenamed
+
+
+def showauthor(repo, ctx, templ, **args):
+    return ctx.user()
+
+def showbranches(**args):
+    branch = args['ctx'].branch()
+    if branch != 'default':
+        branch = encoding.tolocal(branch)
+        return showlist('branch', [branch], plural='branches', **args)
+
+def showdate(repo, ctx, templ, **args):
+    return ctx.date()
+
+def showdescription(repo, ctx, templ, **args):
+    return ctx.description().strip()
+
+def showdiffstat(repo, ctx, templ, **args):
+    diff = patch.diff(repo, ctx.parents()[0].node(), ctx.node())
+    files, adds, removes = 0, 0, 0
+    for i in patch.diffstatdata(util.iterlines(diff)):
+        files += 1
+        adds += i[1]
+        removes += i[2]
+    return '%s: +%s/-%s' % (files, adds, removes)
+
+def showextras(**args):
+    templ = args['templ']
+    for key, value in sorted(args['ctx'].extra().items()):
+        args = args.copy()
+        args.update(dict(key=key, value=value))
+        yield templ('extra', **args)
+
+def showfileadds(**args):
+    repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
+    return showlist('file_add', getfiles(repo, ctx, revcache)[1], **args)
+
+def showfilecopies(**args):
+    cache, ctx = args['cache'], args['ctx']
+    copies = args['revcache'].get('copies')
+    if copies is None:
+        if 'getrenamed' not in cache:
+            cache['getrenamed'] = getrenamedfn(args['repo'])
+        copies = []
+        getrenamed = cache['getrenamed']
+        for fn in ctx.files():
+            rename = getrenamed(fn, ctx.rev())
+            if rename:
+                copies.append((fn, rename[0]))
+
+    c = [{'name': x[0], 'source': x[1]} for x in copies]
+    return showlist('file_copy', c, plural='file_copies', **args)
+
+# showfilecopiesswitch() displays file copies only if copy records are
+# provided before calling the templater, usually with a --copies
+# command line switch.
+def showfilecopiesswitch(**args):
+    copies = args['revcache'].get('copies') or []
+    c = [{'name': x[0], 'source': x[1]} for x in copies]
+    return showlist('file_copy', c, plural='file_copies', **args)
+
+def showfiledels(**args):
+    repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
+    return showlist('file_del', getfiles(repo, ctx, revcache)[2], **args)
+
+def showfilemods(**args):
+    repo, ctx, revcache = args['repo'], args['ctx'], args['revcache']
+    return showlist('file_mod', getfiles(repo, ctx, revcache)[0], **args)
+
+def showfiles(**args):
+    return showlist('file', args['ctx'].files(), **args)
+
+def showlatesttag(repo, ctx, templ, cache, **args):
+    return getlatesttags(repo, ctx, cache)[2]
+
+def showlatesttagdistance(repo, ctx, templ, cache, **args):
+    return getlatesttags(repo, ctx, cache)[1]
+
+def showmanifest(**args):
+    repo, ctx, templ = args['repo'], args['ctx'], args['templ']
+    args = args.copy()
+    args.update(dict(rev=repo.manifest.rev(ctx.changeset()[0]),
+                     node=hex(ctx.changeset()[0])))
+    return templ('manifest', **args)
+
+def shownode(repo, ctx, templ, **args):
+    return ctx.hex()
+
+def showrev(repo, ctx, templ, **args):
+    return ctx.rev()
+
+def showtags(**args):
+    return showlist('tag', args['ctx'].tags(), **args)
+
+# keywords are callables like:
+# fn(repo, ctx, templ, cache, revcache, **args)
+# with:
+# repo - current repository instance
+# ctx - the changectx being displayed
+# templ - the templater instance
+# cache - a cache dictionary for the whole templater run
+# revcache - a cache dictionary for the current revision
+keywords = {
+    'author': showauthor,
+    'branches': showbranches,
+    'date': showdate,
+    'desc': showdescription,
+    'diffstat': showdiffstat,
+    'extras': showextras,
+    'file_adds': showfileadds,
+    'file_copies': showfilecopies,
+    'file_copies_switch': showfilecopiesswitch,
+    'file_dels': showfiledels,
+    'file_mods': showfilemods,
+    'files': showfiles,
+    'latesttag': showlatesttag,
+    'latesttagdistance': showlatesttagdistance,
+    'manifest': showmanifest,
+    'node': shownode,
+    'rev': showrev,
+    'tags': showtags,
+}
+
--- a/mercurial/templater.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/templater.py	Sat Feb 13 23:50:38 2010 -0600
@@ -77,8 +77,14 @@
             raise SyntaxError(_("error expanding '%s%%%s'") % (key, format))
         lm = map.copy()
         for i in v:
-            lm.update(i)
-            yield self.process(format, lm)
+            if isinstance(i, dict):
+                lm.update(i)
+                yield self.process(format, lm)
+            else:
+                # v is not an iterable of dicts, this happen when 'key'
+                # has been fully expanded already and format is useless.
+                # If so, return the expanded value.
+                yield i
 
     def _filter(self, expr, get, map):
         if expr not in self.cache:
@@ -89,10 +95,10 @@
             except KeyError, i:
                 raise SyntaxError(_("unknown filter '%s'") % i[0])
             def apply(get):
-                    x = get(val)
-                    for f in filters:
-                        x = f(x)
-                    return x
+                x = get(val)
+                for f in filters:
+                    x = f(x)
+                return x
             self.cache[expr] = apply
         return self.cache[expr](get)
 
@@ -238,7 +244,6 @@
         styles = [styles]
 
     for style in styles:
-    	
         if not style:
             continue
         locations = [os.path.join(style, 'map'), 'map-' + style]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/changelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,10 @@
+{header}
+ <!-- Changelog -->
+ <id>{urlbase}{url}</id>
+ <link rel="self" href="{urlbase}{url}atom-log"/>
+ <link rel="alternate" href="{urlbase}{url}"/>
+ <title>{repo|escape} Changelog</title>
+ {latestentry%feedupdated}
+
+{entries%changelogentry}
+</feed>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/changelogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,16 @@
+ <entry>
+  <title>{desc|strip|firstline|strip|escape|nonempty}</title>
+  <id>{urlbase}{url}#changeset-{node}</id>
+  <link href="{urlbase}{url}rev/{node|short}"/>
+  <author>
+   <name>{author|person|escape}</name>
+   <email>{author|email|obfuscate}</email>
+  </author>
+  <updated>{date|rfc3339date}</updated>
+  <published>{date|rfc3339date}</published>
+  <content type="xhtml">
+   <div xmlns="http://www.w3.org/1999/xhtml">
+    <pre xml:space="preserve">{desc|escape|nonempty}</pre>
+   </div>
+  </content>
+ </entry>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/error.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,17 @@
+{header}
+ <!-- Error -->
+ <id>{urlbase}{url}</id>
+ <link rel="self" href="{urlbase}{url}atom-log"/>
+ <link rel="alternate" href="{urlbase}{url}"/>
+ <title>Error</title>
+ <updated>1970-01-01T00:00:00+00:00</updated>
+ <entry>
+  <title>Error</title>
+  <id>http://mercurial.selenic.com/#error</id>
+  <author>
+    <name>mercurial</name>
+  </author>
+  <updated>1970-01-01T00:00:00+00:00</updated>
+  <content type="text">{error|escape}</content>
+ </entry>
+</feed>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/filelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,8 @@
+{header}
+ <id>{urlbase}{url}atom-log/tip/{file|escape}</id>
+ <link rel="self" href="{urlbase}{url}atom-log/tip/{file|urlescape}"/>
+ <title>{repo|escape}: {file|escape} history</title>
+ {latestentry%feedupdated}
+
+{entries%changelogentry}
+</feed>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/header.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="{encoding}"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/map	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,11 @@
+default = 'changelog'
+feedupdated = '<updated>{date|rfc3339date}</updated>'
+mimetype = 'application/atom+xml; charset={encoding}'
+header = header.tmpl
+changelog = changelog.tmpl
+changelogentry = changelogentry.tmpl
+filelog = filelog.tmpl
+filelogentry = filelogentry.tmpl
+tags = tags.tmpl
+tagentry = tagentry.tmpl
+error = error.tmpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/tagentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,8 @@
+ <entry>
+  <title>{tag|escape}</title>
+  <link rel="alternate" href="{urlbase}{url}rev/{node|short}"/>
+  <id>{urlbase}{url}#tag-{node}</id>
+  <updated>{date|rfc3339date}</updated>
+  <published>{date|rfc3339date}</published>
+  <content type="text">{tag|strip|escape}</content>
+ </entry>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/atom/tags.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,11 @@
+{header}
+ <id>{urlbase}{url}</id>
+ <link rel="self" href="{urlbase}{url}atom-tags"/>
+ <link rel="alternate" href="{urlbase}{url}tags"/>
+ <title>{repo|escape}: tags</title>
+ <summary>{repo|escape} tag history</summary>
+ <author><name>Mercurial SCM</name></author>
+ {latestentry%feedupdated}
+
+{entriesnotip%tagentry}
+</feed>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/coal/header.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+<head>
+<link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
+<meta name="robots" content="index, nofollow" />
+<link rel="stylesheet" href="{staticurl}style-coal.css" type="text/css" />
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/coal/map	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,196 @@
+default = 'shortlog'
+
+mimetype = 'text/html; charset={encoding}'
+header = header.tmpl
+footer = ../paper/footer.tmpl
+search = ../paper/search.tmpl
+
+changelog = ../paper/shortlog.tmpl
+shortlog = ../paper/shortlog.tmpl
+shortlogentry = ../paper/shortlogentry.tmpl
+graph = ../paper/graph.tmpl
+
+naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
+filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
+filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
+filenolink = '{file|escape} '
+fileellipses = '...'
+changelogentry = ../paper/shortlogentry.tmpl
+searchentry = ../paper/shortlogentry.tmpl
+changeset = ../paper/changeset.tmpl
+manifest = ../paper/manifest.tmpl
+
+nav = '{before%naventry} {after%naventry}'
+navshort = '{before%navshortentry}{after%navshortentry}'
+navgraph = '{before%navgraphentry}{after%navgraphentry}'
+filenav = '{before%filenaventry}{after%filenaventry}'
+
+direntry = '
+  <tr class="fileline parity{parity}">
+    <td class="name">
+      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">
+        <img src="{staticurl}coal-folder.png" alt="dir."/> {basename|escape}/
+      </a>
+      <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
+        {emptydirs|escape}
+      </a>
+    </td>
+    <td class="size"></td>
+    <td class="permissions">drwxr-xr-x</td>
+  </tr>'
+
+fileentry = '
+  <tr class="fileline parity{parity}">
+    <td class="filename">
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        <img src="{staticurl}coal-file.png" alt="file"/> {basename|escape}
+      </a>
+    </td>
+    <td class="size">{size}</td>
+    <td class="permissions">{permissions|permissions}</td>
+  </tr>'
+
+filerevision = ../paper/filerevision.tmpl
+fileannotate = ../paper/fileannotate.tmpl
+filediff = ../paper/filediff.tmpl
+filelog = ../paper/filelog.tmpl
+fileline = '
+  <div class="parity{parity} source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</div>'
+filelogentry = ../paper/filelogentry.tmpl
+
+annotateline = '
+  <tr class="parity{parity}">
+    <td class="annotate">
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#{targetline}"
+         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
+    </td>
+    <td class="source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</td>
+  </tr>'
+
+diffblock = '<div class="source bottomline parity{parity}"><pre>{lines}</pre></div>'
+difflineplus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="plusline">{line|escape}</span>'
+difflineminus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="minusline">{line|escape}</span>'
+difflineat = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="atline">{line|escape}</span>'
+diffline = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
+
+changelogparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+
+changesetparent = '<a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> '
+
+filerevparent = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a> '
+filerevchild = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a> '
+
+filerename = '{file|escape}@'
+filelogrename = '
+  <tr>
+    <th>base:</th>
+    <td>
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {file|escape}@{node|short}
+      </a>
+    </td>
+  </tr>'
+fileannotateparent = '
+  <tr>
+    <td class="metatag">parent:</td>
+    <td>
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {rename%filerename}{node|short}
+      </a>
+    </td>
+  </tr>'
+changesetchild = ' <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>'
+changelogchild = '
+  <tr>
+    <th class="child">child</th>
+    <td class="child">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
+        {node|short}
+      </a>
+    </td>
+  </tr>'
+fileannotatechild = '
+  <tr>
+    <td class="metatag">child:</td>
+    <td>
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {node|short}
+      </a>
+    </td>
+  </tr>'
+tags = ../paper/tags.tmpl
+tagentry = '
+  <tr class="tagEntry parity{parity}">
+    <td>
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
+        {tag|escape}
+      </a>
+    </td>
+    <td class="node">
+      {node|short}
+    </td>
+  </tr>'
+branches = ../paper/branches.tmpl
+branchentry = '
+  <tr class="tagEntry parity{parity}">
+    <td>
+      <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">
+        {branch|escape}
+      </a>
+    </td>
+    <td class="node">
+      {node|short}
+    </td>
+  </tr>'
+changelogtag = '<span class="tag">{name|escape}</span> '
+changesettag = '<span class="tag">{tag|escape}</span> '
+changelogbranchhead = '<span class="branchhead">{name|escape}</span> '
+changelogbranchname = '<span class="branchname">{name|escape}</span> ' 
+
+filediffparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filelogparent = '
+  <tr>
+    <th>parent {rev}:</th>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filediffchild = '
+  <tr>
+    <th class="child">child {rev}:</th>
+    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
+  </td>
+  </tr>'
+filelogchild = '
+  <tr>
+    <th>child {rev}:</th>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+
+indexentry = '
+  <tr class="parity{parity}">
+    <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
+    <td>{description}</td>
+    <td>{contact|obfuscate}</td>
+    <td class="age">{lastchange|age}</td>
+    <td class="indexlinks">{archives%indexarchiveentry}</td>
+  </tr>\n'
+indexarchiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">&nbsp;&darr;{type|escape}</a>'
+index = ../paper/index.tmpl
+archiveentry = '
+  <li>
+    <a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a>
+  </li>'
+notfound = ../paper/notfound.tmpl
+error = ../paper/error.tmpl
+urlparameter = '{separator}{name}={value|urlescape}'
+hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/branches.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,30 @@
+{header}
+<title>{repo|escape}: Branches</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-tags" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-tags" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / branches
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+branches |
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+<br/>
+</div>
+
+<div class="title">&nbsp;</div>
+<table cellspacing="0">
+{entries%branchentry}
+</table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/changelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,39 @@
+{header}
+<title>{repo|escape}: Changelog</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog
+</div>
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev"  />
+</div>
+</form>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a> |
+changelog |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
+<br/>
+{changenav%nav}<br/>
+</div>
+
+{entries%changelogentry}
+
+<div class="page_nav">
+{changenav%nav}<br/>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/changelogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,14 @@
+<div>
+<a class="title" href="{url}rev/{node|short}{sessionvars%urlparameter}"><span class="age">{date|age}</span>{desc|strip|firstline|escape|nonempty}<span class="logtags"> {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a>
+</div>
+<div class="title_text">
+<div class="log_link">
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a><br/>
+</div>
+<i>{author|obfuscate} [{date|rfc822date}] rev {rev}</i><br/>
+</div>
+<div class="log_body">
+{desc|strip|escape|addbreaks|nonempty}
+<br/>
+<br/>
+</div>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/changeset.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,50 @@
+{header}
+<title>{repo|escape}: changeset {rev}:{node|short}</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changeset
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> |
+changeset |
+<a href="{url}raw-rev/{node|short}">raw</a> {archives%archiveentry}<br/>
+</div>
+
+<div>
+<a class="title" href="{url}raw-rev/{node|short}">{desc|strip|escape|firstline|nonempty} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a>
+</div>
+<div class="title_text">
+<table cellspacing="0">
+<tr><td>author</td><td>{author|obfuscate}</td></tr>
+<tr><td></td><td>{date|date} ({date|age})</td></tr>
+{branch%changesetbranch}
+<tr><td>changeset {rev}</td><td style="font-family:monospace">{node|short}</td></tr>
+{parent%changesetparent}
+{child%changesetchild}
+</table></div>
+
+<div class="page_body">
+{desc|strip|escape|addbreaks|nonempty}
+</div>
+<div class="list_head"></div>
+<div class="title_text">
+<table cellspacing="0">
+{files}
+</table></div>
+
+<div class="page_body">{diff}</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/error.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,25 @@
+{header}
+<title>{repo|escape}: Error</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / error
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> | <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | <a href="{url}log{sessionvars%urlparameter}">changelog</a> | <a href="{url}tags{sessionvars%urlparameter}">tags</a> | <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a><br/>
+</div>
+
+<div class="page_body">
+<br/>
+<i>An error occurred while processing your request</i><br/>
+<br/>
+{error|escape}
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/fileannotate.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,62 @@
+{header}
+<title>{repo|escape}: {file|escape}@{node|short} (annotated)</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> |
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+<a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a> |
+<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
+annotate |
+<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+<a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a><br/>
+</div>
+
+<div class="title">{file|escape}</div>
+
+<div class="title_text">
+<table cellspacing="0">
+<tr>
+ <td>author</td>
+ <td>{author|obfuscate}</td></tr>
+<tr>
+ <td></td>
+ <td>{date|date} ({date|age})</td></tr>
+{branch%filerevbranch}
+<tr>
+ <td>changeset {rev}</td>
+ <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+{parent%fileannotateparent}
+{child%fileannotatechild}
+<tr>
+ <td>permissions</td>
+ <td style="font-family:monospace">{permissions|permissions}</td></tr>
+</table>
+</div>
+
+<div class="page_path">
+{desc|strip|escape|addbreaks|nonempty}
+</div>
+<div class="page_body">
+<table>
+{annotate%annotateline}
+</table>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/filediff.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,48 @@
+{header}
+<title>{repo|escape}: diff {file|escape}</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> |
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+<a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a> |
+<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
+<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
+diff |
+<a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a><br/>
+</div>
+
+<div class="title">{file|escape}</div>
+
+<table>
+{branch%filerevbranch}
+<tr>
+ <td>changeset {rev}</td>
+ <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+{parent%filediffparent}
+{child%filediffchild}
+</table>
+
+<div class="list_head"></div>
+
+<div class="page_body">
+{diff}
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/filelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,40 @@
+{header}
+<title>{repo|escape}: File revisions</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+revisions |
+<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
+<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+<a href="{url}rss-log/{node|short}/{file|urlescape}">rss</a>
+<br/>
+{nav%filenav}
+</div>
+
+<div class="title" >{file|urlescape}</div>
+
+<table>
+{entries%filelogentry}
+</table>
+
+<div class="page_nav">
+{nav%filenav}
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/filerevision.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,61 @@
+{header}
+<title>{repo|escape}: {file|escape}@{node|short}</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> |
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+file |
+<a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a> |
+<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
+<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
+<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+<a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a><br/>
+</div>
+
+<div class="title">{file|escape}</div>
+
+<div class="title_text">
+<table cellspacing="0">
+<tr>
+ <td>author</td>
+ <td>{author|obfuscate}</td></tr>
+<tr>
+ <td></td>
+ <td>{date|date} ({date|age})</td></tr>
+{branch%filerevbranch}
+<tr>
+ <td>changeset {rev}</td>
+ <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+{parent%filerevparent}
+{child%filerevchild}
+<tr>
+ <td>permissions</td>
+ <td style="font-family:monospace">{permissions|permissions}</td></tr>
+</table>
+</div>
+
+<div class="page_path">
+{desc|strip|escape|addbreaks|nonempty}
+</div>
+
+<div class="page_body">
+{text%fileline}
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/footer.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,11 @@
+<div class="page_footer">
+<div class="page_footer_text">{repo|escape}</div>
+<div class="rss_logo">
+<a href="{url}rss-log">RSS</a>
+<a href="{url}atom-log">Atom</a>
+</div>
+<br />
+{motd}
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/graph.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,121 @@
+{header}
+<title>{repo|escape}: Graph</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph
+</div>
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev"  />
+</div>
+</form>
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> |
+graph |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+<br/>
+<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
+<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
+| {changenav%navgraph}<br/>
+</div>
+
+<div class="title">&nbsp;</div>
+
+<noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
+
+<div id="wrapper">
+<ul id="nodebgs"></ul>
+<canvas id="graph" width="224" height="{canvasheight}"></canvas>
+<ul id="graphnodes"></ul>
+</div>
+
+<script type="text/javascript" src="{staticurl}graph.js"></script>
+<script>
+<!-- hide script content
+
+var data = {jsdata|json};
+var graph = new Graph();
+graph.scale({bg_height});
+
+graph.edge = function(x0, y0, x1, y1, color) {
+	
+	this.setColor(color, 0.0, 0.65);
+	this.ctx.beginPath();
+	this.ctx.moveTo(x0, y0);
+	this.ctx.lineTo(x1, y1);
+	this.ctx.stroke();
+	
+}
+
+var revlink = '<li style="_STYLE"><span class="desc">';
+revlink += '<a class="list" href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID"><b>_DESC</b></a>';
+revlink += '</span> _TAGS';
+revlink += '<span class="info">_DATE, by _USER</span></li>';
+
+graph.vertex = function(x, y, color, parity, cur) {
+	
+	this.ctx.beginPath();
+	color = this.setColor(color, 0.25, 0.75);
+	this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
+	this.ctx.fill();
+	
+	var bg = '<li class="bg parity' + parity + '"></li>';
+	var left = (this.columns + 1) * this.bg_height;
+	var nstyle = 'padding-left: ' + left + 'px;';
+	var item = revlink.replace(/_STYLE/, nstyle);
+	item = item.replace(/_PARITY/, 'parity' + parity);
+	item = item.replace(/_NODEID/, cur[0]);
+	item = item.replace(/_NODEID/, cur[0]);
+	item = item.replace(/_DESC/, cur[3]);
+	item = item.replace(/_USER/, cur[4]);
+	item = item.replace(/_DATE/, cur[5]);
+	
+	var tagspan = '';
+	if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
+		tagspan = '<span class="logtags">';
+		if (cur[6][1]) {
+			tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
+			tagspan += cur[6][0] + '</span> ';
+		} else if (!cur[6][1] && cur[6][0] != 'default') {
+			tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
+			tagspan += cur[6][0] + '</span> ';
+		}
+		if (cur[7].length) {
+			for (var t in cur[7]) {
+				var tag = cur[7][t];
+				tagspan += '<span class="tagtag">' + tag + '</span> ';
+			}
+		}
+		tagspan += '</span>';
+	}
+	
+	item = item.replace(/_TAGS/, tagspan);
+	return [bg, item];
+	
+}
+
+graph.render(data);
+
+// stop hiding script -->
+</script>
+
+<div class="page_nav">
+<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
+<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
+| {changenav%navgraph}
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/header.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="{encoding}"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<head>
+<link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
+<meta name="robots" content="index, nofollow"/>
+<link rel="stylesheet" href="{staticurl}style-gitweb.css" type="text/css" />
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/index.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,26 @@
+{header}
+<title>Mercurial repositories index</title>
+</head>
+<body>
+
+<div class="page_header">
+    <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a>
+    Repositories list
+</div>
+
+<table cellspacing="0">
+    <tr>
+        <td><a href="?sort={sort_name}">Name</a></td>
+        <td><a href="?sort={sort_description}">Description</a></td>
+        <td><a href="?sort={sort_contact}">Contact</a></td>
+        <td><a href="?sort={sort_lastchange}">Last modified</a></td>
+        <td>&nbsp;</td>
+        <td>&nbsp;</td>
+    </tr>
+    {entries%indexentry}
+</table>
+<div class="page_footer">
+{motd}
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/manifest.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,38 @@
+{header}
+<title>{repo|escape}: files</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+files |
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> {archives%archiveentry}<br/>
+</div>
+
+<div class="title">{path|escape} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></div>
+<table cellspacing="0">
+<tr class="parity{upparity}">
+<td style="font-family:monospace">drwxr-xr-x</td>
+<td style="font-family:monospace"></td>
+<td style="font-family:monospace"></td>
+<td><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
+<td class="link">&nbsp;</td>
+</tr>
+{dentries%direntry}
+{fentries%fileentry}
+</table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/map	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,254 @@
+default = 'summary'
+mimetype = 'text/html; charset={encoding}'
+header = header.tmpl
+footer = footer.tmpl
+search = search.tmpl
+changelog = changelog.tmpl
+summary = summary.tmpl
+error = error.tmpl
+notfound = notfound.tmpl
+naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
+filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
+filenodelink = '
+  <tr class="parity{parity}">
+    <td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td>
+    <td></td>
+    <td class="link">
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
+      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
+    </td>
+  </tr>'
+filenolink = '
+  <tr class="parity{parity}">
+    <td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td>
+    <td></td>
+    <td class="link">
+      file |
+      annotate |
+      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
+    </td>
+  </tr>'
+
+nav = '{before%naventry} {after%naventry}'
+navshort = '{before%navshortentry}{after%navshortentry}'
+navgraph = '{before%navgraphentry}{after%navgraphentry}'
+filenav = '{before%filenaventry}{after%filenaventry}'
+
+fileellipses = '...'
+changelogentry = changelogentry.tmpl
+searchentry = changelogentry.tmpl
+changeset = changeset.tmpl
+manifest = manifest.tmpl
+direntry = '
+  <tr class="parity{parity}">
+    <td style="font-family:monospace">drwxr-xr-x</td>
+    <td style="font-family:monospace"></td>
+    <td style="font-family:monospace"></td>
+    <td>
+      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a>
+      <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">{emptydirs|escape}</a>
+    </td>
+    <td class="link">
+      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a>
+    </td>
+  </tr>'
+fileentry = '
+  <tr class="parity{parity}">
+    <td style="font-family:monospace">{permissions|permissions}</td>
+    <td style="font-family:monospace" align=right>{date|isodate}</td>
+    <td style="font-family:monospace" align=right>{size}</td>
+    <td class="list">
+      <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a>
+    </td>
+    <td class="link">
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
+    </td>
+  </tr>'
+filerevision = filerevision.tmpl
+fileannotate = fileannotate.tmpl
+filediff = filediff.tmpl
+filelog = filelog.tmpl
+fileline = '
+  <div style="font-family:monospace" class="parity{parity}">
+    <pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</pre>
+  </div>'
+annotateline = '
+  <tr style="font-family:monospace" class="parity{parity}">
+    <td class="linenr" style="text-align: right;">
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"
+         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
+    </td>
+    <td><pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a></pre></td>
+    <td><pre>{line|escape}</pre></td>
+  </tr>'
+difflineplus = '<span style="color:#008800;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
+difflineminus = '<span style="color:#cc0000;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
+difflineat = '<span style="color:#990099;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
+diffline = '<span><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
+changelogparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
+    </td>
+  </tr>'
+changesetbranch = '<tr><td>branch</td><td>{name}</td></tr>'
+changesetparent = '
+  <tr>
+    <td>parent {rev}</td>
+    <td style="font-family:monospace">
+      <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
+    </td>
+  </tr>'
+filerevbranch = '<tr><td>branch</td><td>{name}</td></tr>'
+filerevparent = '
+  <tr>
+    <td>parent {rev}</td>
+    <td style="font-family:monospace">
+      <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {rename%filerename}{node|short}
+      </a>
+    </td>
+  </tr>'
+filerename = '{file|escape}@'
+filelogrename = '| <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">base</a>'
+fileannotateparent = '
+  <tr>
+    <td>parent {rev}</td>
+    <td style="font-family:monospace">
+      <a class="list" href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {rename%filerename}{node|short}
+      </a>
+    </td>
+  </tr>'
+changelogchild = '
+  <tr>
+    <th class="child">child {rev}:</th>
+    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+changesetchild = '
+  <tr>
+    <td>child {rev}</td>
+    <td style="font-family:monospace">
+      <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
+    </td>
+  </tr>'
+filerevchild = '
+  <tr>
+    <td>child {rev}</td>
+    <td style="font-family:monospace">
+      <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+    </tr>'
+fileannotatechild = '
+  <tr>
+    <td>child {rev}</td>
+    <td style="font-family:monospace">
+      <a class="list" href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+    </tr>'
+tags = tags.tmpl
+tagentry = '
+  <tr class="parity{parity}">
+    <td class="age"><i>{date|age}</i></td>
+    <td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>{tag|escape}</b></a></td>
+    <td class="link">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+      <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
+      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+    </td>
+  </tr>'
+branches = branches.tmpl
+branchentry = '
+  <tr class="parity{parity}">
+    <td class="age"><i>{date|age}</i></td>
+    <td><a class="list" href="{url}shortlog/{node|short}{sessionvars%urlparameter}"><b>{node|short}</b></a></td>
+    <td class="{status}">{branch|escape}</td>
+    <td class="link">
+      <a href="{url}changeset/{node|short}{sessionvars%urlparameter}">changeset</a> |
+      <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
+      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+    </td>
+  </tr>'
+diffblock = '<pre>{lines}</pre>'
+filediffparent = '
+  <tr>
+    <td>parent {rev}</td>
+    <td style="font-family:monospace">
+      <a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {node|short}
+      </a>
+    </td>
+  </tr>'
+filelogparent = '
+  <tr>
+    <td align="right">parent {rev}:&nbsp;</td>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filediffchild = '
+  <tr>
+    <td>child {rev}</td>
+    <td style="font-family:monospace">
+      <a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
+    </td>
+  </tr>'
+filelogchild = '
+  <tr>
+    <td align="right">child {rev}:&nbsp;</td>
+    <td><a href="{url}file{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+shortlog = shortlog.tmpl
+graph = graph.tmpl
+tagtag = '<span class="tagtag" title="{name}">{name}</span> '
+branchtag = '<span class="branchtag" title="{name}">{name}</span> '
+inbranchtag = '<span class="inbranchtag" title="{name}">{name}</span> '
+shortlogentry = '
+  <tr class="parity{parity}">
+    <td class="age"><i>{date|age}</i></td>
+    <td><i>{author|person}</i></td>
+    <td>
+      <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">
+        <b>{desc|strip|firstline|escape|nonempty}</b>
+        <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span>
+      </a>
+    </td>
+    <td class="link" nowrap>
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+    </td>
+  </tr>'
+filelogentry = '
+  <tr class="parity{parity}">
+    <td class="age"><i>{date|age}</i></td>
+    <td>
+      <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">
+        <b>{desc|strip|firstline|escape|nonempty}</b>
+      </a>
+    </td>
+    <td class="link">
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>&nbsp;|&nbsp;<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>&nbsp;|&nbsp;<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> {rename%filelogrename}</td>
+    </tr>'
+archiveentry = ' | <a href="{url}archive/{node|short}{extension}">{type|escape}</a> '
+indexentry = '
+  <tr class="parity{parity}">
+    <td>
+      <a class="list" href="{url}{sessionvars%urlparameter}">
+        <b>{name|escape}</b>
+      </a>
+    </td>
+    <td>{description}</td>
+    <td>{contact|obfuscate}</td>
+    <td class="age">{lastchange|age}</td>
+    <td class="indexlinks">{archives%indexarchiveentry}</td>
+    <td><div class="rss_logo"><a href="{url}rss-log">RSS</a> <a href="{url}atom-log">Atom</a></div></td>
+  </tr>\n'
+indexarchiveentry = ' <a href="{url}archive/{node|short}{extension}">{type|escape}</a> '
+index = index.tmpl
+urlparameter = '{separator}{name}={value|urlescape}'
+hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/notfound.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,18 @@
+{header}
+<title>Mercurial repository not found</title>
+</head>
+
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a> Not found: {repo|escape}
+</div>
+
+<div class="page_body">
+The specified repository "{repo|escape}" is unknown, sorry.
+<br/>
+<br/>
+Please go back to the <a href="{url}">main repository list page</a>.
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/search.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,36 @@
+{header}
+<title>{repo|escape}: Search</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev" value="{query|escape}" />
+</div>
+</form>
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
+<br/>
+</div>
+
+<div class="title">searching for {query|escape}</div>
+
+{entries}
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/shortlog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,40 @@
+{header}
+<title>{repo|escape}: Shortlog</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog
+</div>
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev"  />
+</div>
+</form>
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+shortlog |
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
+<br/>{changenav%navshort}<br/>
+</div>
+
+<div class="title">&nbsp;</div>
+<table cellspacing="0">
+{entries%shortlogentry}
+</table>
+
+<div class="page_nav">
+{changenav%navshort}
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/summary.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,58 @@
+{header}
+<title>{repo|escape}: Summary</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<div class="search">
+<input type="text" name="rev"  />
+</div>
+</form>
+</div>
+
+<div class="page_nav">
+summary |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
+<br/>
+</div>
+
+<div class="title">&nbsp;</div>
+<table cellspacing="0">
+<tr><td>description</td><td>{desc}</td></tr>
+<tr><td>owner</td><td>{owner|obfuscate}</td></tr>
+<tr><td>last change</td><td>{lastchange|rfc822date}</td></tr>
+</table>
+
+<div><a  class="title" href="{url}shortlog{sessionvars%urlparameter}">changes</a></div>
+<table cellspacing="0">
+{shortlog}
+<tr class="light"><td colspan="4"><a class="list" href="{url}shortlog{sessionvars%urlparameter}">...</a></td></tr>
+</table>
+
+<div><a class="title" href="{url}tags{sessionvars%urlparameter}">tags</a></div>
+<table cellspacing="0">
+{tags}
+<tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr>
+</table>
+
+<div><a class="title" href="#">branches</a></div>
+<table cellspacing="0">
+{branches%branchentry}
+<tr class="light">
+  <td colspan="4"><a class="list"  href="#">...</a></td>
+</tr>
+</table>
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/gitweb/tags.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,30 @@
+{header}
+<title>{repo|escape}: Tags</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-tags" title="Atom feed for {repo|escape}"/>
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-tags" title="RSS feed for {repo|escape}"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags
+</div>
+
+<div class="page_nav">
+<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
+<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
+<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
+tags |
+<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+<br/>
+</div>
+
+<div class="title">&nbsp;</div>
+<table cellspacing="0">
+{entries%tagentry}
+</table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/map-cmdline.changelog	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,17 @@
+header = '{date|shortdate}  {author|person}  <{author|email}>\n\n'
+header_verbose = ''
+changeset = '\t* {files|stringify|fill68|tabindent}{desc|fill68|tabindent|strip}\n\t[{node|short}]{tags}{branches}\n\n'
+changeset_quiet = '\t* {desc|firstline|fill68|tabindent|strip}\n\n'
+changeset_verbose = '{date|isodate}  {author|person}  <{author|email}>  ({node|short}{tags}{branches})\n\n\t* {file_adds|stringify|fill68|tabindent}{file_dels|stringify|fill68|tabindent}{files|stringify|fill68|tabindent}{desc|fill68|tabindent|strip}\n\n'
+start_tags = ' ['
+tag = '{tag}, '
+last_tag = '{tag}]'
+start_branches = ' <'
+branch = '{branch}, '
+last_branch = '{branch}>'
+file = '{file}, '
+last_file = '{file}:\n\t'
+file_add = '{file_add}, '
+last_file_add = '{file_add}: new file.\n* '
+file_del = '{file_del}, '
+last_file_del = '{file_del}: deleted file.\n* '
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/map-cmdline.compact	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,9 @@
+changeset = '{rev}{tags}{parents}   {node|short}   {date|isodate}   {author|user}\n  {desc|firstline|strip}\n\n'
+changeset_quiet = '{rev}:{node|short}\n'
+changeset_verbose = '{rev}{tags}{parents}   {node|short}   {date|isodate}   {author}\n  {desc|strip}\n\n'
+start_tags = '['
+tag = '{tag},'
+last_tag = '{tag}]'
+start_parents = ':'
+parent = '{rev},'
+last_parent = '{rev}'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/map-cmdline.default	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,24 @@
+changeset = 'changeset:   {rev}:{node|short}\n{branches}{tags}{parents}user:        {author}\ndate:        {date|date}\nsummary:     {desc|firstline}\n\n'
+changeset_quiet = '{rev}:{node|short}\n'
+changeset_verbose = 'changeset:   {rev}:{node|short}\n{branches}{tags}{parents}user:        {author}\ndate:        {date|date}\n{files}{file_copies_switch}description:\n{desc|strip}\n\n\n'
+changeset_debug = 'changeset:   {rev}:{node}\n{branches}{tags}{parents}{manifest}user:        {author}\ndate:        {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies_switch}{extras}description:\n{desc|strip}\n\n\n'
+start_files = 'files:      '
+file = ' {file}'
+end_files = '\n'
+start_file_mods = 'files:      '
+file_mod = ' {file_mod}'
+end_file_mods = '\n'
+start_file_adds = 'files+:     '
+file_add = ' {file_add}'
+end_file_adds = '\n'
+start_file_dels = 'files-:     '
+file_del = ' {file_del}'
+end_file_dels = '\n'
+start_file_copies_switch = 'copies:     '
+file_copy = ' {name} ({source})'
+end_file_copies_switch = '\n'
+parent = 'parent:      {rev}:{node|formatnode}\n'
+manifest = 'manifest:    {rev}:{node}\n'
+branch = 'branch:      {branch}\n'
+tag = 'tag:         {tag}\n'
+extra = 'extra:       {key}={value|stringescape}\n'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/map-cmdline.xml	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,19 @@
+header = '<?xml version="1.0"?>\n<log>\n'
+footer = '</log>\n'
+
+changeset = '<logentry revision="{rev}" node="{node}">\n{branches}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n</logentry>\n'
+changeset_verbose = '<logentry revision="{rev}" node="{node}">\n{branches}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}</logentry>\n'
+changeset_debug = '<logentry revision="{rev}" node="{node}">\n{branches}{tags}{parents}<author email="{author|email|xmlescape}">{author|person|xmlescape}</author>\n<date>{date|rfc3339date}</date>\n<msg xml:space="preserve">{desc|xmlescape}</msg>\n<paths>\n{file_adds}{file_dels}{file_mods}</paths>\n{file_copies}{extras}</logentry>\n'
+
+file_add  = '<path action="A">{file_add|xmlescape}</path>\n'
+file_mod  = '<path action="M">{file_mod|xmlescape}</path>\n'
+file_del  = '<path action="R">{file_del|xmlescape}</path>\n'
+
+start_file_copies = '<copies>\n'
+file_copy = '<copy source="{source|xmlescape}">{name|xmlescape}</copy>\n'
+end_file_copies = '</copies>\n'
+
+parent = '<parent revision="{rev}" node="{node}" />\n'
+branch = '<branch>{branch|xmlescape}</branch>\n'
+tag = '<tag>{tag|xmlescape}</tag>\n'
+extra = '<extra key="{key|xmlescape}">{value|xmlescape}</extra>\n'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/branches.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,36 @@
+{header}
+    <title>{repo|escape}: Branches</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / Branches</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li class="current">branches</li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">branches</h2>
+    <table cellspacing="0">
+{entries%branchentry}
+    </table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/changelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,40 @@
+{header}
+    <title>{repo|escape}: changelog</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li class="current">changelog</li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}</li>
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">changelog</h2>
+    <div>
+    {entries%changelogentry}
+    </div>
+
+    <div class="page-path">
+{changenav%nav}
+    </div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/changelogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+<h3 class="changelog"><a class="title" href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}<span class="logtags"> {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a></h3>
+<ul class="changelog-entry">
+    <li class="age">{date|age}</li>
+    <li>by <span class="name">{author|obfuscate}</span> <span class="revdate">[{date|rfc822date}] rev {rev}</span></li>
+    <li class="description">{desc|strip|escape|addbreaks|nonempty}</li>
+</ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/changeset.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,63 @@
+{header}
+<title>{repo|escape}: changeset {rev}:{node|short}</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <ul class="submenu">
+        <li class="current">changeset</li>
+        <li><a href="{url}raw-rev/{node|short}">raw</a> {archives%archiveentry}</li>
+    </ul>
+
+    <h2 class="no-link no-border">changeset</h2>
+
+    <h3 class="changeset"><a href="{url}raw-rev/{node|short}">{desc|strip|escape|firstline|nonempty} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a></h3>
+    <p class="changeset-age"><span>{date|age}</span></p>
+
+    <dl class="overview">
+        <dt>author</dt>
+        <dd>{author|obfuscate}</dd>
+        <dt>date</dt>
+        <dd>{date|date}</dd>
+        {branch%changesetbranch}
+        <dt>changeset {rev}</dt>
+        <dd>{node|short}</dd>
+        {parent%changesetparent}
+        {child%changesetchild}
+    </dl>
+
+    <p class="description">{desc|strip|escape|addbreaks|nonempty}</p>
+
+    <table>
+    {files}
+    </table>
+
+    <div class="diff">
+    {diff}
+    </div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/error.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,34 @@
+{header}
+    <title>{repo|escape}: Error</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / Not found: {repo|escape}</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li class="current">summary</li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">An error occurred while processing your request</h2>
+    <p class="normal">{error|escape}</p>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/fileannotate.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,63 @@
+{header}
+<title>{repo|escape}: {file|escape}@{node|short} (annotated)</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <ul class="submenu">
+        <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+        <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
+        <li class="current">annotate</li>
+        <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+        <li><a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a></li>
+    </ul>
+
+    <h2 class="no-link no-border">{file|escape}@{node|short} (annotated)</h2>
+    <h3 class="changeset">{file|escape}</h3>
+    <p class="changeset-age"><span>{date|age}</span></p>
+
+    <dl class="overview">
+        <dt>author</dt>
+        <dd>{author|obfuscate}</dd>
+        <dt>date</dt>
+        <dd>{date|date}</dd>
+        {branch%filerevbranch}
+        <dt>changeset {rev}</dt>
+        <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
+        {parent%fileannotateparent}
+        {child%fileannotatechild}
+        <dt>permissions</dt>
+        <dd>{permissions|permissions}</dd>
+    </dl>
+
+    <p class="description">{desc|strip|escape|addbreaks|nonempty}</p>
+
+    <table class="annotated">
+    {annotate%annotateline}
+    </table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/filediff.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,54 @@
+{header}
+<title>{repo|escape}: diff {file|escape}</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file diff</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <ul class="submenu">
+        <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+        <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
+        <li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+        <li class="current">diff</li>
+        <li><a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a></li>
+    </ul>
+
+    <h2 class="no-link no-border">diff: {file|escape}</h2>
+    <h3 class="changeset">{file|escape}</h3>
+
+    <dl class="overview">
+        {branch%filerevbranch}
+        <dt>changeset {rev}</dt>
+        <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
+        {parent%filediffparent}
+        {child%filediffchild}
+    </dl>
+
+    <div class="diff">
+    {diff}
+    </div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/filelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,49 @@
+{header}
+<title>{repo|escape}: File revisions</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <ul class="submenu">
+        <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+        <li class="current">revisions</li>
+        <li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+        <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+        <li><a href="{url}rss-log/{node|short}/{file|urlescape}">rss</a></li>
+    </ul>
+
+    <h2 class="no-link no-border">{file|urlescape}</h2>
+
+    <table>
+    {entries%filelogentry}
+    </table>
+
+    <div class="page-path">
+    {nav%filenav}
+    </div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/filerevision.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,63 @@
+{header}
+<title>{repo|escape}: {file|escape}@{node|short}</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <ul class="submenu">
+        <li class="current">file</li>
+        <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
+        <li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+        <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+        <li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
+    </ul>
+
+    <h2 class="no-link no-border">{file|escape}@{node|short}</h2>
+    <h3 class="changeset">{file|escape}</h3>
+    <p class="changeset-age"><span>{date|age}</span></p>
+
+    <dl class="overview">
+        <dt>author</dt>
+        <dd>{author|obfuscate}</dd>
+        <dt>date</dt>
+        <dd>{date|date}</dd>
+        {branch%filerevbranch}
+        <dt>changeset {rev}</dt>
+        <dd><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
+        {parent%filerevparent}
+        {child%filerevchild}
+        <dt>permissions</dt>
+        <dd>{permissions|permissions}</dd>
+    </dl>
+
+    <p class="description">{desc|strip|escape|addbreaks|nonempty}</p>
+
+    <div class="source">
+    {text%fileline}
+    </div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/footer.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,22 @@
+    <div class="page-footer">
+        <p>Mercurial Repository: {repo|escape}</p>
+        <ul class="rss-logo">
+            <li><a href="{url}rss-log">RSS</a></li>
+            <li><a href="{url}atom-log">Atom</a></li>
+        </ul>
+        {motd}
+    </div>
+
+    <div id="powered-by">
+        <p><a href="http://mercurial.selenic.com/" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>
+    </div>
+
+    <div id="corner-top-left"></div>
+    <div id="corner-top-right"></div>
+    <div id="corner-bottom-left"></div>
+    <div id="corner-bottom-right"></div>
+
+</div>
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/graph.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,118 @@
+{header}
+    <title>{repo|escape}: graph</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+    <!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
+            <li class="current">graph</li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">graph</h2>
+
+    <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
+    <div id="wrapper">
+        <ul id="nodebgs"></ul>
+        <canvas id="graph" width="224" height="{canvasheight}"></canvas>
+        <ul id="graphnodes"></ul>
+    </div>
+
+    <script type="text/javascript" src="{staticurl}graph.js"></script>
+    <script>
+    <!-- hide script content
+
+    document.getElementById('noscript').style.display = 'none';
+
+    var data = {jsdata|json};
+    var graph = new Graph();
+    graph.scale({bg_height});
+
+    graph.edge = function(x0, y0, x1, y1, color) {
+
+        this.setColor(color, 0.0, 0.65);
+        this.ctx.beginPath();
+        this.ctx.moveTo(x0, y0);
+        this.ctx.lineTo(x1, y1);
+        this.ctx.stroke();
+
+    }
+
+    var revlink = '<li style="_STYLE"><span class="desc">';
+    revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
+    revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
+
+    graph.vertex = function(x, y, color, parity, cur) {
+
+        this.ctx.beginPath();
+        color = this.setColor(color, 0.25, 0.75);
+        this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
+        this.ctx.fill();
+
+        var bg = '<li class="bg parity' + parity + '"></li>';
+        var left = (this.columns + 1) * this.bg_height;
+        var nstyle = 'padding-left: ' + left + 'px;';
+        var item = revlink.replace(/_STYLE/, nstyle);
+        item = item.replace(/_PARITY/, 'parity' + parity);
+        item = item.replace(/_NODEID/, cur[0]);
+        item = item.replace(/_NODEID/, cur[0]);
+	item = item.replace(/_DESC/, cur[3]);
+        item = item.replace(/_USER/, cur[4]);
+        item = item.replace(/_DATE/, cur[5]);
+
+        var tagspan = '';
+        if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
+            tagspan = '<span class="logtags">';
+            if (cur[6][1]) {
+                tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
+                tagspan += cur[6][0] + '</span> ';
+            } else if (!cur[6][1] && cur[6][0] != 'default') {
+                tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
+                tagspan += cur[6][0] + '</span> ';
+            }
+            if (cur[7].length) {
+                for (var t in cur[7]) {
+                    var tag = cur[7][t];
+                    tagspan += '<span class="tagtag">' + tag + '</span> ';
+                }
+            }
+            tagspan += '</span>';
+        }
+
+        item = item.replace(/_TAGS/, tagspan); 
+        return [bg, item];
+
+    }
+
+    graph.render(data);
+
+    // stop hiding script -->
+    </script>
+
+    <div class="page-path">
+        <a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
+        <a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
+        | {changenav%navgraph}
+    </div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/header.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
+    <meta name="robots" content="index, nofollow"/>
+    <link rel="stylesheet" href="{staticurl}style-monoblue.css" type="text/css" />
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/index.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,39 @@
+{header}
+    <title>{repo|escape}: Mercurial repositories index</title>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1>Mercurial Repositories</h1>
+        <ul class="page-nav">
+        </ul>
+    </div>
+    
+    <table cellspacing="0">
+        <tr>
+            <td><a href="?sort={sort_name}">Name</a></td>
+            <td><a href="?sort={sort_description}">Description</a></td>
+            <td><a href="?sort={sort_contact}">Contact</a></td>
+            <td><a href="?sort={sort_lastchange}">Last modified</a></td>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+        </tr>
+        {entries%indexentry}
+    </table>
+    <div class="page-footer">
+        {motd}
+    </div>
+
+    <div id="powered-by">
+        <p><a href="http://mercurial.selenic.com/" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>
+    </div>
+
+    <div id="corner-top-left"></div>
+    <div id="corner-top-right"></div>
+    <div id="corner-bottom-left"></div>
+    <div id="corner-bottom-right"></div>
+
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/manifest.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,51 @@
+{header}
+<title>{repo|escape}: files</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li class="current">files</li>
+        </ul>
+    </div>
+
+    <ul class="submenu">
+        <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> {archives%archiveentry}</li>
+        {archives%archiveentry}
+    </ul>
+
+    <h2 class="no-link no-border">files</h2>
+    <p class="files">{path|escape} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></p>
+
+    <table>
+        <tr class="parity{upparity}">
+            <td>drwxr-xr-x</td>
+            <td></td>
+            <td></td>
+            <td><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
+            <td class="link">&nbsp;</td>
+        </tr>
+        {dentries%direntry}
+        {fentries%fileentry}
+    </table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/map	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,220 @@
+default = 'summary'
+mimetype = 'text/html; charset={encoding}'
+header = header.tmpl
+footer = footer.tmpl
+search = search.tmpl
+changelog = changelog.tmpl
+summary = summary.tmpl
+error = error.tmpl
+notfound = notfound.tmpl
+naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a>'
+filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
+filenodelink = '
+  <tr class="parity{parity}">
+    <td><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td>
+    <td></td>
+    <td>
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
+      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
+    </td>
+  </tr>'
+filenolink = '
+  <tr class="parity{parity}">
+    <td>
+      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td><td></td><td>file |
+      annotate |
+      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
+      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
+    </td>
+  </tr>'
+
+nav = '{before%naventry} {after%naventry}'
+navshort = '{before%navshortentry}{after%navshortentry}'
+navgraph = '{before%navgraphentry}{after%navgraphentry}'
+filenav = '{before%filenaventry}{after%filenaventry}'
+
+fileellipses = '...'
+changelogentry = changelogentry.tmpl
+searchentry = changelogentry.tmpl
+changeset = changeset.tmpl
+manifest = manifest.tmpl
+direntry = '
+  <tr class="parity{parity}">
+    <td>drwxr-xr-x</td>
+    <td></td>
+    <td></td>
+    <td><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td>
+    <td><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></td>
+  </tr>'
+fileentry = '
+  <tr class="parity{parity}">
+    <td>{permissions|permissions}</td>
+    <td>{date|isodate}</td>
+    <td>{size}</td>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td>
+    <td>
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
+      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
+    </td>
+  </tr>'
+filerevision = filerevision.tmpl
+fileannotate = fileannotate.tmpl
+filediff = filediff.tmpl
+filelog = filelog.tmpl
+fileline = '
+  <div style="font-family:monospace" class="parity{parity}">
+    <pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</pre>
+  </div>'
+annotateline = '
+  <tr class="parity{parity}">
+    <td class="linenr">
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#{targetline}"
+         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
+    </td>
+    <td class="lineno">
+      <a href="#{lineid}" id="{lineid}">{linenumber}</a>
+    </td>
+    <td class="source">{line|escape}</td>
+  </tr>'
+difflineplus = '<span style="color:#008800;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
+difflineminus = '<span style="color:#cc0000;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
+difflineat = '<span style="color:#990099;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
+diffline = '<span><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
+changelogparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
+    </td>
+  </tr>'
+changesetbranch = '<dt>branch</dt><dd>{name}</dd>'
+changesetparent = '
+  <dt>parent {rev}</dt>
+  <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
+filerevbranch = '<dt>branch</dt><dd>{name}</dd>'
+filerevparent = '
+  <dt>parent {rev}</dt>
+  <dd>
+    <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+      {rename%filerename}{node|short}
+    </a>
+  </dd>'
+filerename = '{file|escape}@'
+filelogrename = '| <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">base</a>'
+fileannotateparent = '
+  <dt>parent {rev}</dt>
+  <dd>
+    <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+      {rename%filerename}{node|short}
+    </a>
+  </dd>'
+changelogchild = '
+  <dt>child {rev}:</dt>
+  <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
+changesetchild = '
+  <dt>child {rev}</dt>
+  <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
+filerevchild = '
+  <dt>child {rev}</dt>
+  <dd>
+    <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
+  </dd>'
+fileannotatechild = '
+  <dt>child {rev}</dt>
+  <dd>
+    <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
+  </dd>'
+tags = tags.tmpl
+tagentry = '
+  <tr class="parity{parity}">
+    <td class="nowrap">{date|age}</td>
+    <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{tag|escape}</a></td>
+    <td class="nowrap">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+      <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
+      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+    </td>
+  </tr>'
+branches = branches.tmpl
+branchentry = '
+  <tr class="parity{parity}">
+    <td class="nowrap">{date|age}</td>
+    <td><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+    <td class="{status}">{branch|escape}</td>
+    <td class="nowrap">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+      <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
+      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+    </td>
+  </tr>'
+diffblock = '<pre>{lines}</pre>'
+filediffparent = '
+  <dt>parent {rev}</dt>
+  <dd><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></dd>'
+filelogparent = '
+  <tr>
+    <td align="right">parent {rev}:&nbsp;</td>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filediffchild = '
+  <dt>child {rev}</dt>
+  <dd><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></dd>'
+filelogchild = '
+  <tr>
+    <td align="right">child {rev}:&nbsp;</td>
+    <td><a href="{url}file{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+shortlog = shortlog.tmpl
+tagtag = '<span class="tagtag" title="{name}">{name}</span> '
+branchtag = '<span class="branchtag" title="{name}">{name}</span> '
+inbranchtag = '<span class="inbranchtag" title="{name}">{name}</span> '
+shortlogentry = '
+  <tr class="parity{parity}">
+    <td class="nowrap">{date|age}</td>
+    <td>{author|person}</td>
+    <td>
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
+        {desc|strip|firstline|escape|nonempty}
+        <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span>
+      </a>
+    </td>
+    <td class="nowrap">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
+      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+    </td>
+  </tr>'
+filelogentry = '
+  <tr class="parity{parity}">
+    <td class="nowrap">{date|age}</td>
+    <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></td>
+    <td class="nowrap">
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>&nbsp;|&nbsp;<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>&nbsp;|&nbsp;<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
+      {rename%filelogrename}
+    </td>
+  </tr>'
+archiveentry = '<li><a href="{url}archive/{node|short}{extension}">{type|escape}</a></li>'
+indexentry = '
+  <tr class="parity{parity}">
+    <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
+    <td>{description}</td>
+    <td>{contact|obfuscate}</td>
+    <td>{lastchange|age}</td>
+    <td class="indexlinks">{archives%indexarchiveentry}</td>
+    <td>
+      <div class="rss_logo">
+        <a href="{url}rss-log">RSS</a>
+        <a href="{url}atom-log">Atom</a>
+      </div>
+    </td>
+  </tr>\n'
+indexarchiveentry = '<a href="{url}archive/{node|short}{extension}">{type|escape}</a> '
+index = index.tmpl
+urlparameter = '{separator}{name}={value|urlescape}'
+hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
+graph = graph.tmpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/notfound.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,35 @@
+{header}
+    <title>{repo|escape}: Mercurial repository not found</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / Not found: {repo|escape}</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li class="current">summary</li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}</li>
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">Not Found</h2>
+    <p class="normal">The specified repository "{repo|escape}" is unknown, sorry.</p>
+    <p class="normal">Please go back to the <a href="{url}">main repository list page</a>.</p>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/search.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,34 @@
+{header}
+    <title>{repo|escape}: Search</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" value="{query|escape}" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">searching for {query|escape}</h2>
+    {entries}
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/shortlog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,41 @@
+{header}
+    <title>{repo|escape}: shortlog</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li class="current">shortlog</li>
+            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}</li>
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">shortlog</h2>
+
+    <table>
+{entries%shortlogentry}
+    </table>
+
+    <div class="page-path">
+    {changenav%navshort}
+    </div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/summary.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,66 @@
+{header}
+    <title>{repo|escape}: Summary</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li class="current">summary</li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">Mercurial Repository Overview</h2>
+    <dl class="overview">
+        <dt>name</dt>
+        <dd>{repo|escape}</dd>
+        <dt>description</dt>
+        <dd>{desc}</dd>
+        <dt>owner</dt>
+        <dd>{owner|obfuscate}</dd>
+        <dt>last change</dt>
+        <dd>{lastchange|rfc822date}</dd>
+    </dl>
+
+    <h2><a href="{url}shortlog{sessionvars%urlparameter}">Changes</a></h2>
+    <table>
+{shortlog}
+        <tr class="light">
+            <td colspan="4"><a class="list" href="{url}shortlog{sessionvars%urlparameter}">...</a></td>
+        </tr>
+    </table>
+
+    <h2><a href="{url}tags{sessionvars%urlparameter}">Tags</a></h2>
+    <table>
+{tags}
+        <tr class="light">
+            <td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td>
+        </tr>
+    </table>
+
+    <h2 class="no-link">Branches</h2>
+    <table>
+    {branches%branchentry}
+        <tr class="light">
+          <td colspan="4"><a class="list"  href="#">...</a></td>
+        </tr>
+    </table>
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/monoblue/tags.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,36 @@
+{header}
+    <title>{repo|escape}: Tags</title>
+    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
+    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
+</head>
+
+<body>
+<div id="container">
+    <div class="page-header">
+        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / Tags</h1>
+
+        <form action="{url}log">
+            {sessionvars%hiddenformentry}
+            <dl class="search">
+                <dt><label>Search: </label></dt>
+                <dd><input type="text" name="rev" /></dd>
+            </dl>
+        </form>
+
+        <ul class="page-nav">
+            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
+            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
+            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
+            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+            <li class="current">tags</li>
+            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
+        </ul>
+    </div>
+
+    <h2 class="no-link no-border">tags</h2>
+    <table cellspacing="0">
+{entries%tagentry}
+    </table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/branches.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,45 @@
+{header}
+<title>{repo|escape}: branches</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-tags" title="Atom feed for {repo|escape}: branches" />
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-tags" title="RSS feed for {repo|escape}: branches" />
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li class="active">branches</li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>branches</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<table class="bigtable">
+<tr>
+ <th>branch</th>
+ <th>node</th>
+</tr>
+{entries%branchentry}
+</table>
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/changeset.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,71 @@
+{header}
+<title>{repo|escape}: {node|short}</title>
+</head>
+<body>
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+ <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
+ <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+ <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+ <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+<ul>
+ <li class="active">changeset</li>
+ <li><a href="{url}raw-rev/{node|short}{sessionvars%urlparameter}">raw</a></li>
+ <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">browse</a></li>
+</ul>
+<ul>
+ {archives%archiveentry}
+</ul>
+</div>
+
+<div class="main">
+
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>changeset {rev}:{node|short} {changesetbranch%changelogbranchname} {changesettag}</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
+
+<table id="changesetEntry">
+<tr>
+ <th class="author">author</th>
+ <td class="author">{author|obfuscate}</td>
+</tr>
+<tr>
+ <th class="date">date</th>
+ <td class="date">{date|date} ({date|age})</td></tr>
+<tr>
+ <th class="author">parents</th>
+ <td class="author">{parent%changesetparent}</td>
+</tr>
+<tr>
+ <th class="author">children</th>
+ <td class="author">{child%changesetchild}</td>
+</tr>
+<tr>
+ <th class="files">files</th>
+ <td class="files">{files}</td>
+</tr>
+</table>
+
+<div class="overflow">
+<div class="sourcefirst">   line diff</div>
+
+{diff}
+</div>
+
+</div>
+</div>
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/error.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,43 @@
+{header}
+<title>{repo|escape}: error</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+</div>
+
+<div class="main">
+
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>error</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30"></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="description">
+<p>
+An error occurred while processing your request:
+</p>
+<p>
+{error|escape}
+</p>
+</div>
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/fileannotate.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,78 @@
+{header}
+<title>{repo|escape}: {file|escape} annotate</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+
+<ul>
+<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+</ul>
+<ul>
+<li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+<li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
+<li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+<li class="active">annotate</li>
+<li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
+<li><a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a></li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>annotate {file|escape} @ {rev}:{node|short}</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
+
+<table id="changesetEntry">
+<tr>
+ <th class="author">author</th>
+ <td class="author">{author|obfuscate}</td>
+</tr>
+<tr>
+ <th class="date">date</th>
+ <td class="date">{date|date} ({date|age})</td>
+</tr>
+<tr>
+ <th class="author">parents</th>
+ <td class="author">{parent%filerevparent}</td>
+</tr>
+<tr>
+ <th class="author">children</th>
+ <td class="author">{child%filerevchild}</td>
+</tr>
+{changesettag}
+</table>
+
+<div class="overflow">
+<table class="bigtable">
+<tr>
+ <th class="annotate">rev</th>
+ <th class="line">&nbsp;&nbsp;line source</th>
+</tr>
+{annotate%annotateline}
+</table>
+</div>
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/filediff.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,73 @@
+{header}
+<title>{repo|escape}: {file|escape} diff</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+<ul>
+<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+</ul>
+<ul>
+<li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+<li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
+<li class="active">diff</li>
+<li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+<li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
+<li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>diff {file|escape} @ {rev}:{node|short}</h3>
+
+<form class="search" action="{url}log">
+<p>{sessionvars%hiddenformentry}</p>
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
+
+<table id="changesetEntry">
+<tr>
+ <th>author</th>
+ <td>{author|obfuscate}</td>
+</tr>
+<tr>
+ <th>date</th>
+ <td>{date|date} ({date|age})</td>
+</tr>
+<tr>
+ <th>parents</th>
+ <td>{parent%filerevparent}</td>
+</tr>
+<tr>
+ <th>children</th>
+ <td>{child%filerevchild}</td>
+</tr>
+{changesettag}
+</table>
+
+<div class="overflow">
+<div class="sourcefirst">   line diff</div>
+
+{diff}
+</div>
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/filelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,69 @@
+{header}
+<title>{repo|escape}: {file|escape} history</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}" />
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log/tip/{file|urlescape}" title="RSS feed for {repo|escape}:{file}" />
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+<ul>
+<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+</ul>
+<ul>
+<li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
+<li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+<li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+<li class="active">file log</li>
+<li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>log {file|escape}</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="navigate">
+<a href="{url}log/{node|short}/{file|urlescape}{lessvars%urlparameter}">less</a>
+<a href="{url}log/{node|short}/{file|urlescape}{morevars%urlparameter}">more</a>
+| {nav%filenav}</div>
+
+<table class="bigtable">
+ <tr>
+  <th class="age">age</th>
+  <th class="author">author</th>
+  <th class="description">description</th>
+ </tr>
+{entries%filelogentry}
+</table>
+
+<div class="navigate">
+<a href="{url}log/{node|short}/{file|urlescape}{lessvars%urlparameter}">less</a>
+<a href="{url}log/{node|short}/{file|urlescape}{morevars%urlparameter}">more</a>
+| {nav%filenav}
+</div>
+
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/filelogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,5 @@
+ <tr class="parity{parity}">
+  <td class="age">{date|age}</td>
+  <td class="author">{author|person}</td>
+  <td class="description"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}</td>
+ </tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/filerevision.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,73 @@
+{header}
+<title>{repo|escape}: {node|short} {file|escape}</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+<ul>
+<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+</ul>
+<ul>
+<li class="active">file</li>
+<li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
+<li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
+<li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
+<li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
+<li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>view {file|escape} @ {rev}:{node|short}</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
+
+<table id="changesetEntry">
+<tr>
+ <th class="author">author</th>
+ <td class="author">{author|obfuscate}</td>
+</tr>
+<tr>
+ <th class="date">date</th>
+ <td class="date">{date|date} ({date|age})</td>
+</tr>
+<tr>
+ <th class="author">parents</th>
+ <td class="author">{parent%filerevparent}</td>
+</tr>
+<tr>
+ <th class="author">children</th>
+ <td class="author">{child%filerevchild}</td>
+</tr>
+{changesettag}
+</table>
+
+<div class="overflow">
+<div class="sourcefirst"> line source</div>
+{text%fileline}
+<div class="sourcelast"></div>
+</div>
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/footer.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,4 @@
+{motd}
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/graph.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,132 @@
+{header}
+<title>{repo|escape}: revision graph</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}: log" />
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}: log" />
+<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
+<li class="active">graph</li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+<ul>
+<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>graph</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="navigate">
+<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
+<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
+| rev {rev}: {changenav%navgraph}
+</div>
+
+<noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
+
+<div id="wrapper">
+<ul id="nodebgs"></ul>
+<canvas id="graph" width="224" height="{canvasheight}"></canvas>
+<ul id="graphnodes"></ul>
+</div>
+
+<script type="text/javascript" src="{staticurl}graph.js"></script>
+<script type="text/javascript">
+<!-- hide script content
+
+var data = {jsdata|json};
+var graph = new Graph();
+graph.scale({bg_height});
+
+graph.edge = function(x0, y0, x1, y1, color) {
+	
+	this.setColor(color, 0.0, 0.65);
+	this.ctx.beginPath();
+	this.ctx.moveTo(x0, y0);
+	this.ctx.lineTo(x1, y1);
+	this.ctx.stroke();
+	
+}
+
+var revlink = '<li style="_STYLE"><span class="desc">';
+revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
+revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
+
+graph.vertex = function(x, y, color, parity, cur) {
+	
+	this.ctx.beginPath();
+	color = this.setColor(color, 0.25, 0.75);
+	this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
+	this.ctx.fill();
+	
+	var bg = '<li class="bg parity' + parity + '"></li>';
+	var left = (this.columns + 1) * this.bg_height;
+	var nstyle = 'padding-left: ' + left + 'px;';
+	var item = revlink.replace(/_STYLE/, nstyle);
+	item = item.replace(/_PARITY/, 'parity' + parity);
+	item = item.replace(/_NODEID/, cur[0]);
+	item = item.replace(/_NODEID/, cur[0]);
+	item = item.replace(/_DESC/, cur[3]);
+	item = item.replace(/_USER/, cur[4]);
+	item = item.replace(/_DATE/, cur[5]);
+
+	var tagspan = '';
+	if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
+		tagspan = '<span class="logtags">';
+		if (cur[6][1]) {
+			tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
+			tagspan += cur[6][0] + '</span> ';
+		} else if (!cur[6][1] && cur[6][0] != 'default') {
+			tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
+			tagspan += cur[6][0] + '</span> ';
+		}
+		if (cur[7].length) {
+			for (var t in cur[7]) {
+				var tag = cur[7][t];
+				tagspan += '<span class="tag">' + tag + '</span> ';
+			}
+		}
+		tagspan += '</span>';
+	}
+	
+	item = item.replace(/_TAGS/, tagspan);
+	return [bg, item];
+	
+}
+
+graph.render(data);
+
+// stop hiding script -->
+</script>
+
+<div class="navigate">
+<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
+<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
+| rev {rev}: {changenav%navgraph}
+</div>
+
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/header.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+<head>
+<link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
+<meta name="robots" content="index, nofollow" />
+<link rel="stylesheet" href="{staticurl}style-paper.css" type="text/css" />
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/index.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,26 @@
+{header}
+<title>Mercurial repositories index</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
+</div>
+<div class="main">
+<h2>Mercurial Repositories</h2>
+
+<table class="bigtable">
+    <tr>
+        <th><a href="?sort={sort_name}">Name</a></th>
+        <th><a href="?sort={sort_description}">Description</a></th>
+        <th><a href="?sort={sort_contact}">Contact</a></th>
+        <th><a href="?sort={sort_lastchange}">Last modified</a></th>
+        <th>&nbsp;</th>
+    </tr>
+    {entries%indexentry}
+</table>
+</div>
+</div>
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/manifest.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,54 @@
+{header}
+<title>{repo|escape}: {node|short} {path|escape}</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+<ul>
+<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
+<li class="active">browse</li>
+</ul>
+<ul>
+{archives%archiveentry}
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>directory {path|escape} @ {rev}:{node|short} {tags%changelogtag}</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<table class="bigtable">
+<tr>
+  <th class="name">name</th>
+  <th class="size">size</th>
+  <th class="permissions">permissions</th>
+</tr>
+<tr class="fileline parity{upparity}">
+  <td class="name"><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
+  <td class="size"></td>
+  <td class="permissions">drwxr-xr-x</td>
+</tr>
+{dentries%direntry}
+{fentries%fileentry}
+</table>
+</div>
+</div>
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/map	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,196 @@
+default = 'shortlog'
+
+mimetype = 'text/html; charset={encoding}'
+header = header.tmpl
+footer = footer.tmpl
+search = search.tmpl
+
+changelog = shortlog.tmpl
+shortlog = shortlog.tmpl
+shortlogentry = shortlogentry.tmpl
+graph = graph.tmpl
+
+naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
+filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
+filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
+filenolink = '{file|escape} '
+fileellipses = '...'
+changelogentry = shortlogentry.tmpl
+searchentry = shortlogentry.tmpl
+changeset = changeset.tmpl
+manifest = manifest.tmpl
+
+nav = '{before%naventry} {after%naventry}'
+navshort = '{before%navshortentry}{after%navshortentry}'
+navgraph = '{before%navgraphentry}{after%navgraphentry}'
+filenav = '{before%filenaventry}{after%filenaventry}'
+
+direntry = '
+  <tr class="fileline parity{parity}">
+    <td class="name">
+      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">
+        <img src="{staticurl}coal-folder.png" alt="dir."/> {basename|escape}/
+      </a>
+      <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
+        {emptydirs|escape}
+      </a>
+    </td>
+    <td class="size"></td>
+    <td class="permissions">drwxr-xr-x</td>
+  </tr>'
+
+fileentry = '
+  <tr class="fileline parity{parity}">
+    <td class="filename">
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        <img src="{staticurl}coal-file.png" alt="file"/> {basename|escape}
+      </a>
+    </td>
+    <td class="size">{size}</td>
+    <td class="permissions">{permissions|permissions}</td>
+  </tr>'
+
+filerevision = filerevision.tmpl
+fileannotate = fileannotate.tmpl
+filediff = filediff.tmpl
+filelog = filelog.tmpl
+fileline = '
+  <div class="parity{parity} source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</div>'
+filelogentry = filelogentry.tmpl
+
+annotateline = '
+  <tr class="parity{parity}">
+    <td class="annotate">
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#{targetline}"
+         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
+    </td>
+    <td class="source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</td>
+  </tr>'
+
+diffblock = '<div class="source bottomline parity{parity}"><pre>{lines}</pre></div>'
+difflineplus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="plusline">{line|escape}</span>'
+difflineminus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="minusline">{line|escape}</span>'
+difflineat = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="atline">{line|escape}</span>'
+diffline = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
+
+changelogparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+
+changesetparent = '<a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> '
+
+filerevparent = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a> '
+filerevchild = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a> '
+
+filerename = '{file|escape}@'
+filelogrename = '
+  <tr>
+    <th>base:</th>
+    <td>
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {file|escape}@{node|short}
+      </a>
+    </td>
+  </tr>'
+fileannotateparent = '
+  <tr>
+    <td class="metatag">parent:</td>
+    <td>
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {rename%filerename}{node|short}
+      </a>
+    </td>
+  </tr>'
+changesetchild = ' <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>'
+changelogchild = '
+  <tr>
+    <th class="child">child</th>
+    <td class="child">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
+        {node|short}
+      </a>
+    </td>
+  </tr>'
+fileannotatechild = '
+  <tr>
+    <td class="metatag">child:</td>
+    <td>
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {node|short}
+      </a>
+    </td>
+  </tr>'
+tags = tags.tmpl
+tagentry = '
+  <tr class="tagEntry parity{parity}">
+    <td>
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
+        {tag|escape}
+      </a>
+    </td>
+    <td class="node">
+      {node|short}
+    </td>
+  </tr>'
+branches = branches.tmpl
+branchentry = '
+  <tr class="tagEntry parity{parity}">
+    <td>
+      <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">
+        {branch|escape}
+      </a>
+    </td>
+    <td class="node">
+      {node|short}
+    </td>
+  </tr>'
+changelogtag = '<span class="tag">{name|escape}</span> '
+changesettag = '<span class="tag">{tag|escape}</span> '
+changelogbranchhead = '<span class="branchhead">{name|escape}</span> '
+changelogbranchname = '<span class="branchname">{name|escape}</span> ' 
+
+filediffparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filelogparent = '
+  <tr>
+    <th>parent {rev}:</th>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filediffchild = '
+  <tr>
+    <th class="child">child {rev}:</th>
+    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
+  </td>
+  </tr>'
+filelogchild = '
+  <tr>
+    <th>child {rev}:</th>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+
+indexentry = '
+  <tr class="parity{parity}">
+    <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
+    <td>{description}</td>
+    <td>{contact|obfuscate}</td>
+    <td class="age">{lastchange|age}</td>
+    <td class="indexlinks">{archives%indexarchiveentry}</td>
+  </tr>\n'
+indexarchiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">&nbsp;&darr;{type|escape}</a>'
+index = index.tmpl
+archiveentry = '
+  <li>
+    <a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a>
+  </li>'
+notfound = notfound.tmpl
+error = error.tmpl
+urlparameter = '{separator}{name}={value|urlescape}'
+hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/notfound.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,12 @@
+{header}
+<title>Mercurial repository not found</title>
+</head>
+<body>
+
+<h2>Mercurial repository not found</h2>
+
+The specified repository "{repo|escape}" is unknown, sorry.
+
+Please go back to the <a href="{url}">main repository list page</a>.
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/search.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,53 @@
+{header}
+<title>{repo|escape}: searching for {query|escape}</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
+</div>
+<ul>
+<li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>searching for '{query|escape}'</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30"></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="navigate">
+<a href="{url}search/{lessvars%urlparameter}">less</a>
+<a href="{url}search/{morevars%urlparameter}">more</a>
+</div>
+
+<table class="bigtable">
+ <tr>
+  <th class="age">age</th>
+  <th class="author">author</th>
+  <th class="description">description</th>
+ </tr>
+{entries}
+</table>
+
+<div class="navigate">
+<a href="{url}search/{lessvars%urlparameter}">less</a>
+<a href="{url}search/{morevars%urlparameter}">more</a>
+</div>
+
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/shortlog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,66 @@
+{header}
+<title>{repo|escape}: log</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}" />
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}" />
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li class="active">log</li>
+<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
+<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+<ul>
+<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
+<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
+</ul>
+<ul>
+{archives%archiveentry}
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>log</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="navigate">
+<a href="{url}shortlog/{rev}{lessvars%urlparameter}">less</a>
+<a href="{url}shortlog/{rev}{morevars%urlparameter}">more</a>
+| rev {rev}: {changenav%navshort}
+</div>
+
+<table class="bigtable">
+ <tr>
+  <th class="age">age</th>
+  <th class="author">author</th>
+  <th class="description">description</th>
+ </tr>
+{entries%shortlogentry}
+</table>
+
+<div class="navigate">
+<a href="{url}shortlog/{rev}{lessvars%urlparameter}">less</a>
+<a href="{url}shortlog/{rev}{morevars%urlparameter}">more</a>
+| rev {rev}: {changenav%navshort}
+</div>
+
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/shortlogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,5 @@
+ <tr class="parity{parity}">
+  <td class="age">{date|age}</td>
+  <td class="author">{author|person}</td>
+  <td class="description"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}</td>
+ </tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/paper/tags.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,45 @@
+{header}
+<title>{repo|escape}: tags</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-tags" title="Atom feed for {repo|escape}: tags" />
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-tags" title="RSS feed for {repo|escape}: tags" />
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
+<li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
+<li class="active">tags</li>
+<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
+<h3>tags</h3>
+
+<form class="search" action="{url}log">
+{sessionvars%hiddenformentry}
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<table class="bigtable">
+<tr>
+ <th>tag</th>
+ <th>node</th>
+</tr>
+{entries%tagentry}
+</table>
+</div>
+</div>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/changeset.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,9 @@
+{header}
+# HG changeset patch
+# User {author}
+# Date {date|hgdate}
+# Node ID {node}
+{parent%changesetparent}
+{desc}
+
+{diff}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/error.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,2 @@
+{header}
+error: {error}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/fileannotate.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,5 @@
+{header}
+{annotate%annotateline}
+{footer}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/filediff.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,5 @@
+{header}
+{diff}
+{footer}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/index.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,2 @@
+{header}
+{entries%indexentry}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/manifest.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,3 @@
+{header}
+{dentries%direntry}{fentries%fileentry}
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/map	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,27 @@
+mimetype = 'text/plain; charset={encoding}'
+header = ''
+footer = ''
+changeset = changeset.tmpl
+difflineplus = '{line}'
+difflineminus = '{line}'
+difflineat = '{line}'
+diffline = '{line}'
+changesetparent = '# Parent  {node}'
+changesetchild = '# Child   {node}'
+filenodelink = ''
+fileline = '{line}'
+diffblock = '{lines}'
+filediff = filediff.tmpl
+fileannotate = fileannotate.tmpl
+annotateline = '{author|user}@{rev}: {line}'
+manifest = manifest.tmpl
+direntry = 'drwxr-xr-x {basename}\n'
+fileentry = '{permissions|permissions} {size} {basename}\n'
+index = index.tmpl
+notfound = notfound.tmpl
+error = error.tmpl
+indexentry = '{url}\n'
+tags = '{entries%tagentry}'
+tagentry = '{tag}	{node}\n'
+branches = '{entries%branchentry}'
+branchentry = '{branch}	{node}	{status}\n'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/raw/notfound.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,2 @@
+{header}
+error: repository {repo} not found
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/changelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+{header}
+    <title>{repo|escape} Changelog</title>
+    <description>{repo|escape} Changelog</description>
+    {entries%changelogentry}
+  </channel>
+</rss>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/changelogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,7 @@
+<item>
+    <title>{desc|strip|firstline|strip|escape}</title>
+    <guid isPermaLink="true">{urlbase}{url}rev/{node|short}</guid>
+    <description><![CDATA[{desc|strip|escape|addbreaks|nonempty}]]></description>
+    <author>{author|obfuscate}</author>
+    <pubDate>{date|rfc822date}</pubDate>
+</item>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/error.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,10 @@
+{header}
+    <title>Error</title>
+    <description>Error</description>
+    <item>
+      <title>Error</title>
+      <description>{error|escape}</description>
+      <guid>http://mercurial.selenic.com/#error</guid>
+    </item>
+  </channel>
+</rss>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/filelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+{header}
+    <title>{repo|escape}: {file|escape} history</title>
+    <description>{file|escape} revision history</description>
+    {entries%filelogentry}
+  </channel>
+</rss>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/filelogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,7 @@
+<item>
+    <title>{desc|strip|firstline|strip|escape}</title>
+    <link>{urlbase}{url}log{{node|short}}/{file|urlescape}</link>
+    <description><![CDATA[{desc|strip|escape|addbreaks|nonempty}]]></description>
+    <author>{author|obfuscate}</author>
+    <pubDate>{date|rfc822date}</pubDate>
+</item>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/header.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="{encoding}"?>
+<rss version="2.0">
+  <channel>
+    <link>{urlbase}{url}</link>
+    <language>en-us</language>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/map	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,10 @@
+default = 'changelog'
+mimetype = 'text/xml; charset={encoding}'
+header = header.tmpl
+changelog = changelog.tmpl
+changelogentry = changelogentry.tmpl
+filelog = filelog.tmpl
+filelogentry = filelogentry.tmpl
+tags = tags.tmpl
+tagentry = tagentry.tmpl
+error = error.tmpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/tagentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+<item>
+    <title>{tag|escape}</title>
+    <link>{urlbase}{url}rev/{node|short}</link>
+    <description><![CDATA[{tag|strip|escape|addbreaks}]]></description>
+    <pubDate>{date|rfc822date}</pubDate>
+</item>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/rss/tags.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+{header}
+    <title>{repo|escape}: tags </title>
+    <description>{repo|escape} tag history</description>
+    {entriesnotip%tagentry}
+  </channel>
+</rss>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/branches.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,26 @@
+{header}
+<title>{repo|escape}: branches</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-branches" title="Atom feed for {repo|escape}: branches">
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-branches" title="RSS feed for {repo|escape}: branches">
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a>
+<a type="application/rss+xml" href="{url}rss-branches">rss</a>
+<a type="application/atom+xml" href="{url}atom-branches">atom</a>
+</div>
+
+<h2>branches:</h2>
+
+<ul id="tagEntries">
+{entries%branchentry}
+</ul>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/changelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,43 @@
+{header}
+<title>{repo|escape}: changelog</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}">
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}">
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+{archives%archiveentry}
+<a type="application/rss+xml" href="{url}rss-log">rss</a>
+<a type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}">atom</a>
+</div>
+
+<h2>changelog for {repo|escape}</h2>
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<p>
+<label for="search1">search:</label>
+<input name="rev" id="search1" type="text" size="30">
+navigate: <small class="navigate">{changenav%nav}</small>
+</p>
+</form>
+
+{entries%changelogentry}
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<p>
+<label for="search2">search:</label>
+<input name="rev" id="search2" type="text" size="30">
+navigate: <small class="navigate">{changenav%nav}</small>
+</p>
+</form>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/changelogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,25 @@
+<table class="logEntry parity{parity}">
+ <tr>
+  <th class="age">{date|age}:</th>
+  <th class="firstline">{desc|strip|firstline|escape|nonempty}</th>
+ </tr>
+ <tr>
+  <th class="revision">changeset {rev}:</th>
+  <td class="node"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+ </tr>
+ {parent%changelogparent}
+ {child%changelogchild}
+ {changelogtag}
+ <tr>
+  <th class="author">author:</th>
+  <td class="author">{author|obfuscate}</td>
+ </tr>
+ <tr>
+  <th class="date">date:</th>
+  <td class="date">{date|date}</td>
+ </tr>
+ <tr>
+  <th class="files"><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>:</th>
+  <td class="files">{files}</td>
+ </tr>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/changeset.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,51 @@
+{header}
+<title>{repo|escape}: changeset {node|short}</title>
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+<a href="{url}raw-rev/{node|short}">raw</a>
+{archives%archiveentry}
+</div>
+
+<h2>changeset: {desc|strip|escape|firstline|nonempty}</h2>
+
+<table id="changesetEntry">
+<tr>
+ <th class="changeset">changeset {rev}:</th>
+ <td class="changeset"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+</tr>
+{parent%changesetparent}
+{child%changesetchild}
+{changesettag}
+<tr>
+ <th class="author">author:</th>
+ <td class="author">{author|obfuscate}</td>
+</tr>
+<tr>
+ <th class="date">date:</th>
+ <td class="date">{date|date} ({date|age})</td>
+</tr>
+<tr>
+ <th class="files">files:</th>
+ <td class="files">{files}</td>
+</tr>
+<tr>
+ <th class="description">description:</th>
+ <td class="description">{desc|strip|escape|addbreaks|nonempty}</td>
+</tr>
+</table>
+
+<div id="changesetDiff">
+{diff}
+</div>
+
+{footer}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/error.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,15 @@
+{header}
+<title>Mercurial Error</title>
+</head>
+<body>
+
+<h2>Mercurial Error</h2>
+
+<p>
+An error occurred while processing your request:
+</p>
+<p>
+{error|escape}
+</p>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/fileannotate.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,48 @@
+{header}
+<title>{repo|escape}: {file|escape} annotate</title>
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
+<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a>
+<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>
+<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
+<a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a>
+</div>
+
+<h2>Annotate {file|escape}</h2>
+
+<table>
+<tr>
+ <td class="metatag">changeset {rev}:</td>
+ <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+{parent%fileannotateparent}
+{child%fileannotatechild}
+<tr>
+ <td class="metatag">author:</td>
+ <td>{author|obfuscate}</td></tr>
+<tr>
+ <td class="metatag">date:</td>
+ <td>{date|date} ({date|age})</td>
+</tr>
+<tr>
+ <td class="metatag">permissions:</td>
+ <td>{permissions|permissions}</td>
+</tr>
+<tr>
+  <td class="metatag">description:</td>
+  <td>{desc|strip|escape|addbreaks|nonempty}</td>
+</tr>
+</table>
+
+<table cellspacing="0" cellpadding="0">
+{annotate%annotateline}
+</table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/filediff.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,36 @@
+{header}
+<title>{repo|escape}: {file|escape} diff</title>
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
+<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>
+<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
+<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
+<a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a>
+</div>
+
+<h2>{file|escape}</h2>
+
+<table id="filediffEntry">
+<tr>
+ <th class="revision">revision {rev}:</th>
+ <td class="revision"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+</tr>
+{parent%filediffparent}
+{child%filediffchild}
+</table>
+
+<div id="fileDiff">
+{diff}
+</div>
+
+{footer}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/filelog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,28 @@
+{header}
+<title>{repo|escape}: {file|escape} history</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}">
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log/tip/{file|urlescape}" title="RSS feed for {repo|escape}:{file}">
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>
+<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
+<a type="application/rss+xml" href="{url}rss-log/tip/{file|urlescape}">rss</a>
+<a type="application/atom+xml" href="{url}atom-log/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}">atom</a>
+</div>
+
+<h2>{file|escape} revision history</h2>
+
+<p>navigate: <small class="navigate">{nav%filenav}</small></p>
+
+{entries%filelogentry}
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/filelogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,25 @@
+<table class="logEntry parity{parity}">
+ <tr>
+  <th class="age">{date|age}:</th>
+  <th class="firstline"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></th>
+ </tr>
+ <tr>
+  <th class="revision">revision {filerev}:</td>
+  <td class="node">
+   <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
+   <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">(diff)</a>
+   <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">(annotate)</a>
+  </td>
+ </tr>
+ {rename%filelogrename}
+ <tr>
+  <th class="author">author:</th>
+  <td class="author">{author|obfuscate}</td>
+ </tr>
+ <tr>
+  <th class="date">date:</th>
+  <td class="date">{date|date}</td>
+ </tr>
+</table>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/filerevision.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,46 @@
+{header}
+<title>{repo|escape}:{file|escape}</title>
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
+<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a>
+<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
+<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
+<a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a>
+</div>
+
+<h2>{file|escape}</h2>
+
+<table>
+<tr>
+ <td class="metatag">changeset {rev}:</td>
+ <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
+{parent%filerevparent}
+{child%filerevchild}
+<tr>
+ <td class="metatag">author:</td>
+ <td>{author|obfuscate}</td></tr>
+<tr>
+ <td class="metatag">date:</td>
+ <td>{date|date} ({date|age})</td></tr>
+<tr>
+ <td class="metatag">permissions:</td>
+ <td>{permissions|permissions}</td></tr>
+<tr>
+  <td class="metatag">description:</td>
+  <td>{desc|strip|escape|addbreaks|nonempty}</td>
+</tr>
+</table>
+
+<pre>
+{text%fileline}
+</pre>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/footer.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,8 @@
+{motd}
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
+</div>
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/graph.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,96 @@
+{header}
+<title>{repo|escape}: graph</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-tags" title="Atom feed for {repo|escape}: tags">
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-tags" title="RSS feed for {repo|escape}: tags">
+<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a>
+</div>
+
+<h2>graph</h2>
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<p>
+<label for="search1">search:</label>
+<input name="rev" id="search1" type="text" size="30">
+navigate: <small class="navigate">{changenav%navgraph}</small>
+</p>
+</form>
+
+<noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
+
+<div id="wrapper">
+<ul id="nodebgs"></ul>
+<canvas id="graph" width="224" height="{canvasheight}"></canvas>
+<ul id="graphnodes"></ul>
+</div>
+
+<script type="text/javascript" src="{staticurl}graph.js"></script>
+<script type="text/javascript">
+<!-- hide script content
+
+var data = {jsdata|json};
+var graph = new Graph();
+graph.scale({bg_height});
+
+graph.edge = function(x0, y0, x1, y1, color) {
+	
+	this.setColor(color, 0.0, 0.65);
+	this.ctx.beginPath();
+	this.ctx.moveTo(x0, y0);
+	this.ctx.lineTo(x1, y1);
+	this.ctx.stroke();
+	
+}
+
+var revlink = '<li style="_STYLE"><span class="desc">';
+revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
+revlink += '</span><span class="info">_DATE, by _USER</span></li>';
+
+graph.vertex = function(x, y, color, parity, cur) {
+	
+	this.ctx.beginPath();
+	color = this.setColor(color, 0.25, 0.75);
+	this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
+	this.ctx.fill();
+	
+	var bg = '<li class="bg parity' + parity + '"></li>';
+	var left = (this.columns + 1) * this.bg_height;
+	var nstyle = 'padding-left: ' + left + 'px;';
+	var item = revlink.replace(/_STYLE/, nstyle);
+	item = item.replace(/_PARITY/, 'parity' + parity);
+	item = item.replace(/_NODEID/, cur[0]);
+	item = item.replace(/_NODEID/, cur[0]);
+	item = item.replace(/_DESC/, cur[3]);
+	item = item.replace(/_USER/, cur[4]);
+	item = item.replace(/_DATE/, cur[5]);
+	
+	return [bg, item];
+	
+}
+
+graph.render(data);
+
+// stop hiding script -->
+</script>
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<p>
+<label for="search1">search:</label>
+<input name="rev" id="search1" type="text" size="30">
+navigate: <small class="navigate">{changenav%navgraph}</small>
+</p>
+</form>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/header.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<link rel="icon" href="{staticurl}hgicon.png" type="image/png">
+<meta name="robots" content="index, nofollow" />
+<link rel="stylesheet" href="{staticurl}style.css" type="text/css" />
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/index.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,19 @@
+{header}
+<title>Mercurial repositories index</title>
+</head>
+<body>
+
+<h2>Mercurial Repositories</h2>
+
+<table>
+    <tr>
+        <td><a href="?sort={sort_name}">Name</a></td>
+        <td><a href="?sort={sort_description}">Description</a></td>
+        <td><a href="?sort={sort_contact}">Contact</a></td>
+        <td><a href="?sort={sort_lastchange}">Last modified</a></td>
+        <td>&nbsp;</td>
+    </tr>
+    {entries%indexentry}
+</table>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/manifest.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,28 @@
+{header}
+<title>{repo|escape}: files for changeset {node|short}</title>
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
+{archives%archiveentry}
+</div>
+
+<h2>files for changeset {node|short}: {path|escape}</h2>
+
+<table cellpadding="0" cellspacing="0">
+<tr class="parity{upparity}">
+  <td><tt>drwxr-xr-x</tt>&nbsp;
+  <td>&nbsp;
+  <td>&nbsp;
+  <td><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a>
+</tr>
+{dentries%direntry}
+{fentries%fileentry}
+</table>
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/map	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,183 @@
+default = 'shortlog'
+mimetype = 'text/html; charset={encoding}'
+header = header.tmpl
+footer = footer.tmpl
+search = search.tmpl
+changelog = changelog.tmpl
+shortlog = shortlog.tmpl
+shortlogentry = shortlogentry.tmpl
+graph = graph.tmpl
+naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
+filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
+filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
+filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
+filenolink = '{file|escape} '
+fileellipses = '...'
+changelogentry = changelogentry.tmpl
+searchentry = changelogentry.tmpl
+changeset = changeset.tmpl
+manifest = manifest.tmpl
+
+nav = '{before%naventry} {after%naventry}'
+navshort = '{before%navshortentry}{after%navshortentry}'
+navgraph = '{before%navgraphentry}{after%navgraphentry}'
+filenav = '{before%filenaventry}{after%filenaventry}'
+
+direntry = '
+  <tr class="parity{parity}">
+    <td><tt>drwxr-xr-x</tt>&nbsp;
+    <td>&nbsp;
+    <td>&nbsp;
+    <td>
+      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}/</a>
+      <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
+        {emptydirs|urlescape}
+      </a>'
+
+fileentry = '
+  <tr class="parity{parity}">
+    <td><tt>{permissions|permissions}</tt>&nbsp;
+    <td align=right><tt class="date">{date|isodate}</tt>&nbsp;
+    <td align=right><tt>{size}</tt>&nbsp;
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a>'
+
+filerevision = filerevision.tmpl
+fileannotate = fileannotate.tmpl
+filediff = filediff.tmpl
+filelog = filelog.tmpl
+fileline = '<div class="parity{parity}"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>&nbsp;{line|escape}</div>'
+filelogentry = filelogentry.tmpl
+
+# The &nbsp; ensures that all table cells have content (even if there
+# is an empty line in the annotated file), which in turn ensures that
+# all table rows have equal height.
+annotateline = '
+  <tr class="parity{parity}">
+    <td class="annotate">
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"
+         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
+    </td>
+    <td>
+      <a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>
+    </td>
+    <td><pre>&nbsp;{line|escape}</pre></td>
+  </tr>'
+difflineplus = '<span class="plusline"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</span>'
+difflineminus = '<span class="minusline"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</span>'
+difflineat = '<span class="atline"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</span>'
+diffline = '<a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}'
+changelogparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent">
+      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
+    </td>
+  </tr>'
+changesetparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filerevparent = '
+  <tr>
+    <td class="metatag">parent:</td>
+    <td>
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {rename%filerename}{node|short}
+      </a>
+    </td>
+  </tr>'
+filerename = '{file|escape}@'
+filelogrename = '
+  <tr>
+    <th>base:</th>
+    <td>
+      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {file|escape}@{node|short}
+      </a>
+    </td>
+  </tr>'
+fileannotateparent = '
+  <tr>
+    <td class="metatag">parent:</td>
+    <td>
+      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
+        {rename%filerename}{node|short}
+      </a>
+    </td>
+  </tr>'
+changesetchild = '
+  <tr>
+    <th class="child">child {rev}:</th>
+    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+changelogchild = '
+  <tr>
+    <th class="child">child {rev}:</th>
+    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filerevchild = '
+  <tr>
+    <td class="metatag">child:</td>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+fileannotatechild = '
+  <tr>
+    <td class="metatag">child:</td>
+    <td><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+tags = tags.tmpl
+tagentry = '
+  <li class="tagEntry parity{parity}">
+    <tt class="node">{node}</tt>
+    <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{tag|escape}</a>
+  </li>'
+branches = branches.tmpl
+branchentry = '
+  <li class="tagEntry parity{parity}">
+    <tt class="node">{node}</tt>
+    <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">{branch|escape}</a>
+  </li>'
+diffblock = '<pre class="parity{parity}">{lines}</pre>'
+changelogtag = '<tr><th class="tag">tag:</th><td class="tag">{tag|escape}</td></tr>'
+changesettag = '<tr><th class="tag">tag:</th><td class="tag">{tag|escape}</td></tr>'
+filediffparent = '
+  <tr>
+    <th class="parent">parent {rev}:</th>
+    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filelogparent = '
+  <tr>
+    <th>parent {rev}:</th>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filediffchild = '
+  <tr>
+    <th class="child">child {rev}:</th>
+    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+filelogchild = '
+  <tr>
+    <th>child {rev}:</th>
+    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
+  </tr>'
+indexentry = '
+  <tr class="parity{parity}">
+    <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
+    <td>{description}</td>
+    <td>{contact|obfuscate}</td>
+    <td class="age">{lastchange|age}</td>
+    <td class="indexlinks">
+      <a href="{url}rss-log">RSS</a>
+      <a href="{url}atom-log">Atom</a>
+      {archives%archiveentry}
+    </td>
+  </tr>'
+index = index.tmpl
+archiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a> '
+notfound = notfound.tmpl
+error = error.tmpl
+urlparameter = '{separator}{name}={value|urlescape}'
+hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/notfound.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,12 @@
+{header}
+<title>Mercurial repository not found</title>
+</head>
+<body>
+
+<h2>Mercurial repository not found</h2>
+
+The specified repository "{repo|escape}" is unknown, sorry.
+
+Please go back to the <a href="{url}">main repository list page</a>.
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/search.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,36 @@
+{header}
+<title>{repo|escape}: searching for {query|escape}</title>
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
+{archives%archiveentry}
+</div>
+
+<h2>searching for {query|escape}</h2>
+
+<form>
+{sessionvars%hiddenformentry}
+<p>
+search:
+<input name="rev" type="text" width="30" value="{query|escape}">
+</p>
+</form>
+
+{entries}
+
+<form>
+{sessionvars%hiddenformentry}
+<p>
+search:
+<input name="rev" type="text" width="30" value="{query|escape}">
+</p>
+</form>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/shortlog.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,43 @@
+{header}
+<title>{repo|escape}: shortlog</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-log" title="Atom feed for {repo|escape}">
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-log" title="RSS feed for {repo|escape}">
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}tags{sessionvars%urlparameter}">tags</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a>
+{archives%archiveentry}
+<a type="application/rss+xml" href="{url}rss-log">rss</a>
+<a type="application/rss+xml" href="{url}atom-log" title="Atom feed for {repo|escape}">atom</a>
+</div>
+
+<h2>shortlog for {repo|escape}</h2>
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<p>
+<label for="search1">search:</label>
+<input name="rev" id="search1" type="text" size="30">
+navigate: <small class="navigate">{changenav%navshort}</small>
+</p>
+</form>
+
+{entries%shortlogentry}
+
+<form action="{url}log">
+{sessionvars%hiddenformentry}
+<p>
+<label for="search2">search:</label>
+<input name="rev" id="search2" type="text" size="30">
+navigate: <small class="navigate">{changenav%navshort}</small>
+</p>
+</form>
+
+{footer}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/shortlogentry.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,7 @@
+<table class="slogEntry parity{parity}">
+ <tr>
+  <td class="age">{date|age}</td>
+  <td class="author">{author|person}</td>
+  <td class="node"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></td>
+ </tr>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/spartan/tags.tmpl	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,26 @@
+{header}
+<title>{repo|escape}: tags</title>
+<link rel="alternate" type="application/atom+xml"
+   href="{url}atom-tags" title="Atom feed for {repo|escape}: tags">
+<link rel="alternate" type="application/rss+xml"
+   href="{url}rss-tags" title="RSS feed for {repo|escape}: tags">
+</head>
+<body>
+
+<div class="buttons">
+<a href="{url}log{sessionvars%urlparameter}">changelog</a>
+<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
+<a href="{url}graph{sessionvars%urlparameter}">graph</a>
+<a href="{url}branches{sessionvars%urlparameter}">branches</a>
+<a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a>
+<a type="application/rss+xml" href="{url}rss-tags">rss</a>
+<a type="application/atom+xml" href="{url}atom-tags">atom</a>
+</div>
+
+<h2>tags:</h2>
+
+<ul id="tagEntries">
+{entries%tagentry}
+</ul>
+
+{footer}
Binary file mercurial/templates/static/background.png has changed
Binary file mercurial/templates/static/coal-file.png has changed
Binary file mercurial/templates/static/coal-folder.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/static/excanvas.js	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,19 @@
+if(!window.CanvasRenderingContext2D){(function(){var I=Math,i=I.round,L=I.sin,M=I.cos,m=10,A=m/2,Q={init:function(a){var b=a||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var c=this;b.attachEvent("onreadystatechange",function(){c.r(b)})}},r:function(a){if(a.readyState=="complete"){if(!a.namespaces["s"]){a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var b=a.createStyleSheet();b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}";
+var c=a.getElementsByTagName("canvas");for(var d=0;d<c.length;d++){if(!c[d].getContext){this.initElement(c[d])}}}},q:function(a){var b=a.outerHTML,c=a.ownerDocument.createElement(b);if(b.slice(-2)!="/>"){var d="/"+a.tagName,e;while((e=a.nextSibling)&&e.tagName!=d){e.removeNode()}if(e){e.removeNode()}}a.parentNode.replaceChild(c,a);return c},initElement:function(a){a=this.q(a);a.getContext=function(){if(this.l){return this.l}return this.l=new K(this)};a.attachEvent("onpropertychange",V);a.attachEvent("onresize",
+W);var b=a.attributes;if(b.width&&b.width.specified){a.style.width=b.width.nodeValue+"px"}else{a.width=a.clientWidth}if(b.height&&b.height.specified){a.style.height=b.height.nodeValue+"px"}else{a.height=a.clientHeight}return a}};function V(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function W(a){var b=a.srcElement;
+if(b.firstChild){b.firstChild.style.width=b.clientWidth+"px";b.firstChild.style.height=b.clientHeight+"px"}}Q.init();var R=[];for(var E=0;E<16;E++){for(var F=0;F<16;F++){R[E*16+F]=E.toString(16)+F.toString(16)}}function J(){return[[1,0,0],[0,1,0],[0,0,1]]}function G(a,b){var c=J();for(var d=0;d<3;d++){for(var e=0;e<3;e++){var g=0;for(var h=0;h<3;h++){g+=a[d][h]*b[h][e]}c[d][e]=g}}return c}function N(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=
+a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.d=a.d;b.e=a.e}function O(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),g=a.substring(d+1,e).split(",");b="#";for(var h=0;h<3;h++){b+=R[Number(g[h])]}if(g.length==4&&a.substr(3,1)=="a"){c=g[3]}}else{b=a}return[b,c]}function S(a){switch(a){case "butt":return"flat";case "round":return"round";
+case "square":default:return"square"}}function K(a){this.a=J();this.m=[];this.k=[];this.c=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=m*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.j=b;this.d=1;this.e=1}var j=K.prototype;j.clearRect=function(){this.j.innerHTML=
+"";this.c=[]};j.beginPath=function(){this.c=[]};j.moveTo=function(a,b){this.c.push({type:"moveTo",x:a,y:b});this.f=a;this.g=b};j.lineTo=function(a,b){this.c.push({type:"lineTo",x:a,y:b});this.f=a;this.g=b};j.bezierCurveTo=function(a,b,c,d,e,g){this.c.push({type:"bezierCurveTo",cp1x:a,cp1y:b,cp2x:c,cp2y:d,x:e,y:g});this.f=e;this.g=g};j.quadraticCurveTo=function(a,b,c,d){var e=this.f+0.6666666666666666*(a-this.f),g=this.g+0.6666666666666666*(b-this.g),h=e+(c-this.f)/3,l=g+(d-this.g)/3;this.bezierCurveTo(e,
+g,h,l,c,d)};j.arc=function(a,b,c,d,e,g){c*=m;var h=g?"at":"wa",l=a+M(d)*c-A,n=b+L(d)*c-A,o=a+M(e)*c-A,f=b+L(e)*c-A;if(l==o&&!g){l+=0.125}this.c.push({type:h,x:a,y:b,radius:c,xStart:l,yStart:n,xEnd:o,yEnd:f})};j.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};j.strokeRect=function(a,b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke()};j.fillRect=function(a,
+b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill()};j.createLinearGradient=function(a,b,c,d){var e=new H("gradient");return e};j.createRadialGradient=function(a,b,c,d,e,g){var h=new H("gradientradial");h.n=c;h.o=g;h.i.x=a;h.i.y=b;return h};j.drawImage=function(a,b){var c,d,e,g,h,l,n,o,f=a.runtimeStyle.width,k=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var q=a.width,r=a.height;a.runtimeStyle.width=
+f;a.runtimeStyle.height=k;if(arguments.length==3){c=arguments[1];d=arguments[2];h=(l=0);n=(e=q);o=(g=r)}else if(arguments.length==5){c=arguments[1];d=arguments[2];e=arguments[3];g=arguments[4];h=(l=0);n=q;o=r}else if(arguments.length==9){h=arguments[1];l=arguments[2];n=arguments[3];o=arguments[4];c=arguments[5];d=arguments[6];e=arguments[7];g=arguments[8]}else{throw"Invalid number of arguments";}var s=this.b(c,d),t=[],v=10,w=10;t.push(" <g_vml_:group",' coordsize="',m*v,",",m*w,'"',' coordorigin="0,0"',
+' style="width:',v,";height:",w,";position:absolute;");if(this.a[0][0]!=1||this.a[0][1]){var x=[];x.push("M11='",this.a[0][0],"',","M12='",this.a[1][0],"',","M21='",this.a[0][1],"',","M22='",this.a[1][1],"',","Dx='",i(s.x/m),"',","Dy='",i(s.y/m),"'");var p=s,y=this.b(c+e,d),z=this.b(c,d+g),B=this.b(c+e,d+g);p.x=Math.max(p.x,y.x,z.x,B.x);p.y=Math.max(p.y,y.y,z.y,B.y);t.push("padding:0 ",i(p.x/m),"px ",i(p.y/m),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",x.join(""),", sizingmethod='clip');")}else{t.push("top:",
+i(s.y/m),"px;left:",i(s.x/m),"px;")}t.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',m*e,";"," height:",m*g,';"',' cropleft="',h/q,'"',' croptop="',l/r,'"',' cropright="',(q-h-n)/q,'"',' cropbottom="',(r-l-o)/r,'"'," />","</g_vml_:group>");this.j.insertAdjacentHTML("BeforeEnd",t.join(""))};j.stroke=function(a){var b=[],c=O(a?this.fillStyle:this.strokeStyle),d=c[0],e=c[1]*this.globalAlpha,g=10,h=10;b.push("<g_vml_:shape",' fillcolor="',d,'"',' filled="',Boolean(a),'"',' style="position:absolute;width:',
+g,";height:",h,';"',' coordorigin="0 0" coordsize="',m*g," ",m*h,'"',' stroked="',!a,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',d,'"',' path="');var l={x:null,y:null},n={x:null,y:null};for(var o=0;o<this.c.length;o++){var f=this.c[o];if(f.type=="moveTo"){b.push(" m ");var k=this.b(f.x,f.y);b.push(i(k.x),",",i(k.y))}else if(f.type=="lineTo"){b.push(" l ");var k=this.b(f.x,f.y);b.push(i(k.x),",",i(k.y))}else if(f.type=="close"){b.push(" x ")}else if(f.type=="bezierCurveTo"){b.push(" c ");
+var k=this.b(f.x,f.y),q=this.b(f.cp1x,f.cp1y),r=this.b(f.cp2x,f.cp2y);b.push(i(q.x),",",i(q.y),",",i(r.x),",",i(r.y),",",i(k.x),",",i(k.y))}else if(f.type=="at"||f.type=="wa"){b.push(" ",f.type," ");var k=this.b(f.x,f.y),s=this.b(f.xStart,f.yStart),t=this.b(f.xEnd,f.yEnd);b.push(i(k.x-this.d*f.radius),",",i(k.y-this.e*f.radius)," ",i(k.x+this.d*f.radius),",",i(k.y+this.e*f.radius)," ",i(s.x),",",i(s.y)," ",i(t.x),",",i(t.y))}if(k){if(l.x==null||k.x<l.x){l.x=k.x}if(n.x==null||k.x>n.x){n.x=k.x}if(l.y==
+null||k.y<l.y){l.y=k.y}if(n.y==null||k.y>n.y){n.y=k.y}}}b.push(' ">');if(typeof this.fillStyle=="object"){var v={x:"50%",y:"50%"},w=n.x-l.x,x=n.y-l.y,p=w>x?w:x;v.x=i(this.fillStyle.i.x/w*100+50)+"%";v.y=i(this.fillStyle.i.y/x*100+50)+"%";var y=[];if(this.fillStyle.p=="gradientradial"){var z=this.fillStyle.n/p*100,B=this.fillStyle.o/p*100-z}else{var z=0,B=100}var C={offset:null,color:null},D={offset:null,color:null};this.fillStyle.h.sort(function(T,U){return T.offset-U.offset});for(var o=0;o<this.fillStyle.h.length;o++){var u=
+this.fillStyle.h[o];y.push(u.offset*B+z,"% ",u.color,",");if(u.offset>C.offset||C.offset==null){C.offset=u.offset;C.color=u.color}if(u.offset<D.offset||D.offset==null){D.offset=u.offset;D.color=u.color}}y.pop();b.push("<g_vml_:fill",' color="',D.color,'"',' color2="',C.color,'"',' type="',this.fillStyle.p,'"',' focusposition="',v.x,", ",v.y,'"',' colors="',y.join(""),'"',' opacity="',e,'" />')}else if(a){b.push('<g_vml_:fill color="',d,'" opacity="',e,'" />')}else{b.push("<g_vml_:stroke",' opacity="',
+e,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',S(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',d,'" />')}b.push("</g_vml_:shape>");this.j.insertAdjacentHTML("beforeEnd",b.join(""));this.c=[]};j.fill=function(){this.stroke(true)};j.closePath=function(){this.c.push({type:"close"})};j.b=function(a,b){return{x:m*(a*this.a[0][0]+b*this.a[1][0]+this.a[2][0])-A,y:m*(a*this.a[0][1]+b*this.a[1][1]+this.a[2][1])-A}};j.save=function(){var a={};N(this,a);
+this.k.push(a);this.m.push(this.a);this.a=G(J(),this.a)};j.restore=function(){N(this.k.pop(),this);this.a=this.m.pop()};j.translate=function(a,b){var c=[[1,0,0],[0,1,0],[a,b,1]];this.a=G(c,this.a)};j.rotate=function(a){var b=M(a),c=L(a),d=[[b,c,0],[-c,b,0],[0,0,1]];this.a=G(d,this.a)};j.scale=function(a,b){this.d*=a;this.e*=b;var c=[[a,0,0],[0,b,0],[0,0,1]];this.a=G(c,this.a)};j.clip=function(){};j.arcTo=function(){};j.createPattern=function(){return new P};function H(a){this.p=a;this.n=0;this.o=
+0;this.h=[];this.i={x:0,y:0}}H.prototype.addColorStop=function(a,b){b=O(b);this.h.push({offset:1-a,color:b})};function P(){}G_vmlCanvasManager=Q;CanvasRenderingContext2D=K;CanvasGradient=H;CanvasPattern=P})()};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/static/graph.js	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,137 @@
+// branch_renderer.js - Rendering of branch DAGs on the client side
+//
+// Copyright 2008 Dirkjan Ochtman <dirkjan AT ochtman DOT nl>
+// Copyright 2006 Alexander Schremmer <alex AT alexanderweb DOT de>
+//
+// derived from code written by Scott James Remnant <scott@ubuntu.com>
+// Copyright 2005 Canonical Ltd.
+//
+// This software may be used and distributed according to the terms
+// of the GNU General Public License, incorporated herein by reference.
+
+var colors = [
+	[ 1.0, 0.0, 0.0 ],
+	[ 1.0, 1.0, 0.0 ],
+	[ 0.0, 1.0, 0.0 ],
+	[ 0.0, 1.0, 1.0 ],
+	[ 0.0, 0.0, 1.0 ],
+	[ 1.0, 0.0, 1.0 ]
+];
+
+function Graph() {
+	
+	this.canvas = document.getElementById('graph');
+	if (navigator.userAgent.indexOf('MSIE') >= 0) this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
+	this.ctx = this.canvas.getContext('2d');
+	this.ctx.strokeStyle = 'rgb(0, 0, 0)';
+	this.ctx.fillStyle = 'rgb(0, 0, 0)';
+	this.cur = [0, 0];
+	this.line_width = 3;
+	this.bg = [0, 4];
+	this.cell = [2, 0];
+	this.columns = 0;
+	this.revlink = '';
+	
+	this.scale = function(height) {
+		this.bg_height = height;
+		this.box_size = Math.floor(this.bg_height / 1.2);
+		this.cell_height = this.box_size;
+	}
+	
+	function colorPart(num) {
+		num *= 255
+		num = num < 0 ? 0 : num;
+		num = num > 255 ? 255 : num;
+		var digits = Math.round(num).toString(16);
+		if (num < 16) {
+			return '0' + digits;
+		} else {
+			return digits;
+		}
+	}
+
+	this.setColor = function(color, bg, fg) {
+		
+		// Set the colour.
+		//
+		// Picks a distinct colour based on an internal wheel; the bg
+		// parameter provides the value that should be assigned to the 'zero'
+		// colours and the fg parameter provides the multiplier that should be
+		// applied to the foreground colours.
+		
+		color %= colors.length;
+		var red = (colors[color][0] * fg) || bg;
+		var green = (colors[color][1] * fg) || bg;
+		var blue = (colors[color][2] * fg) || bg;
+		red = Math.round(red * 255);
+		green = Math.round(green * 255);
+		blue = Math.round(blue * 255);
+		var s = 'rgb(' + red + ', ' + green + ', ' + blue + ')';
+		this.ctx.strokeStyle = s;
+		this.ctx.fillStyle = s;
+		return s;
+		
+	}
+
+	this.render = function(data) {
+		
+		var backgrounds = '';
+		var nodedata = '';
+		
+		for (var i in data) {
+			
+			var parity = i % 2;
+			this.cell[1] += this.bg_height;
+			this.bg[1] += this.bg_height;
+			
+			var cur = data[i];
+			var node = cur[1];
+			var edges = cur[2];
+			var fold = false;
+			
+			for (var j in edges) {
+				
+				line = edges[j];
+				start = line[0];
+				end = line[1];
+				color = line[2];
+
+				if (end > this.columns || start > this.columns) {
+					this.columns += 1;
+				}
+				
+				if (start == this.columns && start > end) {
+					var fold = true;
+				}
+				
+				x0 = this.cell[0] + this.box_size * start + this.box_size / 2;
+				y0 = this.bg[1] - this.bg_height / 2;
+				x1 = this.cell[0] + this.box_size * end + this.box_size / 2;
+				y1 = this.bg[1] + this.bg_height / 2;
+				
+				this.edge(x0, y0, x1, y1, color);
+				
+			}
+			
+			// Draw the revision node in the right column
+			
+			column = node[0]
+			color = node[1]
+			
+			radius = this.box_size / 8;
+			x = this.cell[0] + this.box_size * column + this.box_size / 2;
+			y = this.bg[1] - this.bg_height / 2;
+			var add = this.vertex(x, y, color, parity, cur);
+			backgrounds += add[0];
+			nodedata += add[1];
+			
+			if (fold) this.columns -= 1;
+			
+		}
+		
+		document.getElementById('nodebgs').innerHTML += backgrounds;
+		document.getElementById('graphnodes').innerHTML += nodedata;
+		
+	}
+
+}
Binary file mercurial/templates/static/hgicon.png has changed
Binary file mercurial/templates/static/hglogo.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/static/style-coal.css	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,265 @@
+body {
+  margin: 0;
+  padding: 0;
+  background: black url(background.png) repeat-x;
+  font-family: sans-serif;
+}
+
+.container {
+  padding-right: 150px;
+}
+
+.main {
+  position: relative;
+  background: white;
+  padding: 2em;
+  border-right: 15px solid black;
+  border-bottom: 15px solid black;
+}
+
+#.main {
+  width: 98%;
+}
+
+.overflow {
+  width: 100%;
+  overflow: auto;
+}
+
+.menu {
+  background: #999;
+  padding: 10px;
+  width: 75px;
+  margin: 0;
+  font-size: 80%;
+  text-align: left;
+  position: fixed;
+  top: 27px;
+  left: auto;
+  right: 27px;
+}
+
+#.menu {
+  position: absolute !important;
+  top:expression(eval(document.body.scrollTop + 27));
+}
+
+.menu ul {
+  list-style: none;
+  padding: 0;
+  margin: 10px 0 0 0;
+}
+
+.menu li {
+  margin-bottom: 3px;
+  padding: 2px 4px;
+  background: white;
+  color: black;
+  font-weight: normal;
+}
+
+.menu li.active {
+  background: black;
+  color: white;
+}
+
+.menu img {
+  width: 75px;
+  height: 90px;
+  border: 0;
+}
+
+.menu a { color: black; display: block; }
+
+.search {
+  position: absolute;
+  top: .7em;
+  right: 2em;
+}
+
+form.search div#hint {
+  display: none;
+  position: absolute;
+  top: 40px;
+  right: 0px;
+  width: 190px;
+  padding: 5px;
+  background: #ffc;
+  font-size: 70%;
+  border: 1px solid yellow;
+  -moz-border-radius: 5px; /* this works only in camino/firefox */
+  -webkit-border-radius: 5px; /* this is just for Safari */
+}
+
+form.search:hover div#hint { display: block; }
+
+a { text-decoration:none; }
+.age { white-space:nowrap; }
+.date { white-space:nowrap; }
+.indexlinks { white-space:nowrap; }
+.parity0 { background-color: #f0f0f0; }
+.parity1 { background-color: white; }
+.plusline { color: green; }
+.minusline { color: #dc143c; } /* crimson */
+.atline { color: purple; }
+
+.navigate {
+  text-align: right;
+  font-size: 60%;
+  margin: 1em 0;
+}
+
+.tag {
+  color: #999;
+  font-size: 70%;
+  font-weight: normal;
+  margin-left: .5em;
+  vertical-align: baseline;
+}
+
+.branchhead {
+  color: #000;
+  font-size: 80%;
+  font-weight: normal;
+  margin-left: .5em;
+  vertical-align: baseline;
+}
+
+ul#graphnodes .branchhead {
+  font-size: 75%;
+}
+
+.branchname {
+  color: #000;
+  font-size: 60%; 
+  font-weight: normal;
+  margin-left: .5em;
+  vertical-align: baseline;
+}
+
+h3 .branchname {
+  font-size: 80%;
+}
+
+/* Common */
+pre { margin: 0; }
+
+h2 { font-size: 120%; border-bottom: 1px solid #999; }
+h2 a { color: #000; }
+h3 {
+  margin-top: -.7em;
+  font-size: 100%;
+}
+
+/* log and tags tables */
+.bigtable {
+  border-bottom: 1px solid #999;
+  border-collapse: collapse;
+  font-size: 90%;
+  width: 100%;
+  font-weight: normal;
+  text-align: left;
+}
+
+.bigtable td {
+  vertical-align: top;
+}
+
+.bigtable th {
+  padding: 1px 4px;
+  border-bottom: 1px solid #999;
+}
+.bigtable tr { border: none; }
+.bigtable .age { width: 6em; }
+.bigtable .author { width: 12em; }
+.bigtable .description { }
+.bigtable .node { width: 5em; font-family: monospace;}
+.bigtable .lineno { width: 2em; text-align: right;}
+.bigtable .lineno a { color: #999; font-size: smaller; font-family: monospace;}
+.bigtable .permissions { width: 8em; text-align: left;}
+.bigtable .size { width: 5em; text-align: right; }
+.bigtable .annotate { text-align: right; }
+.bigtable td.annotate { font-size: smaller; }
+.bigtable td.source { font-size: inherit; }
+
+.source, .sourcefirst, .sourcelast {
+  font-family: monospace;
+  white-space: pre;
+  padding: 1px 4px;
+  font-size: 90%;
+}
+.sourcefirst { border-bottom: 1px solid #999; font-weight: bold; }
+.sourcelast { border-top: 1px solid #999; }
+.source a { color: #999; font-size: smaller; font-family: monospace;}
+.bottomline { border-bottom: 1px solid #999; }
+
+.fileline { font-family: monospace; }
+.fileline img { border: 0; }
+
+.tagEntry .closed { color: #99f; }
+
+/* Changeset entry */
+#changesetEntry {
+  border-collapse: collapse;
+  font-size: 90%;
+  width: 100%;
+  margin-bottom: 1em;
+}
+
+#changesetEntry th {
+  padding: 1px 4px;
+  width: 4em;
+  text-align: right;
+  font-weight: normal;
+  color: #999;
+  margin-right: .5em;
+  vertical-align: top;
+}
+
+div.description {
+  border-left: 3px solid #999;
+  margin: 1em 0 1em 0;
+  padding: .3em;
+}
+
+/* Graph */
+div#wrapper {
+	position: relative;
+	border-top: 1px solid black;
+	border-bottom: 1px solid black;
+	margin: 0;
+	padding: 0;
+}
+
+canvas {
+	position: absolute;
+	z-index: 5;
+	top: -0.7em;
+	margin: 0;
+}
+
+ul#graphnodes {
+	position: absolute;
+	z-index: 10;
+	top: -1.0em;
+	list-style: none inside none;
+	padding: 0;
+}
+
+ul#nodebgs {
+	list-style: none inside none;
+	padding: 0;
+	margin: 0;
+	top: -0.7em;
+}
+
+ul#graphnodes li, ul#nodebgs li {
+	height: 39px;
+}
+
+ul#graphnodes li .info {
+	display: block;
+	font-size: 70%;
+	position: relative;
+	top: -3px;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/static/style-gitweb.css	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,123 @@
+body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
+a { color:#0000cc; }
+a:hover, a:visited, a:active { color:#880000; }
+div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
+div.page_header a:visited { color:#0000cc; }
+div.page_header a:hover { color:#880000; }
+div.page_nav { padding:8px; }
+div.page_nav a:visited { color:#0000cc; }
+div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
+div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
+div.page_footer_text { float:left; color:#555555; font-style:italic; }
+div.page_body { padding:8px; }
+div.title, a.title {
+	display:block; padding:6px 8px;
+	font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
+}
+a.title:hover { background-color: #d9d8d1; }
+div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
+div.log_body { padding:8px 8px 8px 150px; }
+.age { white-space:nowrap; }
+span.age { position:relative; float:left; width:142px; font-style:italic; }
+div.log_link {
+	padding:0px 8px;
+	font-size:10px; font-family:sans-serif; font-style:normal;
+	position:relative; float:left; width:136px;
+}
+div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
+a.list { text-decoration:none; color:#000000; }
+a.list:hover { text-decoration:underline; color:#880000; }
+table { padding:8px 4px; }
+th { padding:2px 5px; font-size:12px; text-align:left; }
+tr.light:hover, .parity0:hover { background-color:#edece6; }
+tr.dark, .parity1 { background-color:#f6f6f0; }
+tr.dark:hover, .parity1:hover { background-color:#edece6; }
+td { padding:2px 5px; font-size:12px; vertical-align:top; }
+td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
+td.indexlinks { white-space: nowrap; }
+td.indexlinks a {
+  padding: 2px 5px; line-height: 10px;
+  border: 1px solid;
+  color: #ffffff; background-color: #7777bb;
+  border-color: #aaaadd #333366 #333366 #aaaadd;
+  font-weight: bold;  text-align: center; text-decoration: none;
+  font-size: 10px;
+}
+td.indexlinks a:hover { background-color: #6666aa; }
+div.pre { font-family:monospace; font-size:12px; white-space:pre; }
+div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
+div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
+div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
+.linenr { color:#999999; text-decoration:none }
+div.rss_logo { float: right; white-space: nowrap; }
+div.rss_logo a {
+	padding:3px 6px; line-height:10px;
+	border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
+	color:#ffffff; background-color:#ff6600;
+	font-weight:bold; font-family:sans-serif; font-size:10px;
+	text-align:center; text-decoration:none;
+}
+div.rss_logo a:hover { background-color:#ee5500; }
+pre { margin: 0; }
+span.logtags span {
+	padding: 0px 4px;
+	font-size: 10px;
+	font-weight: normal;
+	border: 1px solid;
+	background-color: #ffaaff;
+	border-color: #ffccff #ff00ee #ff00ee #ffccff;
+}
+span.logtags span.tagtag {
+	background-color: #ffffaa;
+	border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
+}
+span.logtags span.branchtag {
+	background-color: #aaffaa;
+	border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
+}
+span.logtags span.inbranchtag {
+	background-color: #d5dde6;
+	border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
+}
+
+/* Graph */
+div#wrapper {
+	position: relative;
+	margin: 0;
+	padding: 0;
+	margin-top: 3px;
+}
+
+canvas {
+	position: absolute;
+	z-index: 5;
+	top: -0.9em;
+	margin: 0;
+}
+
+ul#nodebgs {
+	list-style: none inside none;
+	padding: 0;
+	margin: 0;
+	top: -0.7em;
+}
+
+ul#graphnodes li, ul#nodebgs li {
+	height: 39px;
+}
+
+ul#graphnodes {
+	position: absolute;
+	z-index: 10;
+	top: -0.8em;
+	list-style: none inside none;
+	padding: 0;
+}
+
+ul#graphnodes li .info {
+	display: block;
+	font-size: 100%;
+	position: relative;
+	top: -3px;
+	font-style: italic;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/static/style-monoblue.css	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,472 @@
+/*** Initial Settings ***/
+* {
+  margin: 0;
+  padding: 0;
+  font-weight: normal;
+  font-style: normal;
+}
+
+html {
+  font-size: 100%;
+  font-family: sans-serif;
+}
+
+body {
+  font-size: 77%;
+  margin: 15px 50px;
+  background: #4B4B4C;
+}
+
+a {
+  color:#0000cc;
+  text-decoration: none;
+}
+/*** end of Initial Settings ***/
+
+
+/** common settings **/
+div#container {
+  background: #FFFFFF;
+  position: relative;
+  color: #666;
+}
+
+div.page-header {
+  padding: 50px 20px 0;
+  background: #006699 top left repeat-x;
+  position: relative;
+}
+  div.page-header h1 {
+    margin: 10px 0 30px;
+    font-size: 1.8em;
+    font-weight: bold;
+    font-family: osaka,'MS P Gothic', Georgia, serif;
+    letter-spacing: 1px;
+    color: #DDD;
+  }
+  div.page-header h1 a {
+    font-weight: bold;
+    color: #FFF;
+  }
+  div.page-header a {
+    text-decoration: none;
+  }
+
+  div.page-header form {
+    position: absolute;
+    margin-bottom: 2px;
+    bottom: 0;
+    right: 20px;
+  }
+  div.page-header form label {
+    color: #DDD;
+  }
+  div.page-header form input {
+    padding: 2px;
+    border: solid 1px #DDD;
+  }
+  div.page-header form dl {
+    overflow: hidden;
+  }
+  div.page-header form dl dt {
+    font-size: 1.2em;
+  }
+  div.page-header form dl dt,
+  div.page-header form dl dd {
+    margin: 0 0 0 5px;
+    float: left;
+    height: 24px;
+    line-height: 20px;
+  }
+
+  ul.page-nav {
+    margin: 10px 0 0 0;
+    list-style-type: none;
+    overflow: hidden;
+    width: 800px;
+  }
+    ul.page-nav li {
+      margin: 0 2px 0 0;
+      float: left;
+      width: 80px;
+      height: 24px;
+      font-size: 1.1em;
+      line-height: 24px;
+      text-align: center;
+    }
+    ul.page-nav li.current {
+      background: #FFF;
+    }
+    ul.page-nav li a {
+      height: 24px;
+      color: #666;
+      background: #DDD;
+      display: block;
+      text-decoration: none;
+    }
+    ul.page-nav li a:hover {
+      color:#333;
+      background: #FFF;
+    }
+
+ul.submenu {
+  margin: 10px 0 -10px 20px;
+  list-style-type: none;
+}
+ul.submenu li {
+  margin: 0 10px 0 0;
+  font-size: 1.2em;
+  display: inline;
+}
+
+h2 {
+  margin: 20px 0 10px;
+  height: 30px;
+  line-height: 30px;
+  text-indent: 20px;
+  background: #FFF;
+  font-size: 1.2em;
+  border-top: dotted 1px #D5E1E6;
+  font-weight: bold;
+}
+h2.no-link {
+  color:#006699;
+}
+h2.no-border {
+  color: #FFF;
+  background: #006699;
+  border: 0;
+}
+h2 a {
+  font-weight:bold;
+  color:#006699;
+}
+
+div.page-path {
+  text-align: right;
+  padding: 20px 30px 10px 0;
+  border:solid #d9d8d1;
+  border-width:0px 0px 1px;
+  font-size: 1.2em;
+}
+
+div.page-footer {
+  margin: 50px 0 0;
+  position: relative;
+}
+  div.page-footer p {
+    position: relative;
+    left: 20px;
+    bottom: 5px;
+    font-size: 1.2em;
+  }
+
+  ul.rss-logo {
+    position: absolute;
+    top: -10px;
+    right: 20px;
+    height: 20px;
+    list-style-type: none;
+  }
+  ul.rss-logo li {
+    display: inline;
+  }
+  ul.rss-logo li a {
+    padding: 3px 6px;
+    line-height: 10px;
+    border:1px solid;
+    border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
+    color:#ffffff;
+    background-color:#ff6600;
+    font-weight:bold;
+    font-family:sans-serif;
+    font-size:10px;
+    text-align:center;
+    text-decoration:none;
+  }
+  div.rss-logo li a:hover {
+    background-color:#ee5500;
+  }
+
+p.normal {
+  margin: 20px 0 20px 30px;
+  font-size: 1.2em;
+}
+
+table {
+  margin: 10px 0 0 20px;
+  width: 95%;
+  border-collapse: collapse;
+}
+table tr td {
+  font-size: 1.1em;
+}
+table tr td.nowrap {
+  white-space: nowrap;
+}
+/*
+table tr.parity0:hover,
+table tr.parity1:hover {
+  background: #D5E1E6;
+}
+*/
+table tr.parity0 {
+  background: #F1F6F7;
+}
+table tr.parity1 {
+  background: #FFFFFF;
+}
+table tr td {
+  padding: 5px 5px;
+}
+table.annotated tr td {
+  padding: 0px 5px;
+}
+
+span.logtags span {
+  padding: 2px 6px;
+  font-weight: normal;
+  font-size: 11px;
+  border: 1px solid;
+  background-color: #ffaaff;
+  border-color: #ffccff #ff00ee #ff00ee #ffccff;
+}
+span.logtags span.tagtag {
+  background-color: #ffffaa;
+  border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
+}
+span.logtags span.branchtag {
+  background-color: #aaffaa;
+  border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
+}
+span.logtags span.inbranchtag {
+  background-color: #d5dde6;
+  border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
+}
+
+div.diff pre {
+  margin: 10px 0 0 0;
+}
+div.diff pre span {
+  font-family: monospace;
+  white-space: pre;
+  font-size: 1.2em;
+  padding: 3px 0;
+}
+td.source {
+  white-space: pre;
+  font-family: monospace;
+  margin: 10px 30px 0;
+  font-size: 1.2em;
+  font-family: monospace;
+}
+  div.source div.parity0,
+  div.source div.parity1 {
+    padding: 1px;
+    font-size: 1.2em;
+  }
+  div.source div.parity0 {
+    background: #F1F6F7;
+  }
+  div.source div.parity1 {
+    background: #FFFFFF;
+  }
+div.parity0:hover,
+div.parity1:hover {
+  background: #D5E1E6;
+}
+.linenr {
+  color: #999;
+  text-align: right;
+}
+.lineno {
+  text-align: right;
+}
+.lineno a {
+  color: #999;
+}
+td.linenr {
+  width: 60px;
+}
+
+div#powered-by {
+  position: absolute;
+  width: 75px;
+  top: 15px;
+  right: 20px;
+  font-size: 1.2em;
+}
+div#powered-by a {
+  color: #EEE;
+  text-decoration: none;
+}
+div#powered-by a:hover {
+  text-decoration: underline;
+}
+/*
+div#monoblue-corner-top-left {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 10px;
+  height: 10px;
+  background: url(./monoblue-corner.png) top left no-repeat !important;
+  background: none;
+}
+div#monoblue-corner-top-right {
+  position: absolute;
+  top: 0;
+  right: 0;
+  width: 10px;
+  height: 10px;
+  background: url(./monoblue-corner.png) top right no-repeat !important;
+  background: none;
+}
+div#monoblue-corner-bottom-left {
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  width: 10px;
+  height: 10px;
+  background: url(./monoblue-corner.png) bottom left no-repeat !important;
+  background: none;
+}
+div#monoblue-corner-bottom-right {
+  position: absolute;
+  bottom: 0;
+  right: 0;
+  width: 10px;
+  height: 10px;
+  background: url(./monoblue-corner.png) bottom right no-repeat !important;
+  background: none;
+}
+*/
+/** end of common settings **/
+
+/** summary **/
+dl.overview {
+  margin: 0 0 0 30px;
+  font-size: 1.1em;
+  overflow: hidden;
+}
+  dl.overview dt,
+  dl.overview dd {
+    margin: 5px 0;
+    float: left;
+  }
+  dl.overview dt {
+    clear: left;
+    font-weight: bold;
+    width: 150px;
+  }
+/** end of summary **/
+
+/** chagelog **/
+h3.changelog {
+  margin: 20px 0 5px 30px;
+  padding: 0 0 2px;
+  font-size: 1.4em;
+  border-bottom: dotted 1px #D5E1E6;
+}
+ul.changelog-entry {
+  margin: 0 0 10px 30px;
+  list-style-type: none;
+  position: relative;
+}
+ul.changelog-entry li span.revdate {
+  font-size: 1.1em;
+}
+ul.changelog-entry li.age {
+  position: absolute;
+  top: -25px;
+  right: 10px;
+  font-size: 1.4em;
+  color: #CCC;
+  font-weight: bold;
+  font-style: italic;
+}
+ul.changelog-entry li span.name {
+  font-size: 1.2em;
+  font-weight: bold;
+}
+ul.changelog-entry li.description {
+  margin: 10px 0 0;
+  font-size: 1.1em;
+}
+/** end of changelog **/
+
+/** file **/
+p.files {
+  margin: 0 0 0 20px;
+  font-size: 2.0em;
+  font-weight: bold;
+}
+/** end of file **/
+
+/** changeset **/
+h3.changeset {
+  margin: 20px 0 5px 20px;
+  padding: 0 0 2px;
+  font-size: 1.6em;
+  border-bottom: dotted 1px #D5E1E6;
+}
+p.changeset-age {
+  position: relative;
+}
+p.changeset-age span {
+  position: absolute;
+  top: -25px;
+  right: 10px;
+  font-size: 1.4em;
+  color: #CCC;
+  font-weight: bold;
+  font-style: italic;
+}
+p.description {
+  margin: 10px 30px 0 30px;
+  padding: 10px;
+  border: solid 1px #CCC;
+  font-size: 1.2em;
+}
+/** end of changeset **/
+
+/** canvas **/
+div#wrapper {
+	position: relative;
+    font-size: 1.2em;
+}
+
+canvas {
+	position: absolute;
+	z-index: 5;
+	top: -0.7em;
+}
+
+ul#nodebgs li.parity0 {
+    background: #F1F6F7;
+}
+
+ul#nodebgs li.parity1 {
+    background: #FFFFFF;
+}
+
+ul#graphnodes {
+	position: absolute;
+	z-index: 10;
+	top: 7px;
+	list-style: none inside none;
+}
+
+ul#nodebgs {
+	list-style: none inside none;
+}
+
+ul#graphnodes li, ul#nodebgs li {
+	height: 39px;
+}
+
+ul#graphnodes li .info {
+	display: block;
+	position: relative;
+}
+/** end of canvas **/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/static/style-paper.css	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,254 @@
+body {
+  margin: 0;
+  padding: 0;
+  background: white;
+  font-family: sans-serif;
+}
+
+.container {
+  padding-left: 115px;
+}
+
+.main {
+  position: relative;
+  background: white;
+  padding: 2em 2em 2em 0;
+}
+
+#.main {
+  width: 98%;
+}
+
+.overflow {
+  width: 100%;
+  overflow: auto;
+}
+
+.menu {
+  width: 90px;
+  margin: 0;
+  font-size: 80%;
+  text-align: left;
+  position: absolute;
+  top: 20px;
+  left: 20px;
+  right: auto;
+}
+
+.menu ul {
+  list-style: none;
+  padding: 0;
+  margin: 10px 0 0 0;
+  border-left: 2px solid #999;
+}
+
+.menu li {
+  margin-bottom: 3px;
+  padding: 2px 4px;
+  background: white;
+  color: black;
+  font-weight: normal;
+}
+
+.menu li.active {
+  font-weight: bold;
+}
+
+.menu img {
+  width: 75px;
+  height: 90px;
+  border: 0;
+}
+
+.menu a { color: black; display: block; }
+
+.search {
+  position: absolute;
+  top: .7em;
+  right: 2em;
+}
+
+form.search div#hint {
+  display: none;
+  position: absolute;
+  top: 40px;
+  right: 0px;
+  width: 190px;
+  padding: 5px;
+  background: #ffc;
+  font-size: 70%;
+  border: 1px solid yellow;
+  -moz-border-radius: 5px; /* this works only in camino/firefox */
+  -webkit-border-radius: 5px; /* this is just for Safari */
+}
+
+form.search:hover div#hint { display: block; }
+
+a { text-decoration:none; }
+.age { white-space:nowrap; }
+.date { white-space:nowrap; }
+.indexlinks { white-space:nowrap; }
+.parity0 { background-color: #f0f0f0; }
+.parity1 { background-color: white; }
+.plusline { color: green; }
+.minusline { color: #dc143c; } /* crimson */
+.atline { color: purple; }
+
+.navigate {
+  text-align: right;
+  font-size: 60%;
+  margin: 1em 0;
+}
+
+.tag {
+  color: #999;
+  font-size: 70%;
+  font-weight: normal;
+  margin-left: .5em;
+  vertical-align: baseline;
+}
+
+.branchhead {
+  color: #000;
+  font-size: 80%;
+  font-weight: normal;
+  margin-left: .5em;
+  vertical-align: baseline;
+}
+
+ul#graphnodes .branchhead {
+  font-size: 75%;
+}
+
+.branchname {
+  color: #000;
+  font-size: 60%; 
+  font-weight: normal;
+  margin-left: .5em;
+  vertical-align: baseline;
+}
+
+h3 .branchname {
+  font-size: 80%;
+}
+
+/* Common */
+pre { margin: 0; }
+
+h2 { font-size: 120%; border-bottom: 1px solid #999; }
+h2 a { color: #000; }
+h3 {
+  margin-top: -.7em;
+  font-size: 100%;
+}
+
+/* log and tags tables */
+.bigtable {
+  border-bottom: 1px solid #999;
+  border-collapse: collapse;
+  font-size: 90%;
+  width: 100%;
+  font-weight: normal;
+  text-align: left;
+}
+
+.bigtable td {
+  vertical-align: top;
+}
+
+.bigtable th {
+  padding: 1px 4px;
+  border-bottom: 1px solid #999;
+}
+.bigtable tr { border: none; }
+.bigtable .age { width: 7em; }
+.bigtable .author { width: 12em; }
+.bigtable .description { }
+.bigtable .node { width: 5em; font-family: monospace;}
+.bigtable .permissions { width: 8em; text-align: left;}
+.bigtable .size { width: 5em; text-align: right; }
+.bigtable .annotate { text-align: right; }
+.bigtable td.annotate { font-size: smaller; }
+.bigtable td.source { font-size: inherit; }
+
+.source, .sourcefirst, .sourcelast {
+  font-family: monospace;
+  white-space: pre;
+  padding: 1px 4px;
+  font-size: 90%;
+}
+.sourcefirst { border-bottom: 1px solid #999; font-weight: bold; }
+.sourcelast { border-top: 1px solid #999; }
+.source a { color: #999; font-size: smaller; font-family: monospace;}
+.bottomline { border-bottom: 1px solid #999; }
+
+.fileline { font-family: monospace; }
+.fileline img { border: 0; }
+
+.tagEntry .closed { color: #99f; }
+
+/* Changeset entry */
+#changesetEntry {
+  border-collapse: collapse;
+  font-size: 90%;
+  width: 100%;
+  margin-bottom: 1em;
+}
+
+#changesetEntry th {
+  padding: 1px 4px;
+  width: 4em;
+  text-align: right;
+  font-weight: normal;
+  color: #999;
+  margin-right: .5em;
+  vertical-align: top;
+}
+
+div.description {
+  border-left: 2px solid #999;
+  margin: 1em 0 1em 0;
+  padding: .3em;
+}
+
+/* Graph */
+div#wrapper {
+	position: relative;
+	border-top: 1px solid black;
+	border-bottom: 1px solid black;
+	margin: 0;
+	padding: 0;
+}
+
+canvas {
+	position: absolute;
+	z-index: 5;
+	top: -0.7em;
+	margin: 0;
+}
+
+ul#graphnodes {
+	position: absolute;
+	z-index: 10;
+	top: -1.0em;
+	list-style: none inside none;
+	padding: 0;
+}
+
+ul#nodebgs {
+	list-style: none inside none;
+	padding: 0;
+	margin: 0;
+	top: -0.7em;
+}
+
+ul#graphnodes li, ul#nodebgs li {
+	height: 39px;
+}
+
+ul#graphnodes li .info {
+	display: block;
+	font-size: 70%;
+	position: relative;
+	top: -3px;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/static/style.css	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,105 @@
+a { text-decoration:none; }
+.age { white-space:nowrap; }
+.date { white-space:nowrap; }
+.indexlinks { white-space:nowrap; }
+.parity0 { background-color: #ddd; }
+.parity1 { background-color: #eee; }
+.lineno { width: 60px; color: #aaa; font-size: smaller;
+          text-align: right; }
+.plusline { color: green; }
+.minusline { color: red; }
+.atline { color: purple; }
+.annotate { font-size: smaller; text-align: right; padding-right: 1em; }
+.buttons a {
+  background-color: #666;
+  padding: 2pt;
+  color: white;
+  font-family: sans;
+  font-weight: bold;
+}
+.navigate a {
+  background-color: #ccc;
+  padding: 2pt;
+  font-family: sans;
+  color: black;
+}
+
+.metatag {
+  background-color: #888;
+  color: white;
+  text-align: right;
+}
+
+/* Common */
+pre { margin: 0; }
+
+.logo {
+  float: right;
+  clear: right;
+}
+
+/* Changelog/Filelog entries */
+.logEntry { width: 100%; }
+.logEntry .age { width: 15%; }
+.logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
+.logEntry th.age, .logEntry th.firstline { font-weight: bold; }
+.logEntry th.firstline { text-align: left; width: inherit; }
+
+/* Shortlog entries */
+.slogEntry { width: 100%; }
+.slogEntry .age { width: 8em; }
+.slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
+.slogEntry td.author { width: 15em; }
+
+/* Tag entries */
+#tagEntries { list-style: none; margin: 0; padding: 0; }
+#tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
+
+/* Changeset entry */
+#changesetEntry { }
+#changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
+#changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
+
+/* File diff view */
+#filediffEntry { }
+#filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
+
+/* Graph */
+div#wrapper {
+	position: relative;
+	margin: 0;
+	padding: 0;
+}
+
+canvas {
+	position: absolute;
+	z-index: 5;
+	top: -0.6em;
+	margin: 0;
+}
+
+ul#nodebgs {
+	list-style: none inside none;
+	padding: 0;
+	margin: 0;
+	top: -0.7em;
+}
+
+ul#graphnodes li, ul#nodebgs li {
+	height: 39px;
+}
+
+ul#graphnodes {
+	position: absolute;
+	z-index: 10;
+	top: -0.85em;
+	list-style: none inside none;
+	padding: 0;
+}
+
+ul#graphnodes li .info {
+	display: block;
+	font-size: 70%;
+	position: relative;
+	top: -1px;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/templates/template-vars.txt	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,37 @@
+repo          the name of the repo
+rev           a changeset.manifest revision
+node          a changeset node
+changesets    total number of changesets
+file          a filename
+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
+date          a date string
+age           age in hours, days, etc
+line          a line of text (escaped)
+desc          a description (escaped, with breaks)
+shortdesc     a short description (escaped)
+author        a name or email addressv(obfuscated)
+parent        a list of the parent
+child         a list of the children
+tags          a list of tag
+
+header        the global page header
+footer        the global page footer
+
+files         a list of file links
+file_copies   a list of pairs of name, source filenames
+dirs          a set of directory links
+diff          a diff of one or more files
+annotate      an annotated file
+entries       the entries relevant to the page
+
+Templates and commands:
+  changelog(rev) - a page for browsing changesets
+    naventry - a link for jumping to a changeset number
+    filenodelink - jump to file diff
+    fileellipses - printed after maxfiles
+    changelogentry - an entry in the log
+  manifest - browse a manifest as a directory tree
--- a/mercurial/transaction.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/transaction.py	Sat Feb 13 23:50:38 2010 -0600
@@ -73,8 +73,8 @@
 
     @active
     def add(self, file, offset, data=None):
-        if file in self.map: return
-
+        if file in self.map:
+            return
         if self._queue:
             self._queue[-1].append((file, offset, data))
             return
@@ -147,7 +147,8 @@
             self.report(_("transaction abort!\n"))
 
             try:
-                _playback(self.journal, self.report, self.opener, self.entries, False)
+                _playback(self.journal, self.report, self.opener,
+                          self.entries, False)
                 self.report(_("rollback completed\n"))
             except:
                 self.report(_("rollback failed - please run hg recover\n"))
--- a/mercurial/ui.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/ui.py	Sat Feb 13 23:50:38 2010 -0600
@@ -29,8 +29,11 @@
             self._ocfg = src._ocfg.copy()
             self._trustusers = src._trustusers.copy()
             self._trustgroups = src._trustgroups.copy()
+            self.environ = src.environ
             self.fixconfig()
         else:
+            # shared read-only environment
+            self.environ = os.environ
             # we always trust global config files
             for f in util.rcpath():
                 self.readconfig(f, trust=True)
@@ -76,6 +79,14 @@
                 raise
             self.warn(_("Ignored: %s\n") % str(inst))
 
+        if self.plain():
+            for k in ('debug', 'fallbackencoding', 'quiet', 'traceback',
+                      'verbose'):
+                if k in cfg['ui']:
+                    del cfg['ui'][k]
+            for k, v in cfg.items('defaults'):
+                del cfg['defaults'][k]
+
         if trusted:
             self._tcfg.update(cfg)
             self._tcfg.update(self._ocfg)
@@ -166,6 +177,9 @@
             for name, value in self.configitems(section, untrusted):
                 yield section, name, str(value).replace('\n', '\\n')
 
+    def plain(self):
+        return 'HGPLAIN' in os.environ
+
     def username(self):
         """Return default username to be used in commits.
 
@@ -195,7 +209,8 @@
 
     def shortuser(self, user):
         """Return a short representation of a user name or email address."""
-        if not self.verbose: user = util.shortuser(user)
+        if not self.verbose:
+            user = util.shortuser(user)
         return user
 
     def _path(self, loc):
@@ -233,12 +248,14 @@
 
     def write_err(self, *args):
         try:
-            if not sys.stdout.closed: sys.stdout.flush()
+            if not getattr(sys.stdout, 'closed', False):
+                sys.stdout.flush()
             for a in args:
                 sys.stderr.write(str(a))
             # stderr may be buffered under win32 when redirected to files,
             # including stdout.
-            if not sys.stderr.closed: sys.stderr.flush()
+            if not getattr(sys.stderr, 'closed', False):
+                sys.stderr.flush()
         except IOError, inst:
             if inst.errno != errno.EPIPE:
                 raise
@@ -252,7 +269,13 @@
     def interactive(self):
         i = self.configbool("ui", "interactive", None)
         if i is None:
-            return sys.stdin.isatty()
+            try:
+                return sys.stdin.isatty()
+            except AttributeError:
+                # some environments replace stdin without implementing isatty
+                # usually those are non-interactive
+                return False
+
         return i
 
     def _readline(self, prompt=''):
@@ -302,21 +325,24 @@
                 return resps.index(r.lower())
             self.write(_("unrecognized response\n"))
 
-
     def getpass(self, prompt=None, default=None):
-        if not self.interactive(): return default
+        if not self.interactive():
+            return default
         try:
             return getpass.getpass(prompt or _('password: '))
         except EOFError:
             raise util.Abort(_('response expected'))
     def status(self, *msg):
-        if not self.quiet: self.write(*msg)
+        if not self.quiet:
+            self.write(*msg)
     def warn(self, *msg):
         self.write_err(*msg)
     def note(self, *msg):
-        if self.verbose: self.write(*msg)
+        if self.verbose:
+            self.write(*msg)
     def debug(self, *msg):
-        if self.debugflag: self.write(*msg)
+        if self.debugflag:
+            self.write(*msg)
     def edit(self, text, user):
         (fd, name) = tempfile.mkstemp(prefix="hg-editor-", suffix=".txt",
                                       text=True)
@@ -368,8 +394,10 @@
         revision, bytes, etc.), unit is a corresponding unit label,
         and total is the highest expected pos.
 
-        Multiple nested topics may be active at a time. All topics
-        should be marked closed by setting pos to None at termination.
+        Multiple nested topics may be active at a time.
+
+        All topics should be marked closed by setting pos to None at
+        termination.
         '''
 
         if pos == None or not self.debugflag:
--- a/mercurial/url.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/url.py	Sat Feb 13 23:50:38 2010 -0600
@@ -30,18 +30,18 @@
     if a == -1:
         user, passwd = None, None
     else:
-        userpass, netloc = netloc[:a], netloc[a+1:]
+        userpass, netloc = netloc[:a], netloc[a + 1:]
         c = userpass.find(':')
         if c == -1:
             user, passwd = urllib.unquote(userpass), None
         else:
             user = urllib.unquote(userpass[:c])
-            passwd = urllib.unquote(userpass[c+1:])
+            passwd = urllib.unquote(userpass[c + 1:])
     c = netloc.find(':')
     if c == -1:
         host, port = netloc, None
     else:
-        host, port = netloc[:c], netloc[c+1:]
+        host, port = netloc[:c], netloc[c + 1:]
     return host, port, user, passwd
 
 def netlocunsplit(host, port, user=None, passwd=None):
@@ -89,7 +89,8 @@
     l = list(path)
     for i in xrange(len(l)):
         c = l[i]
-        if c == '%' and i + 2 < len(l) and (l[i+1] in _hex and l[i+2] in _hex):
+        if (c == '%' and i + 2 < len(l) and
+            l[i + 1] in _hex and l[i + 2] in _hex):
             pass
         elif c not in _safeset:
             l[i] = '%%%02X' % ord(c)
@@ -148,7 +149,8 @@
         bestauth = None
         for auth in config.itervalues():
             prefix = auth.get('prefix')
-            if not prefix: continue
+            if not prefix:
+                continue
             p = prefix.split('://', 1)
             if len(p) > 1:
                 schemes, prefix = [p[0]], p[1]
@@ -180,7 +182,7 @@
                 proxypasswd = ui.config("http_proxy", "passwd")
 
             # see if we should use a proxy for this url
-            no_list = [ "localhost", "127.0.0.1" ]
+            no_list = ["localhost", "127.0.0.1"]
             no_list.extend([p.lower() for
                             p in ui.configlist("http_proxy", "no")])
             no_list.extend([p.strip().lower() for
@@ -253,17 +255,54 @@
         # avoid using deprecated/broken FakeSocket in python 2.6
         import ssl
         _ssl_wrap_socket = ssl.wrap_socket
+        CERT_REQUIRED = ssl.CERT_REQUIRED
     except ImportError:
-        def _ssl_wrap_socket(sock, key_file, cert_file):
+        CERT_REQUIRED = 2
+
+        def _ssl_wrap_socket(sock, key_file, cert_file,
+                             cert_reqs=CERT_REQUIRED, ca_certs=None):
+            if ca_certs:
+                raise util.Abort(_(
+                    'certificate checking requires Python 2.6'))
+
             ssl = socket.ssl(sock, key_file, cert_file)
             return httplib.FakeSocket(sock, ssl)
 
+        _GLOBAL_DEFAULT_TIMEOUT = object()
+
+    try:
+        _create_connection = socket.create_connection
+    except AttributeError:
+        def _create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
+                               source_address=None):
+            # lifted from Python 2.6
+
+            msg = "getaddrinfo returns an empty list"
+            host, port = address
+            for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
+                af, socktype, proto, canonname, sa = res
+                sock = None
+                try:
+                    sock = socket.socket(af, socktype, proto)
+                    if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
+                        sock.settimeout(timeout)
+                    if source_address:
+                        sock.bind(source_address)
+                    sock.connect(sa)
+                    return sock
+
+                except socket.error, msg:
+                    if sock is not None:
+                        sock.close()
+
+            raise socket.error, msg
+
 class httpconnection(keepalive.HTTPConnection):
     # must be able to send big bundle as stream.
     send = _gen_sendfile(keepalive.HTTPConnection)
 
     def connect(self):
-        if has_https and self.realhost: # use CONNECT proxy
+        if has_https and self.realhostport: # use CONNECT proxy
             self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             self.sock.connect((self.host, self.port))
             if _generic_proxytunnel(self):
@@ -296,21 +335,16 @@
     if new_tunnel or tunnel_host == req.get_full_url(): # has proxy
         urlparts = urlparse.urlparse(tunnel_host)
         if new_tunnel or urlparts[0] == 'https': # only use CONNECT for HTTPS
-            if ':' in urlparts[1]:
-                realhost, realport = urlparts[1].split(':')
-                realport = int(realport)
-            else:
-                realhost = urlparts[1]
-                realport = 443
+            realhostport = urlparts[1]
+            if realhostport[-1] == ']' or ':' not in realhostport:
+                realhostport += ':443'
 
-            h.realhost = realhost
-            h.realport = realport
+            h.realhostport = realhostport
             h.headers = req.headers.copy()
             h.headers.update(handler.parent.addheaders)
             return
 
-    h.realhost = None
-    h.realport = None
+    h.realhostport = None
     h.headers = None
 
 def _generic_proxytunnel(self):
@@ -318,7 +352,7 @@
             [(x, self.headers[x]) for x in self.headers
              if x.lower().startswith('proxy-')])
     self._set_hostport(self.host, self.port)
-    self.send('CONNECT %s:%d HTTP/1.0\r\n' % (self.realhost, self.realport))
+    self.send('CONNECT %s HTTP/1.0\r\n' % self.realhostport)
     for header in proxyheaders.iteritems():
         self.send('%s: %s\r\n' % header)
     self.send('\r\n')
@@ -425,6 +459,21 @@
     class BetterHTTPS(httplib.HTTPSConnection):
         send = keepalive.safesend
 
+        def connect(self):
+            if hasattr(self, 'ui'):
+                cacerts = self.ui.config('web', 'cacerts')
+            else:
+                cacerts = None
+
+            if cacerts:
+                sock = _create_connection((self.host, self.port))
+                self.sock = _ssl_wrap_socket(sock, self.key_file,
+                        self.cert_file, cert_reqs=CERT_REQUIRED,
+                        ca_certs=cacerts)
+                self.ui.debug(_('server identity verification succeeded\n'))
+            else:
+                httplib.HTTPSConnection.connect(self)
+
     class httpsconnection(BetterHTTPS):
         response_class = keepalive.HTTPResponse
         # must be able to send big bundle as stream.
@@ -432,11 +481,12 @@
         getresponse = keepalive.wrapgetresponse(httplib.HTTPSConnection)
 
         def connect(self):
-            if self.realhost: # use CONNECT proxy
+            if self.realhostport: # use CONNECT proxy
                 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                 self.sock.connect((self.host, self.port))
                 if _generic_proxytunnel(self):
-                    self.sock = _ssl_wrap_socket(self.sock, self.cert_file, self.key_file)
+                    self.sock = _ssl_wrap_socket(self.sock, self.cert_file,
+                                                 self.key_file)
             else:
                 BetterHTTPS.connect(self)
 
@@ -455,7 +505,7 @@
             self.auth = self.pwmgr.readauthtoken(req.get_full_url())
             return self.do_open(self._makeconnection, req)
 
-        def _makeconnection(self, host, port=443, *args, **kwargs):
+        def _makeconnection(self, host, port=None, *args, **kwargs):
             keyfile = None
             certfile = None
 
@@ -470,14 +520,9 @@
                 keyfile = self.auth['key']
                 certfile = self.auth['cert']
 
-            # let host port take precedence
-            if ':' in host and '[' not in host or ']:' in host:
-                host, port = host.rsplit(':', 1)
-                port = int(port)
-                if '[' in host:
-                    host = host[1:-1]
-
-            return httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
+            conn = httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
+            conn.ui = self.ui
+            return conn
 
 # In python < 2.5 AbstractDigestAuthHandler raises a ValueError if
 # it doesn't know about the auth type requested.  This can happen if
--- a/mercurial/util.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/util.py	Sat Feb 13 23:50:38 2010 -0600
@@ -16,7 +16,7 @@
 from i18n import _
 import error, osutil, encoding
 import cStringIO, errno, re, shutil, sys, tempfile, traceback
-import os, stat, time, calendar, textwrap
+import os, stat, time, calendar, textwrap, signal
 import imp
 
 # Python compatibility
@@ -38,19 +38,25 @@
 
 import subprocess
 closefds = os.name == 'posix'
-def popen2(cmd):
+
+def popen2(cmd, env=None, newlines=False):
     # Setting bufsize to -1 lets the system decide the buffer size.
     # The default for bufsize is 0, meaning unbuffered. This leads to
     # poor performance on Mac OS X: http://bugs.python.org/issue4194
     p = subprocess.Popen(cmd, shell=True, bufsize=-1,
                          close_fds=closefds,
-                         stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+                         stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+                         universal_newlines=newlines,
+                         env=env)
     return p.stdin, p.stdout
-def popen3(cmd):
+
+def popen3(cmd, env=None, newlines=False):
     p = subprocess.Popen(cmd, shell=True, bufsize=-1,
                          close_fds=closefds,
                          stdin=subprocess.PIPE, stdout=subprocess.PIPE,
-                         stderr=subprocess.PIPE)
+                         stderr=subprocess.PIPE,
+                         universal_newlines=newlines,
+                         env=env)
     return p.stdin, p.stdout, p.stderr
 
 def version():
@@ -176,16 +182,21 @@
         code = os.system(cmd)
         if sys.platform == 'OpenVMS' and code & 1:
             code = 0
-        if code: raise Abort(_("command '%s' failed: %s") %
-                             (cmd, explain_exit(code)))
+        if code:
+            raise Abort(_("command '%s' failed: %s") %
+                        (cmd, explain_exit(code)))
         return open(outname, 'rb').read()
     finally:
         try:
-            if inname: os.unlink(inname)
-        except: pass
+            if inname:
+                os.unlink(inname)
+        except:
+            pass
         try:
-            if outname: os.unlink(outname)
-        except: pass
+            if outname:
+                os.unlink(outname)
+        except:
+            pass
 
 filtertable = {
     'tempfile:': tempfilter,
@@ -236,8 +247,11 @@
 
 Abort = error.Abort
 
-def always(fn): return True
-def never(fn): return False
+def always(fn):
+    return True
+
+def never(fn):
+    return False
 
 def pathto(root, n1, n2):
     '''return the relative path from one place to another.
@@ -250,7 +264,8 @@
     relative to root.
     n2 should always be relative to root.
     '''
-    if not n1: return localpath(n2)
+    if not n1:
+        return localpath(n2)
     if os.path.isabs(n1):
         if os.path.splitdrive(root)[0] != os.path.splitdrive(n1)[0]:
             return os.path.join(root, localpath(n2))
@@ -523,6 +538,14 @@
 def lookup_reg(key, name=None, scope=None):
     return None
 
+def hidewindow():
+    """Hide current shell window.
+
+    Used to hide the window opened when starting asynchronous
+    child process under Windows, unneeded on other systems.
+    """
+    pass
+
 if os.name == 'nt':
     from windows import *
 else:
@@ -898,11 +921,15 @@
     assert size >= 0
     assert limit is None or limit >= 0
     while True:
-        if limit is None: nbytes = size
-        else: nbytes = min(limit, size)
+        if limit is None:
+            nbytes = size
+        else:
+            nbytes = min(limit, size)
         s = nbytes and f.read(nbytes)
-        if not s: break
-        if limit: limit -= len(s)
+        if not s:
+            break
+        if limit:
+            limit -= len(s)
         yield s
 
 def makedate():
@@ -1070,7 +1097,7 @@
         user = user[:f]
     f = user.find('<')
     if f >= 0:
-        user = user[f+1:]
+        user = user[f + 1:]
     f = user.find(' ')
     if f >= 0:
         user = user[:f]
@@ -1082,15 +1109,16 @@
 def email(author):
     '''get email of author.'''
     r = author.find('>')
-    if r == -1: r = None
-    return author[author.find('<')+1:r]
+    if r == -1:
+        r = None
+    return author[author.find('<') + 1:r]
 
 def ellipsis(text, maxlength=400):
     """Trim string to at most maxlength (default: 400) characters."""
     if len(text) <= maxlength:
         return text
     else:
-        return "%s..." % (text[:maxlength-3])
+        return "%s..." % (text[:maxlength - 3])
 
 def walkrepos(path, followsym=False, seen_dirs=None, recurse=False):
     '''yield every hg repository under path, recursively.'''
@@ -1159,7 +1187,8 @@
         if 'HGRCPATH' in os.environ:
             _rcpath = []
             for p in os.environ['HGRCPATH'].split(os.pathsep):
-                if not p: continue
+                if not p:
+                    continue
                 p = expandpath(p)
                 if os.path.isdir(p):
                     for f, kind in osutil.listdir(p):
@@ -1175,15 +1204,15 @@
     '''return byte count formatted as readable string, with units'''
 
     units = (
-        (100, 1<<30, _('%.0f GB')),
-        (10, 1<<30, _('%.1f GB')),
-        (1, 1<<30, _('%.2f GB')),
-        (100, 1<<20, _('%.0f MB')),
-        (10, 1<<20, _('%.1f MB')),
-        (1, 1<<20, _('%.2f MB')),
-        (100, 1<<10, _('%.0f KB')),
-        (10, 1<<10, _('%.1f KB')),
-        (1, 1<<10, _('%.2f KB')),
+        (100, 1 << 30, _('%.0f GB')),
+        (10, 1 << 30, _('%.1f GB')),
+        (1, 1 << 30, _('%.2f GB')),
+        (100, 1 << 20, _('%.0f MB')),
+        (10, 1 << 20, _('%.1f MB')),
+        (1, 1 << 20, _('%.2f MB')),
+        (100, 1 << 10, _('%.0f KB')),
+        (10, 1 << 10, _('%.1f KB')),
+        (1, 1 << 10, _('%.2f KB')),
         (1, 1, _('%.0f bytes')),
         )
 
@@ -1205,7 +1234,7 @@
                 # root. On POSIX they are rooted at the file system root.
                 if os.name == 'nt':
                     droot = os.path.splitdrive(os.getcwd())[0] + '/'
-                    path = os.path.join(droot, path[i+1:])
+                    path = os.path.join(droot, path[i + 1:])
                 else:
                     path = path[i:]
             else:
@@ -1268,3 +1297,60 @@
 
 def expandpath(path):
     return os.path.expanduser(os.path.expandvars(path))
+
+def hgcmd():
+    """Return the command used to execute current hg
+
+    This is different from hgexecutable() because on Windows we want
+    to avoid things opening new shell windows like batch files, so we
+    get either the python call or current executable.
+    """
+    if main_is_frozen():
+        return [sys.executable]
+    return gethgcmd()
+
+def rundetached(args, condfn):
+    """Execute the argument list in a detached process.
+
+    condfn is a callable which is called repeatedly and should return
+    True once the child process is known to have started successfully.
+    At this point, the child process PID is returned. If the child
+    process fails to start or finishes before condfn() evaluates to
+    True, return -1.
+    """
+    # Windows case is easier because the child process is either
+    # successfully starting and validating the condition or exiting
+    # on failure. We just poll on its PID. On Unix, if the child
+    # process fails to start, it will be left in a zombie state until
+    # the parent wait on it, which we cannot do since we expect a long
+    # running process on success. Instead we listen for SIGCHLD telling
+    # us our child process terminated.
+    terminated = set()
+    def handler(signum, frame):
+        terminated.add(os.wait())
+    prevhandler = None
+    if hasattr(signal, 'SIGCHLD'):
+        prevhandler = signal.signal(signal.SIGCHLD, handler)
+    try:
+        pid = spawndetached(args)
+        while not condfn():
+            if ((pid in terminated or not testpid(pid))
+                and not condfn()):
+                return -1
+            time.sleep(0.1)
+        return pid
+    finally:
+        if prevhandler is not None:
+            signal.signal(signal.SIGCHLD, prevhandler)
+
+def any(iterable):
+    for i in iterable:
+        if i:
+            return True
+    return False
+
+def all(iterable):
+    for i in iterable:
+        if not i:
+            return False
+    return True
--- a/mercurial/verify.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/verify.py	Sat Feb 13 23:50:38 2010 -0600
@@ -120,7 +120,9 @@
     ui.status(_("checking changesets\n"))
     seen = {}
     checklog(cl, "changelog", 0)
+    total = len(repo)
     for i in repo:
+        ui.progress('changelog', i, total=total)
         n = cl.node(i)
         checkentry(cl, i, n, seen, [i], "changelog")
 
@@ -131,11 +133,14 @@
                 filelinkrevs.setdefault(f, []).append(i)
         except Exception, inst:
             exc(i, _("unpacking changeset %s") % short(n), inst)
+    ui.progress('changelog', None)
 
     ui.status(_("checking manifests\n"))
     seen = {}
     checklog(mf, "manifest", 0)
+    total = len(mf)
     for i in mf:
+        ui.progress('manifests', i, total=total)
         n = mf.node(i)
         lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest")
         if n in mflinkrevs:
@@ -151,21 +156,31 @@
                     filenodes.setdefault(f, {}).setdefault(fn, lr)
         except Exception, inst:
             exc(lr, _("reading manifest delta %s") % short(n), inst)
+    ui.progress('manifests', None)
 
     ui.status(_("crosschecking files in changesets and manifests\n"))
 
+    total = len(mflinkrevs) + len(filelinkrevs) + len(filenodes)
+    count = 0
     if havemf:
-        for c,m in sorted([(c, m) for m in mflinkrevs for c in mflinkrevs[m]]):
+        for c, m in sorted([(c, m) for m in mflinkrevs
+                            for c in mflinkrevs[m]]):
+            count += 1
+            ui.progress('crosscheck', count, total=total)
             err(c, _("changeset refers to unknown manifest %s") % short(m))
         mflinkrevs = None # del is bad here due to scope issues
 
         for f in sorted(filelinkrevs):
+            count += 1
+            ui.progress('crosscheck', count, total=total)
             if f not in filenodes:
                 lr = filelinkrevs[f][0]
                 err(lr, _("in changeset but not in manifest"), f)
 
     if havecl:
         for f in sorted(filenodes):
+            count += 1
+            ui.progress('crosscheck', count, total=total)
             if f not in filelinkrevs:
                 try:
                     fl = repo.file(f)
@@ -174,6 +189,8 @@
                     lr = None
                 err(lr, _("in manifest but not in changeset"), f)
 
+    ui.progress('crosscheck', None)
+
     ui.status(_("checking files\n"))
 
     storefiles = set()
@@ -184,7 +201,9 @@
             storefiles.add(f)
 
     files = sorted(set(filenodes) | set(filelinkrevs))
-    for f in files:
+    total = len(files)
+    for i, f in enumerate(files):
+        ui.progress('files', i, item=f, total=total)
         try:
             linkrevs = filelinkrevs[f]
         except KeyError:
@@ -259,9 +278,10 @@
 
         # cross-check
         if f in filenodes:
-            fns = [(lr, n) for n,lr in filenodes[f].iteritems()]
+            fns = [(lr, n) for n, lr in filenodes[f].iteritems()]
             for lr, node in sorted(fns):
                 err(lr, _("%s in manifests not found") % short(node), f)
+    ui.progress('files', None)
 
     for f in storefiles:
         warn(_("warning: orphan revlog '%s'") % f)
--- a/mercurial/win32.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/win32.py	Sat Feb 13 23:50:38 2010 -0600
@@ -16,7 +16,7 @@
 import win32api
 
 import errno, os, sys, pywintypes, win32con, win32file, win32process
-import winerror
+import winerror, win32gui
 import osutil, encoding
 from win32com.shell import shell, shellcon
 
@@ -131,6 +131,14 @@
     progrc = os.path.join(os.path.dirname(filename), 'mercurial.ini')
     if os.path.isfile(progrc):
         return [progrc]
+    # Use hgrc.d found in directory with hg.exe
+    progrcd = os.path.join(os.path.dirname(filename), 'hgrc.d')
+    if os.path.isdir(progrcd):
+        rcpath = []
+        for f, kind in osutil.listdir(progrcd):
+            if f.endswith('.rc'):
+                rcpath.append(os.path.join(progrcd, f))
+        return rcpath
     # else look for a system rcpath in the registry
     try:
         value = win32api.RegQueryValue(
@@ -172,3 +180,12 @@
         win32process.ExitProcess(1)
     win32api.SetConsoleCtrlHandler(handler)
 
+def hidewindow():
+    def callback(*args, **kwargs):
+        hwnd, pid = args
+        wpid = win32process.GetWindowThreadProcessId(hwnd)[1]
+        if pid == wpid:
+            win32gui.ShowWindow(hwnd, win32con.SW_HIDE)
+
+    pid =  win32process.GetCurrentProcessId()
+    win32gui.EnumWindows(callback, pid)
--- a/mercurial/windows.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/mercurial/windows.py	Sat Feb 13 23:50:38 2010 -0600
@@ -7,7 +7,7 @@
 
 from i18n import _
 import osutil, error
-import errno, msvcrt, os, re, sys, random
+import errno, msvcrt, os, re, sys, random, subprocess
 
 nulldev = 'NUL:'
 umask = 002
@@ -41,13 +41,14 @@
             limit = 16000
             l = len(s)
             start = 0
-            self.softspace = 0;
+            self.softspace = 0
             while start < l:
                 end = start + limit
                 self.fp.write(s[start:end])
                 start = end
         except IOError, inst:
-            if inst.errno != 0: raise
+            if inst.errno != 0:
+                raise
             self.close()
             raise IOError(errno.EPIPE, 'Broken pipe')
 
@@ -55,7 +56,8 @@
         try:
             return self.fp.flush()
         except IOError, inst:
-            if inst.errno != errno.EINVAL: raise
+            if inst.errno != errno.EINVAL:
+                raise
             self.close()
             raise IOError(errno.EPIPE, 'Broken pipe')
 
@@ -203,7 +205,7 @@
         executable = findexisting(os.path.join(path, command))
         if executable is not None:
             return executable
-    return None
+    return findexisting(os.path.expanduser(os.path.expandvars(command)))
 
 def set_signal_handler():
     try:
@@ -215,7 +217,6 @@
     '''Stat each file in files and yield stat or None if file does not exist.
     Cluster and cache stat per directory to minimize number of OS stat calls.'''
     ncase = os.path.normcase
-    sep   = os.sep
     dircache = {} # dirname -> filename -> status | None if file does not exist
     for nf in files:
         nf  = ncase(nf)
@@ -321,6 +322,40 @@
             pass
         os.rename(src, dst)
 
+def spawndetached(args):
+    # No standard library function really spawns a fully detached
+    # process under win32 because they allocate pipes or other objects
+    # to handle standard streams communications. Passing these objects
+    # to the child process requires handle inheritance to be enabled
+    # which makes really detached processes impossible.
+    class STARTUPINFO:
+        dwFlags = subprocess.STARTF_USESHOWWINDOW
+        hStdInput = None
+        hStdOutput = None
+        hStdError = None
+        wShowWindow = subprocess.SW_HIDE
+
+    args = subprocess.list2cmdline(args)
+    # Not running the command in shell mode makes python26 hang when
+    # writing to hgweb output socket.
+    comspec = os.environ.get("COMSPEC", "cmd.exe")
+    args = comspec + " /c " + args
+    hp, ht, pid, tid = subprocess.CreateProcess(
+        None, args,
+        # no special security
+        None, None,
+        # Do not inherit handles
+        0,
+        # DETACHED_PROCESS
+        0x00000008,
+        os.environ,
+        os.getcwd(),
+        STARTUPINFO())
+    return pid
+
+def gethgcmd():
+    return [sys.executable] + sys.argv[:1]
+
 try:
     # override functions with win32 versions if possible
     from win32 import *
--- a/setup.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/setup.py	Sat Feb 13 23:50:38 2010 -0600
@@ -37,14 +37,13 @@
 from distutils.spawn import spawn, find_executable
 from distutils.ccompiler import new_compiler
 
-extra = {}
 scripts = ['hg']
 if os.name == 'nt':
     scripts.append('contrib/win32/hg.bat')
 
 # simplified version of distutils.ccompiler.CCompiler.has_function
 # that actually removes its temporary files.
-def has_function(cc, funcname):
+def hasfunction(cc, funcname):
     tmpdir = tempfile.mkdtemp(prefix='hg-install-')
     devnull = oldstderr = None
     try:
@@ -77,6 +76,7 @@
 # py2exe needs to be installed to work
 try:
     import py2exe
+    py2exeloaded = True
 
     # Help py2exe to find win32com.shell
     try:
@@ -92,9 +92,8 @@
     except ImportError:
         pass
 
-    extra['console'] = ['hg']
-
 except ImportError:
+    py2exeloaded = False
     pass
 
 def runcmd(cmd, env):
@@ -167,13 +166,7 @@
 except ImportError:
     version = 'unknown'
 
-class install_package_data(install_data):
-    def finalize_options(self):
-        self.set_undefined_options('install',
-                                   ('install_lib', 'install_dir'))
-        install_data.finalize_options(self)
-
-class build_mo(build):
+class hgbuildmo(build):
 
     description = "build translations (.mo files)"
 
@@ -195,22 +188,23 @@
             pofile = join(podir, po)
             modir = join('locale', po[:-3], 'LC_MESSAGES')
             mofile = join(modir, 'hg.mo')
-            cmd = ['msgfmt', '-v', '-o', mofile, pofile]
+            mobuildfile = join('mercurial', mofile)
+            cmd = ['msgfmt', '-v', '-o', mobuildfile, pofile]
             if sys.platform != 'sunos5':
                 # msgfmt on Solaris does not know about -c
                 cmd.append('-c')
-            self.mkpath(modir)
-            self.make_file([pofile], mofile, spawn, (cmd,))
-            self.distribution.data_files.append((join('mercurial', modir),
-                                                 [mofile]))
+            self.mkpath(join('mercurial', modir))
+            self.make_file([pofile], mobuildfile, spawn, (cmd,))
 
-build.sub_commands.append(('build_mo', None))
+# Insert hgbuildmo first so that files in mercurial/locale/ are found
+# when build_py is run next.
+build.sub_commands.insert(0, ('build_mo', None))
 
 Distribution.pure = 0
 Distribution.global_options.append(('pure', None, "use pure (slow) Python "
                                     "code instead of C extensions"))
 
-class hg_build_py(build_py):
+class hgbuildpy(build_py):
 
     def finalize_options(self):
         build_py.finalize_options(self)
@@ -232,11 +226,10 @@
             else:
                 yield module
 
-cmdclass = {'install_data': install_package_data,
-            'build_mo': build_mo,
-            'build_py': hg_build_py}
+cmdclass = {'build_mo': hgbuildmo,
+            'build_py': hgbuildpy}
 
-ext_modules=[
+extmodules = [
     Extension('mercurial.base85', ['mercurial/base85.c']),
     Extension('mercurial.bdiff', ['mercurial/bdiff.c']),
     Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c']),
@@ -246,27 +239,48 @@
     ]
 
 packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert',
-            'hgext.highlight', 'hgext.zeroconf', ]
+            'hgext.highlight', 'hgext.zeroconf']
 
 if sys.platform == 'linux2' and os.uname()[2] > '2.6':
     # The inotify extension is only usable with Linux 2.6 kernels.
     # You also need a reasonably recent C library.
     cc = new_compiler()
-    if has_function(cc, 'inotify_add_watch'):
-        ext_modules.append(Extension('hgext.inotify.linux._inotify',
+    if hasfunction(cc, 'inotify_add_watch'):
+        extmodules.append(Extension('hgext.inotify.linux._inotify',
                                      ['hgext/inotify/linux/_inotify.c']))
         packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
 
+packagedata = {'mercurial': ['locale/*/LC_MESSAGES/hg.mo',
+                             'help/*.txt']}
+
+def ordinarypath(p):
+    return p and p[0] != '.' and p[-1] != '~'
+
+for root in ('templates',):
+    for curdir, dirs, files in os.walk(os.path.join('mercurial', root)):
+        curdir = curdir.split(os.sep, 1)[1]
+        dirs[:] = filter(ordinarypath, dirs)
+        for f in filter(ordinarypath, files):
+            f = os.path.join(curdir, f)
+            packagedata['mercurial'].append(f)
+
 datafiles = []
-for root in ('templates', 'i18n', 'help'):
-    for dir, dirs, files in os.walk(root):
-        dirs[:] = [x for x in dirs if not x.startswith('.')]
-        files = [x for x in files if not x.startswith('.')]
-        datafiles.append((os.path.join('mercurial', dir),
-                          [os.path.join(dir, file_) for file_ in files]))
+setupversion = version
+extra = {}
+
+if py2exeloaded:
+    extra['console'] = [
+        {'script':'hg',
+         'copyright':'Copyright (C) 2005-2010 Matt Mackall and others',
+         'product_version':version}]
+
+if os.name == 'nt':
+    # Windows binary file versions for exe/dll files must have the
+    # form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535
+    setupversion = version.split('+', 1)[0]
 
 setup(name='mercurial',
-      version=version,
+      version=setupversion,
       author='Matt Mackall',
       author_email='mpm@selenic.com',
       url='http://mercurial.selenic.com/',
@@ -274,8 +288,9 @@
       license='GNU GPLv2+',
       scripts=scripts,
       packages=packages,
-      ext_modules=ext_modules,
+      ext_modules=extmodules,
       data_files=datafiles,
+      package_data=packagedata,
       cmdclass=cmdclass,
       options=dict(py2exe=dict(packages=['hgext', 'email']),
                    bdist_mpkg=dict(zipdist=True,
--- a/templates/atom/changelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-{header}
- <!-- Changelog -->
- <id>{urlbase}{url}</id>
- <link rel="self" href="{urlbase}{url}atom-log"/>
- <link rel="alternate" href="{urlbase}{url}"/>
- <title>{repo|escape} Changelog</title>
- {latestentry%feedupdated}
-
-{entries%changelogentry}
-</feed>
--- a/templates/atom/changelogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
- <entry>
-  <title>{desc|strip|firstline|strip|escape|nonempty}</title>
-  <id>{urlbase}{url}#changeset-{node}</id>
-  <link href="{urlbase}{url}rev/{node|short}"/>
-  <author>
-   <name>{author|person|escape}</name>
-   <email>{author|email|obfuscate}</email>
-  </author>
-  <updated>{date|rfc3339date}</updated>
-  <published>{date|rfc3339date}</published>
-  <content type="xhtml">
-   <div xmlns="http://www.w3.org/1999/xhtml">
-    <pre xml:space="preserve">{desc|escape|nonempty}</pre>
-   </div>
-  </content>
- </entry>
--- a/templates/atom/error.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-{header}
- <!-- Error -->
- <id>{urlbase}{url}</id>
- <link rel="self" href="{urlbase}{url}atom-log"/>
- <link rel="alternate" href="{urlbase}{url}"/>
- <title>Error</title>
- <updated>1970-01-01T00:00:00+00:00</updated>
- <entry>
-  <title>Error</title>
-  <id>http://mercurial.selenic.com/#error</id>
-  <author>
-    <name>mercurial</name>
-  </author>
-  <updated>1970-01-01T00:00:00+00:00</updated>
-  <content type="text">{error|escape}</content>
- </entry>
-</feed>
--- a/templates/atom/filelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-{header}
- <id>{urlbase}{url}atom-log/tip/{file|escape}</id>
- <link rel="self" href="{urlbase}{url}atom-log/tip/{file|urlescape}"/>
- <title>{repo|escape}: {file|escape} history</title>
- {latestentry%feedupdated}
-
-{entries%changelogentry}
-</feed>
--- a/templates/atom/header.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="{encoding}"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
\ No newline at end of file
--- a/templates/atom/map	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-default = 'changelog'
-feedupdated = '<updated>{date|rfc3339date}</updated>'
-mimetype = 'application/atom+xml; charset={encoding}'
-header = header.tmpl
-changelog = changelog.tmpl
-changelogentry = changelogentry.tmpl
-filelog = filelog.tmpl
-filelogentry = filelogentry.tmpl
-tags = tags.tmpl
-tagentry = tagentry.tmpl
-error = error.tmpl
--- a/templates/atom/tagentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
- <entry>
-  <title>{tag|escape}</title>
-  <link rel="alternate" href="{urlbase}{url}rev/{node|short}"/>
-  <id>{urlbase}{url}#tag-{node}</id>
-  <updated>{date|rfc3339date}</updated>
-  <published>{date|rfc3339date}</published>
-  <content type="text">{tag|strip|escape}</content>
- </entry>
--- a/templates/atom/tags.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-{header}
- <id>{urlbase}{url}</id>
- <link rel="self" href="{urlbase}{url}atom-tags"/>
- <link rel="alternate" href="{urlbase}{url}tags"/>
- <title>{repo|escape}: tags</title>
- <summary>{repo|escape} tag history</summary>
- <author><name>Mercurial SCM</name></author>
- {latestentry%feedupdated}
-
-{entriesnotip%tagentry}
-</feed>
--- a/templates/coal/header.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
-<head>
-<link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
-<meta name="robots" content="index, nofollow" />
-<link rel="stylesheet" href="{staticurl}style-coal.css" type="text/css" />
--- a/templates/coal/map	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-default = 'shortlog'
-
-mimetype = 'text/html; charset={encoding}'
-header = header.tmpl
-footer = ../paper/footer.tmpl
-search = ../paper/search.tmpl
-
-changelog = ../paper/shortlog.tmpl
-shortlog = ../paper/shortlog.tmpl
-shortlogentry = ../paper/shortlogentry.tmpl
-graph = ../paper/graph.tmpl
-
-naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
-filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
-filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
-filenolink = '{file|escape} '
-fileellipses = '...'
-changelogentry = ../paper/shortlogentry.tmpl
-searchentry = ../paper/shortlogentry.tmpl
-changeset = ../paper/changeset.tmpl
-manifest = ../paper/manifest.tmpl
-
-direntry = '
-  <tr class="fileline parity{parity}">
-    <td class="name">
-      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">
-        <img src="{staticurl}coal-folder.png" alt="dir."/> {basename|escape}/
-      </a>
-      <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
-        {emptydirs|escape}
-      </a>
-    </td>
-    <td class="size"></td>
-    <td class="permissions">drwxr-xr-x</td>
-  </tr>'
-
-fileentry = '
-  <tr class="fileline parity{parity}">
-    <td class="filename">
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        <img src="{staticurl}coal-file.png" alt="file"/> {basename|escape}
-      </a>
-    </td>
-    <td class="size">{size}</td>
-    <td class="permissions">{permissions|permissions}</td>
-  </tr>'
-
-filerevision = ../paper/filerevision.tmpl
-fileannotate = ../paper/fileannotate.tmpl
-filediff = ../paper/filediff.tmpl
-filelog = ../paper/filelog.tmpl
-fileline = '
-  <div class="parity{parity} source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</div>'
-filelogentry = ../paper/filelogentry.tmpl
-
-annotateline = '
-  <tr class="parity{parity}">
-    <td class="annotate">
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#{targetline}"
-         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
-    </td>
-    <td class="source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</td>
-  </tr>'
-
-diffblock = '<div class="source bottomline parity{parity}"><pre>{lines}</pre></div>'
-difflineplus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="plusline">{line|escape}</span>'
-difflineminus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="minusline">{line|escape}</span>'
-difflineat = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="atline">{line|escape}</span>'
-diffline = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
-
-changelogparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-
-changesetparent = '<a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> '
-
-filerevparent = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a> '
-filerevchild = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a> '
-
-filerename = '{file|escape}@'
-filelogrename = '
-  <tr>
-    <th>base:</th>
-    <td>
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {file|escape}@{node|short}
-      </a>
-    </td>
-  </tr>'
-fileannotateparent = '
-  <tr>
-    <td class="metatag">parent:</td>
-    <td>
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {rename%filerename}{node|short}
-      </a>
-    </td>
-  </tr>'
-changesetchild = ' <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>'
-changelogchild = '
-  <tr>
-    <th class="child">child</th>
-    <td class="child">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
-        {node|short}
-      </a>
-    </td>
-  </tr>'
-fileannotatechild = '
-  <tr>
-    <td class="metatag">child:</td>
-    <td>
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {node|short}
-      </a>
-    </td>
-  </tr>'
-tags = ../paper/tags.tmpl
-tagentry = '
-  <tr class="tagEntry parity{parity}">
-    <td>
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
-        {tag|escape}
-      </a>
-    </td>
-    <td class="node">
-      {node|short}
-    </td>
-  </tr>'
-branches = ../paper/branches.tmpl
-branchentry = '
-  <tr class="tagEntry parity{parity}">
-    <td>
-      <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">
-        {branch|escape}
-      </a>
-    </td>
-    <td class="node">
-      {node|short}
-    </td>
-  </tr>'
-changelogtag = '<span class="tag">{name|escape}</span> '
-changesettag = '<span class="tag">{tag|escape}</span> '
-changelogbranchhead = '<span class="branchhead">{name|escape}</span> '
-changelogbranchname = '<span class="branchname">{name|escape}</span> ' 
-
-filediffparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filelogparent = '
-  <tr>
-    <th>parent {rev}:</th>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filediffchild = '
-  <tr>
-    <th class="child">child {rev}:</th>
-    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
-  </td>
-  </tr>'
-filelogchild = '
-  <tr>
-    <th>child {rev}:</th>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-
-indexentry = '
-  <tr class="parity{parity}">
-    <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
-    <td>{description}</td>
-    <td>{contact|obfuscate}</td>
-    <td class="age">{lastchange|age}</td>
-    <td class="indexlinks">{archives%indexarchiveentry}</td>
-  </tr>\n'
-indexarchiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">&nbsp;&darr;{type|escape}</a>'
-index = ../paper/index.tmpl
-archiveentry = '
-  <li>
-    <a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a>
-  </li>'
-notfound = ../paper/notfound.tmpl
-error = ../paper/error.tmpl
-urlparameter = '{separator}{name}={value|urlescape}'
-hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- a/templates/gitweb/branches.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-{header}
-<title>{repo|escape}: Branches</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-tags" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-tags" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / branches
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-branches |
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-<br/>
-</div>
-
-<div class="title">&nbsp;</div>
-<table cellspacing="0">
-{entries%branchentry}
-</table>
-
-{footer}
--- a/templates/gitweb/changelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-{header}
-<title>{repo|escape}: Changelog</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog
-</div>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<div class="search">
-<input type="text" name="rev"  />
-</div>
-</form>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a> |
-changelog |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
-<br/>
-{changenav%naventry}<br/>
-</div>
-
-{entries%changelogentry}
-
-<div class="page_nav">
-{changenav%naventry}<br/>
-</div>
-
-{footer}
--- a/templates/gitweb/changelogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<div>
-<a class="title" href="{url}rev/{node|short}{sessionvars%urlparameter}"><span class="age">{date|age}</span>{desc|strip|firstline|escape|nonempty}<span class="logtags"> {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a>
-</div>
-<div class="title_text">
-<div class="log_link">
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a><br/>
-</div>
-<i>{author|obfuscate} [{date|rfc822date}] rev {rev}</i><br/>
-</div>
-<div class="log_body">
-{desc|strip|escape|addbreaks|nonempty}
-<br/>
-<br/>
-</div>
--- a/templates/gitweb/changeset.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-{header}
-<title>{repo|escape}: changeset {rev}:{node|short}</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changeset
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a> |
-changeset |
-<a href="{url}raw-rev/{node|short}">raw</a> {archives%archiveentry}<br/>
-</div>
-
-<div>
-<a class="title" href="{url}raw-rev/{node|short}">{desc|strip|escape|firstline|nonempty} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a>
-</div>
-<div class="title_text">
-<table cellspacing="0">
-<tr><td>author</td><td>{author|obfuscate}</td></tr>
-<tr><td></td><td>{date|date} ({date|age})</td></tr>
-{branch%changesetbranch}
-<tr><td>changeset {rev}</td><td style="font-family:monospace">{node|short}</td></tr>
-{parent%changesetparent}
-{child%changesetchild}
-</table></div>
-
-<div class="page_body">
-{desc|strip|escape|addbreaks|nonempty}
-</div>
-<div class="list_head"></div>
-<div class="title_text">
-<table cellspacing="0">
-{files}
-</table></div>
-
-<div class="page_body">{diff}</div>
-
-{footer}
--- a/templates/gitweb/error.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-{header}
-<title>{repo|escape}: Error</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / error
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> | <a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> | <a href="{url}log{sessionvars%urlparameter}">changelog</a> | <a href="{url}tags{sessionvars%urlparameter}">tags</a> | <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a><br/>
-</div>
-
-<div class="page_body">
-<br/>
-<i>An error occurred while processing your request</i><br/>
-<br/>
-{error|escape}
-</div>
-
-{footer}
--- a/templates/gitweb/fileannotate.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape}@{node|short} (annotated)</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> |
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
-<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
-<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
-annotate |
-<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
-<a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a><br/>
-</div>
-
-<div class="title">{file|escape}</div>
-
-<div class="title_text">
-<table cellspacing="0">
-<tr>
- <td>author</td>
- <td>{author|obfuscate}</td></tr>
-<tr>
- <td></td>
- <td>{date|date} ({date|age})</td></tr>
-{branch%filerevbranch}
-<tr>
- <td>changeset {rev}</td>
- <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
-{parent%fileannotateparent}
-{child%fileannotatechild}
-<tr>
- <td>permissions</td>
- <td style="font-family:monospace">{permissions|permissions}</td></tr>
-</table>
-</div>
-
-<div class="page_path">
-{desc|strip|escape|addbreaks|nonempty}
-</div>
-<div class="page_body">
-<table>
-{annotate%annotateline}
-</table>
-</div>
-
-{footer}
--- a/templates/gitweb/filediff.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-{header}
-<title>{repo|escape}: diff {file|escape}</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / diff
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> |
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
-<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
-<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
-<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
-diff |
-<a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a><br/>
-</div>
-
-<div class="title">{file|escape}</div>
-
-<table>
-{branch%filerevbranch}
-<tr>
- <td>changeset {rev}</td>
- <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
-{parent%filediffparent}
-{child%filediffchild}
-</table>
-
-<div class="list_head"></div>
-
-<div class="page_body">
-{diff}
-</div>
-
-{footer}
--- a/templates/gitweb/filelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-{header}
-<title>{repo|escape}: File revisions</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
-revisions |
-<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
-<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
-<a href="{url}rss-log/{node|short}/{file|urlescape}">rss</a>
-<br/>
-{nav%filenaventry}
-</div>
-
-<div class="title" >{file|urlescape}</div>
-
-<table>
-{entries%filelogentry}
-</table>
-
-<div class="page_nav">
-{nav%filenaventry}
-</div>
-
-{footer}
--- a/templates/gitweb/filerevision.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape}@{node|short}</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a> |
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
-file |
-<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
-<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
-<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
-<a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a><br/>
-</div>
-
-<div class="title">{file|escape}</div>
-
-<div class="title_text">
-<table cellspacing="0">
-<tr>
- <td>author</td>
- <td>{author|obfuscate}</td></tr>
-<tr>
- <td></td>
- <td>{date|date} ({date|age})</td></tr>
-{branch%filerevbranch}
-<tr>
- <td>changeset {rev}</td>
- <td style="font-family:monospace"><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
-{parent%filerevparent}
-{child%filerevchild}
-<tr>
- <td>permissions</td>
- <td style="font-family:monospace">{permissions|permissions}</td></tr>
-</table>
-</div>
-
-<div class="page_path">
-{desc|strip|escape|addbreaks|nonempty}
-</div>
-
-<div class="page_body">
-{text%fileline}
-</div>
-
-{footer}
--- a/templates/gitweb/footer.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<div class="page_footer">
-<div class="page_footer_text">{repo|escape}</div>
-<div class="rss_logo">
-<a href="{url}rss-log">RSS</a>
-<a href="{url}atom-log">Atom</a>
-</div>
-<br />
-{motd}
-</div>
-</body>
-</html>
--- a/templates/gitweb/graph.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-{header}
-<title>{repo|escape}: Graph</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph
-</div>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<div class="search">
-<input type="text" name="rev"  />
-</div>
-</form>
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> |
-graph |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-<br/>
-<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
-<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
-| {changenav%navgraphentry}<br/>
-</div>
-
-<div class="title">&nbsp;</div>
-
-<noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
-
-<div id="wrapper">
-<ul id="nodebgs"></ul>
-<canvas id="graph" width="224" height="{canvasheight}"></canvas>
-<ul id="graphnodes"></ul>
-</div>
-
-<script type="text/javascript" src="{staticurl}graph.js"></script>
-<script>
-<!-- hide script content
-
-var data = {jsdata|json};
-var graph = new Graph();
-graph.scale({bg_height});
-
-graph.edge = function(x0, y0, x1, y1, color) {
-	
-	this.setColor(color, 0.0, 0.65);
-	this.ctx.beginPath();
-	this.ctx.moveTo(x0, y0);
-	this.ctx.lineTo(x1, y1);
-	this.ctx.stroke();
-	
-}
-
-var revlink = '<li style="_STYLE"><span class="desc">';
-revlink += '<a class="list" href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID"><b>_DESC</b></a>';
-revlink += '</span> _TAGS';
-revlink += '<span class="info">_DATE, by _USER</span></li>';
-
-graph.vertex = function(x, y, color, parity, cur) {
-	
-	this.ctx.beginPath();
-	color = this.setColor(color, 0.25, 0.75);
-	this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
-	this.ctx.fill();
-	
-	var bg = '<li class="bg parity' + parity + '"></li>';
-	var left = (this.columns + 1) * this.bg_height;
-	var nstyle = 'padding-left: ' + left + 'px;';
-	var item = revlink.replace(/_STYLE/, nstyle);
-	item = item.replace(/_PARITY/, 'parity' + parity);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_DESC/, cur[3]);
-	item = item.replace(/_USER/, cur[4]);
-	item = item.replace(/_DATE/, cur[5]);
-	
-	var tagspan = '';
-	if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
-		tagspan = '<span class="logtags">';
-		if (cur[6][1]) {
-			tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
-			tagspan += cur[6][0] + '</span> ';
-		} else if (!cur[6][1] && cur[6][0] != 'default') {
-			tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
-			tagspan += cur[6][0] + '</span> ';
-		}
-		if (cur[7].length) {
-			for (var t in cur[7]) {
-				var tag = cur[7][t];
-				tagspan += '<span class="tagtag">' + tag + '</span> ';
-			}
-		}
-		tagspan += '</span>';
-	}
-	
-	item = item.replace(/_TAGS/, tagspan);
-	return [bg, item];
-	
-}
-
-graph.render(data);
-
-// stop hiding script -->
-</script>
-
-<div class="page_nav">
-<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
-<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
-| {changenav%navgraphentry}
-</div>
-
-{footer}
--- a/templates/gitweb/header.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="{encoding}"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
-<head>
-<link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
-<meta name="robots" content="index, nofollow"/>
-<link rel="stylesheet" href="{staticurl}style-gitweb.css" type="text/css" />
-
--- a/templates/gitweb/index.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-{header}
-<title>Mercurial repositories index</title>
-</head>
-<body>
-
-<div class="page_header">
-    <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a>
-    Repositories list
-</div>
-
-<table cellspacing="0">
-    <tr>
-        <td><a href="?sort={sort_name}">Name</a></td>
-        <td><a href="?sort={sort_description}">Description</a></td>
-        <td><a href="?sort={sort_contact}">Contact</a></td>
-        <td><a href="?sort={sort_lastchange}">Last change</a></td>
-        <td>&nbsp;</td>
-        <td>&nbsp;</td>
-    </tr>
-    {entries%indexentry}
-</table>
-<div class="page_footer">
-{motd}
-</div>
-</body>
-</html>
--- a/templates/gitweb/manifest.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-{header}
-<title>{repo|escape}: files</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-files |
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> {archives%archiveentry}<br/>
-</div>
-
-<div class="title">{path|escape} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></div>
-<table cellspacing="0">
-<tr class="parity{upparity}">
-<td style="font-family:monospace">drwxr-xr-x</td>
-<td style="font-family:monospace"></td>
-<td style="font-family:monospace"></td>
-<td><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
-<td class="link">&nbsp;</td>
-</tr>
-{dentries%direntry}
-{fentries%fileentry}
-</table>
-
-{footer}
--- a/templates/gitweb/map	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-default = 'summary'
-mimetype = 'text/html; charset={encoding}'
-header = header.tmpl
-footer = footer.tmpl
-search = search.tmpl
-changelog = changelog.tmpl
-summary = summary.tmpl
-error = error.tmpl
-notfound = notfound.tmpl
-naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
-filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
-filenodelink = '
-  <tr class="parity{parity}">
-    <td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td>
-    <td></td>
-    <td class="link">
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
-      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
-      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
-    </td>
-  </tr>'
-filenolink = '
-  <tr class="parity{parity}">
-    <td><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td>
-    <td></td>
-    <td class="link">
-      file |
-      annotate |
-      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
-      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
-    </td>
-  </tr>'
-fileellipses = '...'
-changelogentry = changelogentry.tmpl
-searchentry = changelogentry.tmpl
-changeset = changeset.tmpl
-manifest = manifest.tmpl
-direntry = '
-  <tr class="parity{parity}">
-    <td style="font-family:monospace">drwxr-xr-x</td>
-    <td style="font-family:monospace"></td>
-    <td style="font-family:monospace"></td>
-    <td>
-      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a>
-      <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">{emptydirs|escape}</a>
-    </td>
-    <td class="link">
-      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a>
-    </td>
-  </tr>'
-fileentry = '
-  <tr class="parity{parity}">
-    <td style="font-family:monospace">{permissions|permissions}</td>
-    <td style="font-family:monospace" align=right>{date|isodate}</td>
-    <td style="font-family:monospace" align=right>{size}</td>
-    <td class="list">
-      <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a>
-    </td>
-    <td class="link">
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
-      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
-    </td>
-  </tr>'
-filerevision = filerevision.tmpl
-fileannotate = fileannotate.tmpl
-filediff = filediff.tmpl
-filelog = filelog.tmpl
-fileline = '
-  <div style="font-family:monospace" class="parity{parity}">
-    <pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</pre>
-  </div>'
-annotateline = '
-  <tr style="font-family:monospace" class="parity{parity}">
-    <td class="linenr" style="text-align: right;">
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"
-         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
-    </td>
-    <td><pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a></pre></td>
-    <td><pre>{line|escape}</pre></td>
-  </tr>'
-difflineplus = '<span style="color:#008800;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
-difflineminus = '<span style="color:#cc0000;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
-difflineat = '<span style="color:#990099;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
-diffline = '<span><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
-changelogparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
-    </td>
-  </tr>'
-changesetbranch = '<tr><td>branch</td><td>{name}</td></tr>'
-changesetparent = '
-  <tr>
-    <td>parent {rev}</td>
-    <td style="font-family:monospace">
-      <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
-    </td>
-  </tr>'
-filerevbranch = '<tr><td>branch</td><td>{name}</td></tr>'
-filerevparent = '
-  <tr>
-    <td>parent {rev}</td>
-    <td style="font-family:monospace">
-      <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {rename%filerename}{node|short}
-      </a>
-    </td>
-  </tr>'
-filerename = '{file|escape}@'
-filelogrename = '| <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">base</a>'
-fileannotateparent = '
-  <tr>
-    <td>parent {rev}</td>
-    <td style="font-family:monospace">
-      <a class="list" href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {rename%filerename}{node|short}
-      </a>
-    </td>
-  </tr>'
-changelogchild = '
-  <tr>
-    <th class="child">child {rev}:</th>
-    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-changesetchild = '
-  <tr>
-    <td>child {rev}</td>
-    <td style="font-family:monospace">
-      <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
-    </td>
-  </tr>'
-filerevchild = '
-  <tr>
-    <td>child {rev}</td>
-    <td style="font-family:monospace">
-      <a class="list" href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-    </tr>'
-fileannotatechild = '
-  <tr>
-    <td>child {rev}</td>
-    <td style="font-family:monospace">
-      <a class="list" href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-    </tr>'
-tags = tags.tmpl
-tagentry = '
-  <tr class="parity{parity}">
-    <td class="age"><i>{date|age}</i></td>
-    <td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>{tag|escape}</b></a></td>
-    <td class="link">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
-      <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
-      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-    </td>
-  </tr>'
-branches = branches.tmpl
-branchentry = '
-  <tr class="parity{parity}">
-    <td class="age"><i>{date|age}</i></td>
-    <td><a class="list" href="{url}shortlog/{node|short}{sessionvars%urlparameter}"><b>{node|short}</b></a></td>
-    <td class="{status}">{branch|escape}</td>
-    <td class="link">
-      <a href="{url}changeset/{node|short}{sessionvars%urlparameter}">changeset</a> |
-      <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
-      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-    </td>
-  </tr>'
-diffblock = '<pre>{lines}</pre>'
-filediffparent = '
-  <tr>
-    <td>parent {rev}</td>
-    <td style="font-family:monospace">
-      <a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {node|short}
-      </a>
-    </td>
-  </tr>'
-filelogparent = '
-  <tr>
-    <td align="right">parent {rev}:&nbsp;</td>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filediffchild = '
-  <tr>
-    <td>child {rev}</td>
-    <td style="font-family:monospace">
-      <a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
-    </td>
-  </tr>'
-filelogchild = '
-  <tr>
-    <td align="right">child {rev}:&nbsp;</td>
-    <td><a href="{url}file{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-shortlog = shortlog.tmpl
-graph = graph.tmpl
-tagtag = '<span class="tagtag" title="{name}">{name}</span> '
-branchtag = '<span class="branchtag" title="{name}">{name}</span> '
-inbranchtag = '<span class="inbranchtag" title="{name}">{name}</span> '
-shortlogentry = '
-  <tr class="parity{parity}">
-    <td class="age"><i>{date|age}</i></td>
-    <td><i>{author|person}</i></td>
-    <td>
-      <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">
-        <b>{desc|strip|firstline|escape|nonempty}</b>
-        <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span>
-      </a>
-    </td>
-    <td class="link" nowrap>
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
-      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-    </td>
-  </tr>'
-filelogentry = '
-  <tr class="parity{parity}">
-    <td class="age"><i>{date|age}</i></td>
-    <td>
-      <a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">
-        <b>{desc|strip|firstline|escape|nonempty}</b>
-      </a>
-    </td>
-    <td class="link">
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>&nbsp;|&nbsp;<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>&nbsp;|&nbsp;<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> {rename%filelogrename}</td>
-    </tr>'
-archiveentry = ' | <a href="{url}archive/{node|short}{extension}">{type|escape}</a> '
-indexentry = '
-  <tr class="parity{parity}">
-    <td>
-      <a class="list" href="{url}{sessionvars%urlparameter}">
-        <b>{name|escape}</b>
-      </a>
-    </td>
-    <td>{description}</td>
-    <td>{contact|obfuscate}</td>
-    <td class="age">{lastchange|age}</td>
-    <td class="indexlinks">{archives%indexarchiveentry}</td>
-    <td><div class="rss_logo"><a href="{url}rss-log">RSS</a> <a href="{url}atom-log">Atom</a></div></td>
-  </tr>\n'
-indexarchiveentry = ' <a href="{url}archive/{node|short}{extension}">{type|escape}</a> '
-index = index.tmpl
-urlparameter = '{separator}{name}={value|urlescape}'
-hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- a/templates/gitweb/notfound.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-{header}
-<title>Mercurial repository not found</title>
-</head>
-
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a> Not found: {repo|escape}
-</div>
-
-<div class="page_body">
-The specified repository "{repo|escape}" is unknown, sorry.
-<br/>
-<br/>
-Please go back to the <a href="{url}">main repository list page</a>.
-</div>
-
-{footer}
--- a/templates/gitweb/search.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-{header}
-<title>{repo|escape}: Search</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<div class="search">
-<input type="text" name="rev" value="{query|escape}" />
-</div>
-</form>
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
-<br/>
-</div>
-
-<div class="title">searching for {query|escape}</div>
-
-{entries}
-
-{footer}
--- a/templates/gitweb/shortlog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-{header}
-<title>{repo|escape}: Shortlog</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog
-</div>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<div class="search">
-<input type="text" name="rev"  />
-</div>
-</form>
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-shortlog |
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
-<br/>
-{changenav%navshortentry}<br/>
-</div>
-
-<div class="title">&nbsp;</div>
-<table cellspacing="0">
-{entries%shortlogentry}
-</table>
-
-<div class="page_nav">
-{changenav%navshortentry}
-</div>
-
-{footer}
--- a/templates/gitweb/summary.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-{header}
-<title>{repo|escape}: Summary</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<div class="search">
-<input type="text" name="rev"  />
-</div>
-</form>
-</div>
-
-<div class="page_nav">
-summary |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
-<br/>
-</div>
-
-<div class="title">&nbsp;</div>
-<table cellspacing="0">
-<tr><td>description</td><td>{desc}</td></tr>
-<tr><td>owner</td><td>{owner|obfuscate}</td></tr>
-<tr><td>last change</td><td>{lastchange|rfc822date}</td></tr>
-</table>
-
-<div><a  class="title" href="{url}shortlog{sessionvars%urlparameter}">changes</a></div>
-<table cellspacing="0">
-{shortlog}
-<tr class="light"><td colspan="4"><a class="list" href="{url}shortlog{sessionvars%urlparameter}">...</a></td></tr>
-</table>
-
-<div><a class="title" href="{url}tags{sessionvars%urlparameter}">tags</a></div>
-<table cellspacing="0">
-{tags}
-<tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr>
-</table>
-
-<div><a class="title" href="#">branches</a></div>
-<table cellspacing="0">
-{branches%branchentry}
-<tr class="light">
-  <td colspan="4"><a class="list"  href="#">...</a></td>
-</tr>
-</table>
-{footer}
--- a/templates/gitweb/tags.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-{header}
-<title>{repo|escape}: Tags</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-tags" title="Atom feed for {repo|escape}"/>
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-tags" title="RSS feed for {repo|escape}"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / tags
-</div>
-
-<div class="page_nav">
-<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
-<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
-<a href="{url}graph{sessionvars%urlparameter}">graph</a> |
-tags |
-<a href="{url}branches{sessionvars%urlparameter}">branches</a> |
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-<br/>
-</div>
-
-<div class="title">&nbsp;</div>
-<table cellspacing="0">
-{entries%tagentry}
-</table>
-
-{footer}
--- a/templates/map-cmdline.changelog	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-header = '{date|shortdate}  {author|person}  <{author|email}>\n\n'
-header_verbose = ''
-changeset = '\t* {files|stringify|fill68|tabindent}{desc|fill68|tabindent|strip}\n\t[{node|short}]{tags}\n\n'
-changeset_quiet = '\t* {desc|firstline|fill68|tabindent|strip}\n\n'
-changeset_verbose = '{date|isodate}  {author|person}  <{author|email}>  ({node|short}{tags})\n\n\t* {file_adds|stringify|fill68|tabindent}{file_dels|stringify|fill68|tabindent}{files|stringify|fill68|tabindent}{desc|fill68|tabindent|strip}\n\n'
-start_tags = ' ['
-tag = '{tag}, '
-last_tag = '{tag}]'
-file = '{file}, '
-last_file = '{file}:\n\t'
-file_add = '{file_add}, '
-last_file_add = '{file_add}: new file.\n* '
-file_del = '{file_del}, '
-last_file_del = '{file_del}: deleted file.\n* '
--- a/templates/map-cmdline.compact	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-changeset = '{rev}{tags}{parents}   {node|short}   {date|isodate}   {author|user}\n  {desc|firstline|strip}\n\n'
-changeset_quiet = '{rev}:{node|short}\n'
-changeset_verbose = '{rev}{tags}{parents}   {node|short}   {date|isodate}   {author}\n  {desc|strip}\n\n'
-start_tags = '['
-tag = '{tag},'
-last_tag = '{tag}]'
-start_parents = ':'
-parent = '{rev},'
-last_parent = '{rev}'
--- a/templates/map-cmdline.default	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-changeset = 'changeset:   {rev}:{node|short}\n{branches}{tags}{parents}user:        {author}\ndate:        {date|date}\nsummary:     {desc|firstline}\n\n'
-changeset_quiet = '{rev}:{node|short}\n'
-changeset_verbose = 'changeset:   {rev}:{node|short}\n{branches}{tags}{parents}user:        {author}\ndate:        {date|date}\n{files}{file_copies}description:\n{desc|strip}\n\n\n'
-changeset_debug = 'changeset:   {rev}:{node}\n{branches}{tags}{parents}{manifest}user:        {author}\ndate:        {date|date}\n{file_mods}{file_adds}{file_dels}{file_copies}{extras}description:\n{desc|strip}\n\n\n'
-start_files = 'files:      '
-file = ' {file}'
-end_files = '\n'
-start_file_mods = 'files:      '
-file_mod = ' {file_mod}'
-end_file_mods = '\n'
-start_file_adds = 'files+:     '
-file_add = ' {file_add}'
-end_file_adds = '\n'
-start_file_dels = 'files-:     '
-file_del = ' {file_del}'
-end_file_dels = '\n'
-start_file_copies = 'copies:     '
-file_copy = ' {name} ({source})'
-end_file_copies = '\n'
-parent = 'parent:      {rev}:{node|formatnode}\n'
-manifest = 'manifest:    {rev}:{node}\n'
-branch = 'branch:      {branch}\n'
-tag = 'tag:         {tag}\n'
-extra = 'extra:       {key}={value|stringescape}\n'
--- a/templates/monoblue/branches.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-{header}
-    <title>{repo|escape}: Branches</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / Branches</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li class="current">branches</li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">branches</h2>
-    <table cellspacing="0">
-{entries%branchentry}
-    </table>
-
-{footer}
--- a/templates/monoblue/changelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-{header}
-    <title>{repo|escape}: changelog</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / changelog</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li class="current">changelog</li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}</li>
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">changelog</h2>
-    <div>
-    {entries%changelogentry}
-    </div>
-
-    <div class="page-path">
-{changenav%naventry}
-    </div>
-
-{footer}
--- a/templates/monoblue/changelogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<h3 class="changelog"><a class="title" href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}<span class="logtags"> {inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a></h3>
-<ul class="changelog-entry">
-    <li class="age">{date|age}</li>
-    <li>by <span class="name">{author|obfuscate}</span> <span class="revdate">[{date|rfc822date}] rev {rev}</span></li>
-    <li class="description">{desc|strip|escape|addbreaks|nonempty}</li>
-</ul>
--- a/templates/monoblue/changeset.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-{header}
-<title>{repo|escape}: changeset {rev}:{node|short}</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <ul class="submenu">
-        <li class="current">changeset</li>
-        <li><a href="{url}raw-rev/{node|short}">raw</a> {archives%archiveentry}</li>
-    </ul>
-
-    <h2 class="no-link no-border">changeset</h2>
-
-    <h3 class="changeset"><a href="{url}raw-rev/{node|short}">{desc|strip|escape|firstline|nonempty} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></a></h3>
-    <p class="changeset-age"><span>{date|age}</span></p>
-
-    <dl class="overview">
-        <dt>author</dt>
-        <dd>{author|obfuscate}</dd>
-        <dt>date</dt>
-        <dd>{date|date}</dd>
-        {branch%changesetbranch}
-        <dt>changeset {rev}</dt>
-        <dd>{node|short}</dd>
-        {parent%changesetparent}
-        {child%changesetchild}
-    </dl>
-
-    <p class="description">{desc|strip|escape|addbreaks|nonempty}</p>
-
-    <table>
-    {files}
-    </table>
-
-    <div class="diff">
-    {diff}
-    </div>
-
-{footer}
--- a/templates/monoblue/error.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-{header}
-    <title>{repo|escape}: Error</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / Not found: {repo|escape}</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li class="current">summary</li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">An error occurred while processing your request</h2>
-    <p class="normal">{error|escape}</p>
-
-{footer}
--- a/templates/monoblue/fileannotate.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape}@{node|short} (annotated)</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / annotate</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <ul class="submenu">
-        <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
-        <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
-        <li class="current">annotate</li>
-        <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-        <li><a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a></li>
-    </ul>
-
-    <h2 class="no-link no-border">{file|escape}@{node|short} (annotated)</h2>
-    <h3 class="changeset">{file|escape}</h3>
-    <p class="changeset-age"><span>{date|age}</span></p>
-
-    <dl class="overview">
-        <dt>author</dt>
-        <dd>{author|obfuscate}</dd>
-        <dt>date</dt>
-        <dd>{date|date}</dd>
-        {branch%filerevbranch}
-        <dt>changeset {rev}</dt>
-        <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
-        {parent%fileannotateparent}
-        {child%fileannotatechild}
-        <dt>permissions</dt>
-        <dd>{permissions|permissions}</dd>
-    </dl>
-
-    <p class="description">{desc|strip|escape|addbreaks|nonempty}</p>
-
-    <table class="annotated">
-    {annotate%annotateline}
-    </table>
-
-{footer}
--- a/templates/monoblue/filediff.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-{header}
-<title>{repo|escape}: diff {file|escape}</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file diff</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <ul class="submenu">
-        <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
-        <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
-        <li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-        <li class="current">diff</li>
-        <li><a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a></li>
-    </ul>
-
-    <h2 class="no-link no-border">diff: {file|escape}</h2>
-    <h3 class="changeset">{file|escape}</h3>
-
-    <dl class="overview">
-        {branch%filerevbranch}
-        <dt>changeset {rev}</dt>
-        <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
-        {parent%filediffparent}
-        {child%filediffchild}
-    </dl>
-
-    <div class="diff">
-    {diff}
-    </div>
-
-{footer}
--- a/templates/monoblue/filelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-{header}
-<title>{repo|escape}: File revisions</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revisions</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <ul class="submenu">
-        <li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
-        <li class="current">revisions</li>
-        <li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-        <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-        <li><a href="{url}rss-log/{node|short}/{file|urlescape}">rss</a></li>
-    </ul>
-
-    <h2 class="no-link no-border">{file|urlescape}</h2>
-
-    <table>
-    {entries%filelogentry}
-    </table>
-
-    <div class="page-path">
-    {nav%filenaventry}
-    </div>
-
-{footer}
--- a/templates/monoblue/filerevision.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape}@{node|short}</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / file revision</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <ul class="submenu">
-        <li class="current">file</li>
-        <li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a></li>
-        <li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-        <li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-        <li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
-    </ul>
-
-    <h2 class="no-link no-border">{file|escape}@{node|short}</h2>
-    <h3 class="changeset">{file|escape}</h3>
-    <p class="changeset-age"><span>{date|age}</span></p>
-
-    <dl class="overview">
-        <dt>author</dt>
-        <dd>{author|obfuscate}</dd>
-        <dt>date</dt>
-        <dd>{date|date}</dd>
-        {branch%filerevbranch}
-        <dt>changeset {rev}</dt>
-        <dd><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>
-        {parent%filerevparent}
-        {child%filerevchild}
-        <dt>permissions</dt>
-        <dd>{permissions|permissions}</dd>
-    </dl>
-
-    <p class="description">{desc|strip|escape|addbreaks|nonempty}</p>
-
-    <div class="source">
-    {text%fileline}
-    </div>
-
-{footer}
--- a/templates/monoblue/footer.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-    <div class="page-footer">
-        <p>Mercurial Repository: {repo|escape}</p>
-        <ul class="rss-logo">
-            <li><a href="{url}rss-log">RSS</a></li>
-            <li><a href="{url}atom-log">Atom</a></li>
-        </ul>
-        {motd}
-    </div>
-
-    <div id="powered-by">
-        <p><a href="http://mercurial.selenic.com/" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>
-    </div>
-
-    <div id="corner-top-left"></div>
-    <div id="corner-top-right"></div>
-    <div id="corner-bottom-left"></div>
-    <div id="corner-bottom-right"></div>
-
-</div>
-
-</body>
-</html>
--- a/templates/monoblue/graph.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-{header}
-    <title>{repo|escape}: graph</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-    <!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / graph</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
-            <li class="current">graph</li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">graph</h2>
-
-    <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
-    <div id="wrapper">
-        <ul id="nodebgs"></ul>
-        <canvas id="graph" width="224" height="{canvasheight}"></canvas>
-        <ul id="graphnodes"></ul>
-    </div>
-
-    <script type="text/javascript" src="{staticurl}graph.js"></script>
-    <script>
-    <!-- hide script content
-
-    document.getElementById('noscript').style.display = 'none';
-
-    var data = {jsdata|json};
-    var graph = new Graph();
-    graph.scale({bg_height});
-
-    graph.edge = function(x0, y0, x1, y1, color) {
-
-        this.setColor(color, 0.0, 0.65);
-        this.ctx.beginPath();
-        this.ctx.moveTo(x0, y0);
-        this.ctx.lineTo(x1, y1);
-        this.ctx.stroke();
-
-    }
-
-    var revlink = '<li style="_STYLE"><span class="desc">';
-    revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
-    revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
-
-    graph.vertex = function(x, y, color, parity, cur) {
-
-        this.ctx.beginPath();
-        color = this.setColor(color, 0.25, 0.75);
-        this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
-        this.ctx.fill();
-
-        var bg = '<li class="bg parity' + parity + '"></li>';
-        var left = (this.columns + 1) * this.bg_height;
-        var nstyle = 'padding-left: ' + left + 'px;';
-        var item = revlink.replace(/_STYLE/, nstyle);
-        item = item.replace(/_PARITY/, 'parity' + parity);
-        item = item.replace(/_NODEID/, cur[0]);
-        item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_DESC/, cur[3]);
-        item = item.replace(/_USER/, cur[4]);
-        item = item.replace(/_DATE/, cur[5]);
-
-        var tagspan = '';
-        if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
-            tagspan = '<span class="logtags">';
-            if (cur[6][1]) {
-                tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
-                tagspan += cur[6][0] + '</span> ';
-            } else if (!cur[6][1] && cur[6][0] != 'default') {
-                tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
-                tagspan += cur[6][0] + '</span> ';
-            }
-            if (cur[7].length) {
-                for (var t in cur[7]) {
-                    var tag = cur[7][t];
-                    tagspan += '<span class="tagtag">' + tag + '</span> ';
-                }
-            }
-            tagspan += '</span>';
-        }
-
-        item = item.replace(/_TAGS/, tagspan); 
-        return [bg, item];
-
-    }
-
-    graph.render(data);
-
-    // stop hiding script -->
-    </script>
-
-    <div class="page-path">
-        <a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
-        <a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
-        | {changenav%navgraphentry}
-    </div>
-
-{footer}
--- a/templates/monoblue/header.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-    <link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
-    <meta name="robots" content="index, nofollow"/>
-    <link rel="stylesheet" href="{staticurl}style-monoblue.css" type="text/css" />
--- a/templates/monoblue/index.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-{header}
-    <title>{repo|escape}: Mercurial repositories index</title>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1>Mercurial Repositories</h1>
-        <ul class="page-nav">
-        </ul>
-    </div>
-    
-    <table cellspacing="0">
-        <tr>
-            <td><a href="?sort={sort_name}">Name</a></td>
-            <td><a href="?sort={sort_description}">Description</a></td>
-            <td><a href="?sort={sort_contact}">Contact</a></td>
-            <td><a href="?sort={sort_lastchange}">Last change</a></td>
-            <td>&nbsp;</td>
-            <td>&nbsp;</td>
-        </tr>
-        {entries%indexentry}
-    </table>
-    <div class="page-footer">
-        {motd}
-    </div>
-
-    <div id="powered-by">
-        <p><a href="http://mercurial.selenic.com/" title="Mercurial"><img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a></p>
-    </div>
-
-    <div id="corner-top-left"></div>
-    <div id="corner-top-right"></div>
-    <div id="corner-bottom-left"></div>
-    <div id="corner-bottom-right"></div>
-
-</div>
-</body>
-</html>
--- a/templates/monoblue/manifest.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-{header}
-<title>{repo|escape}: files</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / files</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li class="current">files</li>
-        </ul>
-    </div>
-
-    <ul class="submenu">
-        <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> {archives%archiveentry}</li>
-        {archives%archiveentry}
-    </ul>
-
-    <h2 class="no-link no-border">files</h2>
-    <p class="files">{path|escape} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span></p>
-
-    <table>
-        <tr class="parity{upparity}">
-            <td>drwxr-xr-x</td>
-            <td></td>
-            <td></td>
-            <td><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
-            <td class="link">&nbsp;</td>
-        </tr>
-        {dentries%direntry}
-        {fentries%fileentry}
-    </table>
-
-{footer}
--- a/templates/monoblue/map	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-default = 'summary'
-mimetype = 'text/html; charset={encoding}'
-header = header.tmpl
-footer = footer.tmpl
-search = search.tmpl
-changelog = changelog.tmpl
-summary = summary.tmpl
-error = error.tmpl
-notfound = notfound.tmpl
-naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a>'
-filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
-filenodelink = '
-  <tr class="parity{parity}">
-    <td><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td>
-    <td></td>
-    <td>
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a> |
-      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
-      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
-    </td>
-  </tr>'
-filenolink = '
-  <tr class="parity{parity}">
-    <td>
-      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a></td><td></td><td>file |
-      annotate |
-      <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
-      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
-    </td>
-  </tr>'
-fileellipses = '...'
-changelogentry = changelogentry.tmpl
-searchentry = changelogentry.tmpl
-changeset = changeset.tmpl
-manifest = manifest.tmpl
-direntry = '
-  <tr class="parity{parity}">
-    <td>drwxr-xr-x</td>
-    <td></td>
-    <td></td>
-    <td><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td>
-    <td><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></td>
-  </tr>'
-fileentry = '
-  <tr class="parity{parity}">
-    <td>{permissions|permissions}</td>
-    <td>{date|isodate}</td>
-    <td>{size}</td>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td>
-    <td>
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a> |
-      <a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a> |
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
-    </td>
-  </tr>'
-filerevision = filerevision.tmpl
-fileannotate = fileannotate.tmpl
-filediff = filediff.tmpl
-filelog = filelog.tmpl
-fileline = '
-  <div style="font-family:monospace" class="parity{parity}">
-    <pre><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</pre>
-  </div>'
-annotateline = '
-  <tr class="parity{parity}">
-    <td class="linenr">
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#{targetline}"
-         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
-    </td>
-    <td class="lineno">
-      <a href="#{lineid}" id="{lineid}">{linenumber}</a>
-    </td>
-    <td class="source">{line|escape}</td>
-  </tr>'
-difflineplus = '<span style="color:#008800;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
-difflineminus = '<span style="color:#cc0000;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
-difflineat = '<span style="color:#990099;"><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
-diffline = '<span><a class="linenr" href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</span>'
-changelogparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
-    </td>
-  </tr>'
-changesetbranch = '<dt>branch</dt><dd>{name}</dd>'
-changesetparent = '
-  <dt>parent {rev}</dt>
-  <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
-filerevbranch = '<dt>branch</dt><dd>{name}</dd>'
-filerevparent = '
-  <dt>parent {rev}</dt>
-  <dd>
-    <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-      {rename%filerename}{node|short}
-    </a>
-  </dd>'
-filerename = '{file|escape}@'
-filelogrename = '| <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">base</a>'
-fileannotateparent = '
-  <dt>parent {rev}</dt>
-  <dd>
-    <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-      {rename%filerename}{node|short}
-    </a>
-  </dd>'
-changelogchild = '
-  <dt>child {rev}:</dt>
-  <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
-changesetchild = '
-  <dt>child {rev}</dt>
-  <dd><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></dd>'
-filerevchild = '
-  <dt>child {rev}</dt>
-  <dd>
-    <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
-  </dd>'
-fileannotatechild = '
-  <dt>child {rev}</dt>
-  <dd>
-    <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
-  </dd>'
-tags = tags.tmpl
-tagentry = '
-  <tr class="parity{parity}">
-    <td class="nowrap">{date|age}</td>
-    <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{tag|escape}</a></td>
-    <td class="nowrap">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
-      <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
-      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-    </td>
-  </tr>'
-branches = branches.tmpl
-branchentry = '
-  <tr class="parity{parity}">
-    <td class="nowrap">{date|age}</td>
-    <td><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-    <td class="{status}">{branch|escape}</td>
-    <td class="nowrap">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
-      <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
-      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-    </td>
-  </tr>'
-diffblock = '<pre>{lines}</pre>'
-filediffparent = '
-  <dt>parent {rev}</dt>
-  <dd><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></dd>'
-filelogparent = '
-  <tr>
-    <td align="right">parent {rev}:&nbsp;</td>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filediffchild = '
-  <dt>child {rev}</dt>
-  <dd><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></dd>'
-filelogchild = '
-  <tr>
-    <td align="right">child {rev}:&nbsp;</td>
-    <td><a href="{url}file{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-shortlog = shortlog.tmpl
-tagtag = '<span class="tagtag" title="{name}">{name}</span> '
-branchtag = '<span class="branchtag" title="{name}">{name}</span> '
-inbranchtag = '<span class="inbranchtag" title="{name}">{name}</span> '
-shortlogentry = '
-  <tr class="parity{parity}">
-    <td class="nowrap">{date|age}</td>
-    <td>{author|person}</td>
-    <td>
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
-        {desc|strip|firstline|escape|nonempty}
-        <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}</span>
-      </a>
-    </td>
-    <td class="nowrap">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
-      <a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-    </td>
-  </tr>'
-filelogentry = '
-  <tr class="parity{parity}">
-    <td class="nowrap">{date|age}</td>
-    <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></td>
-    <td class="nowrap">
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>&nbsp;|&nbsp;<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a>&nbsp;|&nbsp;<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
-      {rename%filelogrename}
-    </td>
-  </tr>'
-archiveentry = '<li><a href="{url}archive/{node|short}{extension}">{type|escape}</a></li>'
-indexentry = '
-  <tr class="parity{parity}">
-    <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
-    <td>{description}</td>
-    <td>{contact|obfuscate}</td>
-    <td>{lastchange|age}</td>
-    <td class="indexlinks">{archives%indexarchiveentry}</td>
-    <td>
-      <div class="rss_logo">
-        <a href="{url}rss-log">RSS</a>
-        <a href="{url}atom-log">Atom</a>
-      </div>
-    </td>
-  </tr>\n'
-indexarchiveentry = '<a href="{url}archive/{node|short}{extension}">{type|escape}</a> '
-index = index.tmpl
-urlparameter = '{separator}{name}={value|urlescape}'
-hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
-graph = graph.tmpl
--- a/templates/monoblue/notfound.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-{header}
-    <title>{repo|escape}: Mercurial repository not found</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / Not found: {repo|escape}</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li class="current">summary</li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}</li>
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">Not Found</h2>
-    <p class="normal">The specified repository "{repo|escape}" is unknown, sorry.</p>
-    <p class="normal">Please go back to the <a href="{url}">main repository list page</a>.</p>
-
-{footer}
--- a/templates/monoblue/search.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-{header}
-    <title>{repo|escape}: Search</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / search</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" value="{query|escape}" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">searching for {query|escape}</h2>
-    {entries}
-
-{footer}
--- a/templates/monoblue/shortlog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-{header}
-    <title>{repo|escape}: shortlog</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / shortlog</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li class="current">shortlog</li>
-            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>{archives%archiveentry}</li>
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">shortlog</h2>
-
-    <table>
-{entries%shortlogentry}
-    </table>
-
-    <div class="page-path">
-{changenav%navshortentry}
-    </div>
-
-{footer}
--- a/templates/monoblue/summary.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-{header}
-    <title>{repo|escape}: Summary</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / summary</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li class="current">summary</li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}log{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">Mercurial Repository Overview</h2>
-    <dl class="overview">
-        <dt>name</dt>
-        <dd>{repo|escape}</dd>
-        <dt>description</dt>
-        <dd>{desc}</dd>
-        <dt>owner</dt>
-        <dd>{owner|obfuscate}</dd>
-        <dt>last change</dt>
-        <dd>{lastchange|rfc822date}</dd>
-    </dl>
-
-    <h2><a href="{url}shortlog{sessionvars%urlparameter}">Changes</a></h2>
-    <table>
-{shortlog}
-        <tr class="light">
-            <td colspan="4"><a class="list" href="{url}shortlog{sessionvars%urlparameter}">...</a></td>
-        </tr>
-    </table>
-
-    <h2><a href="{url}tags{sessionvars%urlparameter}">Tags</a></h2>
-    <table>
-{tags}
-        <tr class="light">
-            <td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td>
-        </tr>
-    </table>
-
-    <h2 class="no-link">Branches</h2>
-    <table>
-    {branches%branchentry}
-        <tr class="light">
-          <td colspan="4"><a class="list"  href="#">...</a></td>
-        </tr>
-    </table>
-{footer}
--- a/templates/monoblue/tags.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-{header}
-    <title>{repo|escape}: Tags</title>
-    <link rel="alternate" type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}"/>
-    <link rel="alternate" type="application/rss+xml" href="{url}rss-log" title="RSS feed for {repo|escape}"/>
-</head>
-
-<body>
-<div id="container">
-    <div class="page-header">
-        <h1><a href="{url}summary{sessionvars%urlparameter}">{repo|escape}</a> / Tags</h1>
-
-        <form action="{url}log">
-            {sessionvars%hiddenformentry}
-            <dl class="search">
-                <dt><label>Search: </label></dt>
-                <dd><input type="text" name="rev" /></dd>
-            </dl>
-        </form>
-
-        <ul class="page-nav">
-            <li><a href="{url}summary{sessionvars%urlparameter}">summary</a></li>
-            <li><a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a></li>
-            <li><a href="{url}changelog{sessionvars%urlparameter}">changelog</a></li>
-            <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-            <li class="current">tags</li>
-            <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-            <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a></li>
-        </ul>
-    </div>
-
-    <h2 class="no-link no-border">tags</h2>
-    <table cellspacing="0">
-{entries%tagentry}
-    </table>
-
-{footer}
--- a/templates/paper/branches.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-{header}
-<title>{repo|escape}: branches</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-tags" title="Atom feed for {repo|escape}: branches" />
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-tags" title="RSS feed for {repo|escape}: branches" />
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li class="active">branches</li>
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>branches</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<table class="bigtable">
-<tr>
- <th>branch</th>
- <th>node</th>
-</tr>
-{entries%branchentry}
-</table>
-</div>
-</div>
-
-{footer}
--- a/templates/paper/changeset.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-{header}
-<title>{repo|escape}: {node|short}</title>
-</head>
-<body>
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
- <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
- <li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
- <li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
- <li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-<ul>
- <li class="active">changeset</li>
- <li><a href="{url}raw-rev/{node|short}{sessionvars%urlparameter}">raw</a></li>
- <li><a href="{url}file/{node|short}{sessionvars%urlparameter}">browse</a></li>
-</ul>
-<ul>
- {archives%archiveentry}
-</ul>
-</div>
-
-<div class="main">
-
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>changeset {rev}:{node|short} {changesetbranch%changelogbranchname} {changesettag}</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
-
-<table id="changesetEntry">
-<tr>
- <th class="author">author</th>
- <td class="author">{author|obfuscate}</td>
-</tr>
-<tr>
- <th class="date">date</th>
- <td class="date">{date|date} ({date|age})</td></tr>
-<tr>
- <th class="author">parents</th>
- <td class="author">{parent%changesetparent}</td>
-</tr>
-<tr>
- <th class="author">children</th>
- <td class="author">{child%changesetchild}</td>
-</tr>
-<tr>
- <th class="files">files</th>
- <td class="files">{files}</td>
-</tr>
-</table>
-
-<div class="overflow">
-<div class="sourcefirst">   line diff</div>
-
-{diff}
-</div>
-
-</div>
-</div>
-{footer}
--- a/templates/paper/error.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-{header}
-<title>{repo|escape}: error</title>
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-</div>
-
-<div class="main">
-
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>error</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30"></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<div class="description">
-<p>
-An error occurred while processing your request:
-</p>
-<p>
-{error|escape}
-</p>
-</div>
-</div>
-</div>
-
-{footer}
--- a/templates/paper/fileannotate.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape} annotate</title>
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-
-<ul>
-<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
-</ul>
-<ul>
-<li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
-<li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
-<li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-<li class="active">annotate</li>
-<li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
-<li><a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a></li>
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>annotate {file|escape} @ {rev}:{node|short}</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
-
-<table id="changesetEntry">
-<tr>
- <th class="author">author</th>
- <td class="author">{author|obfuscate}</td>
-</tr>
-<tr>
- <th class="date">date</th>
- <td class="date">{date|date} ({date|age})</td>
-</tr>
-<tr>
- <th class="author">parents</th>
- <td class="author">{parent%filerevparent}</td>
-</tr>
-<tr>
- <th class="author">children</th>
- <td class="author">{child%filerevchild}</td>
-</tr>
-{changesettag}
-</table>
-
-<div class="overflow">
-<table class="bigtable">
-<tr>
- <th class="annotate">rev</th>
- <th class="line">&nbsp;&nbsp;line source</th>
-</tr>
-{annotate%annotateline}
-</table>
-</div>
-</div>
-</div>
-
-{footer}
--- a/templates/paper/filediff.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape} diff</title>
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-<ul>
-<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
-</ul>
-<ul>
-<li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
-<li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
-<li class="active">diff</li>
-<li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-<li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
-<li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>diff {file|escape} @ {rev}:{node|short}</h3>
-
-<form class="search" action="{url}log">
-<p>{sessionvars%hiddenformentry}</p>
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
-
-<table id="changesetEntry">
-<tr>
- <th>author</th>
- <td>{author|obfuscate}</td>
-</tr>
-<tr>
- <th>date</th>
- <td>{date|date} ({date|age})</td>
-</tr>
-<tr>
- <th>parents</th>
- <td>{parent%filerevparent}</td>
-</tr>
-<tr>
- <th>children</th>
- <td>{child%filerevchild}</td>
-</tr>
-{changesettag}
-</table>
-
-<div class="overflow">
-<div class="sourcefirst">   line diff</div>
-
-{diff}
-</div>
-</div>
-</div>
-
-{footer}
--- a/templates/paper/filelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape} history</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}" />
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log/tip/{file|urlescape}" title="RSS feed for {repo|escape}:{file}" />
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-<ul>
-<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
-</ul>
-<ul>
-<li><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
-<li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-<li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-<li class="active">file log</li>
-<li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>log {file|escape}</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<div class="navigate">{nav%filenaventry}</div>
-
-<table class="bigtable">
- <tr>
-  <th class="age">age</th>
-  <th class="author">author</th>
-  <th class="description">description</th>
- </tr>
-{entries%filelogentry}
-</table>
-
-</div>
-</div>
-
-{footer}
--- a/templates/paper/filelogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
- <tr class="parity{parity}">
-  <td class="age">{date|age}</td>
-  <td class="author">{author|person}</td>
-  <td class="description"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}</td>
- </tr>
--- a/templates/paper/filerevision.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-{header}
-<title>{repo|escape}: {node|short} {file|escape}</title>
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-<ul>
-<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
-</ul>
-<ul>
-<li class="active">file</li>
-<li><a href="{url}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
-<li><a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li>
-<li><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
-<li><a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
-<li><a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a></li>
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>view {file|escape} @ {rev}:{node|short}</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
-
-<table id="changesetEntry">
-<tr>
- <th class="author">author</th>
- <td class="author">{author|obfuscate}</td>
-</tr>
-<tr>
- <th class="date">date</th>
- <td class="date">{date|date} ({date|age})</td>
-</tr>
-<tr>
- <th class="author">parents</th>
- <td class="author">{parent%filerevparent}</td>
-</tr>
-<tr>
- <th class="author">children</th>
- <td class="author">{child%filerevchild}</td>
-</tr>
-{changesettag}
-</table>
-
-<div class="overflow">
-<div class="sourcefirst"> line source</div>
-{text%fileline}
-<div class="sourcelast"></div>
-</div>
-</div>
-</div>
-
-{footer}
--- a/templates/paper/footer.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-{motd}
-
-</body>
-</html>
--- a/templates/paper/graph.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-{header}
-<title>{repo|escape}: revision graph</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}: log" />
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}: log" />
-<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li class="active">graph</li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-<ul>
-<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>graph</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<div class="navigate">
-<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
-<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
-| rev {rev}: {changenav%navgraphentry}
-</div>
-
-<noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
-
-<div id="wrapper">
-<ul id="nodebgs"></ul>
-<canvas id="graph" width="224" height="{canvasheight}"></canvas>
-<ul id="graphnodes"></ul>
-</div>
-
-<script type="text/javascript" src="{staticurl}graph.js"></script>
-<script type="text/javascript">
-<!-- hide script content
-
-var data = {jsdata|json};
-var graph = new Graph();
-graph.scale({bg_height});
-
-graph.edge = function(x0, y0, x1, y1, color) {
-	
-	this.setColor(color, 0.0, 0.65);
-	this.ctx.beginPath();
-	this.ctx.moveTo(x0, y0);
-	this.ctx.lineTo(x1, y1);
-	this.ctx.stroke();
-	
-}
-
-var revlink = '<li style="_STYLE"><span class="desc">';
-revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
-revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
-
-graph.vertex = function(x, y, color, parity, cur) {
-	
-	this.ctx.beginPath();
-	color = this.setColor(color, 0.25, 0.75);
-	this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
-	this.ctx.fill();
-	
-	var bg = '<li class="bg parity' + parity + '"></li>';
-	var left = (this.columns + 1) * this.bg_height;
-	var nstyle = 'padding-left: ' + left + 'px;';
-	var item = revlink.replace(/_STYLE/, nstyle);
-	item = item.replace(/_PARITY/, 'parity' + parity);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_DESC/, cur[3]);
-	item = item.replace(/_USER/, cur[4]);
-	item = item.replace(/_DATE/, cur[5]);
-
-	var tagspan = '';
-	if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
-		tagspan = '<span class="logtags">';
-		if (cur[6][1]) {
-			tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
-			tagspan += cur[6][0] + '</span> ';
-		} else if (!cur[6][1] && cur[6][0] != 'default') {
-			tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
-			tagspan += cur[6][0] + '</span> ';
-		}
-		if (cur[7].length) {
-			for (var t in cur[7]) {
-				var tag = cur[7][t];
-				tagspan += '<span class="tag">' + tag + '</span> ';
-			}
-		}
-		tagspan += '</span>';
-	}
-	
-	item = item.replace(/_TAGS/, tagspan);
-	return [bg, item];
-	
-}
-
-graph.render(data);
-
-// stop hiding script -->
-</script>
-
-<div class="navigate">
-<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
-<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
-| rev {rev}: {changenav%navgraphentry}
-</div>
-
-</div>
-</div>
-
-{footer}
--- a/templates/paper/header.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
-<head>
-<link rel="icon" href="{staticurl}hgicon.png" type="image/png" />
-<meta name="robots" content="index, nofollow" />
-<link rel="stylesheet" href="{staticurl}style-paper.css" type="text/css" />
--- a/templates/paper/index.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-{header}
-<title>Mercurial repositories index</title>
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
-</div>
-<div class="main">
-<h2>Mercurial Repositories</h2>
-
-<table class="bigtable">
-    <tr>
-        <th><a href="?sort={sort_name}">Name</a></th>
-        <th><a href="?sort={sort_description}">Description</a></th>
-        <th><a href="?sort={sort_contact}">Contact</a></th>
-        <th><a href="?sort={sort_lastchange}">Last change</a></th>
-        <th>&nbsp;</th>
-    </tr>
-    {entries%indexentry}
-</table>
-</div>
-</div>
-{footer}
--- a/templates/paper/manifest.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-{header}
-<title>{repo|escape}: {node|short} {path|escape}</title>
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-<ul>
-<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li class="active">browse</li>
-</ul>
-<ul>
-{archives%archiveentry}
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>directory {path|escape} @ {rev}:{node|short} {tags%changelogtag}</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<table class="bigtable">
-<tr>
-  <th class="name">name</th>
-  <th class="size">size</th>
-  <th class="permissions">permissions</th>
-</tr>
-<tr class="fileline parity{upparity}">
-  <td class="name"><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
-  <td class="size"></td>
-  <td class="permissions">drwxr-xr-x</td>
-</tr>
-{dentries%direntry}
-{fentries%fileentry}
-</table>
-</div>
-</div>
-{footer}
--- a/templates/paper/map	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-default = 'shortlog'
-
-mimetype = 'text/html; charset={encoding}'
-header = header.tmpl
-footer = footer.tmpl
-search = search.tmpl
-
-changelog = shortlog.tmpl
-shortlog = shortlog.tmpl
-shortlogentry = shortlogentry.tmpl
-graph = graph.tmpl
-
-naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
-filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
-filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
-filenolink = '{file|escape} '
-fileellipses = '...'
-changelogentry = shortlogentry.tmpl
-searchentry = shortlogentry.tmpl
-changeset = changeset.tmpl
-manifest = manifest.tmpl
-
-direntry = '
-  <tr class="fileline parity{parity}">
-    <td class="name">
-      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">
-        <img src="{staticurl}coal-folder.png" alt="dir."/> {basename|escape}/
-      </a>
-      <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
-        {emptydirs|escape}
-      </a>
-    </td>
-    <td class="size"></td>
-    <td class="permissions">drwxr-xr-x</td>
-  </tr>'
-
-fileentry = '
-  <tr class="fileline parity{parity}">
-    <td class="filename">
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        <img src="{staticurl}coal-file.png" alt="file"/> {basename|escape}
-      </a>
-    </td>
-    <td class="size">{size}</td>
-    <td class="permissions">{permissions|permissions}</td>
-  </tr>'
-
-filerevision = filerevision.tmpl
-fileannotate = fileannotate.tmpl
-filediff = filediff.tmpl
-filelog = filelog.tmpl
-fileline = '
-  <div class="parity{parity} source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</div>'
-filelogentry = filelogentry.tmpl
-
-annotateline = '
-  <tr class="parity{parity}">
-    <td class="annotate">
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#{targetline}"
-         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
-    </td>
-    <td class="source"><a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}</td>
-  </tr>'
-
-diffblock = '<div class="source bottomline parity{parity}"><pre>{lines}</pre></div>'
-difflineplus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="plusline">{line|escape}</span>'
-difflineminus = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="minusline">{line|escape}</span>'
-difflineat = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> <span class="atline">{line|escape}</span>'
-diffline = '<a href="#{lineid}" id="{lineid}">{linenumber}</a> {line|escape}'
-
-changelogparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-
-changesetparent = '<a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> '
-
-filerevparent = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{rename%filerename}{node|short}</a> '
-filerevchild = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a> '
-
-filerename = '{file|escape}@'
-filelogrename = '
-  <tr>
-    <th>base:</th>
-    <td>
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {file|escape}@{node|short}
-      </a>
-    </td>
-  </tr>'
-fileannotateparent = '
-  <tr>
-    <td class="metatag">parent:</td>
-    <td>
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {rename%filerename}{node|short}
-      </a>
-    </td>
-  </tr>'
-changesetchild = ' <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>'
-changelogchild = '
-  <tr>
-    <th class="child">child</th>
-    <td class="child">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
-        {node|short}
-      </a>
-    </td>
-  </tr>'
-fileannotatechild = '
-  <tr>
-    <td class="metatag">child:</td>
-    <td>
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {node|short}
-      </a>
-    </td>
-  </tr>'
-tags = tags.tmpl
-tagentry = '
-  <tr class="tagEntry parity{parity}">
-    <td>
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">
-        {tag|escape}
-      </a>
-    </td>
-    <td class="node">
-      {node|short}
-    </td>
-  </tr>'
-branches = branches.tmpl
-branchentry = '
-  <tr class="tagEntry parity{parity}">
-    <td>
-      <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">
-        {branch|escape}
-      </a>
-    </td>
-    <td class="node">
-      {node|short}
-    </td>
-  </tr>'
-changelogtag = '<span class="tag">{name|escape}</span> '
-changesettag = '<span class="tag">{tag|escape}</span> '
-changelogbranchhead = '<span class="branchhead">{name|escape}</span> '
-changelogbranchname = '<span class="branchname">{name|escape}</span> ' 
-
-filediffparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filelogparent = '
-  <tr>
-    <th>parent {rev}:</th>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filediffchild = '
-  <tr>
-    <th class="child">child {rev}:</th>
-    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
-  </td>
-  </tr>'
-filelogchild = '
-  <tr>
-    <th>child {rev}:</th>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-
-indexentry = '
-  <tr class="parity{parity}">
-    <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
-    <td>{description}</td>
-    <td>{contact|obfuscate}</td>
-    <td class="age">{lastchange|age}</td>
-    <td class="indexlinks">{archives%indexarchiveentry}</td>
-  </tr>\n'
-indexarchiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">&nbsp;&darr;{type|escape}</a>'
-index = index.tmpl
-archiveentry = '
-  <li>
-    <a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a>
-  </li>'
-notfound = notfound.tmpl
-error = error.tmpl
-urlparameter = '{separator}{name}={value|urlescape}'
-hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- a/templates/paper/notfound.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-{header}
-<title>Mercurial repository not found</title>
-</head>
-<body>
-
-<h2>Mercurial repository not found</h2>
-
-The specified repository "{repo|escape}" is unknown, sorry.
-
-Please go back to the <a href="{url}">main repository list page</a>.
-
-{footer}
--- a/templates/paper/search.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-{header}
-<title>{repo|escape}: searching for {query|escape}</title>
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
-</div>
-<ul>
-<li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>searching for '{query|escape}'</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30"></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<table class="bigtable">
- <tr>
-  <th class="age">age</th>
-  <th class="author">author</th>
-  <th class="description">description</th>
- </tr>
-{entries}
-</table>
-
-</div>
-</div>
-
-{footer}
--- a/templates/paper/shortlog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-{header}
-<title>{repo|escape}: log</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}" />
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}" />
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li class="active">log</li>
-<li><a href="{url}graph/{node|short}{sessionvars%urlparameter}">graph</a></li>
-<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-<ul>
-<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
-<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
-</ul>
-<ul>
-{archives%archiveentry}
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>log</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<div class="navigate">rev {rev}: {changenav%navshortentry}</div>
-
-<table class="bigtable">
- <tr>
-  <th class="age">age</th>
-  <th class="author">author</th>
-  <th class="description">description</th>
- </tr>
-{entries%shortlogentry}
-</table>
-
-<div class="navigate">rev {rev}: {changenav%navshortentry}</div>
-</div>
-</div>
-
-{footer}
--- a/templates/paper/shortlogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
- <tr class="parity{parity}">
-  <td class="age">{date|age}</td>
-  <td class="author">{author|person}</td>
-  <td class="description"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a>{inbranch%changelogbranchname}{branches%changelogbranchhead}{tags%changelogtag}</td>
- </tr>
--- a/templates/paper/tags.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-{header}
-<title>{repo|escape}: tags</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-tags" title="Atom feed for {repo|escape}: tags" />
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-tags" title="RSS feed for {repo|escape}: tags" />
-</head>
-<body>
-
-<div class="container">
-<div class="menu">
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" alt="mercurial" /></a>
-</div>
-<ul>
-<li><a href="{url}shortlog{sessionvars%urlparameter}">log</a></li>
-<li><a href="{url}graph{sessionvars%urlparameter}">graph</a></li>
-<li class="active">tags</li>
-<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
-</ul>
-</div>
-
-<div class="main">
-<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
-<h3>tags</h3>
-
-<form class="search" action="{url}log">
-{sessionvars%hiddenformentry}
-<p><input name="rev" id="search1" type="text" size="30" /></p>
-<div id="hint">find changesets by author, revision,
-files, or words in the commit message</div>
-</form>
-
-<table class="bigtable">
-<tr>
- <th>tag</th>
- <th>node</th>
-</tr>
-{entries%tagentry}
-</table>
-</div>
-</div>
-
-{footer}
--- a/templates/raw/changeset.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-{header}
-# HG changeset patch
-# User {author}
-# Date {date|hgdate}
-# Node ID {node}
-{parent%changesetparent}
-{desc}
-
-{diff}
--- a/templates/raw/error.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-{header}
-error: {error}
--- a/templates/raw/fileannotate.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-{header}
-{annotate%annotateline}
-{footer}
-
-
--- a/templates/raw/filediff.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-{header}
-{diff}
-{footer}
-
-
--- a/templates/raw/index.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-{header}
-{entries%indexentry}
--- a/templates/raw/manifest.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-{header}
-{dentries%direntry}{fentries%fileentry}
-{footer}
--- a/templates/raw/map	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-mimetype = 'text/plain; charset={encoding}'
-header = ''
-footer = ''
-changeset = changeset.tmpl
-difflineplus = '{line}'
-difflineminus = '{line}'
-difflineat = '{line}'
-diffline = '{line}'
-changesetparent = '# Parent  {node}'
-changesetchild = '# Child   {node}'
-filenodelink = ''
-fileline = '{line}'
-diffblock = '{lines}'
-filediff = filediff.tmpl
-fileannotate = fileannotate.tmpl
-annotateline = '{author|user}@{rev}: {line}'
-manifest = manifest.tmpl
-direntry = 'drwxr-xr-x {basename}\n'
-fileentry = '{permissions|permissions} {size} {basename}\n'
-index = index.tmpl
-notfound = notfound.tmpl
-error = error.tmpl
-indexentry = '{url}\n'
--- a/templates/raw/notfound.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-{header}
-error: repository {repo} not found
--- a/templates/rss/changelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-{header}
-    <title>{repo|escape} Changelog</title>
-    <description>{repo|escape} Changelog</description>
-    {entries%changelogentry}
-  </channel>
-</rss>
\ No newline at end of file
--- a/templates/rss/changelogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<item>
-    <title>{desc|strip|firstline|strip|escape}</title>
-    <guid isPermaLink="true">{urlbase}{url}rev/{node|short}</guid>
-    <description><![CDATA[{desc|strip|escape|addbreaks|nonempty}]]></description>
-    <author>{author|obfuscate}</author>
-    <pubDate>{date|rfc822date}</pubDate>
-</item>
--- a/templates/rss/error.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-{header}
-    <title>Error</title>
-    <description>Error</description>
-    <item>
-      <title>Error</title>
-      <description>{error|escape}</description>
-      <guid>http://mercurial.selenic.com/#error</guid>
-    </item>
-  </channel>
-</rss>
--- a/templates/rss/filelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-{header}
-    <title>{repo|escape}: {file|escape} history</title>
-    <description>{file|escape} revision history</description>
-    {entries%filelogentry}
-  </channel>
-</rss>
--- a/templates/rss/filelogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<item>
-    <title>{desc|strip|firstline|strip|escape}</title>
-    <link>{urlbase}{url}log{{node|short}}/{file|urlescape}</link>
-    <description><![CDATA[{desc|strip|escape|addbreaks|nonempty}]]></description>
-    <author>{author|obfuscate}</author>
-    <pubDate>{date|rfc822date}</pubDate>
-</item>
--- a/templates/rss/header.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="{encoding}"?>
-<rss version="2.0">
-  <channel>
-    <link>{urlbase}{url}</link>
-    <language>en-us</language>
--- a/templates/rss/map	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-default = 'changelog'
-mimetype = 'text/xml; charset={encoding}'
-header = header.tmpl
-changelog = changelog.tmpl
-changelogentry = changelogentry.tmpl
-filelog = filelog.tmpl
-filelogentry = filelogentry.tmpl
-tags = tags.tmpl
-tagentry = tagentry.tmpl
-error = error.tmpl
--- a/templates/rss/tagentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<item>
-    <title>{tag|escape}</title>
-    <link>{urlbase}{url}rev/{node|short}</link>
-    <description><![CDATA[{tag|strip|escape|addbreaks}]]></description>
-    <pubDate>{date|rfc822date}</pubDate>
-</item>
--- a/templates/rss/tags.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-{header}
-    <title>{repo|escape}: tags </title>
-    <description>{repo|escape} tag history</description>
-    {entriesnotip%tagentry}
-  </channel>
-</rss>
--- a/templates/spartan/branches.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-{header}
-<title>{repo|escape}: branches</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-branches" title="Atom feed for {repo|escape}: branches">
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-branches" title="RSS feed for {repo|escape}: branches">
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a>
-<a type="application/rss+xml" href="{url}rss-branches">rss</a>
-<a type="application/atom+xml" href="{url}atom-branches">atom</a>
-</div>
-
-<h2>branches:</h2>
-
-<ul id="tagEntries">
-{entries%branchentry}
-</ul>
-
-{footer}
--- a/templates/spartan/changelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-{header}
-<title>{repo|escape}: changelog</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}">
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}">
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-{archives%archiveentry}
-<a type="application/rss+xml" href="{url}rss-log">rss</a>
-<a type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}">atom</a>
-</div>
-
-<h2>changelog for {repo|escape}</h2>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<p>
-<label for="search1">search:</label>
-<input name="rev" id="search1" type="text" size="30">
-navigate: <small class="navigate">{changenav%naventry}</small>
-</p>
-</form>
-
-{entries%changelogentry}
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<p>
-<label for="search2">search:</label>
-<input name="rev" id="search2" type="text" size="30">
-navigate: <small class="navigate">{changenav%naventry}</small>
-</p>
-</form>
-
-{footer}
--- a/templates/spartan/changelogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-<table class="logEntry parity{parity}">
- <tr>
-  <th class="age">{date|age}:</th>
-  <th class="firstline">{desc|strip|firstline|escape|nonempty}</th>
- </tr>
- <tr>
-  <th class="revision">changeset {rev}:</th>
-  <td class="node"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
- </tr>
- {parent%changelogparent}
- {child%changelogchild}
- {changelogtag}
- <tr>
-  <th class="author">author:</th>
-  <td class="author">{author|obfuscate}</td>
- </tr>
- <tr>
-  <th class="date">date:</th>
-  <td class="date">{date|date}</td>
- </tr>
- <tr>
-  <th class="files"><a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>:</th>
-  <td class="files">{files}</td>
- </tr>
-</table>
--- a/templates/spartan/changeset.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-{header}
-<title>{repo|escape}: changeset {node|short}</title>
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-<a href="{url}raw-rev/{node|short}">raw</a>
-{archives%archiveentry}
-</div>
-
-<h2>changeset: {desc|strip|escape|firstline|nonempty}</h2>
-
-<table id="changesetEntry">
-<tr>
- <th class="changeset">changeset {rev}:</th>
- <td class="changeset"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-</tr>
-{parent%changesetparent}
-{child%changesetchild}
-{changesettag}
-<tr>
- <th class="author">author:</th>
- <td class="author">{author|obfuscate}</td>
-</tr>
-<tr>
- <th class="date">date:</th>
- <td class="date">{date|date} ({date|age})</td>
-</tr>
-<tr>
- <th class="files">files:</th>
- <td class="files">{files}</td>
-</tr>
-<tr>
- <th class="description">description:</th>
- <td class="description">{desc|strip|escape|addbreaks|nonempty}</td>
-</tr>
-</table>
-
-<div id="changesetDiff">
-{diff}
-</div>
-
-{footer}
-
-
--- a/templates/spartan/error.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-{header}
-<title>Mercurial Error</title>
-</head>
-<body>
-
-<h2>Mercurial Error</h2>
-
-<p>
-An error occurred while processing your request:
-</p>
-<p>
-{error|escape}
-</p>
-
-{footer}
--- a/templates/spartan/fileannotate.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape} annotate</title>
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
-<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a>
-<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>
-<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
-<a href="{url}raw-annotate/{node|short}/{file|urlescape}">raw</a>
-</div>
-
-<h2>Annotate {file|escape}</h2>
-
-<table>
-<tr>
- <td class="metatag">changeset {rev}:</td>
- <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
-{parent%fileannotateparent}
-{child%fileannotatechild}
-<tr>
- <td class="metatag">author:</td>
- <td>{author|obfuscate}</td></tr>
-<tr>
- <td class="metatag">date:</td>
- <td>{date|date} ({date|age})</td>
-</tr>
-<tr>
- <td class="metatag">permissions:</td>
- <td>{permissions|permissions}</td>
-</tr>
-<tr>
-  <td class="metatag">description:</td>
-  <td>{desc|strip|escape|addbreaks|nonempty}</td>
-</tr>
-</table>
-
-<table cellspacing="0" cellpadding="0">
-{annotate%annotateline}
-</table>
-
-{footer}
--- a/templates/spartan/filediff.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape} diff</title>
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
-<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>
-<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
-<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
-<a href="{url}raw-diff/{node|short}/{file|urlescape}">raw</a>
-</div>
-
-<h2>{file|escape}</h2>
-
-<table id="filediffEntry">
-<tr>
- <th class="revision">revision {rev}:</th>
- <td class="revision"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-</tr>
-{parent%filediffparent}
-{child%filediffchild}
-</table>
-
-<div id="fileDiff">
-{diff}
-</div>
-
-{footer}
-
-
--- a/templates/spartan/filelog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-{header}
-<title>{repo|escape}: {file|escape} history</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}">
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log/tip/{file|urlescape}" title="RSS feed for {repo|escape}:{file}">
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">file</a>
-<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
-<a type="application/rss+xml" href="{url}rss-log/tip/{file|urlescape}">rss</a>
-<a type="application/atom+xml" href="{url}atom-log/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}">atom</a>
-</div>
-
-<h2>{file|escape} revision history</h2>
-
-<p>navigate: <small class="navigate">{nav%filenaventry}</small></p>
-
-{entries%filelogentry}
-
-{footer}
--- a/templates/spartan/filelogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-<table class="logEntry parity{parity}">
- <tr>
-  <th class="age">{date|age}:</th>
-  <th class="firstline"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></th>
- </tr>
- <tr>
-  <th class="revision">revision {filerev}:</td>
-  <td class="node">
-   <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a>
-   <a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">(diff)</a>
-   <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">(annotate)</a>
-  </td>
- </tr>
- {rename%filelogrename}
- <tr>
-  <th class="author">author:</th>
-  <td class="author">{author|obfuscate}</td>
- </tr>
- <tr>
-  <th class="date">date:</th>
-  <td class="date">{date|date}</td>
- </tr>
-</table>
-
-
--- a/templates/spartan/filerevision.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-{header}
-<title>{repo|escape}:{file|escape}</title>
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
-<a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a>
-<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">revisions</a>
-<a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">annotate</a>
-<a href="{url}raw-file/{node|short}/{file|urlescape}">raw</a>
-</div>
-
-<h2>{file|escape}</h2>
-
-<table>
-<tr>
- <td class="metatag">changeset {rev}:</td>
- <td><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td></tr>
-{parent%filerevparent}
-{child%filerevchild}
-<tr>
- <td class="metatag">author:</td>
- <td>{author|obfuscate}</td></tr>
-<tr>
- <td class="metatag">date:</td>
- <td>{date|date} ({date|age})</td></tr>
-<tr>
- <td class="metatag">permissions:</td>
- <td>{permissions|permissions}</td></tr>
-<tr>
-  <td class="metatag">description:</td>
-  <td>{desc|strip|escape|addbreaks|nonempty}</td>
-</tr>
-</table>
-
-<pre>
-{text%fileline}
-</pre>
-
-{footer}
--- a/templates/spartan/footer.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-{motd}
-<div class="logo">
-<a href="http://mercurial.selenic.com/">
-<img src="{staticurl}hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
-</div>
-
-</body>
-</html>
--- a/templates/spartan/graph.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-{header}
-<title>{repo|escape}: graph</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-tags" title="Atom feed for {repo|escape}: tags">
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-tags" title="RSS feed for {repo|escape}: tags">
-<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a>
-</div>
-
-<h2>graph</h2>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<p>
-<label for="search1">search:</label>
-<input name="rev" id="search1" type="text" size="30">
-navigate: <small class="navigate">{changenav%navgraphentry}</small>
-</p>
-</form>
-
-<noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
-
-<div id="wrapper">
-<ul id="nodebgs"></ul>
-<canvas id="graph" width="224" height="{canvasheight}"></canvas>
-<ul id="graphnodes"></ul>
-</div>
-
-<script type="text/javascript" src="{staticurl}graph.js"></script>
-<script type="text/javascript">
-<!-- hide script content
-
-var data = {jsdata|json};
-var graph = new Graph();
-graph.scale({bg_height});
-
-graph.edge = function(x0, y0, x1, y1, color) {
-	
-	this.setColor(color, 0.0, 0.65);
-	this.ctx.beginPath();
-	this.ctx.moveTo(x0, y0);
-	this.ctx.lineTo(x1, y1);
-	this.ctx.stroke();
-	
-}
-
-var revlink = '<li style="_STYLE"><span class="desc">';
-revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
-revlink += '</span><span class="info">_DATE, by _USER</span></li>';
-
-graph.vertex = function(x, y, color, parity, cur) {
-	
-	this.ctx.beginPath();
-	color = this.setColor(color, 0.25, 0.75);
-	this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
-	this.ctx.fill();
-	
-	var bg = '<li class="bg parity' + parity + '"></li>';
-	var left = (this.columns + 1) * this.bg_height;
-	var nstyle = 'padding-left: ' + left + 'px;';
-	var item = revlink.replace(/_STYLE/, nstyle);
-	item = item.replace(/_PARITY/, 'parity' + parity);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_NODEID/, cur[0]);
-	item = item.replace(/_DESC/, cur[3]);
-	item = item.replace(/_USER/, cur[4]);
-	item = item.replace(/_DATE/, cur[5]);
-	
-	return [bg, item];
-	
-}
-
-graph.render(data);
-
-// stop hiding script -->
-</script>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<p>
-<label for="search1">search:</label>
-<input name="rev" id="search1" type="text" size="30">
-navigate: <small class="navigate">{changenav%navgraphentry}</small>
-</p>
-</form>
-
-{footer}
--- a/templates/spartan/header.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<link rel="icon" href="{staticurl}hgicon.png" type="image/png">
-<meta name="robots" content="index, nofollow" />
-<link rel="stylesheet" href="{staticurl}style.css" type="text/css" />
--- a/templates/spartan/index.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-{header}
-<title>Mercurial repositories index</title>
-</head>
-<body>
-
-<h2>Mercurial Repositories</h2>
-
-<table>
-    <tr>
-        <td><a href="?sort={sort_name}">Name</a></td>
-        <td><a href="?sort={sort_description}">Description</a></td>
-        <td><a href="?sort={sort_contact}">Contact</a></td>
-        <td><a href="?sort={sort_lastchange}">Last change</a></td>
-        <td>&nbsp;</td>
-    </tr>
-    {entries%indexentry}
-</table>
-
-{footer}
--- a/templates/spartan/manifest.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-{header}
-<title>{repo|escape}: files for changeset {node|short}</title>
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog/{rev}{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a>
-{archives%archiveentry}
-</div>
-
-<h2>files for changeset {node|short}: {path|escape}</h2>
-
-<table cellpadding="0" cellspacing="0">
-<tr class="parity{upparity}">
-  <td><tt>drwxr-xr-x</tt>&nbsp;
-  <td>&nbsp;
-  <td>&nbsp;
-  <td><a href="{url}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a>
-</tr>
-{dentries%direntry}
-{fentries%fileentry}
-</table>
-{footer}
--- a/templates/spartan/map	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-default = 'shortlog'
-mimetype = 'text/html; charset={encoding}'
-header = header.tmpl
-footer = footer.tmpl
-search = search.tmpl
-changelog = changelog.tmpl
-shortlog = shortlog.tmpl
-shortlogentry = shortlogentry.tmpl
-graph = graph.tmpl
-naventry = '<a href="{url}log/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navshortentry = '<a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-navgraphentry = '<a href="{url}graph/{node|short}{sessionvars%urlparameter}">{label|escape}</a> '
-filenaventry = '<a href="{url}log/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{label|escape}</a> '
-filedifflink = '<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
-filenodelink = '<a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{file|escape}</a> '
-filenolink = '{file|escape} '
-fileellipses = '...'
-changelogentry = changelogentry.tmpl
-searchentry = changelogentry.tmpl
-changeset = changeset.tmpl
-manifest = manifest.tmpl
-
-direntry = '
-  <tr class="parity{parity}">
-    <td><tt>drwxr-xr-x</tt>&nbsp;
-    <td>&nbsp;
-    <td>&nbsp;
-    <td>
-      <a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}/</a>
-      <a href="{url}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">
-        {emptydirs|urlescape}
-      </a>'
-
-fileentry = '
-  <tr class="parity{parity}">
-    <td><tt>{permissions|permissions}</tt>&nbsp;
-    <td align=right><tt class="date">{date|isodate}</tt>&nbsp;
-    <td align=right><tt>{size}</tt>&nbsp;
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{basename|escape}</a>'
-
-filerevision = filerevision.tmpl
-fileannotate = fileannotate.tmpl
-filediff = filediff.tmpl
-filelog = filelog.tmpl
-fileline = '<div class="parity{parity}"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>&nbsp;{line|escape}</div>'
-filelogentry = filelogentry.tmpl
-
-# The &nbsp; ensures that all table cells have content (even if there
-# is an empty line in the annotated file), which in turn ensures that
-# all table rows have equal height.
-annotateline = '
-  <tr class="parity{parity}">
-    <td class="annotate">
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"
-         title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}</a>
-    </td>
-    <td>
-      <a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>
-    </td>
-    <td><pre>&nbsp;{line|escape}</pre></td>
-  </tr>'
-difflineplus = '<span class="plusline"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</span>'
-difflineminus = '<span class="minusline"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</span>'
-difflineat = '<span class="atline"><a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}</span>'
-diffline = '<a class="lineno" href="#{lineid}" id="{lineid}">{linenumber}</a>{line|escape}'
-changelogparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent">
-      <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a>
-    </td>
-  </tr>'
-changesetparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filerevparent = '
-  <tr>
-    <td class="metatag">parent:</td>
-    <td>
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {rename%filerename}{node|short}
-      </a>
-    </td>
-  </tr>'
-filerename = '{file|escape}@'
-filelogrename = '
-  <tr>
-    <th>base:</th>
-    <td>
-      <a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {file|escape}@{node|short}
-      </a>
-    </td>
-  </tr>'
-fileannotateparent = '
-  <tr>
-    <td class="metatag">parent:</td>
-    <td>
-      <a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
-        {rename%filerename}{node|short}
-      </a>
-    </td>
-  </tr>'
-changesetchild = '
-  <tr>
-    <th class="child">child {rev}:</th>
-    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-changelogchild = '
-  <tr>
-    <th class="child">child {rev}:</th>
-    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filerevchild = '
-  <tr>
-    <td class="metatag">child:</td>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-fileannotatechild = '
-  <tr>
-    <td class="metatag">child:</td>
-    <td><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-tags = tags.tmpl
-tagentry = '
-  <li class="tagEntry parity{parity}">
-    <tt class="node">{node}</tt>
-    <a href="{url}rev/{node|short}{sessionvars%urlparameter}">{tag|escape}</a>
-  </li>'
-branches = branches.tmpl
-branchentry = '
-  <li class="tagEntry parity{parity}">
-    <tt class="node">{node}</tt>
-    <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">{branch|escape}</a>
-  </li>'
-diffblock = '<pre class="parity{parity}">{lines}</pre>'
-changelogtag = '<tr><th class="tag">tag:</th><td class="tag">{tag|escape}</td></tr>'
-changesettag = '<tr><th class="tag">tag:</th><td class="tag">{tag|escape}</td></tr>'
-filediffparent = '
-  <tr>
-    <th class="parent">parent {rev}:</th>
-    <td class="parent"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filelogparent = '
-  <tr>
-    <th>parent {rev}:</th>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filediffchild = '
-  <tr>
-    <th class="child">child {rev}:</th>
-    <td class="child"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-filelogchild = '
-  <tr>
-    <th>child {rev}:</th>
-    <td><a href="{url}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td>
-  </tr>'
-indexentry = '
-  <tr class="parity{parity}">
-    <td><a href="{url}{sessionvars%urlparameter}">{name|escape}</a></td>
-    <td>{description}</td>
-    <td>{contact|obfuscate}</td>
-    <td class="age">{lastchange|age}</td>
-    <td class="indexlinks">
-      <a href="{url}rss-log">RSS</a>
-      <a href="{url}atom-log">Atom</a>
-      {archives%archiveentry}
-    </td>
-  </tr>'
-index = index.tmpl
-archiveentry = '<a href="{url}archive/{node|short}{extension|urlescape}">{type|escape}</a> '
-notfound = notfound.tmpl
-error = error.tmpl
-urlparameter = '{separator}{name}={value|urlescape}'
-hiddenformentry = '<input type="hidden" name="{name}" value="{value|escape}" />'
--- a/templates/spartan/notfound.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-{header}
-<title>Mercurial repository not found</title>
-</head>
-<body>
-
-<h2>Mercurial repository not found</h2>
-
-The specified repository "{repo|escape}" is unknown, sorry.
-
-Please go back to the <a href="{url}">main repository list page</a>.
-
-{footer}
--- a/templates/spartan/search.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-{header}
-<title>{repo|escape}: searching for {query|escape}</title>
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}file/{node|short}{sessionvars%urlparameter}">files</a>
-{archives%archiveentry}
-</div>
-
-<h2>searching for {query|escape}</h2>
-
-<form>
-{sessionvars%hiddenformentry}
-<p>
-search:
-<input name="rev" type="text" width="30" value="{query|escape}">
-</p>
-</form>
-
-{entries}
-
-<form>
-{sessionvars%hiddenformentry}
-<p>
-search:
-<input name="rev" type="text" width="30" value="{query|escape}">
-</p>
-</form>
-
-{footer}
--- a/templates/spartan/shortlog.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-{header}
-<title>{repo|escape}: shortlog</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-log" title="Atom feed for {repo|escape}">
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-log" title="RSS feed for {repo|escape}">
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log/{rev}{sessionvars%urlparameter}">changelog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}tags{sessionvars%urlparameter}">tags</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a>
-{archives%archiveentry}
-<a type="application/rss+xml" href="{url}rss-log">rss</a>
-<a type="application/rss+xml" href="{url}atom-log" title="Atom feed for {repo|escape}">atom</a>
-</div>
-
-<h2>shortlog for {repo|escape}</h2>
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<p>
-<label for="search1">search:</label>
-<input name="rev" id="search1" type="text" size="30">
-navigate: <small class="navigate">{changenav%navshortentry}</small>
-</p>
-</form>
-
-{entries%shortlogentry}
-
-<form action="{url}log">
-{sessionvars%hiddenformentry}
-<p>
-<label for="search2">search:</label>
-<input name="rev" id="search2" type="text" size="30">
-navigate: <small class="navigate">{changenav%navshortentry}</small>
-</p>
-</form>
-
-{footer}
--- a/templates/spartan/shortlogentry.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<table class="slogEntry parity{parity}">
- <tr>
-  <td class="age">{date|age}</td>
-  <td class="author">{author|person}</td>
-  <td class="node"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">{desc|strip|firstline|escape|nonempty}</a></td>
- </tr>
-</table>
--- a/templates/spartan/tags.tmpl	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-{header}
-<title>{repo|escape}: tags</title>
-<link rel="alternate" type="application/atom+xml"
-   href="{url}atom-tags" title="Atom feed for {repo|escape}: tags">
-<link rel="alternate" type="application/rss+xml"
-   href="{url}rss-tags" title="RSS feed for {repo|escape}: tags">
-</head>
-<body>
-
-<div class="buttons">
-<a href="{url}log{sessionvars%urlparameter}">changelog</a>
-<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a>
-<a href="{url}graph{sessionvars%urlparameter}">graph</a>
-<a href="{url}branches{sessionvars%urlparameter}">branches</a>
-<a href="{url}file/{node|short}/{sessionvars%urlparameter}">files</a>
-<a type="application/rss+xml" href="{url}rss-tags">rss</a>
-<a type="application/atom+xml" href="{url}atom-tags">atom</a>
-</div>
-
-<h2>tags:</h2>
-
-<ul id="tagEntries">
-{entries%tagentry}
-</ul>
-
-{footer}
Binary file templates/static/background.png has changed
Binary file templates/static/coal-file.png has changed
Binary file templates/static/coal-folder.png has changed
--- a/templates/static/excanvas.js	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-if(!window.CanvasRenderingContext2D){(function(){var I=Math,i=I.round,L=I.sin,M=I.cos,m=10,A=m/2,Q={init:function(a){var b=a||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var c=this;b.attachEvent("onreadystatechange",function(){c.r(b)})}},r:function(a){if(a.readyState=="complete"){if(!a.namespaces["s"]){a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var b=a.createStyleSheet();b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}";
-var c=a.getElementsByTagName("canvas");for(var d=0;d<c.length;d++){if(!c[d].getContext){this.initElement(c[d])}}}},q:function(a){var b=a.outerHTML,c=a.ownerDocument.createElement(b);if(b.slice(-2)!="/>"){var d="/"+a.tagName,e;while((e=a.nextSibling)&&e.tagName!=d){e.removeNode()}if(e){e.removeNode()}}a.parentNode.replaceChild(c,a);return c},initElement:function(a){a=this.q(a);a.getContext=function(){if(this.l){return this.l}return this.l=new K(this)};a.attachEvent("onpropertychange",V);a.attachEvent("onresize",
-W);var b=a.attributes;if(b.width&&b.width.specified){a.style.width=b.width.nodeValue+"px"}else{a.width=a.clientWidth}if(b.height&&b.height.specified){a.style.height=b.height.nodeValue+"px"}else{a.height=a.clientHeight}return a}};function V(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function W(a){var b=a.srcElement;
-if(b.firstChild){b.firstChild.style.width=b.clientWidth+"px";b.firstChild.style.height=b.clientHeight+"px"}}Q.init();var R=[];for(var E=0;E<16;E++){for(var F=0;F<16;F++){R[E*16+F]=E.toString(16)+F.toString(16)}}function J(){return[[1,0,0],[0,1,0],[0,0,1]]}function G(a,b){var c=J();for(var d=0;d<3;d++){for(var e=0;e<3;e++){var g=0;for(var h=0;h<3;h++){g+=a[d][h]*b[h][e]}c[d][e]=g}}return c}function N(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=
-a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.d=a.d;b.e=a.e}function O(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),g=a.substring(d+1,e).split(",");b="#";for(var h=0;h<3;h++){b+=R[Number(g[h])]}if(g.length==4&&a.substr(3,1)=="a"){c=g[3]}}else{b=a}return[b,c]}function S(a){switch(a){case "butt":return"flat";case "round":return"round";
-case "square":default:return"square"}}function K(a){this.a=J();this.m=[];this.k=[];this.c=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=m*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.j=b;this.d=1;this.e=1}var j=K.prototype;j.clearRect=function(){this.j.innerHTML=
-"";this.c=[]};j.beginPath=function(){this.c=[]};j.moveTo=function(a,b){this.c.push({type:"moveTo",x:a,y:b});this.f=a;this.g=b};j.lineTo=function(a,b){this.c.push({type:"lineTo",x:a,y:b});this.f=a;this.g=b};j.bezierCurveTo=function(a,b,c,d,e,g){this.c.push({type:"bezierCurveTo",cp1x:a,cp1y:b,cp2x:c,cp2y:d,x:e,y:g});this.f=e;this.g=g};j.quadraticCurveTo=function(a,b,c,d){var e=this.f+0.6666666666666666*(a-this.f),g=this.g+0.6666666666666666*(b-this.g),h=e+(c-this.f)/3,l=g+(d-this.g)/3;this.bezierCurveTo(e,
-g,h,l,c,d)};j.arc=function(a,b,c,d,e,g){c*=m;var h=g?"at":"wa",l=a+M(d)*c-A,n=b+L(d)*c-A,o=a+M(e)*c-A,f=b+L(e)*c-A;if(l==o&&!g){l+=0.125}this.c.push({type:h,x:a,y:b,radius:c,xStart:l,yStart:n,xEnd:o,yEnd:f})};j.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};j.strokeRect=function(a,b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke()};j.fillRect=function(a,
-b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill()};j.createLinearGradient=function(a,b,c,d){var e=new H("gradient");return e};j.createRadialGradient=function(a,b,c,d,e,g){var h=new H("gradientradial");h.n=c;h.o=g;h.i.x=a;h.i.y=b;return h};j.drawImage=function(a,b){var c,d,e,g,h,l,n,o,f=a.runtimeStyle.width,k=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var q=a.width,r=a.height;a.runtimeStyle.width=
-f;a.runtimeStyle.height=k;if(arguments.length==3){c=arguments[1];d=arguments[2];h=(l=0);n=(e=q);o=(g=r)}else if(arguments.length==5){c=arguments[1];d=arguments[2];e=arguments[3];g=arguments[4];h=(l=0);n=q;o=r}else if(arguments.length==9){h=arguments[1];l=arguments[2];n=arguments[3];o=arguments[4];c=arguments[5];d=arguments[6];e=arguments[7];g=arguments[8]}else{throw"Invalid number of arguments";}var s=this.b(c,d),t=[],v=10,w=10;t.push(" <g_vml_:group",' coordsize="',m*v,",",m*w,'"',' coordorigin="0,0"',
-' style="width:',v,";height:",w,";position:absolute;");if(this.a[0][0]!=1||this.a[0][1]){var x=[];x.push("M11='",this.a[0][0],"',","M12='",this.a[1][0],"',","M21='",this.a[0][1],"',","M22='",this.a[1][1],"',","Dx='",i(s.x/m),"',","Dy='",i(s.y/m),"'");var p=s,y=this.b(c+e,d),z=this.b(c,d+g),B=this.b(c+e,d+g);p.x=Math.max(p.x,y.x,z.x,B.x);p.y=Math.max(p.y,y.y,z.y,B.y);t.push("padding:0 ",i(p.x/m),"px ",i(p.y/m),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",x.join(""),", sizingmethod='clip');")}else{t.push("top:",
-i(s.y/m),"px;left:",i(s.x/m),"px;")}t.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',m*e,";"," height:",m*g,';"',' cropleft="',h/q,'"',' croptop="',l/r,'"',' cropright="',(q-h-n)/q,'"',' cropbottom="',(r-l-o)/r,'"'," />","</g_vml_:group>");this.j.insertAdjacentHTML("BeforeEnd",t.join(""))};j.stroke=function(a){var b=[],c=O(a?this.fillStyle:this.strokeStyle),d=c[0],e=c[1]*this.globalAlpha,g=10,h=10;b.push("<g_vml_:shape",' fillcolor="',d,'"',' filled="',Boolean(a),'"',' style="position:absolute;width:',
-g,";height:",h,';"',' coordorigin="0 0" coordsize="',m*g," ",m*h,'"',' stroked="',!a,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',d,'"',' path="');var l={x:null,y:null},n={x:null,y:null};for(var o=0;o<this.c.length;o++){var f=this.c[o];if(f.type=="moveTo"){b.push(" m ");var k=this.b(f.x,f.y);b.push(i(k.x),",",i(k.y))}else if(f.type=="lineTo"){b.push(" l ");var k=this.b(f.x,f.y);b.push(i(k.x),",",i(k.y))}else if(f.type=="close"){b.push(" x ")}else if(f.type=="bezierCurveTo"){b.push(" c ");
-var k=this.b(f.x,f.y),q=this.b(f.cp1x,f.cp1y),r=this.b(f.cp2x,f.cp2y);b.push(i(q.x),",",i(q.y),",",i(r.x),",",i(r.y),",",i(k.x),",",i(k.y))}else if(f.type=="at"||f.type=="wa"){b.push(" ",f.type," ");var k=this.b(f.x,f.y),s=this.b(f.xStart,f.yStart),t=this.b(f.xEnd,f.yEnd);b.push(i(k.x-this.d*f.radius),",",i(k.y-this.e*f.radius)," ",i(k.x+this.d*f.radius),",",i(k.y+this.e*f.radius)," ",i(s.x),",",i(s.y)," ",i(t.x),",",i(t.y))}if(k){if(l.x==null||k.x<l.x){l.x=k.x}if(n.x==null||k.x>n.x){n.x=k.x}if(l.y==
-null||k.y<l.y){l.y=k.y}if(n.y==null||k.y>n.y){n.y=k.y}}}b.push(' ">');if(typeof this.fillStyle=="object"){var v={x:"50%",y:"50%"},w=n.x-l.x,x=n.y-l.y,p=w>x?w:x;v.x=i(this.fillStyle.i.x/w*100+50)+"%";v.y=i(this.fillStyle.i.y/x*100+50)+"%";var y=[];if(this.fillStyle.p=="gradientradial"){var z=this.fillStyle.n/p*100,B=this.fillStyle.o/p*100-z}else{var z=0,B=100}var C={offset:null,color:null},D={offset:null,color:null};this.fillStyle.h.sort(function(T,U){return T.offset-U.offset});for(var o=0;o<this.fillStyle.h.length;o++){var u=
-this.fillStyle.h[o];y.push(u.offset*B+z,"% ",u.color,",");if(u.offset>C.offset||C.offset==null){C.offset=u.offset;C.color=u.color}if(u.offset<D.offset||D.offset==null){D.offset=u.offset;D.color=u.color}}y.pop();b.push("<g_vml_:fill",' color="',D.color,'"',' color2="',C.color,'"',' type="',this.fillStyle.p,'"',' focusposition="',v.x,", ",v.y,'"',' colors="',y.join(""),'"',' opacity="',e,'" />')}else if(a){b.push('<g_vml_:fill color="',d,'" opacity="',e,'" />')}else{b.push("<g_vml_:stroke",' opacity="',
-e,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',S(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',d,'" />')}b.push("</g_vml_:shape>");this.j.insertAdjacentHTML("beforeEnd",b.join(""));this.c=[]};j.fill=function(){this.stroke(true)};j.closePath=function(){this.c.push({type:"close"})};j.b=function(a,b){return{x:m*(a*this.a[0][0]+b*this.a[1][0]+this.a[2][0])-A,y:m*(a*this.a[0][1]+b*this.a[1][1]+this.a[2][1])-A}};j.save=function(){var a={};N(this,a);
-this.k.push(a);this.m.push(this.a);this.a=G(J(),this.a)};j.restore=function(){N(this.k.pop(),this);this.a=this.m.pop()};j.translate=function(a,b){var c=[[1,0,0],[0,1,0],[a,b,1]];this.a=G(c,this.a)};j.rotate=function(a){var b=M(a),c=L(a),d=[[b,c,0],[-c,b,0],[0,0,1]];this.a=G(d,this.a)};j.scale=function(a,b){this.d*=a;this.e*=b;var c=[[a,0,0],[0,b,0],[0,0,1]];this.a=G(c,this.a)};j.clip=function(){};j.arcTo=function(){};j.createPattern=function(){return new P};function H(a){this.p=a;this.n=0;this.o=
-0;this.h=[];this.i={x:0,y:0}}H.prototype.addColorStop=function(a,b){b=O(b);this.h.push({offset:1-a,color:b})};function P(){}G_vmlCanvasManager=Q;CanvasRenderingContext2D=K;CanvasGradient=H;CanvasPattern=P})()};
--- a/templates/static/graph.js	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-// branch_renderer.js - Rendering of branch DAGs on the client side
-//
-// Copyright 2008 Dirkjan Ochtman <dirkjan AT ochtman DOT nl>
-// Copyright 2006 Alexander Schremmer <alex AT alexanderweb DOT de>
-//
-// derived from code written by Scott James Remnant <scott@ubuntu.com>
-// Copyright 2005 Canonical Ltd.
-//
-// This software may be used and distributed according to the terms
-// of the GNU General Public License, incorporated herein by reference.
-
-var colors = [
-	[ 1.0, 0.0, 0.0 ],
-	[ 1.0, 1.0, 0.0 ],
-	[ 0.0, 1.0, 0.0 ],
-	[ 0.0, 1.0, 1.0 ],
-	[ 0.0, 0.0, 1.0 ],
-	[ 1.0, 0.0, 1.0 ]
-];
-
-function Graph() {
-	
-	this.canvas = document.getElementById('graph');
-	if (navigator.userAgent.indexOf('MSIE') >= 0) this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
-	this.ctx = this.canvas.getContext('2d');
-	this.ctx.strokeStyle = 'rgb(0, 0, 0)';
-	this.ctx.fillStyle = 'rgb(0, 0, 0)';
-	this.cur = [0, 0];
-	this.line_width = 3;
-	this.bg = [0, 4];
-	this.cell = [2, 0];
-	this.columns = 0;
-	this.revlink = '';
-	
-	this.scale = function(height) {
-		this.bg_height = height;
-		this.box_size = Math.floor(this.bg_height / 1.2);
-		this.cell_height = this.box_size;
-	}
-	
-	function colorPart(num) {
-		num *= 255
-		num = num < 0 ? 0 : num;
-		num = num > 255 ? 255 : num;
-		var digits = Math.round(num).toString(16);
-		if (num < 16) {
-			return '0' + digits;
-		} else {
-			return digits;
-		}
-	}
-
-	this.setColor = function(color, bg, fg) {
-		
-		// Set the colour.
-		//
-		// Picks a distinct colour based on an internal wheel; the bg
-		// parameter provides the value that should be assigned to the 'zero'
-		// colours and the fg parameter provides the multiplier that should be
-		// applied to the foreground colours.
-		
-		color %= colors.length;
-		var red = (colors[color][0] * fg) || bg;
-		var green = (colors[color][1] * fg) || bg;
-		var blue = (colors[color][2] * fg) || bg;
-		red = Math.round(red * 255);
-		green = Math.round(green * 255);
-		blue = Math.round(blue * 255);
-		var s = 'rgb(' + red + ', ' + green + ', ' + blue + ')';
-		this.ctx.strokeStyle = s;
-		this.ctx.fillStyle = s;
-		return s;
-		
-	}
-
-	this.render = function(data) {
-		
-		var backgrounds = '';
-		var nodedata = '';
-		
-		for (var i in data) {
-			
-			var parity = i % 2;
-			this.cell[1] += this.bg_height;
-			this.bg[1] += this.bg_height;
-			
-			var cur = data[i];
-			var node = cur[1];
-			var edges = cur[2];
-			var fold = false;
-			
-			for (var j in edges) {
-				
-				line = edges[j];
-				start = line[0];
-				end = line[1];
-				color = line[2];
-
-				if (end > this.columns || start > this.columns) {
-					this.columns += 1;
-				}
-				
-				if (start == this.columns && start > end) {
-					var fold = true;
-				}
-				
-				x0 = this.cell[0] + this.box_size * start + this.box_size / 2;
-				y0 = this.bg[1] - this.bg_height / 2;
-				x1 = this.cell[0] + this.box_size * end + this.box_size / 2;
-				y1 = this.bg[1] + this.bg_height / 2;
-				
-				this.edge(x0, y0, x1, y1, color);
-				
-			}
-			
-			// Draw the revision node in the right column
-			
-			column = node[0]
-			color = node[1]
-			
-			radius = this.box_size / 8;
-			x = this.cell[0] + this.box_size * column + this.box_size / 2;
-			y = this.bg[1] - this.bg_height / 2;
-			var add = this.vertex(x, y, color, parity, cur);
-			backgrounds += add[0];
-			nodedata += add[1];
-			
-			if (fold) this.columns -= 1;
-			
-		}
-		
-		document.getElementById('nodebgs').innerHTML += backgrounds;
-		document.getElementById('graphnodes').innerHTML += nodedata;
-		
-	}
-
-}
Binary file templates/static/hgicon.png has changed
Binary file templates/static/hglogo.png has changed
--- a/templates/static/style-coal.css	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-body {
-  margin: 0;
-  padding: 0;
-  background: black url(background.png) repeat-x;
-  font-family: sans-serif;
-}
-
-.container {
-  padding-right: 150px;
-}
-
-.main {
-  position: relative;
-  background: white;
-  padding: 2em;
-  border-right: 15px solid black;
-  border-bottom: 15px solid black;
-}
-
-#.main {
-  width: 98%;
-}
-
-.overflow {
-  width: 100%;
-  overflow: auto;
-}
-
-.menu {
-  background: #999;
-  padding: 10px;
-  width: 75px;
-  margin: 0;
-  font-size: 80%;
-  text-align: left;
-  position: fixed;
-  top: 27px;
-  left: auto;
-  right: 27px;
-}
-
-#.menu {
-  position: absolute !important;
-  top:expression(eval(document.body.scrollTop + 27));
-}
-
-.menu ul {
-  list-style: none;
-  padding: 0;
-  margin: 10px 0 0 0;
-}
-
-.menu li {
-  margin-bottom: 3px;
-  padding: 2px 4px;
-  background: white;
-  color: black;
-  font-weight: normal;
-}
-
-.menu li.active {
-  background: black;
-  color: white;
-}
-
-.menu img {
-  width: 75px;
-  height: 90px;
-  border: 0;
-}
-
-.menu a { color: black; display: block; }
-
-.search {
-  position: absolute;
-  top: .7em;
-  right: 2em;
-}
-
-form.search div#hint {
-  display: none;
-  position: absolute;
-  top: 40px;
-  right: 0px;
-  width: 190px;
-  padding: 5px;
-  background: #ffc;
-  font-size: 70%;
-  border: 1px solid yellow;
-  -moz-border-radius: 5px; /* this works only in camino/firefox */
-  -webkit-border-radius: 5px; /* this is just for Safari */
-}
-
-form.search:hover div#hint { display: block; }
-
-a { text-decoration:none; }
-.age { white-space:nowrap; }
-.date { white-space:nowrap; }
-.indexlinks { white-space:nowrap; }
-.parity0 { background-color: #f0f0f0; }
-.parity1 { background-color: white; }
-.plusline { color: green; }
-.minusline { color: #dc143c; } /* crimson */
-.atline { color: purple; }
-
-.navigate {
-  text-align: right;
-  font-size: 60%;
-  margin: 1em 0;
-}
-
-.tag {
-  color: #999;
-  font-size: 70%;
-  font-weight: normal;
-  margin-left: .5em;
-  vertical-align: baseline;
-}
-
-.branchhead {
-  color: #000;
-  font-size: 80%;
-  font-weight: normal;
-  margin-left: .5em;
-  vertical-align: baseline;
-}
-
-ul#graphnodes .branchhead {
-  font-size: 75%;
-}
-
-.branchname {
-  color: #000;
-  font-size: 60%; 
-  font-weight: normal;
-  margin-left: .5em;
-  vertical-align: baseline;
-}
-
-h3 .branchname {
-  font-size: 80%;
-}
-
-/* Common */
-pre { margin: 0; }
-
-h2 { font-size: 120%; border-bottom: 1px solid #999; }
-h2 a { color: #000; }
-h3 {
-  margin-top: -.7em;
-  font-size: 100%;
-}
-
-/* log and tags tables */
-.bigtable {
-  border-bottom: 1px solid #999;
-  border-collapse: collapse;
-  font-size: 90%;
-  width: 100%;
-  font-weight: normal;
-  text-align: left;
-}
-
-.bigtable td {
-  vertical-align: top;
-}
-
-.bigtable th {
-  padding: 1px 4px;
-  border-bottom: 1px solid #999;
-}
-.bigtable tr { border: none; }
-.bigtable .age { width: 6em; }
-.bigtable .author { width: 12em; }
-.bigtable .description { }
-.bigtable .node { width: 5em; font-family: monospace;}
-.bigtable .lineno { width: 2em; text-align: right;}
-.bigtable .lineno a { color: #999; font-size: smaller; font-family: monospace;}
-.bigtable .permissions { width: 8em; text-align: left;}
-.bigtable .size { width: 5em; text-align: right; }
-.bigtable .annotate { text-align: right; }
-.bigtable td.annotate { font-size: smaller; }
-.bigtable td.source { font-size: inherit; }
-
-.source, .sourcefirst, .sourcelast {
-  font-family: monospace;
-  white-space: pre;
-  padding: 1px 4px;
-  font-size: 90%;
-}
-.sourcefirst { border-bottom: 1px solid #999; font-weight: bold; }
-.sourcelast { border-top: 1px solid #999; }
-.source a { color: #999; font-size: smaller; font-family: monospace;}
-.bottomline { border-bottom: 1px solid #999; }
-
-.fileline { font-family: monospace; }
-.fileline img { border: 0; }
-
-.tagEntry .closed { color: #99f; }
-
-/* Changeset entry */
-#changesetEntry {
-  border-collapse: collapse;
-  font-size: 90%;
-  width: 100%;
-  margin-bottom: 1em;
-}
-
-#changesetEntry th {
-  padding: 1px 4px;
-  width: 4em;
-  text-align: right;
-  font-weight: normal;
-  color: #999;
-  margin-right: .5em;
-  vertical-align: top;
-}
-
-div.description {
-  border-left: 3px solid #999;
-  margin: 1em 0 1em 0;
-  padding: .3em;
-}
-
-/* Graph */
-div#wrapper {
-	position: relative;
-	border-top: 1px solid black;
-	border-bottom: 1px solid black;
-	margin: 0;
-	padding: 0;
-}
-
-canvas {
-	position: absolute;
-	z-index: 5;
-	top: -0.7em;
-	margin: 0;
-}
-
-ul#graphnodes {
-	position: absolute;
-	z-index: 10;
-	top: -1.0em;
-	list-style: none inside none;
-	padding: 0;
-}
-
-ul#nodebgs {
-	list-style: none inside none;
-	padding: 0;
-	margin: 0;
-	top: -0.7em;
-}
-
-ul#graphnodes li, ul#nodebgs li {
-	height: 39px;
-}
-
-ul#graphnodes li .info {
-	display: block;
-	font-size: 70%;
-	position: relative;
-	top: -3px;
-}
--- a/templates/static/style-gitweb.css	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
-a { color:#0000cc; }
-a:hover, a:visited, a:active { color:#880000; }
-div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
-div.page_header a:visited { color:#0000cc; }
-div.page_header a:hover { color:#880000; }
-div.page_nav { padding:8px; }
-div.page_nav a:visited { color:#0000cc; }
-div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
-div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
-div.page_footer_text { float:left; color:#555555; font-style:italic; }
-div.page_body { padding:8px; }
-div.title, a.title {
-	display:block; padding:6px 8px;
-	font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
-}
-a.title:hover { background-color: #d9d8d1; }
-div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
-div.log_body { padding:8px 8px 8px 150px; }
-.age { white-space:nowrap; }
-span.age { position:relative; float:left; width:142px; font-style:italic; }
-div.log_link {
-	padding:0px 8px;
-	font-size:10px; font-family:sans-serif; font-style:normal;
-	position:relative; float:left; width:136px;
-}
-div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
-a.list { text-decoration:none; color:#000000; }
-a.list:hover { text-decoration:underline; color:#880000; }
-table { padding:8px 4px; }
-th { padding:2px 5px; font-size:12px; text-align:left; }
-tr.light:hover, .parity0:hover { background-color:#edece6; }
-tr.dark, .parity1 { background-color:#f6f6f0; }
-tr.dark:hover, .parity1:hover { background-color:#edece6; }
-td { padding:2px 5px; font-size:12px; vertical-align:top; }
-td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
-td.indexlinks { white-space: nowrap; }
-td.indexlinks a {
-  padding: 2px 5px; line-height: 10px;
-  border: 1px solid;
-  color: #ffffff; background-color: #7777bb;
-  border-color: #aaaadd #333366 #333366 #aaaadd;
-  font-weight: bold;  text-align: center; text-decoration: none;
-  font-size: 10px;
-}
-td.indexlinks a:hover { background-color: #6666aa; }
-div.pre { font-family:monospace; font-size:12px; white-space:pre; }
-div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
-div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
-div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
-.linenr { color:#999999; text-decoration:none }
-div.rss_logo { float: right; white-space: nowrap; }
-div.rss_logo a {
-	padding:3px 6px; line-height:10px;
-	border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
-	color:#ffffff; background-color:#ff6600;
-	font-weight:bold; font-family:sans-serif; font-size:10px;
-	text-align:center; text-decoration:none;
-}
-div.rss_logo a:hover { background-color:#ee5500; }
-pre { margin: 0; }
-span.logtags span {
-	padding: 0px 4px;
-	font-size: 10px;
-	font-weight: normal;
-	border: 1px solid;
-	background-color: #ffaaff;
-	border-color: #ffccff #ff00ee #ff00ee #ffccff;
-}
-span.logtags span.tagtag {
-	background-color: #ffffaa;
-	border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
-}
-span.logtags span.branchtag {
-	background-color: #aaffaa;
-	border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
-}
-span.logtags span.inbranchtag {
-	background-color: #d5dde6;
-	border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
-}
-
-/* Graph */
-div#wrapper {
-	position: relative;
-	margin: 0;
-	padding: 0;
-	margin-top: 3px;
-}
-
-canvas {
-	position: absolute;
-	z-index: 5;
-	top: -0.9em;
-	margin: 0;
-}
-
-ul#nodebgs {
-	list-style: none inside none;
-	padding: 0;
-	margin: 0;
-	top: -0.7em;
-}
-
-ul#graphnodes li, ul#nodebgs li {
-	height: 39px;
-}
-
-ul#graphnodes {
-	position: absolute;
-	z-index: 10;
-	top: -0.8em;
-	list-style: none inside none;
-	padding: 0;
-}
-
-ul#graphnodes li .info {
-	display: block;
-	font-size: 100%;
-	position: relative;
-	top: -3px;
-	font-style: italic;
-}
--- a/templates/static/style-monoblue.css	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,472 +0,0 @@
-/*** Initial Settings ***/
-* {
-  margin: 0;
-  padding: 0;
-  font-weight: normal;
-  font-style: normal;
-}
-
-html {
-  font-size: 100%;
-  font-family: sans-serif;
-}
-
-body {
-  font-size: 77%;
-  margin: 15px 50px;
-  background: #4B4B4C;
-}
-
-a {
-  color:#0000cc;
-  text-decoration: none;
-}
-/*** end of Initial Settings ***/
-
-
-/** common settings **/
-div#container {
-  background: #FFFFFF;
-  position: relative;
-  color: #666;
-}
-
-div.page-header {
-  padding: 50px 20px 0;
-  background: #006699 top left repeat-x;
-  position: relative;
-}
-  div.page-header h1 {
-    margin: 10px 0 30px;
-    font-size: 1.8em;
-    font-weight: bold;
-    font-family: osaka,'MS P Gothic', Georgia, serif;
-    letter-spacing: 1px;
-    color: #DDD;
-  }
-  div.page-header h1 a {
-    font-weight: bold;
-    color: #FFF;
-  }
-  div.page-header a {
-    text-decoration: none;
-  }
-
-  div.page-header form {
-    position: absolute;
-    margin-bottom: 2px;
-    bottom: 0;
-    right: 20px;
-  }
-  div.page-header form label {
-    color: #DDD;
-  }
-  div.page-header form input {
-    padding: 2px;
-    border: solid 1px #DDD;
-  }
-  div.page-header form dl {
-    overflow: hidden;
-  }
-  div.page-header form dl dt {
-    font-size: 1.2em;
-  }
-  div.page-header form dl dt,
-  div.page-header form dl dd {
-    margin: 0 0 0 5px;
-    float: left;
-    height: 24px;
-    line-height: 20px;
-  }
-
-  ul.page-nav {
-    margin: 10px 0 0 0;
-    list-style-type: none;
-    overflow: hidden;
-    width: 800px;
-  }
-    ul.page-nav li {
-      margin: 0 2px 0 0;
-      float: left;
-      width: 80px;
-      height: 24px;
-      font-size: 1.1em;
-      line-height: 24px;
-      text-align: center;
-    }
-    ul.page-nav li.current {
-      background: #FFF;
-    }
-    ul.page-nav li a {
-      height: 24px;
-      color: #666;
-      background: #DDD;
-      display: block;
-      text-decoration: none;
-    }
-    ul.page-nav li a:hover {
-      color:#333;
-      background: #FFF;
-    }
-
-ul.submenu {
-  margin: 10px 0 -10px 20px;
-  list-style-type: none;
-}
-ul.submenu li {
-  margin: 0 10px 0 0;
-  font-size: 1.2em;
-  display: inline;
-}
-
-h2 {
-  margin: 20px 0 10px;
-  height: 30px;
-  line-height: 30px;
-  text-indent: 20px;
-  background: #FFF;
-  font-size: 1.2em;
-  border-top: dotted 1px #D5E1E6;
-  font-weight: bold;
-}
-h2.no-link {
-  color:#006699;
-}
-h2.no-border {
-  color: #FFF;
-  background: #006699;
-  border: 0;
-}
-h2 a {
-  font-weight:bold;
-  color:#006699;
-}
-
-div.page-path {
-  text-align: right;
-  padding: 20px 30px 10px 0;
-  border:solid #d9d8d1;
-  border-width:0px 0px 1px;
-  font-size: 1.2em;
-}
-
-div.page-footer {
-  margin: 50px 0 0;
-  position: relative;
-}
-  div.page-footer p {
-    position: relative;
-    left: 20px;
-    bottom: 5px;
-    font-size: 1.2em;
-  }
-
-  ul.rss-logo {
-    position: absolute;
-    top: -10px;
-    right: 20px;
-    height: 20px;
-    list-style-type: none;
-  }
-  ul.rss-logo li {
-    display: inline;
-  }
-  ul.rss-logo li a {
-    padding: 3px 6px;
-    line-height: 10px;
-    border:1px solid;
-    border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
-    color:#ffffff;
-    background-color:#ff6600;
-    font-weight:bold;
-    font-family:sans-serif;
-    font-size:10px;
-    text-align:center;
-    text-decoration:none;
-  }
-  div.rss-logo li a:hover {
-    background-color:#ee5500;
-  }
-
-p.normal {
-  margin: 20px 0 20px 30px;
-  font-size: 1.2em;
-}
-
-table {
-  margin: 10px 0 0 20px;
-  width: 95%;
-  border-collapse: collapse;
-}
-table tr td {
-  font-size: 1.1em;
-}
-table tr td.nowrap {
-  white-space: nowrap;
-}
-/*
-table tr.parity0:hover,
-table tr.parity1:hover {
-  background: #D5E1E6;
-}
-*/
-table tr.parity0 {
-  background: #F1F6F7;
-}
-table tr.parity1 {
-  background: #FFFFFF;
-}
-table tr td {
-  padding: 5px 5px;
-}
-table.annotated tr td {
-  padding: 0px 5px;
-}
-
-span.logtags span {
-  padding: 2px 6px;
-  font-weight: normal;
-  font-size: 11px;
-  border: 1px solid;
-  background-color: #ffaaff;
-  border-color: #ffccff #ff00ee #ff00ee #ffccff;
-}
-span.logtags span.tagtag {
-  background-color: #ffffaa;
-  border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
-}
-span.logtags span.branchtag {
-  background-color: #aaffaa;
-  border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
-}
-span.logtags span.inbranchtag {
-  background-color: #d5dde6;
-  border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
-}
-
-div.diff pre {
-  margin: 10px 0 0 0;
-}
-div.diff pre span {
-  font-family: monospace;
-  white-space: pre;
-  font-size: 1.2em;
-  padding: 3px 0;
-}
-td.source {
-  white-space: pre;
-  font-family: monospace;
-  margin: 10px 30px 0;
-  font-size: 1.2em;
-  font-family: monospace;
-}
-  div.source div.parity0,
-  div.source div.parity1 {
-    padding: 1px;
-    font-size: 1.2em;
-  }
-  div.source div.parity0 {
-    background: #F1F6F7;
-  }
-  div.source div.parity1 {
-    background: #FFFFFF;
-  }
-div.parity0:hover,
-div.parity1:hover {
-  background: #D5E1E6;
-}
-.linenr {
-  color: #999;
-  text-align: right;
-}
-.lineno {
-  text-align: right;
-}
-.lineno a {
-  color: #999;
-}
-td.linenr {
-  width: 60px;
-}
-
-div#powered-by {
-  position: absolute;
-  width: 75px;
-  top: 15px;
-  right: 20px;
-  font-size: 1.2em;
-}
-div#powered-by a {
-  color: #EEE;
-  text-decoration: none;
-}
-div#powered-by a:hover {
-  text-decoration: underline;
-}
-/*
-div#monoblue-corner-top-left {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 10px;
-  height: 10px;
-  background: url(./monoblue-corner.png) top left no-repeat !important;
-  background: none;
-}
-div#monoblue-corner-top-right {
-  position: absolute;
-  top: 0;
-  right: 0;
-  width: 10px;
-  height: 10px;
-  background: url(./monoblue-corner.png) top right no-repeat !important;
-  background: none;
-}
-div#monoblue-corner-bottom-left {
-  position: absolute;
-  bottom: 0;
-  left: 0;
-  width: 10px;
-  height: 10px;
-  background: url(./monoblue-corner.png) bottom left no-repeat !important;
-  background: none;
-}
-div#monoblue-corner-bottom-right {
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  width: 10px;
-  height: 10px;
-  background: url(./monoblue-corner.png) bottom right no-repeat !important;
-  background: none;
-}
-*/
-/** end of common settings **/
-
-/** summary **/
-dl.overview {
-  margin: 0 0 0 30px;
-  font-size: 1.1em;
-  overflow: hidden;
-}
-  dl.overview dt,
-  dl.overview dd {
-    margin: 5px 0;
-    float: left;
-  }
-  dl.overview dt {
-    clear: left;
-    font-weight: bold;
-    width: 150px;
-  }
-/** end of summary **/
-
-/** chagelog **/
-h3.changelog {
-  margin: 20px 0 5px 30px;
-  padding: 0 0 2px;
-  font-size: 1.4em;
-  border-bottom: dotted 1px #D5E1E6;
-}
-ul.changelog-entry {
-  margin: 0 0 10px 30px;
-  list-style-type: none;
-  position: relative;
-}
-ul.changelog-entry li span.revdate {
-  font-size: 1.1em;
-}
-ul.changelog-entry li.age {
-  position: absolute;
-  top: -25px;
-  right: 10px;
-  font-size: 1.4em;
-  color: #CCC;
-  font-weight: bold;
-  font-style: italic;
-}
-ul.changelog-entry li span.name {
-  font-size: 1.2em;
-  font-weight: bold;
-}
-ul.changelog-entry li.description {
-  margin: 10px 0 0;
-  font-size: 1.1em;
-}
-/** end of changelog **/
-
-/** file **/
-p.files {
-  margin: 0 0 0 20px;
-  font-size: 2.0em;
-  font-weight: bold;
-}
-/** end of file **/
-
-/** changeset **/
-h3.changeset {
-  margin: 20px 0 5px 20px;
-  padding: 0 0 2px;
-  font-size: 1.6em;
-  border-bottom: dotted 1px #D5E1E6;
-}
-p.changeset-age {
-  position: relative;
-}
-p.changeset-age span {
-  position: absolute;
-  top: -25px;
-  right: 10px;
-  font-size: 1.4em;
-  color: #CCC;
-  font-weight: bold;
-  font-style: italic;
-}
-p.description {
-  margin: 10px 30px 0 30px;
-  padding: 10px;
-  border: solid 1px #CCC;
-  font-size: 1.2em;
-}
-/** end of changeset **/
-
-/** canvas **/
-div#wrapper {
-	position: relative;
-    font-size: 1.2em;
-}
-
-canvas {
-	position: absolute;
-	z-index: 5;
-	top: -0.7em;
-}
-
-ul#nodebgs li.parity0 {
-    background: #F1F6F7;
-}
-
-ul#nodebgs li.parity1 {
-    background: #FFFFFF;
-}
-
-ul#graphnodes {
-	position: absolute;
-	z-index: 10;
-	top: 7px;
-	list-style: none inside none;
-}
-
-ul#nodebgs {
-	list-style: none inside none;
-}
-
-ul#graphnodes li, ul#nodebgs li {
-	height: 39px;
-}
-
-ul#graphnodes li .info {
-	display: block;
-	position: relative;
-}
-/** end of canvas **/
--- a/templates/static/style-paper.css	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,254 +0,0 @@
-body {
-  margin: 0;
-  padding: 0;
-  background: white;
-  font-family: sans-serif;
-}
-
-.container {
-  padding-left: 115px;
-}
-
-.main {
-  position: relative;
-  background: white;
-  padding: 2em 2em 2em 0;
-}
-
-#.main {
-  width: 98%;
-}
-
-.overflow {
-  width: 100%;
-  overflow: auto;
-}
-
-.menu {
-  width: 90px;
-  margin: 0;
-  font-size: 80%;
-  text-align: left;
-  position: absolute;
-  top: 20px;
-  left: 20px;
-  right: auto;
-}
-
-.menu ul {
-  list-style: none;
-  padding: 0;
-  margin: 10px 0 0 0;
-  border-left: 2px solid #999;
-}
-
-.menu li {
-  margin-bottom: 3px;
-  padding: 2px 4px;
-  background: white;
-  color: black;
-  font-weight: normal;
-}
-
-.menu li.active {
-  font-weight: bold;
-}
-
-.menu img {
-  width: 75px;
-  height: 90px;
-  border: 0;
-}
-
-.menu a { color: black; display: block; }
-
-.search {
-  position: absolute;
-  top: .7em;
-  right: 2em;
-}
-
-form.search div#hint {
-  display: none;
-  position: absolute;
-  top: 40px;
-  right: 0px;
-  width: 190px;
-  padding: 5px;
-  background: #ffc;
-  font-size: 70%;
-  border: 1px solid yellow;
-  -moz-border-radius: 5px; /* this works only in camino/firefox */
-  -webkit-border-radius: 5px; /* this is just for Safari */
-}
-
-form.search:hover div#hint { display: block; }
-
-a { text-decoration:none; }
-.age { white-space:nowrap; }
-.date { white-space:nowrap; }
-.indexlinks { white-space:nowrap; }
-.parity0 { background-color: #f0f0f0; }
-.parity1 { background-color: white; }
-.plusline { color: green; }
-.minusline { color: #dc143c; } /* crimson */
-.atline { color: purple; }
-
-.navigate {
-  text-align: right;
-  font-size: 60%;
-  margin: 1em 0;
-}
-
-.tag {
-  color: #999;
-  font-size: 70%;
-  font-weight: normal;
-  margin-left: .5em;
-  vertical-align: baseline;
-}
-
-.branchhead {
-  color: #000;
-  font-size: 80%;
-  font-weight: normal;
-  margin-left: .5em;
-  vertical-align: baseline;
-}
-
-ul#graphnodes .branchhead {
-  font-size: 75%;
-}
-
-.branchname {
-  color: #000;
-  font-size: 60%; 
-  font-weight: normal;
-  margin-left: .5em;
-  vertical-align: baseline;
-}
-
-h3 .branchname {
-  font-size: 80%;
-}
-
-/* Common */
-pre { margin: 0; }
-
-h2 { font-size: 120%; border-bottom: 1px solid #999; }
-h2 a { color: #000; }
-h3 {
-  margin-top: -.7em;
-  font-size: 100%;
-}
-
-/* log and tags tables */
-.bigtable {
-  border-bottom: 1px solid #999;
-  border-collapse: collapse;
-  font-size: 90%;
-  width: 100%;
-  font-weight: normal;
-  text-align: left;
-}
-
-.bigtable td {
-  vertical-align: top;
-}
-
-.bigtable th {
-  padding: 1px 4px;
-  border-bottom: 1px solid #999;
-}
-.bigtable tr { border: none; }
-.bigtable .age { width: 7em; }
-.bigtable .author { width: 12em; }
-.bigtable .description { }
-.bigtable .node { width: 5em; font-family: monospace;}
-.bigtable .permissions { width: 8em; text-align: left;}
-.bigtable .size { width: 5em; text-align: right; }
-.bigtable .annotate { text-align: right; }
-.bigtable td.annotate { font-size: smaller; }
-.bigtable td.source { font-size: inherit; }
-
-.source, .sourcefirst, .sourcelast {
-  font-family: monospace;
-  white-space: pre;
-  padding: 1px 4px;
-  font-size: 90%;
-}
-.sourcefirst { border-bottom: 1px solid #999; font-weight: bold; }
-.sourcelast { border-top: 1px solid #999; }
-.source a { color: #999; font-size: smaller; font-family: monospace;}
-.bottomline { border-bottom: 1px solid #999; }
-
-.fileline { font-family: monospace; }
-.fileline img { border: 0; }
-
-.tagEntry .closed { color: #99f; }
-
-/* Changeset entry */
-#changesetEntry {
-  border-collapse: collapse;
-  font-size: 90%;
-  width: 100%;
-  margin-bottom: 1em;
-}
-
-#changesetEntry th {
-  padding: 1px 4px;
-  width: 4em;
-  text-align: right;
-  font-weight: normal;
-  color: #999;
-  margin-right: .5em;
-  vertical-align: top;
-}
-
-div.description {
-  border-left: 2px solid #999;
-  margin: 1em 0 1em 0;
-  padding: .3em;
-}
-
-/* Graph */
-div#wrapper {
-	position: relative;
-	border-top: 1px solid black;
-	border-bottom: 1px solid black;
-	margin: 0;
-	padding: 0;
-}
-
-canvas {
-	position: absolute;
-	z-index: 5;
-	top: -0.7em;
-	margin: 0;
-}
-
-ul#graphnodes {
-	position: absolute;
-	z-index: 10;
-	top: -1.0em;
-	list-style: none inside none;
-	padding: 0;
-}
-
-ul#nodebgs {
-	list-style: none inside none;
-	padding: 0;
-	margin: 0;
-	top: -0.7em;
-}
-
-ul#graphnodes li, ul#nodebgs li {
-	height: 39px;
-}
-
-ul#graphnodes li .info {
-	display: block;
-	font-size: 70%;
-	position: relative;
-	top: -3px;
-}
--- a/templates/static/style.css	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-a { text-decoration:none; }
-.age { white-space:nowrap; }
-.date { white-space:nowrap; }
-.indexlinks { white-space:nowrap; }
-.parity0 { background-color: #ddd; }
-.parity1 { background-color: #eee; }
-.lineno { width: 60px; color: #aaa; font-size: smaller;
-          text-align: right; }
-.plusline { color: green; }
-.minusline { color: red; }
-.atline { color: purple; }
-.annotate { font-size: smaller; text-align: right; padding-right: 1em; }
-.buttons a {
-  background-color: #666;
-  padding: 2pt;
-  color: white;
-  font-family: sans;
-  font-weight: bold;
-}
-.navigate a {
-  background-color: #ccc;
-  padding: 2pt;
-  font-family: sans;
-  color: black;
-}
-
-.metatag {
-  background-color: #888;
-  color: white;
-  text-align: right;
-}
-
-/* Common */
-pre { margin: 0; }
-
-.logo {
-  float: right;
-  clear: right;
-}
-
-/* Changelog/Filelog entries */
-.logEntry { width: 100%; }
-.logEntry .age { width: 15%; }
-.logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
-.logEntry th.age, .logEntry th.firstline { font-weight: bold; }
-.logEntry th.firstline { text-align: left; width: inherit; }
-
-/* Shortlog entries */
-.slogEntry { width: 100%; }
-.slogEntry .age { width: 8em; }
-.slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
-.slogEntry td.author { width: 15em; }
-
-/* Tag entries */
-#tagEntries { list-style: none; margin: 0; padding: 0; }
-#tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
-
-/* Changeset entry */
-#changesetEntry { }
-#changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
-#changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
-
-/* File diff view */
-#filediffEntry { }
-#filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
-
-/* Graph */
-div#wrapper {
-	position: relative;
-	margin: 0;
-	padding: 0;
-}
-
-canvas {
-	position: absolute;
-	z-index: 5;
-	top: -0.6em;
-	margin: 0;
-}
-
-ul#nodebgs {
-	list-style: none inside none;
-	padding: 0;
-	margin: 0;
-	top: -0.7em;
-}
-
-ul#graphnodes li, ul#nodebgs li {
-	height: 39px;
-}
-
-ul#graphnodes {
-	position: absolute;
-	z-index: 10;
-	top: -0.85em;
-	list-style: none inside none;
-	padding: 0;
-}
-
-ul#graphnodes li .info {
-	display: block;
-	font-size: 70%;
-	position: relative;
-	top: -1px;
-}
--- a/templates/template-vars.txt	Thu Feb 11 23:15:42 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-repo          the name of the repo
-rev           a changeset.manifest revision
-node          a changeset node
-changesets    total number of changesets
-file          a filename
-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
-date          a date string
-age           age in hours, days, etc
-line          a line of text (escaped)
-desc          a description (escaped, with breaks)
-shortdesc     a short description (escaped)
-author        a name or email addressv(obfuscated)
-parent        a list of the parent
-child         a list of the children
-tags          a list of tag
-
-header        the global page header
-footer        the global page footer
-
-files         a list of file links
-file_copies   a list of pairs of name, source filenames
-dirs          a set of directory links
-diff          a diff of one or more files
-annotate      an annotated file
-entries       the entries relevant to the page
-
-Templates and commands:
-  changelog(rev) - a page for browsing changesets
-    naventry - a link for jumping to a changeset number
-    filenodelink - jump to file diff
-    fileellipses - printed after maxfiles
-    changelogentry - an entry in the log
-  manifest - browse a manifest as a directory tree
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/autodiff.py	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,46 @@
+# Extension dedicated to test patch.diff() upgrade modes
+#
+#
+from mercurial import cmdutil, patch, util
+
+def autodiff(ui, repo, *pats, **opts):
+    diffopts = patch.diffopts(ui, opts)
+    git = opts.get('git', 'no')
+    brokenfiles = set()
+    losedatafn = None
+    if git in ('yes', 'no'):
+        diffopts.git = git == 'yes'
+        diffopts.upgrade = False
+    elif git == 'auto':
+        diffopts.git = False
+        diffopts.upgrade = True
+    elif git == 'warn':
+        diffopts.git = False
+        diffopts.upgrade = True
+        def losedatafn(fn=None, **kwargs):
+            brokenfiles.add(fn)
+            return True
+    elif git == 'abort':
+        diffopts.git = False
+        diffopts.upgrade = True
+        def losedatafn(fn=None, **kwargs):
+            raise util.Abort('losing data for %s' % fn)
+    else:
+        raise util.Abort('--git must be yes, no or auto')
+
+    node1, node2 = cmdutil.revpair(repo, [])
+    m = cmdutil.match(repo, pats, opts)
+    it = patch.diff(repo, node1, node2, match=m, opts=diffopts,
+                    losedatafn=losedatafn)
+    for chunk in it:
+        ui.write(chunk)
+    for fn in sorted(brokenfiles):
+        ui.write('data lost for: %s\n' % fn)
+
+cmdtable = {
+    "autodiff":
+        (autodiff,
+         [('', 'git', '', 'git upgrade mode (yes/no/auto/warn/abort)'),
+          ],
+         '[OPTION]... [FILE]...'),
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/blacklists/README	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,14 @@
+Put here definitions of blacklists for run-tests.py
+
+Create a file per blacklist. Each file should list the names of tests that you
+want to be skipped.
+File names are meant to be used as targets for run-tests.py --blacklist
+option.
+Lines starting with # are ignored. White spaces are stripped.
+
+e.g. if you create a blacklist/example file containing:
+ test-hgrc
+ # some comment
+ test-help
+then calling "run-tests.py --blacklist blacklists/example" will exclude
+test-hgrc and test-help from the list of tests to run.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/blacklists/inotify-failures	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,21 @@
+# When --inotify is activated, help output and config changes:
+test-debugcomplete
+test-empty
+test-fncache
+test-globalopts
+test-help
+test-hgrc
+test-inherit-mode
+test-qrecord
+test-strict
+
+# --inotify activates de facto the inotify extension. It does not play well
+# with inotify-specific tests, which activate/desactivate inotify at will:
+test-inotify
+test-inotify-debuginotify
+test-inotify-dirty-dirstate
+test-inotify-issue1208
+test-inotify-issue1371
+test-inotify-issue1542
+test-inotify-issue1556
+test-inotify-lookup
--- a/tests/coverage.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/coverage.py	Sat Feb 13 23:50:38 2010 -0600
@@ -106,20 +106,20 @@
         self.excluded = excluded
         self.suite_spots = suite_spots
         self.excluding_suite = 0
-        
+
     def doRecursive(self, node):
         for n in node.getChildNodes():
             self.dispatch(n)
 
     visitStmt = visitModule = doRecursive
-    
+
     def doCode(self, node):
         if hasattr(node, 'decorators') and node.decorators:
             self.dispatch(node.decorators)
             self.recordAndDispatch(node.code)
         else:
             self.doSuite(node, node.code)
-            
+
     visitFunction = visitClass = doCode
 
     def getFirstLine(self, node):
@@ -139,26 +139,26 @@
         for n in node.getChildNodes():
             lineno = max(lineno, self.getLastLine(n))
         return lineno
-    
+
     def doStatement(self, node):
         self.recordLine(self.getFirstLine(node))
 
     visitAssert = visitAssign = visitAssTuple = visitPrint = \
         visitPrintnl = visitRaise = visitSubscript = visitDecorators = \
         doStatement
-    
+
     def visitPass(self, node):
-        # Pass statements have weird interactions with docstrings.  If this
-        # pass statement is part of one of those pairs, claim that the statement
-        # is on the later of the two lines.
+        # Pass statements have weird interactions with docstrings. If
+        # this pass statement is part of one of those pairs, claim
+        # that the statement is on the later of the two lines.
         l = node.lineno
         if l:
-            lines = self.suite_spots.get(l, [l,l])
+            lines = self.suite_spots.get(l, [l, l])
             self.statements[lines[1]] = 1
-        
+
     def visitDiscard(self, node):
         # Discard nodes are statements that execute an expression, but then
-        # discard the results.  This includes function calls, so we can't 
+        # discard the results.  This includes function calls, so we can't
         # ignore them all.  But if the expression is a constant, the statement
         # won't be "executed", so don't count it now.
         if node.expr.__class__.__name__ != 'Const':
@@ -172,7 +172,7 @@
             return self.recordLine(self.getFirstLine(node))
         else:
             return 0
-    
+
     def recordLine(self, lineno):
         # Returns a bool, whether the line is included or excluded.
         if lineno:
@@ -196,9 +196,9 @@
                 self.statements[lineno] = 1
                 return 1
         return 0
-    
+
     default = recordNodeLine
-    
+
     def recordAndDispatch(self, node):
         self.recordNodeLine(node)
         self.dispatch(node)
@@ -209,7 +209,7 @@
             self.excluding_suite = 1
         self.recordAndDispatch(body)
         self.excluding_suite = exsuite
-        
+
     def doPlainWordSuite(self, prevsuite, suite):
         # Finding the exclude lines for else's is tricky, because they aren't
         # present in the compiler parse tree.  Look at the previous suite,
@@ -217,17 +217,17 @@
         # first line are excluded, then we exclude the else.
         lastprev = self.getLastLine(prevsuite)
         firstelse = self.getFirstLine(suite)
-        for l in range(lastprev+1, firstelse):
+        for l in range(lastprev + 1, firstelse):
             if self.suite_spots.has_key(l):
                 self.doSuite(None, suite, exclude=self.excluded.has_key(l))
                 break
         else:
             self.doSuite(None, suite)
-        
+
     def doElse(self, prevsuite, node):
         if node.else_:
             self.doPlainWordSuite(prevsuite, node.else_)
-    
+
     def visitFor(self, node):
         self.doSuite(node, node.body)
         self.doElse(node.body, node)
@@ -250,21 +250,21 @@
             if not a:
                 # It's a plain "except:".  Find the previous suite.
                 if i > 0:
-                    prev = node.handlers[i-1][2]
+                    prev = node.handlers[i - 1][2]
                 else:
                     prev = node.body
                 self.doPlainWordSuite(prev, h)
             else:
                 self.doSuite(a, h)
         self.doElse(node.handlers[-1][2], node)
-    
+
     def visitTryFinally(self, node):
         self.doSuite(node, node.body)
         self.doPlainWordSuite(node.body, node.final)
-        
+
     def visitWith(self, node):
         self.doSuite(node, node.body)
-        
+
     def visitGlobal(self, node):
         # "global" statements don't execute like others (they don't call the
         # trace function), so don't record their line numbers.
@@ -285,7 +285,7 @@
     # A dictionary with an entry for (Python source file name, line number
     # in that file) if that line has been executed.
     c = {}
-    
+
     # A map from canonical Python source file name to a dictionary in
     # which there's an entry for each line number that has been
     # executed.
@@ -313,19 +313,18 @@
         self.relative_dir = self.abs_file(os.curdir)+os.sep
         self.exclude('# *pragma[: ]*[nN][oO] *[cC][oO][vV][eE][rR]')
 
-    # t(f, x, y).  This method is passed to sys.settrace as a trace function.  
-    # See [van Rossum 2001-07-20b, 9.2] for an explanation of sys.settrace and 
+    # t(f, x, y).  This method is passed to sys.settrace as a trace function.
+    # See [van Rossum 2001-07-20b, 9.2] for an explanation of sys.settrace and
     # the arguments and return value of the trace function.
     # See [van Rossum 2001-07-20a, 3.2] for a description of frame and code
     # objects.
-    
-    def t(self, f, w, unused):                                 #pragma: no cover
+    def t(self, f, w, unused): #pragma: no cover
         if w == 'line':
             self.c[(f.f_code.co_filename, f.f_lineno)] = 1
             #-for c in self.cstack:
             #-    c[(f.f_code.co_filename, f.f_lineno)] = 1
         return self.t
-    
+
     def help(self, error=None):     #pragma: no cover
         if error:
             print error
@@ -363,7 +362,8 @@
             elif o[2:] + '=' in long_opts:
                 settings[o[2:]+'='] = a
             else:       #pragma: no cover
-                pass    # Can't get here, because getopt won't return anything unknown.
+                # Can't get here, because getopt won't return anything unknown.
+                pass
 
         if settings.get('help'):
             help_fn()
@@ -377,14 +377,14 @@
         args_needed = (settings.get('execute')
                        or settings.get('annotate')
                        or settings.get('report'))
-        action = (settings.get('erase') 
+        action = (settings.get('erase')
                   or settings.get('collect')
                   or args_needed)
         if not action:
             help_fn("You must specify at least one of -e, -x, -c, -r, or -a.")
         if not args_needed and args:
             help_fn("Unexpected arguments: %s" % " ".join(args))
-        
+
         self.parallel_mode = settings.get('parallel-mode')
         self.get_ready()
 
@@ -402,7 +402,7 @@
             self.collect()
         if not args:
             args = self.cexecuted.keys()
-        
+
         ignore_errors = settings.get('ignore-errors')
         show_missing = settings.get('show-missing')
         directory = settings.get('directory=')
@@ -412,7 +412,7 @@
             omit = [self.abs_file(p) for p in omit.split(',')]
         else:
             omit = []
-        
+
         if settings.get('report'):
             self.report(args, show_missing, ignore_errors, omit_prefixes=omit)
         if settings.get('annotate'):
@@ -422,7 +422,7 @@
         self.usecache = usecache
         if cache_file and not self.cache:
             self.cache_default = cache_file
-        
+
     def get_ready(self, parallel_mode=False):
         if self.usecache and not self.cache:
             self.cache = os.environ.get(self.cache_env, self.cache_default)
@@ -430,7 +430,7 @@
                 self.cache += "." + gethostname() + "." + str(os.getpid())
             self.restore()
         self.analysis_cache = {}
-        
+
     def start(self, parallel_mode=False):
         self.get_ready()
         if self.nesting == 0:                               #pragma: no cover
@@ -438,7 +438,7 @@
             if hasattr(threading, 'settrace'):
                 threading.settrace(self.t)
         self.nesting += 1
-        
+
     def stop(self):
         self.nesting -= 1
         if self.nesting == 0:                               #pragma: no cover
@@ -462,7 +462,7 @@
     def begin_recursive(self):
         self.cstack.append(self.c)
         self.xstack.append(self.exclude_re)
-        
+
     def end_recursive(self):
         self.c = self.cstack.pop()
         self.exclude_re = self.xstack.pop()
@@ -568,7 +568,7 @@
             self.canonical_filename_cache[filename] = cf
         return self.canonical_filename_cache[filename]
 
-    # canonicalize_filenames().  Copy results from "c" to "cexecuted", 
+    # canonicalize_filenames().  Copy results from "c" to "cexecuted",
     # canonicalizing filenames on the way.  Clear the "c" map.
 
     def canonicalize_filenames(self):
@@ -598,7 +598,6 @@
     # in the source code, (3) a list of lines of excluded statements,
     # and (4), a map of line numbers to multi-line line number ranges, for
     # statements that cross lines.
-    
     def analyze_morf(self, morf):
         if self.analysis_cache.has_key(morf):
             return self.analysis_cache[morf]
@@ -636,26 +635,27 @@
             if len(tree) == 3 and type(tree[2]) == type(1):
                 return tree[2]
             tree = tree[1]
-    
+
     def last_line_of_tree(self, tree):
         while True:
             if len(tree) == 3 and type(tree[2]) == type(1):
                 return tree[2]
             tree = tree[-1]
-    
+
     def find_docstring_pass_pair(self, tree, spots):
         for i in range(1, len(tree)):
-            if self.is_string_constant(tree[i]) and self.is_pass_stmt(tree[i+1]):
+            if (self.is_string_constant(tree[i]) and
+                self.is_pass_stmt(tree[i + 1])):
                 first_line = self.first_line_of_tree(tree[i])
-                last_line = self.last_line_of_tree(tree[i+1])
+                last_line = self.last_line_of_tree(tree[i + 1])
                 self.record_multiline(spots, first_line, last_line)
-        
+
     def is_string_constant(self, tree):
         try:
             return tree[0] == symbol.stmt and tree[1][1][1][0] == symbol.expr_stmt
         except:
             return False
-        
+
     def is_pass_stmt(self, tree):
         try:
             return tree[0] == symbol.stmt and tree[1][1][1][0] == symbol.pass_stmt
@@ -663,9 +663,9 @@
             return False
 
     def record_multiline(self, spots, i, j):
-        for l in range(i, j+1):
+        for l in range(i, j + 1):
             spots[l] = (i, j)
-            
+
     def get_suite_spots(self, tree, spots):
         """ Analyze a parse tree to find suite introducers which span a number
             of lines.
@@ -675,16 +675,16 @@
                 if tree[i][0] == symbol.suite:
                     # Found a suite, look back for the colon and keyword.
                     lineno_colon = lineno_word = None
-                    for j in range(i-1, 0, -1):
+                    for j in range(i - 1, 0, -1):
                         if tree[j][0] == token.COLON:
                             # Colons are never executed themselves: we want the
                             # line number of the last token before the colon.
-                            lineno_colon = self.last_line_of_tree(tree[j-1])
+                            lineno_colon = self.last_line_of_tree(tree[j - 1])
                         elif tree[j][0] == token.NAME:
                             if tree[j][1] == 'elif':
-                                # Find the line number of the first non-terminal
-                                # after the keyword.
-                                t = tree[j+1]
+                                # Find the line number of the first
+                                # non-terminal after the keyword.
+                                t = tree[j + 1]
                                 while t and token.ISNONTERMINAL(t[0]):
                                     t = t[1]
                                 if t:
@@ -694,7 +694,7 @@
                             break
                         elif tree[j][0] == symbol.except_clause:
                             # "except" clauses look like:
-                            # ('except_clause', ('NAME', 'except', lineno), ...)
+                            # ('except_clause', ('NAME', 'except', lineno),...)
                             if tree[j][1][0] == token.NAME:
                                 lineno_word = tree[j][1][2]
                                 break
@@ -703,11 +703,11 @@
                         # between the two with the two line numbers.
                         self.record_multiline(spots, lineno_word, lineno_colon)
 
-                    # "pass" statements are tricky: different versions of Python
-                    # treat them differently, especially in the common case of a
-                    # function with a doc string and a single pass statement.
+                    # "pass" statements are tricky: different versions
+                    # of Python treat them differently, especially in
+                    # the common case of a function with a doc string
+                    # and a single pass statement.
                     self.find_docstring_pass_pair(tree[i], spots)
-                    
                 elif tree[i][0] == symbol.simple_stmt:
                     first_line = self.first_line_of_tree(tree[i])
                     last_line = self.last_line_of_tree(tree[i])
@@ -724,7 +724,7 @@
             lines = text.split('\n')
             for i in range(len(lines)):
                 if reExclude.search(lines[i]):
-                    excluded[i+1] = 1
+                    excluded[i + 1] = 1
 
         # Parse the code and analyze the parse tree to find out which statements
         # are multiline, and where suites begin and end.
@@ -732,7 +732,7 @@
         tree = parser.suite(text+'\n\n').totuple(1)
         self.get_suite_spots(tree, suite_spots)
         #print "Suite spots:", suite_spots
-        
+
         # Use the compiler module to parse the text and find the executable
         # statements.  We add newlines to be impervious to final partial lines.
         statements = {}
@@ -831,7 +831,8 @@
     def morf_name_compare(self, x, y):
         return cmp(self.morf_name(x), self.morf_name(y))
 
-    def report(self, morfs, show_missing=1, ignore_errors=0, file=None, omit_prefixes=[]):
+    def report(self, morfs, show_missing=1, ignore_errors=0, file=None,
+               omit_prefixes=[]):
         if not isinstance(morfs, types.ListType):
             morfs = [morfs]
         # On windows, the shell doesn't expand wildcards.  Do it here.
@@ -842,11 +843,11 @@
             else:
                 globbed.append(morf)
         morfs = globbed
-        
+
         morfs = self.filter_by_prefix(morfs, omit_prefixes)
         morfs.sort(self.morf_name_compare)
 
-        max_name = max([5,] + map(len, map(self.morf_name, morfs)))
+        max_name = max([5] + map(len, map(self.morf_name, morfs)))
         fmt_name = "%%- %ds  " % max_name
         fmt_err = fmt_name + "%s: %s"
         header = fmt_name % "Name" + " Stmts   Exec  Cover"
@@ -856,8 +857,8 @@
             fmt_coverage = fmt_coverage + "   %s"
         if not file:
             file = sys.stdout
-        print >>file, header
-        print >>file, "-" * len(header)
+        print >> file, header
+        print >> file, "-" * len(header)
         total_statements = 0
         total_executed = 0
         for morf in morfs:
@@ -903,14 +904,16 @@
         for morf in morfs:
             try:
                 filename, statements, excluded, missing, _ = self.analysis2(morf)
-                self.annotate_file(filename, statements, excluded, missing, directory)
+                self.annotate_file(filename, statements, excluded, missing,
+                                   directory)
             except KeyboardInterrupt:
                 raise
             except:
                 if not ignore_errors:
                     raise
-                
-    def annotate_file(self, filename, statements, excluded, missing, directory=None):
+
+    def annotate_file(self, filename, statements, excluded, missing,
+                      directory=None):
         source = open(filename, 'r')
         if directory:
             dest_file = os.path.join(directory,
@@ -937,7 +940,7 @@
             if self.blank_re.match(line):
                 dest.write('  ')
             elif self.else_re.match(line):
-                # Special logic for lines containing only 'else:'.  
+                # Special logic for lines containing only 'else:'.
                 # See [GDR 2001-12-04b, 3.2].
                 if i >= len(statements) and j >= len(missing):
                     dest.write('! ')
@@ -961,40 +964,40 @@
 the_coverage = coverage()
 
 # Module functions call methods in the singleton object.
-def use_cache(*args, **kw): 
+def use_cache(*args, **kw):
     return the_coverage.use_cache(*args, **kw)
 
-def start(*args, **kw): 
+def start(*args, **kw):
     return the_coverage.start(*args, **kw)
 
-def stop(*args, **kw): 
+def stop(*args, **kw):
     return the_coverage.stop(*args, **kw)
 
-def erase(*args, **kw): 
+def erase(*args, **kw):
     return the_coverage.erase(*args, **kw)
 
-def begin_recursive(*args, **kw): 
+def begin_recursive(*args, **kw):
     return the_coverage.begin_recursive(*args, **kw)
 
-def end_recursive(*args, **kw): 
+def end_recursive(*args, **kw):
     return the_coverage.end_recursive(*args, **kw)
 
-def exclude(*args, **kw): 
+def exclude(*args, **kw):
     return the_coverage.exclude(*args, **kw)
 
-def analysis(*args, **kw): 
+def analysis(*args, **kw):
     return the_coverage.analysis(*args, **kw)
 
-def analysis2(*args, **kw): 
+def analysis2(*args, **kw):
     return the_coverage.analysis2(*args, **kw)
 
-def report(*args, **kw): 
+def report(*args, **kw):
     return the_coverage.report(*args, **kw)
 
-def annotate(*args, **kw): 
+def annotate(*args, **kw):
     return the_coverage.annotate(*args, **kw)
 
-def annotate_file(*args, **kw): 
+def annotate_file(*args, **kw):
     return the_coverage.annotate_file(*args, **kw)
 
 # Save coverage data when Python exits.  (The atexit module wasn't
@@ -1008,7 +1011,7 @@
 
 def main():
     the_coverage.command_line(sys.argv[1:])
-    
+
 # Command-line interface.
 if __name__ == '__main__':
     main()
@@ -1072,7 +1075,7 @@
 # Thanks, Allen.
 #
 # 2005-12-02 NMB Call threading.settrace so that all threads are measured.
-# Thanks Martin Fuzzey. Add a file argument to report so that reports can be 
+# Thanks Martin Fuzzey. Add a file argument to report so that reports can be
 # captured to a different destination.
 #
 # 2005-12-03 NMB coverage.py can now measure itself.
--- a/tests/printenv.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/printenv.py	Sat Feb 13 23:50:38 2010 -0600
@@ -48,7 +48,8 @@
 
 out.write("%s hook: " % name)
 for v in env:
-    out.write("%s=%s " % (v, os.environ[v].replace(os.environ["HGTMP"], '$HGTMP')))
+    out.write("%s=%s " %
+              (v, os.environ[v].replace(os.environ["HGTMP"], '$HGTMP')))
 out.write("\n")
 out.close()
 
--- a/tests/readlink.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/readlink.py	Sat Feb 13 23:50:38 2010 -0600
@@ -6,7 +6,8 @@
     try:
         print f, '->', os.readlink(f)
     except OSError, err:
-        if err.errno != errno.EINVAL: raise
+        if err.errno != errno.EINVAL:
+            raise
         print f, 'not a symlink'
 
 sys.exit(0)
--- a/tests/run-tests.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/run-tests.py	Sat Feb 13 23:50:38 2010 -0600
@@ -45,6 +45,7 @@
 import errno
 import optparse
 import os
+import signal
 import subprocess
 import shutil
 import signal
@@ -130,6 +131,10 @@
         help="use pure Python code instead of C extensions")
     parser.add_option("-3", "--py3k-warnings", action="store_true",
         help="enable Py3k warnings on Python 2.6+")
+    parser.add_option("--inotify", action="store_true",
+        help="enable inotify extension when running tests")
+    parser.add_option("--blacklist", action="append",
+        help="skip tests listed in the specified blacklist file")
 
     for option, default in defaults.items():
         defaults[option] = int(os.environ.get(*default))
@@ -195,6 +200,24 @@
     if options.py3k_warnings:
         if sys.version_info[:2] < (2, 6) or sys.version_info[:2] >= (3, 0):
             parser.error('--py3k-warnings can only be used on Python 2.6+')
+    if options.blacklist:
+        blacklist = dict()
+        for filename in options.blacklist:
+            try:
+                path = os.path.expanduser(os.path.expandvars(filename))
+                f = open(path, "r")
+            except IOError, err:
+                if err.errno != errno.ENOENT:
+                    raise
+                print "warning: no such blacklist file: %s" % filename
+                continue
+
+            for line in f.readlines():
+                line = line.strip()
+                if line and not line.startswith('#'):
+                    blacklist[line] = filename
+
+        options.blacklist = blacklist
 
     return (options, args)
 
@@ -217,7 +240,7 @@
             if last:
                 lines.append(last)
             return lines
-        lines.append(text[i:n+1])
+        lines.append(text[i:n + 1])
         i = n + 1
 
 def parsehghaveoutput(lines):
@@ -237,9 +260,8 @@
 
     return missing, failed
 
-def showdiff(expected, output):
-    for line in difflib.unified_diff(expected, output,
-            "Expected output", "Test output"):
+def showdiff(expected, output, ref, err):
+    for line in difflib.unified_diff(expected, output, ref, err):
         sys.stdout.write(line)
 
 def findprogram(program):
@@ -262,6 +284,31 @@
         else:
             print "WARNING: Did not find prerequisite tool: "+p
 
+def killdaemons():
+    # Kill off any leftover daemon processes
+    try:
+        fp = open(DAEMON_PIDS)
+        for line in fp:
+            try:
+                pid = int(line)
+            except ValueError:
+                continue
+            try:
+                os.kill(pid, 0)
+                vlog('# Killing daemon process %d' % pid)
+                os.kill(pid, signal.SIGTERM)
+                time.sleep(0.25)
+                os.kill(pid, 0)
+                vlog('# Daemon process %d is stuck - really killing it' % pid)
+                os.kill(pid, signal.SIGKILL)
+            except OSError, err:
+                if err.errno != errno.ESRCH:
+                    raise
+        fp.close()
+        os.unlink(DAEMON_PIDS)
+    except IOError:
+        pass
+
 def cleanup(options):
     if not options.keep_tmpdir:
         vlog("# Cleaning up HGTMP", HGTMP)
@@ -293,10 +340,18 @@
     script = os.path.realpath(sys.argv[0])
     hgroot = os.path.dirname(os.path.dirname(script))
     os.chdir(hgroot)
+    nohome = '--home=""'
+    if os.name == 'nt':
+        # The --home="" trick works only on OS where os.sep == '/'
+        # because of a distutils convert_path() fast-path. Avoid it at
+        # least on Windows for now, deal with .pydistutils.cfg bugs
+        # when they happen.
+        nohome = ''
     cmd = ('%s setup.py %s clean --all'
            ' install --force --prefix="%s" --install-lib="%s"'
-           ' --install-scripts="%s" >%s 2>&1'
-           % (sys.executable, pure, INST, PYTHONDIR, BINDIR, installerrs))
+           ' --install-scripts="%s" %s >%s 2>&1'
+           % (sys.executable, pure, INST, PYTHONDIR, BINDIR, nohome,
+              installerrs))
     vlog("# Running", cmd)
     if os.system(cmd) == 0:
         if not options.verbose:
@@ -403,6 +458,14 @@
             ret = 0
     else:
         proc = Popen4(cmd)
+        def cleanup():
+            os.kill(proc.pid, signal.SIGTERM)
+            ret = proc.wait()
+            if ret == 0:
+                ret = signal.SIGTERM << 8
+            killdaemons()
+            return ret
+
         try:
             output = ''
             proc.tochild.close()
@@ -412,12 +475,14 @@
                 ret = os.WEXITSTATUS(ret)
         except Timeout:
             vlog('# Process %d timed out - killing it' % proc.pid)
-            os.kill(proc.pid, signal.SIGTERM)
-            ret = proc.wait()
-            if ret == 0:
-                ret = signal.SIGTERM << 8
+            ret = cleanup()
             output += ("\n### Abort: timeout after %d seconds.\n"
                        % options.timeout)
+        except KeyboardInterrupt:
+            vlog('# Handling keyboard interrupt')
+            cleanup()
+            raise
+
     return ret, splitnewlines(output)
 
 def runone(options, test, skips, fails):
@@ -430,13 +495,13 @@
         if not options.verbose:
             skips.append((test, msg))
         else:
-            print "\nSkipping %s: %s" % (test, msg)
+            print "\nSkipping %s: %s" % (testpath, msg)
         return None
 
     def fail(msg):
         fails.append((test, msg))
         if not options.nodiff:
-            print "\nERROR: %s %s" % (test, msg)
+            print "\nERROR: %s %s" % (testpath, msg)
         return None
 
     vlog("# Test", test)
@@ -449,20 +514,19 @@
     hgrc.write('backout = -d "0 0"\n')
     hgrc.write('commit = -d "0 0"\n')
     hgrc.write('tag = -d "0 0"\n')
+    if options.inotify:
+        hgrc.write('[extensions]\n')
+        hgrc.write('inotify=\n')
+        hgrc.write('[inotify]\n')
+        hgrc.write('pidfile=%s\n' % DAEMON_PIDS)
+        hgrc.write('appendpid=True\n')
     hgrc.close()
 
-    err = os.path.join(TESTDIR, test+".err")
+    testpath = os.path.join(TESTDIR, test)
     ref = os.path.join(TESTDIR, test+".out")
-    testpath = os.path.join(TESTDIR, test)
-
+    err = os.path.join(TESTDIR, test+".err")
     if os.path.exists(err):
         os.remove(err)       # Remove any previous output files
-
-    # Make a tmp subdirectory to work in
-    tmpd = os.path.join(HGTMP, test)
-    os.mkdir(tmpd)
-    os.chdir(tmpd)
-
     try:
         tf = open(testpath)
         firstline = tf.readline().rstrip()
@@ -492,6 +556,11 @@
             return skip("not executable")
         cmd = '"%s"' % testpath
 
+    # Make a tmp subdirectory to work in
+    tmpd = os.path.join(HGTMP, test)
+    os.mkdir(tmpd)
+    os.chdir(tmpd)
+
     if options.timeout > 0:
         signal.alarm(options.timeout)
 
@@ -537,7 +606,7 @@
         else:
             fail("output changed")
         if not options.nodiff:
-            showdiff(refout, out)
+            showdiff(refout, out, ref, err)
         ret = 1
     elif ret:
         mark = '!'
@@ -554,29 +623,7 @@
             f.write(line)
         f.close()
 
-    # Kill off any leftover daemon processes
-    try:
-        fp = open(DAEMON_PIDS)
-        for line in fp:
-            try:
-                pid = int(line)
-            except ValueError:
-                continue
-            try:
-                os.kill(pid, 0)
-                vlog('# Killing daemon process %d' % pid)
-                os.kill(pid, signal.SIGTERM)
-                time.sleep(0.25)
-                os.kill(pid, 0)
-                vlog('# Daemon process %d is stuck - really killing it' % pid)
-                os.kill(pid, signal.SIGKILL)
-            except OSError, err:
-                if err.errno != errno.ESRCH:
-                    raise
-        fp.close()
-        os.unlink(DAEMON_PIDS)
-    except IOError:
-        pass
+    killdaemons()
 
     os.chdir(TESTDIR)
     if not options.keep_tmpdir:
@@ -633,9 +680,11 @@
     jobs = [[] for j in xrange(options.jobs)]
     while tests:
         for job in jobs:
-            if not tests: break
+            if not tests:
+                break
             job.append(tests.pop())
     fps = {}
+
     for j, job in enumerate(jobs):
         if not job:
             continue
@@ -647,6 +696,7 @@
         vlog(' '.join(cmdline))
         fps[os.spawnvp(os.P_NOWAIT, cmdline[0], cmdline)] = os.fdopen(rfd, 'r')
         os.close(wfd)
+    signal.signal(signal.SIGINT, signal.SIG_IGN)
     failures = 0
     tested, skipped, failed = 0, 0, 0
     skips = []
@@ -655,7 +705,10 @@
         pid, status = os.wait()
         fp = fps.pop(pid)
         l = fp.read().splitlines()
-        test, skip, fail = map(int, l[:3])
+        try:
+            test, skip, fail = map(int, l[:3])
+        except ValueError:
+            test, skip, fail = 0, 0, 0
         split = -fail or len(l)
         for s in l[3:split]:
             skips.append(s.split(" ", 1))
@@ -715,6 +768,13 @@
         fails = []
 
         for test in tests:
+            if options.blacklist:
+                filename = options.blacklist.get(test)
+                if filename is not None:
+                    skips.append((test, "blacklisted (%s)" % filename))
+                    skipped += 1
+                    continue
+
             if options.retest and not os.path.exists(test + ".err"):
                 skipped += 1
                 continue
@@ -725,7 +785,7 @@
                     if k in t:
                         break
                 else:
-                    skipped +=1
+                    skipped += 1
                     continue
 
             ret = runone(options, test, skips, fails)
@@ -882,6 +942,7 @@
         else:
             runtests(options, tests)
     finally:
+        time.sleep(1)
         cleanup(options)
 
 main()
--- a/tests/test-acl	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-acl	Sat Feb 13 23:50:38 2010 -0600
@@ -44,7 +44,7 @@
 hg clone -r 0 a b
 
 echo '[extensions]' >> $HGRCPATH
-echo 'hgext.acl =' >> $HGRCPATH
+echo 'acl =' >> $HGRCPATH
 
 config=b/.hg/hgrc
 
--- a/tests/test-acl.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-acl.out	Sat Feb 13 23:50:38 2010 -0600
@@ -20,14 +20,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 updating the branch cache
 rolling back last transaction
@@ -49,14 +90,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: changes have source "push" - skipping
@@ -82,14 +164,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow not enabled
@@ -120,14 +243,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 0 entries for user fred
@@ -159,14 +323,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 1 entries for user fred
@@ -201,14 +406,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 0 entries for user barney
@@ -242,14 +488,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 1 entries for user fred
@@ -286,14 +573,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 1 entries for user fred
@@ -329,14 +657,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 0 entries for user barney
@@ -373,14 +742,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 1 entries for user barney
@@ -418,14 +828,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 1 entries for user wilma
@@ -467,14 +918,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 error: pretxnchangegroup.acl hook raised an exception: [Errno 2] No such file or directory: '../acl.config'
@@ -515,14 +1007,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 1 entries for user betty
@@ -570,14 +1103,55 @@
 f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
 911600dab2ae7a9baff75958b84fe606851ce955
 adding changesets
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle changes: 7 chunks
+bundle changes: 8 chunks
+bundle changes: 9 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle manifests: 7 chunks
+bundle manifests: 8 chunks
+bundle manifests: 9 chunks
+bundle files: foo/Bar/file.txt 0 chunks
+bundle files: foo/Bar/file.txt 1 chunks
+bundle files: foo/Bar/file.txt 2 chunks
+bundle files: foo/Bar/file.txt 3 chunks
+bundle files: foo/file.txt 4 chunks
+bundle files: foo/file.txt 5 chunks
+bundle files: foo/file.txt 6 chunks
+bundle files: foo/file.txt 7 chunks
+bundle files: quux/file.py 8 chunks
+bundle files: quux/file.py 9 chunks
+bundle files: quux/file.py 10 chunks
+bundle files: quux/file.py 11 chunks
+changesets: 1 chunks
 add changeset ef1ea85a6374
+changesets: 2 chunks
 add changeset f9cafe1212c8
+changesets: 3 chunks
 add changeset 911600dab2ae
 adding manifests
+manifests: 1 chunks
+manifests: 2 chunks
+manifests: 3 chunks
 adding file changes
 adding foo/Bar/file.txt revisions
+files: 1 chunks
 adding foo/file.txt revisions
+files: 2 chunks
 adding quux/file.py revisions
+files: 3 chunks
 added 3 changesets with 3 changes to 3 files
 calling hook pretxnchangegroup.acl: hgext.acl.hook
 acl: acl.allow enabled, 1 entries for user barney
--- a/tests/test-alias	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-alias	Sat Feb 13 23:50:38 2010 -0600
@@ -25,15 +25,19 @@
 
 echo '% unknown'
 hg unknown
+hg help unknown
 
 echo '% ambiguous'
 hg ambiguous
+hg help ambiguous
 
 echo '% recursive'
 hg recursive
+hg help recursive
 
 echo '% no definition'
 hg nodef
+hg help nodef
 
 cd alias
 
--- a/tests/test-alias.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-alias.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,12 +1,16 @@
 % basic
 % unknown
 alias 'unknown' resolves to unknown command 'bargle'
+alias 'unknown' resolves to unknown command 'bargle'
 % ambiguous
 alias 'ambiguous' resolves to ambiguous command 's'
+alias 'ambiguous' resolves to ambiguous command 's'
 % recursive
 alias 'recursive' resolves to unknown command 'recursive'
+alias 'recursive' resolves to unknown command 'recursive'
 % no definition
 no definition for alias 'nodefinition'
+no definition for alias 'nodefinition'
 % no usage
 no rollback information available
 adding foo
--- a/tests/test-annotate	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-annotate	Sat Feb 13 23:50:38 2010 -0600
@@ -49,6 +49,8 @@
 
 echo % annotate -n b
 hg annotate -n b
+echo % annotate --no-follow b
+hg annotate --no-follow b
 echo % annotate -nl b
 hg annotate -nl b
 echo % annotate -nf b
--- a/tests/test-annotate.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-annotate.out	Sat Feb 13 23:50:38 2010 -0600
@@ -18,6 +18,13 @@
 % annotate -cdnul
 nobody 0 8435f90966e4 Thu Jan 01 00:00:01 1970 +0000:1: a
 % annotate -n b
+0: a
+1: a
+1: a
+3: b4
+3: b5
+3: b6
+% annotate --no-follow b
 2: a
 2: a
 2: a
@@ -25,9 +32,9 @@
 3: b5
 3: b6
 % annotate -nl b
-2:1: a
-2:2: a
-2:3: a
+0:1: a
+1:2: a
+1:3: a
 3:4: b4
 3:5: b5
 3:6: b6
@@ -95,4 +102,4 @@
 1:3: a
 % generate ABA rename configuration
 % annotate after ABA with follow
-foo: foo
+8: foo
--- a/tests/test-bheads	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-bheads	Sat Feb 13 23:50:38 2010 -0600
@@ -2,7 +2,7 @@
 
 heads()
 {
-    hg heads --template '{rev}: {desc|firstline|strip}\n' "$@"
+    hg heads --template '{rev}: {desc|firstline|strip} ({branches})\n' "$@"
 }
 
 hg init a
@@ -111,3 +111,6 @@
 
 echo '======='
 heads 0 1 2 3 4 5 6 7
+
+echo '% topological heads'
+heads -t
--- a/tests/test-bheads.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-bheads.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,154 +1,182 @@
-0: Adding root node
+0: Adding root node ()
 -------
-0: Adding root node
+0: Adding root node ()
 =======
 marked working directory as branch a
-1: Adding a branch
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-1: Adding a branch
+1: Adding a branch (a)
 =======
 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
 marked working directory as branch b
 created new head
-2: Adding b branch
-1: Adding a branch
+2: Adding b branch (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-2: Adding b branch
+2: Adding b branch (b)
 =======
-3: Adding b branch head 1
-1: Adding a branch
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-3: Adding b branch head 1
+3: Adding b branch head 1 (b)
 =======
 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
 created new head
-4: Adding b branch head 2
-3: Adding b branch head 1
-1: Adding a branch
+4: Adding b branch head 2 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-4: Adding b branch head 2
-3: Adding b branch head 1
+4: Adding b branch head 2 (b)
+3: Adding b branch head 1 (b)
 =======
 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
 created new head
-5: Adding b branch head 3
-4: Adding b branch head 2
-3: Adding b branch head 1
-1: Adding a branch
+5: Adding b branch head 3 (b)
+4: Adding b branch head 2 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-5: Adding b branch head 3
-4: Adding b branch head 2
-3: Adding b branch head 1
+5: Adding b branch head 3 (b)
+4: Adding b branch head 2 (b)
+3: Adding b branch head 1 (b)
 =======
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
-1: Adding a branch
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
 =======
 marked working directory as branch c
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-7: Adding c branch
+7: Adding c branch (c)
 =======
-no changes on branch c containing . are reachable from 3
+no open branch heads found on branches c (started at 3)
 1
 -------
-7: Adding c branch
+7: Adding c branch (c)
 0
 -------
 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
 0
 -------
-3: Adding b branch head 1
+3: Adding b branch head 1 (b)
 0
 -------
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
 0
 -------
-no changes on branch b containing . are reachable from 7
+no open branch heads found on branches b (started at 7)
 1
 =======
 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-0: Adding root node
+0: Adding root node ()
 -------
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-1: Adding a branch
+1: Adding a branch (a)
 -------
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
 -------
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
 -------
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
 -------
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
 -------
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
 -------
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-7: Adding c branch
-3: Adding b branch head 1
-1: Adding a branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
 -------
-7: Adding c branch
+7: Adding c branch (c)
 -------
 =======
-1: Adding a branch
+1: Adding a branch (a)
 -------
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
 -------
-7: Adding c branch
+7: Adding c branch (c)
 -------
 abort: unknown revision 'z'!
 -------
 =======
-0: Adding root node
-1: Adding a branch
-6: Merging b branch head 2 and b branch head 3
-3: Adding b branch head 1
-7: Adding c branch
+7: Adding c branch (c)
+6: Merging b branch head 2 and b branch head 3 (b)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
+0: Adding root node ()
+% topological heads
+7: Adding c branch (c)
+3: Adding b branch head 1 (b)
+1: Adding a branch (a)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-branch-option	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# test branch selection options
+hg init branch
+cd branch
+hg branch a
+echo a > foo
+hg ci -d '0 0' -Ama
+echo a2 > foo
+hg ci -d '0 0' -ma2
+hg up 0
+hg branch c
+echo c > foo
+hg ci -d '0 0' -mc
+cd ..
+hg clone -r 0 branch branch2
+cd branch2
+hg up 0
+hg branch b
+echo b > foo
+hg ci -d '0 0' -mb
+hg up 0
+hg branch -f b
+echo b2 > foo
+hg ci -d '0 0' -mb2
+
+echo in rev c branch a
+hg in -qr c ../branch#a
+hg in -qr c -b a
+echo out branch .
+hg out -q ../branch#.
+hg out -q -b .
+echo clone branch b
+cd ..
+hg clone branch2#b branch3
+hg -q -R branch3 heads b
+hg -q -R branch3 parents
+rm -rf branch3
+echo clone rev a branch b
+hg clone -r a branch2#b branch3
+hg -q -R branch3 heads b
+hg -q -R branch3 parents
+rm -rf branch3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-branch-option.out	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,47 @@
+marked working directory as branch a
+adding foo
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+marked working directory as branch c
+created new head
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+updating to branch a
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+marked working directory as branch b
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+marked working directory as branch b
+created new head
+in rev c branch a
+1:dd6e60a716c6
+2:f25d57ab0566
+1:dd6e60a716c6
+2:f25d57ab0566
+out branch .
+2:65511d0e2b55
+2:65511d0e2b55
+clone branch b
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 3 changesets with 3 changes to 1 files (+1 heads)
+updating to branch b
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+2:65511d0e2b55
+1:b84708d77ab7
+2:65511d0e2b55
+clone rev a branch b
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 3 changesets with 3 changes to 1 files (+1 heads)
+updating to branch a
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+2:65511d0e2b55
+1:b84708d77ab7
+0:5b65ba7c951d
--- a/tests/test-branches.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-branches.out	Sat Feb 13 23:50:38 2010 -0600
@@ -66,7 +66,6 @@
 c                              6:589736a22561 (inactive)
 a                              5:d8cbc61dbaa6 (inactive)
 default                        0:19709c5a4e75 (inactive)
-abort: you must specify a branch to use --closed
 changeset:   10:bfbe841b666e
 branch:      b
 tag:         tip
@@ -87,6 +86,62 @@
 date:        Thu Jan 01 00:00:06 1970 +0000
 summary:     Adding d branch
 
+changeset:   6:589736a22561
+branch:      c
+user:        test
+date:        Thu Jan 01 00:00:05 1970 +0000
+summary:     Adding c branch
+
+changeset:   5:d8cbc61dbaa6
+branch:      a
+parent:      2:881fe2b92ad0
+user:        test
+date:        Thu Jan 01 00:00:04 1970 +0000
+summary:     Adding b branch head 2
+
+changeset:   0:19709c5a4e75
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     Adding root node
+
+changeset:   10:bfbe841b666e
+branch:      b
+tag:         tip
+user:        test
+date:        Thu Jan 01 00:00:09 1970 +0000
+summary:     adding another cset to branch b
+
+changeset:   8:eebb944467c9
+branch:      b
+parent:      4:aee39cd168d0
+user:        test
+date:        Thu Jan 01 00:00:07 1970 +0000
+summary:     adding cset to branch b
+
+changeset:   7:10ff5895aa57
+branch:      a branch name much longer than the default justification used by branches
+user:        test
+date:        Thu Jan 01 00:00:06 1970 +0000
+summary:     Adding d branch
+
+changeset:   6:589736a22561
+branch:      c
+user:        test
+date:        Thu Jan 01 00:00:05 1970 +0000
+summary:     Adding c branch
+
+changeset:   5:d8cbc61dbaa6
+branch:      a
+parent:      2:881fe2b92ad0
+user:        test
+date:        Thu Jan 01 00:00:04 1970 +0000
+summary:     Adding b branch head 2
+
+changeset:   0:19709c5a4e75
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     Adding root node
+
 b                              8:eebb944467c9
 a branch name much longer than the default justification used by branches 7:10ff5895aa57
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -101,7 +156,7 @@
 a                              5:d8cbc61dbaa6 (inactive)
 default                        0:19709c5a4e75 (inactive)
 a branch name much longer than the default justification used by branches 7:10ff5895aa57
-no open branch heads on branch b
+no open branch heads found on branches b
 changeset:   12:2da6583810df
 branch:      b
 tag:         tip
@@ -127,18 +182,30 @@
 date:        Thu Jan 01 00:00:09 1970 +0000
 summary:     reopen branch with a change
 
-changeset:   11:c84627f3c15d
-branch:      b
-user:        test
-date:        Thu Jan 01 00:00:09 1970 +0000
-summary:     prune bad branch
-
 changeset:   7:10ff5895aa57
 branch:      a branch name much longer than the default justification used by branches
 user:        test
 date:        Thu Jan 01 00:00:06 1970 +0000
 summary:     Adding d branch
 
+changeset:   6:589736a22561
+branch:      c
+user:        test
+date:        Thu Jan 01 00:00:05 1970 +0000
+summary:     Adding c branch
+
+changeset:   5:d8cbc61dbaa6
+branch:      a
+parent:      2:881fe2b92ad0
+user:        test
+date:        Thu Jan 01 00:00:04 1970 +0000
+summary:     Adding b branch head 2
+
+changeset:   0:19709c5a4e75
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     Adding root node
+
 % branch default
 changeset:   0:19709c5a4e75
 user:        test
@@ -153,6 +220,7 @@
 date:        Thu Jan 01 00:00:04 1970 +0000
 summary:     Adding b branch head 2
 
+no open branch heads found on branches a
 % branch b
 changeset:   13:6ac12926b8c3
 branch:      b
--- a/tests/test-bundle.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-bundle.out	Sat Feb 13 23:50:38 2010 -0600
@@ -19,11 +19,6 @@
 added 0 changesets with 0 changes to 4 files
 (run 'hg update' to get a working copy)
 ====== Verify empty
-changeset:   -1:000000000000
-tag:         tip
-user:        
-date:        Thu Jan 01 00:00:00 1970 +0000
-
 checking changesets
 checking manifests
 crosschecking files in changesets and manifests
@@ -346,3 +341,25 @@
 list of changesets:
 d2ae7f538514cd87c17547b0de4cea71fe1af9fb
 5ece8e77363e2b5269e27c66828b72da29e4341a
+bundle changes: 0 chunks
+bundle changes: 1 chunks
+bundle changes: 2 chunks
+bundle changes: 3 chunks
+bundle changes: 4 chunks
+bundle changes: 5 chunks
+bundle changes: 6 chunks
+bundle manifests: 0 chunks
+bundle manifests: 1 chunks
+bundle manifests: 2 chunks
+bundle manifests: 3 chunks
+bundle manifests: 4 chunks
+bundle manifests: 5 chunks
+bundle manifests: 6 chunks
+bundle files: b 0 chunks
+bundle files: b 1 chunks
+bundle files: b 2 chunks
+bundle files: b 3 chunks
+bundle files: b1 4 chunks
+bundle files: b1 5 chunks
+bundle files: b1 6 chunks
+bundle files: b1 7 chunks
--- a/tests/test-children	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-children	Sat Feb 13 23:50:38 2010 -0600
@@ -3,7 +3,7 @@
 
 cat <<EOF >> $HGRCPATH
 [extensions]
-hgext.children=
+children =
 EOF
 
 echo "% init"
--- a/tests/test-clone.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-clone.out	Sat Feb 13 23:50:38 2010 -0600
@@ -217,6 +217,11 @@
 date:        Thu Jan 01 00:00:00 1970 +0000
 summary:     another change for branch stable
 
+changeset:   10:a7949464abda
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     test
+
 
 % same revision checked out in repo a and ua
 e8ece76546a6
@@ -239,6 +244,11 @@
 date:        Thu Jan 01 00:00:00 1970 +0000
 summary:     another change for branch stable
 
+changeset:   10:a7949464abda
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     test
+
 
 % same revision checked out in repo a and ua
 e8ece76546a6
@@ -261,6 +271,11 @@
 date:        Thu Jan 01 00:00:00 1970 +0000
 summary:     another change for branch stable
 
+changeset:   10:a7949464abda
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     test
+
 
 % branch stable is checked out
 changeset:   13:0aae7cf88f0d
--- a/tests/test-command-template	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-command-template	Sat Feb 13 23:50:38 2010 -0600
@@ -32,6 +32,7 @@
 hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
 echo third > third
 hg add third
+hg mv second fourth
 hg commit -m third -d "2020-01-01 10:01"
 
 # make sure user/global hgrc does not affect tests
@@ -61,6 +62,14 @@
 hg log -v --style compact
 hg log --debug --style compact
 
+# Test xml styles
+echo '# xml style works (--style xml)'
+hg log --style xml
+echo '# xml style works (-v --style xml)'
+hg log -v --style xml
+echo '# xml style works (--debug --style xml)'
+hg log --debug --style xml
+
 echo '# error if style not readable'
 touch q
 chmod 0 q
@@ -93,7 +102,8 @@
 
 echo "# keys work"
 for key in author branches date desc file_adds file_dels file_mods \
-        files manifest node parents rev tags diffstat; do
+        file_copies file_copies_switch files \
+        manifest node parents rev tags diffstat extras; do
     for mode in '' --verbose --debug; do
         hg log $mode --template "$key$mode: {$key}\n"
     done
@@ -185,4 +195,13 @@
 EOF
 hg -R latesttag tip
 
+echo '# test recursive showlist template (issue1989)'
+cat > style1989 <<EOF
+changeset = '{file_mods}{manifest}{extras}'
+file_mod  = 'M|{author|person}\n'
+manifest = '{rev},{author}\n'
+extra = '{key}: {author}\n'
+EOF
+hg -R latesttag log -r tip --style=style1989
+
 echo '# done'
--- a/tests/test-command-template.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-command-template.out	Sat Feb 13 23:50:38 2010 -0600
@@ -8,7 +8,7 @@
 # revision with no copies (used to print a traceback)
 
 # compact style works
-8[tip]   946e2bd9c565   2020-01-01 10:01 +0000   test
+8[tip]   3bdecc1cde0c   2020-01-01 10:01 +0000   test
   third
 
 7:-1   29114dbae42b   1970-01-12 13:46 +0000   user
@@ -35,7 +35,7 @@
 0   1e4e1b8f71e0   1970-01-12 13:46 +0000   user
   line 1
 
-8[tip]   946e2bd9c565   2020-01-01 10:01 +0000   test
+8[tip]   3bdecc1cde0c   2020-01-01 10:01 +0000   test
   third
 
 7:-1   29114dbae42b   1970-01-12 13:46 +0000   User Name <user@hostname>
@@ -66,7 +66,7 @@
   line 1
 line 2
 
-8[tip]:7,-1   946e2bd9c565   2020-01-01 10:01 +0000   test
+8[tip]:7,-1   3bdecc1cde0c   2020-01-01 10:01 +0000   test
   third
 
 7:-1,-1   29114dbae42b   1970-01-12 13:46 +0000   User Name <user@hostname>
@@ -97,6 +97,266 @@
   line 1
 line 2
 
+# xml style works (--style xml)
+<?xml version="1.0"?>
+<log>
+<logentry revision="8" node="3bdecc1cde0c3d5fa6eaee3d9d9828f6ac468d57">
+<tag>tip</tag>
+<author email="test">test</author>
+<date>2020-01-01T10:01:00+00:00</date>
+<msg xml:space="preserve">third</msg>
+</logentry>
+<logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="user@hostname">User Name</author>
+<date>1970-01-12T13:46:40+00:00</date>
+<msg xml:space="preserve">second</msg>
+</logentry>
+<logentry revision="6" node="c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f">
+<parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
+<parent revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4" />
+<author email="person">person</author>
+<date>1970-01-18T08:40:01+00:00</date>
+<msg xml:space="preserve">merge</msg>
+</logentry>
+<logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
+<parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
+<author email="person">person</author>
+<date>1970-01-18T08:40:00+00:00</date>
+<msg xml:space="preserve">new head</msg>
+</logentry>
+<logentry revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4">
+<branch>foo</branch>
+<author email="person">person</author>
+<date>1970-01-17T04:53:20+00:00</date>
+<msg xml:space="preserve">new branch</msg>
+</logentry>
+<logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
+<author email="person">person</author>
+<date>1970-01-16T01:06:40+00:00</date>
+<msg xml:space="preserve">no user, no domain</msg>
+</logentry>
+<logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
+<author email="other@place">other</author>
+<date>1970-01-14T21:20:00+00:00</date>
+<msg xml:space="preserve">no person</msg>
+</logentry>
+<logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
+<author email="other@place">A. N. Other</author>
+<date>1970-01-13T17:33:20+00:00</date>
+<msg xml:space="preserve">other 1
+other 2
+
+other 3</msg>
+</logentry>
+<logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
+<author email="user@hostname">User Name</author>
+<date>1970-01-12T13:46:40+00:00</date>
+<msg xml:space="preserve">line 1
+line 2</msg>
+</logentry>
+</log>
+# xml style works (-v --style xml)
+<?xml version="1.0"?>
+<log>
+<logentry revision="8" node="3bdecc1cde0c3d5fa6eaee3d9d9828f6ac468d57">
+<tag>tip</tag>
+<author email="test">test</author>
+<date>2020-01-01T10:01:00+00:00</date>
+<msg xml:space="preserve">third</msg>
+<paths>
+<path action="A">fourth</path>
+<path action="A">third</path>
+<path action="R">second</path>
+</paths>
+<copies>
+<copy source="second">fourth</copy>
+</copies>
+</logentry>
+<logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="user@hostname">User Name</author>
+<date>1970-01-12T13:46:40+00:00</date>
+<msg xml:space="preserve">second</msg>
+<paths>
+<path action="A">second</path>
+</paths>
+</logentry>
+<logentry revision="6" node="c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f">
+<parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
+<parent revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4" />
+<author email="person">person</author>
+<date>1970-01-18T08:40:01+00:00</date>
+<msg xml:space="preserve">merge</msg>
+<paths>
+</paths>
+</logentry>
+<logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
+<parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
+<author email="person">person</author>
+<date>1970-01-18T08:40:00+00:00</date>
+<msg xml:space="preserve">new head</msg>
+<paths>
+<path action="A">d</path>
+</paths>
+</logentry>
+<logentry revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4">
+<branch>foo</branch>
+<author email="person">person</author>
+<date>1970-01-17T04:53:20+00:00</date>
+<msg xml:space="preserve">new branch</msg>
+<paths>
+</paths>
+</logentry>
+<logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
+<author email="person">person</author>
+<date>1970-01-16T01:06:40+00:00</date>
+<msg xml:space="preserve">no user, no domain</msg>
+<paths>
+<path action="M">c</path>
+</paths>
+</logentry>
+<logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
+<author email="other@place">other</author>
+<date>1970-01-14T21:20:00+00:00</date>
+<msg xml:space="preserve">no person</msg>
+<paths>
+<path action="A">c</path>
+</paths>
+</logentry>
+<logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
+<author email="other@place">A. N. Other</author>
+<date>1970-01-13T17:33:20+00:00</date>
+<msg xml:space="preserve">other 1
+other 2
+
+other 3</msg>
+<paths>
+<path action="A">b</path>
+</paths>
+</logentry>
+<logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
+<author email="user@hostname">User Name</author>
+<date>1970-01-12T13:46:40+00:00</date>
+<msg xml:space="preserve">line 1
+line 2</msg>
+<paths>
+<path action="A">a</path>
+</paths>
+</logentry>
+</log>
+# xml style works (--debug --style xml)
+<?xml version="1.0"?>
+<log>
+<logentry revision="8" node="3bdecc1cde0c3d5fa6eaee3d9d9828f6ac468d57">
+<tag>tip</tag>
+<parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="test">test</author>
+<date>2020-01-01T10:01:00+00:00</date>
+<msg xml:space="preserve">third</msg>
+<paths>
+<path action="A">fourth</path>
+<path action="A">third</path>
+<path action="R">second</path>
+</paths>
+<copies>
+<copy source="second">fourth</copy>
+</copies>
+<extra key="branch">default</extra>
+</logentry>
+<logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="user@hostname">User Name</author>
+<date>1970-01-12T13:46:40+00:00</date>
+<msg xml:space="preserve">second</msg>
+<paths>
+<path action="A">second</path>
+</paths>
+<extra key="branch">default</extra>
+</logentry>
+<logentry revision="6" node="c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f">
+<parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
+<parent revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4" />
+<author email="person">person</author>
+<date>1970-01-18T08:40:01+00:00</date>
+<msg xml:space="preserve">merge</msg>
+<paths>
+</paths>
+<extra key="branch">default</extra>
+</logentry>
+<logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
+<parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="person">person</author>
+<date>1970-01-18T08:40:00+00:00</date>
+<msg xml:space="preserve">new head</msg>
+<paths>
+<path action="A">d</path>
+</paths>
+<extra key="branch">default</extra>
+</logentry>
+<logentry revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4">
+<branch>foo</branch>
+<parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="person">person</author>
+<date>1970-01-17T04:53:20+00:00</date>
+<msg xml:space="preserve">new branch</msg>
+<paths>
+</paths>
+<extra key="branch">foo</extra>
+</logentry>
+<logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
+<parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="person">person</author>
+<date>1970-01-16T01:06:40+00:00</date>
+<msg xml:space="preserve">no user, no domain</msg>
+<paths>
+<path action="M">c</path>
+</paths>
+<extra key="branch">default</extra>
+</logentry>
+<logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
+<parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="other@place">other</author>
+<date>1970-01-14T21:20:00+00:00</date>
+<msg xml:space="preserve">no person</msg>
+<paths>
+<path action="A">c</path>
+</paths>
+<extra key="branch">default</extra>
+</logentry>
+<logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
+<parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="other@place">A. N. Other</author>
+<date>1970-01-13T17:33:20+00:00</date>
+<msg xml:space="preserve">other 1
+other 2
+
+other 3</msg>
+<paths>
+<path action="A">b</path>
+</paths>
+<extra key="branch">default</extra>
+</logentry>
+<logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<parent revision="-1" node="0000000000000000000000000000000000000000" />
+<author email="user@hostname">User Name</author>
+<date>1970-01-12T13:46:40+00:00</date>
+<msg xml:space="preserve">line 1
+line 2</msg>
+<paths>
+<path action="A">a</path>
+</paths>
+<extra key="branch">default</extra>
+</logentry>
+</log>
 # error if style not readable
 abort: Permission denied: ./q
 # error if no style
@@ -128,9 +388,9 @@
 # issue338
 2020-01-01  test  <test>
 
-	* third:
+	* fourth, second, third:
 	third
-	[946e2bd9c565] [tip]
+	[3bdecc1cde0c] [tip]
 
 1970-01-12  User Name  <user@hostname>
 
@@ -150,7 +410,7 @@
 1970-01-17  person  <person>
 
 	* new branch
-	[32a18f097fcc]
+	[32a18f097fcc] <foo>
 
 1970-01-16  person  <person>
 
@@ -299,7 +559,7 @@
 other 3
 desc--debug: line 1
 line 2
-file_adds: third
+file_adds: fourth third
 file_adds: second
 file_adds: 
 file_adds: d
@@ -308,7 +568,7 @@
 file_adds: c
 file_adds: b
 file_adds: a
-file_adds--verbose: third
+file_adds--verbose: fourth third
 file_adds--verbose: second
 file_adds--verbose: 
 file_adds--verbose: d
@@ -317,7 +577,7 @@
 file_adds--verbose: c
 file_adds--verbose: b
 file_adds--verbose: a
-file_adds--debug: third
+file_adds--debug: fourth third
 file_adds--debug: second
 file_adds--debug: 
 file_adds--debug: d
@@ -326,7 +586,7 @@
 file_adds--debug: c
 file_adds--debug: b
 file_adds--debug: a
-file_dels: 
+file_dels: second
 file_dels: 
 file_dels: 
 file_dels: 
@@ -335,6 +595,7 @@
 file_dels: 
 file_dels: 
 file_dels: 
+file_dels--verbose: second
 file_dels--verbose: 
 file_dels--verbose: 
 file_dels--verbose: 
@@ -343,8 +604,7 @@
 file_dels--verbose: 
 file_dels--verbose: 
 file_dels--verbose: 
-file_dels--verbose: 
-file_dels--debug: 
+file_dels--debug: second
 file_dels--debug: 
 file_dels--debug: 
 file_dels--debug: 
@@ -380,7 +640,61 @@
 file_mods--debug: 
 file_mods--debug: 
 file_mods--debug: 
-files: third
+file_copies: fourth (second)
+file_copies: 
+file_copies: 
+file_copies: 
+file_copies: 
+file_copies: 
+file_copies: 
+file_copies: 
+file_copies: 
+file_copies--verbose: fourth (second)
+file_copies--verbose: 
+file_copies--verbose: 
+file_copies--verbose: 
+file_copies--verbose: 
+file_copies--verbose: 
+file_copies--verbose: 
+file_copies--verbose: 
+file_copies--verbose: 
+file_copies--debug: fourth (second)
+file_copies--debug: 
+file_copies--debug: 
+file_copies--debug: 
+file_copies--debug: 
+file_copies--debug: 
+file_copies--debug: 
+file_copies--debug: 
+file_copies--debug: 
+file_copies_switch: 
+file_copies_switch: 
+file_copies_switch: 
+file_copies_switch: 
+file_copies_switch: 
+file_copies_switch: 
+file_copies_switch: 
+file_copies_switch: 
+file_copies_switch: 
+file_copies_switch--verbose: 
+file_copies_switch--verbose: 
+file_copies_switch--verbose: 
+file_copies_switch--verbose: 
+file_copies_switch--verbose: 
+file_copies_switch--verbose: 
+file_copies_switch--verbose: 
+file_copies_switch--verbose: 
+file_copies_switch--verbose: 
+file_copies_switch--debug: 
+file_copies_switch--debug: 
+file_copies_switch--debug: 
+file_copies_switch--debug: 
+file_copies_switch--debug: 
+file_copies_switch--debug: 
+file_copies_switch--debug: 
+file_copies_switch--debug: 
+file_copies_switch--debug: 
+files: fourth second third
 files: second
 files: 
 files: d
@@ -389,7 +703,7 @@
 files: c
 files: b
 files: a
-files--verbose: third
+files--verbose: fourth second third
 files--verbose: second
 files--verbose: 
 files--verbose: d
@@ -398,7 +712,7 @@
 files--verbose: c
 files--verbose: b
 files--verbose: a
-files--debug: third
+files--debug: fourth second third
 files--debug: second
 files--debug: 
 files--debug: d
@@ -407,7 +721,7 @@
 files--debug: c
 files--debug: b
 files--debug: a
-manifest: 8:8a0d8faab8b2
+manifest: 8:79c71159cb0a
 manifest: 7:f2dbc354b94e
 manifest: 6:91015e9dbdd7
 manifest: 5:4dc3def4f9b4
@@ -416,7 +730,7 @@
 manifest: 2:6e0e82995c35
 manifest: 1:4e8d705b1e53
 manifest: 0:a0c8bcbbb45c
-manifest--verbose: 8:8a0d8faab8b2
+manifest--verbose: 8:79c71159cb0a
 manifest--verbose: 7:f2dbc354b94e
 manifest--verbose: 6:91015e9dbdd7
 manifest--verbose: 5:4dc3def4f9b4
@@ -425,7 +739,7 @@
 manifest--verbose: 2:6e0e82995c35
 manifest--verbose: 1:4e8d705b1e53
 manifest--verbose: 0:a0c8bcbbb45c
-manifest--debug: 8:8a0d8faab8b2eee97dcfccabbcb18f413c9d097b
+manifest--debug: 8:79c71159cb0a1a84add78e7922a1e5e7be34c499
 manifest--debug: 7:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
 manifest--debug: 6:91015e9dbdd76a6791085d12b0a0ec7fcd22ffbf
 manifest--debug: 5:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
@@ -434,7 +748,7 @@
 manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
 manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
 manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
-node: 946e2bd9c565394777d74d9669045b39e856e3ea
+node: 3bdecc1cde0c3d5fa6eaee3d9d9828f6ac468d57
 node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
 node: c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f
 node: 13207e5a10d9fd28ec424934298e176197f2c67f
@@ -443,7 +757,7 @@
 node: 97054abb4ab824450e9164180baf491ae0078465
 node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
 node: 1e4e1b8f71e05681d422154f5421e385fec3454f
-node--verbose: 946e2bd9c565394777d74d9669045b39e856e3ea
+node--verbose: 3bdecc1cde0c3d5fa6eaee3d9d9828f6ac468d57
 node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
 node--verbose: c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f
 node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
@@ -452,7 +766,7 @@
 node--verbose: 97054abb4ab824450e9164180baf491ae0078465
 node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
 node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
-node--debug: 946e2bd9c565394777d74d9669045b39e856e3ea
+node--debug: 3bdecc1cde0c3d5fa6eaee3d9d9828f6ac468d57
 node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
 node--debug: c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f
 node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
@@ -542,7 +856,7 @@
 tags--debug: 
 tags--debug: 
 tags--debug: 
-diffstat: 1: +1/-0
+diffstat: 3: +2/-1
 diffstat: 1: +1/-0
 diffstat: 0: +0/-0
 diffstat: 1: +1/-0
@@ -551,7 +865,7 @@
 diffstat: 1: +4/-0
 diffstat: 1: +2/-0
 diffstat: 1: +1/-0
-diffstat--verbose: 1: +1/-0
+diffstat--verbose: 3: +2/-1
 diffstat--verbose: 1: +1/-0
 diffstat--verbose: 0: +0/-0
 diffstat--verbose: 1: +1/-0
@@ -560,7 +874,7 @@
 diffstat--verbose: 1: +4/-0
 diffstat--verbose: 1: +2/-0
 diffstat--verbose: 1: +1/-0
-diffstat--debug: 1: +1/-0
+diffstat--debug: 3: +2/-1
 diffstat--debug: 1: +1/-0
 diffstat--debug: 0: +0/-0
 diffstat--debug: 1: +1/-0
@@ -569,6 +883,33 @@
 diffstat--debug: 1: +4/-0
 diffstat--debug: 1: +2/-0
 diffstat--debug: 1: +1/-0
+extras: branch=default
+extras: branch=default
+extras: branch=default
+extras: branch=default
+extras: branch=foo
+extras: branch=default
+extras: branch=default
+extras: branch=default
+extras: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=foo
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--verbose: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=foo
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
+extras--debug: branch=default
 # filters work
 
 hostname
@@ -643,7 +984,7 @@
 no person
 other 1
 line 1
-946e2bd9c565
+3bdecc1cde0c
 29114dbae42b
 c7b487c6c50e
 13207e5a10d9
@@ -725,4 +1066,8 @@
 0: null+1
 # style path expansion (issue1948)
 test 10:dee8f28249af
+# test recursive showlist template (issue1989)
+M|test
+10,test
+branch: test
 # done
--- a/tests/test-convert	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert	Sat Feb 13 23:50:38 2010 -0600
@@ -50,3 +50,10 @@
 # override $PATH to ensure p4 not visible; use $PYTHON in case we're
 # running from a devel copy, not a temp installation
 PATH=$BINDIR $PYTHON $BINDIR/hg convert emptydir 2>&1 | sed 's,file://.*/emptydir,.../emptydir,g'
+
+echo % convert with imaginary source type
+hg convert --source-type foo a a-foo
+echo % convert with imaginary sink type
+hg convert --dest-type foo a a-foo
+
+true
--- a/tests/test-convert-baz	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-baz	Sat Feb 13 23:50:38 2010 -0600
@@ -10,7 +10,7 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert=" >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
 
 echo % create baz archive
 baz make-archive baz@mercurial--convert hg-test-convert-baz
--- a/tests/test-convert-clonebranches	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-clonebranches	Sat Feb 13 23:50:38 2010 -0600
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 echo "[extensions]" >> $HGRCPATH
-echo "hgext.convert = " >> $HGRCPATH
+echo "convert = " >> $HGRCPATH
 echo "[convert]" >> $HGRCPATH
 echo "hg.tagsbranch=0" >> $HGRCPATH
 
--- a/tests/test-convert-cvs	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-cvs	Sat Feb 13 23:50:38 2010 -0600
@@ -16,6 +16,19 @@
 echo "convert = " >> $HGRCPATH
 echo "graphlog = " >> $HGRCPATH
 
+cat > cvshooks.py <<EOF
+def cvslog(ui,repo,hooktype,log):
+    print "%s hook: %d entries"%(hooktype,len(log))
+
+def cvschangesets(ui,repo,hooktype,changesets):
+    print "%s hook: %d changesets"%(hooktype,len(changesets))
+EOF
+hookpath=`pwd`
+
+echo "[hooks]" >> $HGRCPATH
+echo "cvslog=python:$hookpath/cvshooks.py:cvslog" >> $HGRCPATH
+echo "cvschangesets=python:$hookpath/cvshooks.py:cvschangesets" >> $HGRCPATH
+
 echo % create cvs repository
 mkdir cvsrepo
 cd cvsrepo
--- a/tests/test-convert-cvs.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-cvs.out	Sat Feb 13 23:50:38 2010 -0600
@@ -17,8 +17,10 @@
 scanning source...
 collecting CVS rlog
 5 log entries
+cvslog hook: 5 entries
 creating changesets
 3 changeset entries
+cvschangesets hook: 3 changesets
 sorting...
 converting...
 2 Initial revision
@@ -34,8 +36,10 @@
 scanning source...
 collecting CVS rlog
 5 log entries
+cvslog hook: 5 entries
 creating changesets
 3 changeset entries
+cvschangesets hook: 3 changesets
 sorting...
 converting...
 2 Initial revision
@@ -57,8 +61,10 @@
 scanning source...
 collecting CVS rlog
 7 log entries
+cvslog hook: 7 entries
 creating changesets
 4 changeset entries
+cvschangesets hook: 4 changesets
 sorting...
 converting...
 0 ci1
@@ -72,8 +78,10 @@
 scanning source...
 collecting CVS rlog
 7 log entries
+cvslog hook: 7 entries
 creating changesets
 4 changeset entries
+cvschangesets hook: 4 changesets
 sorting...
 converting...
 0 ci1
@@ -94,8 +102,10 @@
 scanning source...
 collecting CVS rlog
 8 log entries
+cvslog hook: 8 entries
 creating changesets
 5 changeset entries
+cvschangesets hook: 5 changesets
 sorting...
 converting...
 0 ci2
@@ -106,8 +116,10 @@
 scanning source...
 collecting CVS rlog
 8 log entries
+cvslog hook: 8 entries
 creating changesets
 5 changeset entries
+cvschangesets hook: 5 changesets
 sorting...
 converting...
 0 ci2
@@ -125,8 +137,10 @@
 scanning source...
 collecting CVS rlog
 9 log entries
+cvslog hook: 9 entries
 creating changesets
 6 changeset entries
+cvschangesets hook: 6 changesets
 sorting...
 converting...
 0 funny
@@ -148,8 +162,10 @@
 % testing debugcvsps
 collecting CVS rlog
 9 log entries
+cvslog hook: 9 entries
 creating changesets
 8 changeset entries
+cvschangesets hook: 8 changesets
 ---------------------
 PatchSet 1 
 Date:
--- a/tests/test-convert-darcs	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-darcs	Sat Feb 13 23:50:38 2010 -0600
@@ -4,7 +4,7 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert=" >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
 
 DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
 HOME=`pwd`/do_not_use_HOME_darcs; export HOME
--- a/tests/test-convert-filemap	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-filemap	Sat Feb 13 23:50:38 2010 -0600
@@ -3,8 +3,8 @@
 HGMERGE=true; export HGMERGE
 
 echo '[extensions]' >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
-echo 'hgext.convert =' >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
+echo 'convert =' >> $HGRCPATH
 
 glog()
 {
@@ -16,9 +16,11 @@
 
 echo foo > foo
 echo baz > baz
-mkdir dir
+mkdir -p dir/subdir
 echo dir/file >> dir/file
 echo dir/file2 >> dir/file2
+echo dir/subdir/file3 >> dir/subdir/file3
+echo dir/subdir/file4 >> dir/subdir/file4
 hg ci -d '0 0' -qAm '0: add foo baz dir/'
 
 echo bar > bar
@@ -114,6 +116,8 @@
 include copied
 rename foo foo2
 rename copied copied2
+exclude dir/subdir
+include dir/subdir/file3
 EOF
 hg -q convert --filemap renames.fmap --datesort source renames.repo
 hg up -q -R renames.repo
--- a/tests/test-convert-filemap.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-filemap.out	Sat Feb 13 23:50:38 2010 -0600
@@ -16,7 +16,7 @@
 |/
 o  1 "1: add bar quux; copy foo to copied" files: bar copied quux
 |
-o  0 "0: add foo baz dir/" files: baz dir/file dir/file2 foo
+o  0 "0: add foo baz dir/" files: baz dir/file dir/file2 dir/subdir/file3 dir/subdir/file4 foo
 
 % final file versions in this repo:
 9463f52fe115e377cf2878d4fc548117211063f2 644   bar
@@ -24,6 +24,8 @@
 6ca237634e1f6bee1b6db94292fb44f092a25842 644   copied
 3e20847584beff41d7cd16136b7331ab3d754be0 644   dir/file
 75e6d3f8328f5f6ace6bf10b98df793416a09dca 644   dir/file2
+5fe139720576e18e34bcc9f79174db8897c8afe9 644   dir/subdir/file3
+57a1c1511590f3de52874adfa04effe8a77d64af 644   dir/subdir/file4
 9a7b52012991e4873687192c3e17e61ba3e837a3 644   foo
 bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644   quux
 copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
@@ -144,10 +146,11 @@
 |
 o  1 "1: add bar quux; copy foo to copied" files: copied2
 |
-o  0 "0: add foo baz dir/" files: dir2/file foo2
+o  0 "0: add foo baz dir/" files: dir2/file dir2/subdir/file3 foo2
 
 e5e3d520be9be45937d0b06b004fadcd6c221fa2 644   copied2
 3e20847584beff41d7cd16136b7331ab3d754be0 644   dir2/file
+5fe139720576e18e34bcc9f79174db8897c8afe9 644   dir2/subdir/file3
 9a7b52012991e4873687192c3e17e61ba3e837a3 644   foo2
 copied2 renamed from foo2:2ed2a3912a0b24502043eae84ee4b279c18b90dd
 copied:
--- a/tests/test-convert-hg-startrev	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-hg-startrev	Sat Feb 13 23:50:38 2010 -0600
@@ -1,8 +1,8 @@
 #!/bin/sh
 
 echo '[extensions]' >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
-echo 'hgext.convert =' >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
+echo 'convert =' >> $HGRCPATH
 
 glog()
 {
--- a/tests/test-convert-mtn	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-mtn	Sat Feb 13 23:50:38 2010 -0600
@@ -7,7 +7,7 @@
 mtndir=.monotone
 echo "[extensions]" >> $HGRCPATH
 echo "convert=" >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
 
 HOME=`pwd`/do_not_use_HOME_mtn; export HOME
 # Windows version of monotone home
--- a/tests/test-convert-splicemap	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-splicemap	Sat Feb 13 23:50:38 2010 -0600
@@ -2,7 +2,7 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert=" >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
 
 glog()
 {
--- a/tests/test-convert-svn-branches	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-svn-branches	Sat Feb 13 23:50:38 2010 -0600
@@ -2,14 +2,9 @@
 
 "$TESTDIR/hghave" svn svn-bindings || exit 80
 
-fix_path()
-{
-    tr '\\' /
-}
-
 echo "[extensions]" >> $HGRCPATH
 echo "convert = " >> $HGRCPATH
-echo "hgext.graphlog =" >> $HGRCPATH
+echo "graphlog =" >> $HGRCPATH
 
 svnadmin create svn-repo
 cat "$TESTDIR/svn/branches.svndump" | svnadmin load svn-repo > /dev/null
@@ -30,5 +25,5 @@
 cd ..
 
 echo '% test hg failing to call itself'
-HG=foobar hg convert svn-repo B-hg 2>&1 | grep -v foobar
+HG=foobar hg convert svn-repo B-hg 2>&1 | grep itself
 
--- a/tests/test-convert-svn-branches.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-svn-branches.out	Sat Feb 13 23:50:38 2010 -0600
@@ -49,5 +49,4 @@
 old2                           8:
 tip
 % test hg failing to call itself
-initializing destination B-hg repository
 abort: Mercurial failed to run itself, check hg executable is in PATH
--- a/tests/test-convert-svn-source	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-svn-source	Sat Feb 13 23:50:38 2010 -0600
@@ -9,7 +9,7 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert = " >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
 
 svnadmin create svn-repo
 
--- a/tests/test-convert-svn-startrev	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-svn-startrev	Sat Feb 13 23:50:38 2010 -0600
@@ -2,14 +2,9 @@
 
 "$TESTDIR/hghave" svn svn-bindings || exit 80
 
-fix_path()
-{
-    tr '\\' /
-}
-
 echo "[extensions]" >> $HGRCPATH
 echo "convert = " >> $HGRCPATH
-echo "hgext.graphlog =" >> $HGRCPATH
+echo "graphlog =" >> $HGRCPATH
 
 svnadmin create svn-repo
 cat "$TESTDIR/svn/startrev.svndump" | svnadmin load svn-repo > /dev/null
--- a/tests/test-convert-svn-tags	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-svn-tags	Sat Feb 13 23:50:38 2010 -0600
@@ -2,14 +2,9 @@
 
 "$TESTDIR/hghave" svn svn-bindings || exit 80
 
-fix_path()
-{
-    tr '\\' /
-}
-
 echo "[extensions]" >> $HGRCPATH
 echo "convert = " >> $HGRCPATH
-echo "hgext.graphlog =" >> $HGRCPATH
+echo "graphlog =" >> $HGRCPATH
 
 svnadmin create svn-repo
 cat "$TESTDIR/svn/tags.svndump" | svnadmin load svn-repo > /dev/null
--- a/tests/test-convert-tla	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert-tla	Sat Feb 13 23:50:38 2010 -0600
@@ -10,7 +10,7 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert=" >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
 
 echo % create tla archive
 tla make-archive tla@mercurial--convert `pwd`/hg-test-convert-tla
--- a/tests/test-convert.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-convert.out	Sat Feb 13 23:50:38 2010 -0600
@@ -140,6 +140,15 @@
         If a match occurs, then the conversion process will add the most
         recent revision on the branch indicated in the regex as the second
         parent of the changeset.
+    --config hook.cvslog
+        Specify a Python function to be called at the end of gathering the CVS
+        log. The function is passed a list with the log entries, and can
+        modify the entries in-place, or add or delete them.
+    --config hook.cvschangesets
+        Specify a Python function to be called after the changesets are
+        calculated from the the CVS log. The function is passed a list with
+        the changeset entries, and can modify the changesets in-place, or add
+        or delete them.
 
     An additional "debugcvsps" Mercurial command allows the builtin changeset
     merging code to be run without doing a conversion. Its parameters and
@@ -259,3 +268,8 @@
 emptydir does not look like a Bazaar repo
 cannot find required "p4" tool
 abort: emptydir: missing or unsupported repository
+% convert with imaginary source type
+initializing destination a-foo repository
+abort: foo: invalid source repository type
+% convert with imaginary sink type
+abort: foo: invalid destination repository type
--- a/tests/test-copy-move-merge.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-copy-move-merge.out	Sat Feb 13 23:50:38 2010 -0600
@@ -15,10 +15,12 @@
 preserving a for resolve of b
 preserving a for resolve of c
 removing a
+update: a 1/2 files (50.00%)
 picked tool 'internal:merge' for b (binary False symlink False)
 merging a and b to b
 my b@fb3948d97f07+ other b@40da226db0f0 ancestor a@583c7b748052
  premerge successful
+update: a 2/2 files (100.00%)
 picked tool 'internal:merge' for c (binary False symlink False)
 merging a and c to c
 my c@fb3948d97f07+ other c@40da226db0f0 ancestor a@583c7b748052
--- a/tests/test-debugcomplete.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-debugcomplete.out	Sat Feb 13 23:50:38 2010 -0600
@@ -164,20 +164,20 @@
 
 % Show all commands + options
 add: include, exclude, dry-run
-annotate: rev, follow, text, user, date, number, changeset, line-number, include, exclude
-clone: noupdate, updaterev, rev, pull, uncompressed, ssh, remotecmd
+annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, include, exclude
+clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd
 commit: addremove, close-branch, include, exclude, message, logfile, date, user
 diff: rev, change, text, git, nodates, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude
-export: output, switch-parent, text, git, nodates
+export: output, switch-parent, rev, text, git, nodates
 forget: include, exclude
 init: ssh, remotecmd
 log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, prune, patch, git, limit, no-merges, style, template, include, exclude
 merge: force, rev, preview
-pull: update, force, rev, ssh, remotecmd
-push: force, rev, ssh, remotecmd
+pull: update, force, rev, branch, ssh, remotecmd
+push: force, rev, branch, ssh, remotecmd
 remove: after, force, include, exclude
 serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, webdir-conf, pid-file, stdio, templates, style, ipv6, certificate
-status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, include, exclude
+status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude
 summary: remote
 update: clean, check, date, rev
 addremove: similarity, include, exclude, dry-run
@@ -186,7 +186,7 @@
 bisect: reset, good, bad, skip, command, noupdate
 branch: force, clean
 branches: active, closed
-bundle: force, rev, base, all, type, ssh, remotecmd
+bundle: force, rev, branch, base, all, type, ssh, remotecmd
 cat: output, rev, decode, include, exclude
 copy: after, force, include, exclude, dry-run
 debugancestor: 
@@ -206,14 +206,14 @@
 debugsub: rev
 debugwalk: include, exclude
 grep: print0, all, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude
-heads: rev, active, closed, style, template
+heads: rev, topo, active, closed, style, template
 help: 
 identify: rev, num, id, branch, tags
 import: strip, base, force, no-commit, exact, import-branch, message, logfile, date, user, similarity
-incoming: force, newest-first, bundle, rev, patch, git, limit, no-merges, style, template, ssh, remotecmd
+incoming: force, newest-first, bundle, rev, branch, patch, git, limit, no-merges, style, template, ssh, remotecmd
 locate: rev, print0, fullpath, include, exclude
 manifest: rev
-outgoing: force, rev, newest-first, patch, git, limit, no-merges, style, template, ssh, remotecmd
+outgoing: force, rev, newest-first, branch, patch, git, limit, no-merges, style, template, ssh, remotecmd
 parents: rev, style, template
 paths: 
 recover: 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-diff-upgrade	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+echo "[extensions]" >> $HGRCPATH
+echo "autodiff=$TESTDIR/autodiff.py" >> $HGRCPATH
+echo "[diff]" >> $HGRCPATH
+echo "nodates=1" >> $HGRCPATH
+
+hg init repo
+cd repo
+echo '% make a combination of new, changed and deleted file'
+echo regular > regular
+echo rmregular > rmregular
+touch rmempty
+echo exec > exec
+chmod +x exec
+echo rmexec > rmexec
+chmod +x rmexec
+echo setexec > setexec
+echo unsetexec > unsetexec
+chmod +x unsetexec
+echo binary > binary
+python -c "file('rmbinary', 'wb').write('\0')"
+hg ci -Am addfiles
+echo regular >> regular
+echo newregular >> newregular
+rm rmempty
+touch newempty
+rm rmregular
+echo exec >> exec
+echo newexec > newexec
+chmod +x newexec
+rm rmexec
+chmod +x setexec
+chmod -x unsetexec
+python -c "file('binary', 'wb').write('\0\0')"
+python -c "file('newbinary', 'wb').write('\0')"
+rm rmbinary
+hg addremove
+
+echo '% git=no: regular diff for all files'
+hg autodiff --git=no
+
+echo '% git=no: git diff for single regular file'
+hg autodiff --git=yes regular
+
+echo '% git=auto: regular diff for regular files and removals'
+hg autodiff --git=auto regular newregular rmregular rmbinary rmexec
+
+for f in exec newexec setexec unsetexec binary newbinary newempty rmempty; do
+    echo '% git=auto: git diff for' $f
+    hg autodiff --git=auto $f
+done
+
+echo '% git=warn: regular diff with data loss warnings'
+hg autodiff --git=warn
+
+echo '% git=abort: fail on execute bit change'
+hg autodiff --git=abort regular setexec
+
+echo '% git=abort: succeed on regular file'
+hg autodiff --git=abort regular
+
+cd ..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-diff-upgrade.out	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,186 @@
+% make a combination of new, changed and deleted file
+adding binary
+adding exec
+adding regular
+adding rmbinary
+adding rmempty
+adding rmexec
+adding rmregular
+adding setexec
+adding unsetexec
+adding newbinary
+adding newempty
+adding newexec
+adding newregular
+removing rmbinary
+removing rmempty
+removing rmexec
+removing rmregular
+% git=no: regular diff for all files
+diff -r b3f053cd7c7f binary
+Binary file binary has changed
+diff -r b3f053cd7c7f exec
+--- a/exec
++++ b/exec
+@@ -1,1 +1,2 @@
+ exec
++exec
+diff -r b3f053cd7c7f newbinary
+Binary file newbinary has changed
+diff -r b3f053cd7c7f newexec
+--- /dev/null
++++ b/newexec
+@@ -0,0 +1,1 @@
++newexec
+diff -r b3f053cd7c7f newregular
+--- /dev/null
++++ b/newregular
+@@ -0,0 +1,1 @@
++newregular
+diff -r b3f053cd7c7f regular
+--- a/regular
++++ b/regular
+@@ -1,1 +1,2 @@
+ regular
++regular
+diff -r b3f053cd7c7f rmbinary
+Binary file rmbinary has changed
+diff -r b3f053cd7c7f rmexec
+--- a/rmexec
++++ /dev/null
+@@ -1,1 +0,0 @@
+-rmexec
+diff -r b3f053cd7c7f rmregular
+--- a/rmregular
++++ /dev/null
+@@ -1,1 +0,0 @@
+-rmregular
+% git=no: git diff for single regular file
+diff --git a/regular b/regular
+--- a/regular
++++ b/regular
+@@ -1,1 +1,2 @@
+ regular
++regular
+% git=auto: regular diff for regular files and removals
+diff -r b3f053cd7c7f newregular
+--- /dev/null
++++ b/newregular
+@@ -0,0 +1,1 @@
++newregular
+diff -r b3f053cd7c7f regular
+--- a/regular
++++ b/regular
+@@ -1,1 +1,2 @@
+ regular
++regular
+diff -r b3f053cd7c7f rmbinary
+Binary file rmbinary has changed
+diff -r b3f053cd7c7f rmexec
+--- a/rmexec
++++ /dev/null
+@@ -1,1 +0,0 @@
+-rmexec
+diff -r b3f053cd7c7f rmregular
+--- a/rmregular
++++ /dev/null
+@@ -1,1 +0,0 @@
+-rmregular
+% git=auto: git diff for exec
+diff -r b3f053cd7c7f exec
+--- a/exec
++++ b/exec
+@@ -1,1 +1,2 @@
+ exec
++exec
+% git=auto: git diff for newexec
+diff --git a/newexec b/newexec
+new file mode 100755
+--- /dev/null
++++ b/newexec
+@@ -0,0 +1,1 @@
++newexec
+% git=auto: git diff for setexec
+diff --git a/setexec b/setexec
+old mode 100644
+new mode 100755
+% git=auto: git diff for unsetexec
+diff --git a/unsetexec b/unsetexec
+old mode 100755
+new mode 100644
+% git=auto: git diff for binary
+diff --git a/binary b/binary
+index a9128c283485202893f5af379dd9beccb6e79486..09f370e38f498a462e1ca0faa724559b6630c04f
+GIT binary patch
+literal 2
+Jc${Nk0000200961
+
+% git=auto: git diff for newbinary
+diff --git a/newbinary b/newbinary
+new file mode 100644
+index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d
+GIT binary patch
+literal 1
+Ic${MZ000310RR91
+
+% git=auto: git diff for newempty
+diff --git a/newempty b/newempty
+new file mode 100644
+% git=auto: git diff for rmempty
+diff --git a/rmempty b/rmempty
+deleted file mode 100644
+% git=warn: regular diff with data loss warnings
+diff -r b3f053cd7c7f binary
+Binary file binary has changed
+diff -r b3f053cd7c7f exec
+--- a/exec
++++ b/exec
+@@ -1,1 +1,2 @@
+ exec
++exec
+diff -r b3f053cd7c7f newbinary
+Binary file newbinary has changed
+diff -r b3f053cd7c7f newexec
+--- /dev/null
++++ b/newexec
+@@ -0,0 +1,1 @@
++newexec
+diff -r b3f053cd7c7f newregular
+--- /dev/null
++++ b/newregular
+@@ -0,0 +1,1 @@
++newregular
+diff -r b3f053cd7c7f regular
+--- a/regular
++++ b/regular
+@@ -1,1 +1,2 @@
+ regular
++regular
+diff -r b3f053cd7c7f rmbinary
+Binary file rmbinary has changed
+diff -r b3f053cd7c7f rmexec
+--- a/rmexec
++++ /dev/null
+@@ -1,1 +0,0 @@
+-rmexec
+diff -r b3f053cd7c7f rmregular
+--- a/rmregular
++++ /dev/null
+@@ -1,1 +0,0 @@
+-rmregular
+data lost for: binary
+data lost for: newbinary
+data lost for: newempty
+data lost for: newexec
+data lost for: rmempty
+data lost for: setexec
+data lost for: unsetexec
+% git=abort: fail on execute bit change
+abort: losing data for setexec
+% git=abort: succeed on regular file
+diff -r b3f053cd7c7f regular
+--- a/regular
++++ b/regular
+@@ -1,1 +1,2 @@
+ regular
++regular
--- a/tests/test-dispatch.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-dispatch.out	Sat Feb 13 23:50:38 2010 -0600
@@ -13,9 +13,9 @@
     a format string. The formatting rules are the same as for the export
     command, with the following additions:
 
-    "%s"   basename of file being printed
-    "%d"   dirname of file being printed, or '.' if in repository root
-    "%p"   root-relative path name of file being printed
+    "%s"  basename of file being printed
+    "%d"  dirname of file being printed, or '.' if in repository root
+    "%p"  root-relative path name of file being printed
 
 options:
 
--- a/tests/test-doctest.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-doctest.py	Sat Feb 13 23:50:38 2010 -0600
@@ -1,5 +1,5 @@
 # this is hack to make sure no escape characters are inserted into the output
-import os;
+import os
 if 'TERM' in os.environ:
     del os.environ['TERM']
 import doctest
--- a/tests/test-double-merge.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-double-merge.out	Sat Feb 13 23:50:38 2010 -0600
@@ -17,10 +17,12 @@
  foo: remote copied to bar -> m
 preserving foo for resolve of bar
 preserving foo for resolve of foo
+update: foo 1/2 files (50.00%)
 picked tool 'internal:merge' for bar (binary False symlink False)
 merging foo and bar to bar
 my bar@2092631ce82b+ other bar@7731dad1c2b9 ancestor foo@310fd17130da
  premerge successful
+update: foo 2/2 files (100.00%)
 picked tool 'internal:merge' for foo (binary False symlink False)
 merging foo
 my foo@2092631ce82b+ other foo@7731dad1c2b9 ancestor foo@310fd17130da
--- a/tests/test-extension	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-extension	Sat Feb 13 23:50:38 2010 -0600
@@ -153,3 +153,27 @@
 
 echo % show extensions
 hg debugextensions
+
+echo '% disabled extension commands'
+HGRCPATH=
+hg help email
+hg qdel
+hg churn
+echo '% disabled extensions'
+hg help churn
+hg help patchbomb
+echo '% broken disabled extension and command'
+mkdir hgext
+echo > hgext/__init__.py
+cat > hgext/broken.py <<EOF
+"broken extension'
+EOF
+TMPPYTHONPATH="$PYTHONPATH"
+PYTHONPATH="`pwd`:$PYTHONPATH"
+export PYTHONPATH
+hg help broken
+hg help foo > /dev/null
+PYTHONPATH="$TMPPYTHONPATH"
+export PYTHONPATH
+
+exit 0
--- a/tests/test-extension.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-extension.out	Sat Feb 13 23:50:38 2010 -0600
@@ -96,3 +96,33 @@
 % show extensions
 debugissue811
 mq
+% disabled extension commands
+'email' is provided by the following extension:
+
+    patchbomb  command to send changesets as (a series of) patch emails
+
+use "hg help extensions" for information on enabling extensions
+hg: unknown command 'qdel'
+'qdelete' is provided by the following extension:
+
+    mq  manage a stack of patches
+
+use "hg help extensions" for information on enabling extensions
+hg: unknown command 'churn'
+'churn' is provided by the following extension:
+
+    churn  command to display statistics about repository history
+
+use "hg help extensions" for information on enabling extensions
+% disabled extensions
+churn extension - command to display statistics about repository history
+
+use "hg help extensions" for information on enabling extensions
+patchbomb extension - command to send changesets as (a series of) patch emails
+
+use "hg help extensions" for information on enabling extensions
+% broken disabled extension and command
+broken extension - (no help text available)
+
+use "hg help extensions" for information on enabling extensions
+hg: unknown command 'foo'
--- a/tests/test-fetch	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-fetch	Sat Feb 13 23:50:38 2010 -0600
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # adjust to non-default HGPORT, e.g. with run-tests.py -j
-hideport() { sed "s/localhost:$HGPORT/localhost:20059/"; }
+hideport() { sed "s/localhost:$HGPORT/localhost:\$HGPORT/"; }
 hidehash() { sed "s/changeset 3:............ merges/changeset 3:... merges/"; }
 
 echo "[extensions]" >> $HGRCPATH
--- a/tests/test-fetch.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-fetch.out	Sat Feb 13 23:50:38 2010 -0600
@@ -36,7 +36,7 @@
 b
 c
 % fetch over http, no auth
-pulling from http://localhost:20059/
+pulling from http://localhost:$HGPORT/
 searching for changes
 adding changesets
 adding manifests
@@ -47,9 +47,9 @@
 merging with 1:5e056962225c
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 new changeset 3:... merges remote changes with local
-Automated merge with http://localhost:20059/
+Automated merge with http://localhost:$HGPORT/
 % fetch over http with auth (should be hidden in desc)
-pulling from http://user:***@localhost:20059/
+pulling from http://user:***@localhost:$HGPORT/
 searching for changes
 adding changesets
 adding manifests
@@ -60,7 +60,7 @@
 merging with 1:5e056962225c
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 new changeset 3:... merges remote changes with local
-Automated merge with http://localhost:20059/
+Automated merge with http://localhost:$HGPORT/
 updating to branch default
 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 updating to branch default
--- a/tests/test-fncache.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-fncache.out	Sat Feb 13 23:50:38 2010 -0600
@@ -50,6 +50,7 @@
 .hg/data/tst.d.hg
 .hg/data/tst.d.hg/foo.i
 .hg/dirstate
+.hg/last-message.txt
 .hg/requires
 .hg/undo
 .hg/undo.branch
@@ -59,6 +60,7 @@
 .hg
 .hg/00changelog.i
 .hg/dirstate
+.hg/last-message.txt
 .hg/requires
 .hg/store
 .hg/store/00changelog.i
--- a/tests/test-gendoc	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-gendoc	Sat Feb 13 23:50:38 2010 -0600
@@ -1,13 +1,13 @@
 #!/bin/sh
 
 "$TESTDIR/hghave" rst2html || exit 80
-RST2HTML=$(which rst2html 2> /dev/null || which rst2html.py)
+RST2HTML=`which rst2html 2> /dev/null || which rst2html.py`
 
 HGENCODING=UTF-8
 export HGENCODING
 
 for PO in C $TESTDIR/../i18n/*.po; do
-    LOCALE=$(basename $PO .po)
+    LOCALE=`basename $PO .po`
     echo
     echo "% extracting documentation from $LOCALE"
     echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
--- a/tests/test-git-import	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-git-import	Sat Feb 13 23:50:38 2010 -0600
@@ -141,7 +141,7 @@
 rename from rename2
 rename to rename3-2
 EOF
-hg log -vCr. --template '{rev} {files} / {file_copies%filecopy}\n'
+hg log -vr. --template '{rev} {files} / {file_copies}\n'
 
 hg locate rename2 rename3 rename3-2
 hg cat rename3
--- a/tests/test-globalopts.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-globalopts.out	Sat Feb 13 23:50:38 2010 -0600
@@ -176,7 +176,7 @@
  log          show revision history of entire repository or files
  manifest     output the current or given revision of the project manifest
  merge        merge working directory with another revision
- outgoing     show changesets not found in destination
+ outgoing     show changesets not found in the destination
  parents      show the parents of the working directory or revision
  paths        show aliases for remote repositories
  pull         pull changes from the specified source
@@ -245,7 +245,7 @@
  log          show revision history of entire repository or files
  manifest     output the current or given revision of the project manifest
  merge        merge working directory with another revision
- outgoing     show changesets not found in destination
+ outgoing     show changesets not found in the destination
  parents      show the parents of the working directory or revision
  paths        show aliases for remote repositories
  pull         pull changes from the specified source
--- a/tests/test-help	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-help	Sat Feb 13 23:50:38 2010 -0600
@@ -4,12 +4,60 @@
 hg -q
 hg help
 hg -q help
+
+echo %% test short command list with verbose option
+hg -v help shortlist | sed 's/[(]version [^)]*[)]/(version xxx)/'
+
 hg add -h
+
+echo %% verbose help for add
+hg add -hv
+
+echo %% test help option with version option
+hg add -h --version | sed 's/[(]version [^)]*[)]/(version xxx)/'
+
 hg add --skjdfks
+
+echo %% test ambiguous command help
+hg help ad
+
+echo %% test command without options
+hg help verify
+
 hg help diff
 hg help status
 hg -q help status
 hg help foo
 hg skjdfks
 
+cat > helpext.py <<EOF
+import os
+from mercurial import commands
+
+def nohelp(ui, *args, **kwargs):
+    pass
+
+cmdtable = {
+    "nohelp": (nohelp, [], "hg nohelp"),
+}
+
+commands.norepo += ' nohelp'
+EOF
+abspath=`pwd`/helpext.py
+
+echo '[extensions]' >> $HGRCPATH
+echo "helpext = $abspath" >> $HGRCPATH
+
+echo %% test command with no help text
+hg help nohelp
+
+echo %% test that default list of commands omits extension commands
+hg help
+
+echo %% test list of commands with command with no help text
+hg help helpext
+
+echo %% test a help topic
+hg help revs
+
 exit 0
--- a/tests/test-help.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-help.out	Sat Feb 13 23:50:38 2010 -0600
@@ -69,7 +69,7 @@
  log          show revision history of entire repository or files
  manifest     output the current or given revision of the project manifest
  merge        merge working directory with another revision
- outgoing     show changesets not found in destination
+ outgoing     show changesets not found in the destination
  parents      show the parents of the working directory or revision
  paths        show aliases for remote repositories
  pull         pull changes from the specified source
@@ -134,7 +134,7 @@
  log          show revision history of entire repository or files
  manifest     output the current or given revision of the project manifest
  merge        merge working directory with another revision
- outgoing     show changesets not found in destination
+ outgoing     show changesets not found in the destination
  parents      show the parents of the working directory or revision
  paths        show aliases for remote repositories
  pull         pull changes from the specified source
@@ -170,6 +170,68 @@
  templating   Template Usage
  urls         URL Paths
  extensions   Using additional features
+%% test short command list with verbose option
+Mercurial Distributed SCM (version xxx)
+
+Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+basic commands:
+
+ add:
+      add the specified files on the next commit
+ annotate, blame:
+      show changeset information by line for each file
+ clone:
+      make a copy of an existing repository
+ commit, ci:
+      commit the specified files or all outstanding changes
+ diff:
+      diff repository (or selected files)
+ export:
+      dump the header and diffs for one or more changesets
+ forget:
+      forget the specified files on the next commit
+ init:
+      create a new repository in the given directory
+ log, history:
+      show revision history of entire repository or files
+ merge:
+      merge working directory with another revision
+ pull:
+      pull changes from the specified source
+ push:
+      push changes to the specified destination
+ remove, rm:
+      remove the specified files on the next commit
+ serve:
+      export the repository via HTTP
+ status, st:
+      show changed files in the working directory
+ summary, sum:
+      summarize working directory state
+ update, up, checkout, co:
+      update working directory
+
+global options:
+ -R --repository      repository root directory or name of overlay bundle file
+    --cwd             change working directory
+ -y --noninteractive  do not prompt, assume 'yes' for any required answers
+ -q --quiet           suppress output
+ -v --verbose         enable additional output
+    --config          set/override config option
+    --debug           enable debugging output
+    --debugger        start debugger
+    --encoding        set the charset encoding (default: ascii)
+    --encodingmode    set the charset encoding mode (default: strict)
+    --traceback       always print a traceback on exception
+    --time            time how long the command takes
+    --profile         print command execution profile
+    --version         output version information and exit
+ -h --help            display help and exit
+
+use "hg help" for the full list of commands
 hg add [OPTION]... [FILE]...
 
 add the specified files on the next commit
@@ -181,6 +243,81 @@
 
     If no names are given, add all files to the repository.
 
+use "hg -v help add" to show verbose help
+
+options:
+
+ -I --include  include names matching the given patterns
+ -X --exclude  exclude names matching the given patterns
+ -n --dry-run  do not perform actions, just print output
+
+use "hg -v help add" to show global options
+%% verbose help for add
+hg add [OPTION]... [FILE]...
+
+add the specified files on the next commit
+
+    Schedule files to be version controlled and added to the repository.
+
+    The files will be added to the repository at the next commit. To undo an
+    add before that, see hg forget.
+
+    If no names are given, add all files to the repository.
+
+    An example showing how new (unknown) files are added automatically by "hg
+    add":
+
+      $ ls
+      foo.c
+      $ hg status
+      ? foo.c
+      $ hg add
+      adding foo.c
+      $ hg status
+      A foo.c
+
+options:
+
+ -I --include         include names matching the given patterns
+ -X --exclude         exclude names matching the given patterns
+ -n --dry-run         do not perform actions, just print output
+
+global options:
+ -R --repository      repository root directory or name of overlay bundle file
+    --cwd             change working directory
+ -y --noninteractive  do not prompt, assume 'yes' for any required answers
+ -q --quiet           suppress output
+ -v --verbose         enable additional output
+    --config          set/override config option
+    --debug           enable debugging output
+    --debugger        start debugger
+    --encoding        set the charset encoding (default: ascii)
+    --encodingmode    set the charset encoding mode (default: strict)
+    --traceback       always print a traceback on exception
+    --time            time how long the command takes
+    --profile         print command execution profile
+    --version         output version information and exit
+ -h --help            display help and exit
+%% test help option with version option
+Mercurial Distributed SCM (version xxx)
+
+Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+hg add [OPTION]... [FILE]...
+
+add the specified files on the next commit
+
+    Schedule files to be version controlled and added to the repository.
+
+    The files will be added to the repository at the next commit. To undo an
+    add before that, see hg forget.
+
+    If no names are given, add all files to the repository.
+
+use "hg -v help add" to show verbose help
+
 options:
 
  -I --include  include names matching the given patterns
@@ -200,6 +337,8 @@
 
     If no names are given, add all files to the repository.
 
+use "hg -v help add" to show verbose help
+
 options:
 
  -I --include  include names matching the given patterns
@@ -207,6 +346,26 @@
  -n --dry-run  do not perform actions, just print output
 
 use "hg -v help add" to show global options
+%% test ambiguous command help
+list of commands:
+
+ add         add the specified files on the next commit
+ addremove   add all new files, delete all missing files
+
+use "hg -v help ad" to show aliases and global options
+%% test command without options
+hg verify
+
+verify the integrity of the repository
+
+    Verify the integrity of the current repository.
+
+    This will perform an extensive check of the repository's integrity,
+    validating the hashes and checksums of each entry in the changelog,
+    manifest, and tracked files, as well as the integrity of their crosslinks
+    and indices.
+
+use "hg -v help verify" to show global options
 hg diff [OPTION]... [-r REV1 [-r REV2]] [FILE]...
 
 diff repository (or selected files)
@@ -237,7 +396,7 @@
  -c --change               change made by revision
  -a --text                 treat all files as text
  -g --git                  use git extended diff format
-    --nodates              don't include dates in diff headers
+    --nodates              omit dates from diff headers
  -p --show-function        show which function each change is in
     --reverse              produce a diff that undoes the changes
  -w --ignore-all-space     ignore white space when comparing lines
@@ -270,7 +429,9 @@
     parent.
 
     If one revision is given, it is used as the base revision. If two
-    revisions are given, the differences between them are shown.
+    revisions are given, the differences between them are shown. The --change
+    option can also be used as a shortcut to list the changed files of a
+    revision from its first parent.
 
     The codes used to show the status of files are:
 
@@ -297,6 +458,7 @@
  -C --copies     show source of copied files
  -0 --print0     end filenames with NUL, for use with xargs
     --rev        show difference from revision
+    --change     list the changed files of a revision
  -I --include    include names matching the given patterns
  -X --exclude    exclude names matching the given patterns
 
@@ -352,3 +514,121 @@
  update     update working directory
 
 use "hg help" for the full list of commands or "hg -v" for details
+%% test command with no help text
+hg nohelp
+
+(no help text available)
+
+use "hg -v help nohelp" to show global options
+%% test that default list of commands omits extension commands
+Mercurial Distributed SCM
+
+list of commands:
+
+ add          add the specified files on the next commit
+ addremove    add all new files, delete all missing files
+ annotate     show changeset information by line for each file
+ archive      create an unversioned archive of a repository revision
+ backout      reverse effect of earlier changeset
+ bisect       subdivision search of changesets
+ branch       set or show the current branch name
+ branches     list repository named branches
+ bundle       create a changegroup file
+ cat          output the current or given revision of files
+ clone        make a copy of an existing repository
+ commit       commit the specified files or all outstanding changes
+ copy         mark files as copied for the next commit
+ diff         diff repository (or selected files)
+ export       dump the header and diffs for one or more changesets
+ forget       forget the specified files on the next commit
+ grep         search for a pattern in specified files and revisions
+ heads        show current repository heads or show branch heads
+ help         show help for a given topic or a help overview
+ identify     identify the working copy or specified revision
+ import       import an ordered set of patches
+ incoming     show new changesets found in source
+ init         create a new repository in the given directory
+ locate       locate files matching specific patterns
+ log          show revision history of entire repository or files
+ manifest     output the current or given revision of the project manifest
+ merge        merge working directory with another revision
+ outgoing     show changesets not found in the destination
+ parents      show the parents of the working directory or revision
+ paths        show aliases for remote repositories
+ pull         pull changes from the specified source
+ push         push changes to the specified destination
+ recover      roll back an interrupted transaction
+ remove       remove the specified files on the next commit
+ rename       rename files; equivalent of copy + remove
+ resolve      retry file merges from a merge or update
+ revert       restore individual files or directories to an earlier state
+ rollback     roll back the last transaction
+ root         print the root (top) of the current working directory
+ serve        export the repository via HTTP
+ showconfig   show combined config settings from all hgrc files
+ status       show changed files in the working directory
+ summary      summarize working directory state
+ tag          add one or more tags for the current or given revision
+ tags         list repository tags
+ tip          show the tip revision
+ unbundle     apply one or more changegroup files
+ update       update working directory
+ verify       verify the integrity of the repository
+ version      output version and copyright information
+
+enabled extensions:
+
+ helpext  (no help text available)
+
+additional help topics:
+
+ config       Configuration Files
+ dates        Date Formats
+ patterns     File Name Patterns
+ environment  Environment Variables
+ revisions    Specifying Single Revisions
+ multirevs    Specifying Multiple Revisions
+ diffs        Diff Formats
+ templating   Template Usage
+ urls         URL Paths
+ extensions   Using additional features
+
+use "hg -v help" to show aliases and global options
+%% test list of commands with command with no help text
+helpext extension - no help text available
+
+list of commands:
+
+ nohelp   (no help text available)
+
+use "hg -v help helpext" to show aliases and global options
+%% test a help topic
+Specifying Single Revisions
+
+    Mercurial supports several ways to specify individual revisions.
+
+    A plain integer is treated as a revision number. Negative integers are
+    treated as sequential offsets from the tip, with -1 denoting the tip, -2
+    denoting the revision prior to the tip, and so forth.
+
+    A 40-digit hexadecimal string is treated as a unique revision identifier.
+
+    A hexadecimal string less than 40 characters long is treated as a unique
+    revision identifier and is referred to as a short-form identifier. A
+    short-form identifier is only valid if it is the prefix of exactly one
+    full-length identifier.
+
+    Any other string is treated as a tag or branch name. A tag name is a
+    symbolic name associated with a revision identifier. A branch name denotes
+    the tipmost revision of that branch. Tag and branch names must not contain
+    the ":" character.
+
+    The reserved name "tip" is a special tag that always identifies the most
+    recent revision.
+
+    The reserved name "null" indicates the null revision. This is the revision
+    of an empty repository, and the parent of revision 0.
+
+    The reserved name "." indicates the working directory parent. If no
+    working directory is checked out, it is equivalent to null. If an
+    uncommitted merge is in progress, "." is the revision of the first parent.
--- a/tests/test-hg-parseurl.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hg-parseurl.py	Sat Feb 13 23:50:38 2010 -0600
@@ -2,11 +2,11 @@
 
 from mercurial.hg import parseurl
 
-def testparse(url, rev=[]):
-    print '%s, revs: %r, checkout: %r' % parseurl(url, rev)
+def testparse(url, branch=[]):
+    print '%s, branches: %r' % parseurl(url, branch)
 
 testparse('http://example.com/no/anchor')
 testparse('http://example.com/an/anchor#foo')
-testparse('http://example.com/no/anchor/revs', rev=['foo'])
-testparse('http://example.com/an/anchor/revs#bar', rev=['foo'])
-testparse('http://example.com/an/anchor/rev-None#foo', rev=None)
+testparse('http://example.com/no/anchor/branches', branch=['foo'])
+testparse('http://example.com/an/anchor/branches#bar', branch=['foo'])
+testparse('http://example.com/an/anchor/branches-None#foo', branch=None)
--- a/tests/test-hg-parseurl.py.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hg-parseurl.py.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,5 +1,5 @@
-http://example.com/no/anchor, revs: None, checkout: None
-http://example.com/an/anchor, revs: ['foo'], checkout: 'foo'
-http://example.com/no/anchor/revs, revs: ['foo'], checkout: 'foo'
-http://example.com/an/anchor/revs, revs: ['foo', 'bar'], checkout: 'foo'
-http://example.com/an/anchor/rev-None, revs: ['foo'], checkout: 'foo'
+http://example.com/no/anchor, branches: []
+http://example.com/an/anchor, branches: ['foo']
+http://example.com/no/anchor/branches, branches: ['foo']
+http://example.com/an/anchor/branches, branches: ['foo', 'bar']
+http://example.com/an/anchor/branches-None, branches: ['foo']
--- a/tests/test-hgrc	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hgrc	Sat Feb 13 23:50:38 2010 -0600
@@ -1,25 +1,21 @@
 #!/bin/sh
 
-mkdir t
-cd t
-hg init
-echo "invalid" > .hg/hgrc
-hg status 2>&1 |sed -e "s:/.*\(/t/.*\):...\1:"
+echo "invalid" > $HGRCPATH
+hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
+echo "" > $HGRCPATH
 
-#issue 1199, escaping
-
-cd ..
+# issue1199: escaping
 hg init "foo%bar"
 hg clone "foo%bar" foobar
 p=`pwd`
 cd foobar
-cat .hg/hgrc |sed -e "s:$p:...:"
-hg paths |sed -e "s:$p:...:"
-hg showconfig |sed -e "s:$p:...:"
+cat .hg/hgrc | sed -e "s:$p:...:"
+hg paths | sed -e "s:$p:...:"
+hg showconfig | sed -e "s:$p:...:"
+cd ..
 
 # issue1829: wrong indentation
-cd ..
-echo '[foo]' >> $HGRCPATH
+echo '[foo]' > $HGRCPATH
 echo '  x = y' >> $HGRCPATH
 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
 
@@ -29,3 +25,22 @@
 
 echo '%include /no-such-file' > $HGRCPATH
 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
+
+# HGPLAIN
+cd ..
+p=`pwd`
+echo "[ui]" > $HGRCPATH
+echo "debug=true" >> $HGRCPATH
+echo "fallbackencoding=ASCII" >> $HGRCPATH
+echo "quiet=true" >> $HGRCPATH
+echo "traceback=true" >> $HGRCPATH
+echo "verbose=true" >> $HGRCPATH
+echo "[defaults]" >> $HGRCPATH
+echo "identify=-n" >> $HGRCPATH
+
+echo '% customized hgrc'
+hg showconfig | sed -e "s:$p:...:"
+
+echo '% plain hgrc'
+HGPLAIN=; export HGPLAIN
+hg showconfig --config ui.traceback=True --debug | sed -e "s:$p:...:"
--- a/tests/test-hgrc.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hgrc.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,16 +1,24 @@
-hg: config error at .../t/.hg/hgrc:1: 'invalid'
+hg: config error at $HGRCPATH:1: 'invalid'
 updating to branch default
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 [paths]
 default = .../foo%bar
 default = .../foo%bar
 bundle.mainreporoot=.../foobar
-defaults.backout=-d "0 0"
-defaults.commit=-d "0 0"
-defaults.tag=-d "0 0"
 paths.default=.../foo%bar
-ui.slash=True
-hg: config error at $HGRCPATH:8: '  x = y'
+hg: config error at $HGRCPATH:2: '  x = y'
 foo.bar=a\nb\nc\nde\nfg
 foo.baz=bif cb
 hg: config error at $HGRCPATH:1: cannot include /no-such-file (No such file or directory)
+% customized hgrc
+.../.hgrc:8: defaults.identify=-n
+.../.hgrc:2: ui.debug=true
+.../.hgrc:3: ui.fallbackencoding=ASCII
+.../.hgrc:4: ui.quiet=true
+.../.hgrc:5: ui.traceback=true
+.../.hgrc:6: ui.verbose=true
+% plain hgrc
+none: ui.traceback=True
+none: ui.verbose=False
+none: ui.debug=True
+none: ui.quiet=False
--- a/tests/test-hgweb-auth.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hgweb-auth.py	Sat Feb 13 23:50:38 2010 -0600
@@ -16,7 +16,8 @@
     return ui
 
 def dumpdict(dict):
-    return '{' + ', '.join(['%s: %s' % (k, dict[k]) for k in sorted(dict.iterkeys())]) + '}'
+    return '{' + ', '.join(['%s: %s' % (k, dict[k])
+                            for k in sorted(dict.iterkeys())]) + '}'
 
 def test(auth):
     print 'CFG:', dumpdict(auth)
@@ -56,6 +57,8 @@
 test({'x.prefix': 'example.org', 'x.schemes': 'http https'})
 
 print '\n*** Test prefix matching\n'
-test({'x.prefix': 'http://example.org/foo', 'y.prefix': 'http://example.org/bar'})
-test({'x.prefix': 'http://example.org/foo', 'y.prefix': 'http://example.org/foo/bar'})
+test({'x.prefix': 'http://example.org/foo',
+      'y.prefix': 'http://example.org/bar'})
+test({'x.prefix': 'http://example.org/foo',
+      'y.prefix': 'http://example.org/foo/bar'})
 test({'x.prefix': '*', 'y.prefix': 'https://example.org/bar'})
--- a/tests/test-hgweb-commands	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hgweb-commands	Sat Feb 13 23:50:38 2010 -0600
@@ -16,7 +16,7 @@
 echo another > foo
 hg branch stable
 hg ci -Ambranch
-hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
+hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
 cat hg.pid >> $DAEMON_PIDS
 
 echo % Logs and changes
@@ -26,6 +26,7 @@
 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/'
 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/'
 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
+"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base'
 
 echo % File-related
 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
@@ -35,8 +36,8 @@
 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
 
 echo % Overviews
-"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/tags/?style=atom' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
-"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/branches/?style=gitweb' | sed "s/http:\/\/[^/]*\//http:\/\/127.0.0.1\//"
+"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags'
+"$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches'
 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb'
 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb'
 
--- a/tests/test-hgweb-commands.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hgweb-commands.out	Sat Feb 13 23:50:38 2010 -0600
@@ -201,7 +201,11 @@
 files, or words in the commit message</div>
 </form>
 
-<div class="navigate">rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> </div>
+<div class="navigate">
+<a href="/shortlog/2?revcount=30">less</a>
+<a href="/shortlog/2?revcount=120">more</a>
+| rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> 
+</div>
 
 <table class="bigtable">
  <tr>
@@ -227,7 +231,12 @@
 
 </table>
 
-<div class="navigate">rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> </div>
+<div class="navigate">
+<a href="/shortlog/2?revcount=30">less</a>
+<a href="/shortlog/2?revcount=120">more</a>
+| rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> 
+</div>
+
 </div>
 </div>
 
@@ -343,6 +352,76 @@
 @@ -0,0 +1,1 @@
 +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
 
+200 Script output follows
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+<head>
+<link rel="icon" href="/static/hgicon.png" type="image/png" />
+<meta name="robots" content="index, nofollow" />
+<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
+
+<title>test: searching for base</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
+</div>
+<ul>
+<li><a href="/shortlog">log</a></li>
+<li><a href="/graph">graph</a></li>
+<li><a href="/tags">tags</a></li>
+<li><a href="/branches">branches</a></li>
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="/">test</a></h2>
+<h3>searching for 'base'</h3>
+
+<form class="search" action="/log">
+
+<p><input name="rev" id="search1" type="text" size="30"></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<div class="navigate">
+<a href="/search/?rev=base&revcount=5">less</a>
+<a href="/search/?rev=base&revcount=20">more</a>
+</div>
+
+<table class="bigtable">
+ <tr>
+  <th class="age">age</th>
+  <th class="author">author</th>
+  <th class="description">description</th>
+ </tr>
+ <tr class="parity0">
+  <td class="age">1970-01-01</td>
+  <td class="author">test</td>
+  <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> </td>
+ </tr>
+
+</table>
+
+<div class="navigate">
+<a href="/search/?rev=base&revcount=5">less</a>
+<a href="/search/?rev=base&revcount=20">more</a>
+</div>
+
+</div>
+</div>
+
+
+
+</body>
+</html>
+
 % File-related
 200 Script output follows
 
@@ -465,97 +544,12 @@
 % Overviews
 200 Script output follows
 
-<?xml version="1.0" encoding="ascii"?>
-<feed xmlns="http://127.0.0.1/2005/Atom">
- <id>http://127.0.0.1/</id>
- <link rel="self" href="http://127.0.0.1/atom-tags"/>
- <link rel="alternate" href="http://127.0.0.1/tags"/>
- <title>test: tags</title>
- <summary>test tag history</summary>
- <author><name>Mercurial SCM</name></author>
- <updated>1970-01-01T00:00:00+00:00</updated>
-
- <entry>
-  <title>1.0</title>
-  <link rel="alternate" href="http://127.0.0.1/rev/2ef0ac749a14"/>
-  <id>http://127.0.0.1/#tag-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id>
-  <updated>1970-01-01T00:00:00+00:00</updated>
-  <published>1970-01-01T00:00:00+00:00</published>
-  <content type="text">1.0</content>
- </entry>
-
-</feed>
+tip	1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
+1.0	2ef0ac749a14e4f57a5a822464a0902c6f7f448f
 200 Script output follows
 
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://127.0.0.1/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://127.0.0.1/1999/xhtml" xml:lang="en-US" lang="en-US">
-<head>
-<link rel="icon" href="/static/hgicon.png" type="image/png" />
-<meta name="robots" content="index, nofollow"/>
-<link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
-
-
-<title>test: Branches</title>
-<link rel="alternate" type="application/atom+xml"
-   href="/atom-tags" title="Atom feed for test"/>
-<link rel="alternate" type="application/rss+xml"
-   href="/rss-tags" title="RSS feed for test"/>
-</head>
-<body>
-
-<div class="page_header">
-<a href="http://127.0.0.1/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / branches
-</div>
-
-<div class="page_nav">
-<a href="/summary?style=gitweb">summary</a> |
-<a href="/shortlog?style=gitweb">shortlog</a> |
-<a href="/log?style=gitweb">changelog</a> |
-<a href="/graph?style=gitweb">graph</a> |
-<a href="/tags?style=gitweb">tags</a> |
-branches |
-<a href="/file/1d22e65f027e?style=gitweb">files</a>
-<br/>
-</div>
-
-<div class="title">&nbsp;</div>
-<table cellspacing="0">
-
-<tr class="parity0">
-<td class="age"><i>1970-01-01</i></td>
-<td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
-<td class="open">stable</td>
-<td class="link">
-<a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
-<a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
-<a href="/file/1d22e65f027e?style=gitweb">files</a>
-</td>
-</tr>
-<tr class="parity1">
-<td class="age"><i>1970-01-01</i></td>
-<td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
-<td class="inactive">default</td>
-<td class="link">
-<a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
-<a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
-<a href="/file/a4f92ed23982?style=gitweb">files</a>
-</td>
-</tr>
-</table>
-
-<div class="page_footer">
-<div class="page_footer_text">test</div>
-<div class="rss_logo">
-<a href="/rss-log">RSS</a>
-<a href="/atom-log">Atom</a>
-</div>
-<br />
-
-</div>
-</body>
-</html>
-
+stable	1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe	open
+default	a4f92ed23982be056b9852de5dfe873eaac7f0de	inactive
 200 Script output follows
 
 <?xml version="1.0" encoding="ascii"?>
@@ -745,8 +739,8 @@
 <a href="/branches?style=gitweb">branches</a> |
 <a href="/file/1d22e65f027e?style=gitweb">files</a>
 <br/>
-<a href="/graph/2?style=gitweb&revcount=12">less</a>
-<a href="/graph/2?style=gitweb&revcount=50">more</a>
+<a href="/graph/2?style=gitweb&revcount=30">less</a>
+<a href="/graph/2?style=gitweb&revcount=120">more</a>
 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a> <br/>
 </div>
 
@@ -831,8 +825,8 @@
 </script>
 
 <div class="page_nav">
-<a href="/graph/2?style=gitweb&revcount=12">less</a>
-<a href="/graph/2?style=gitweb&revcount=50">more</a>
+<a href="/graph/2?style=gitweb&revcount=30">less</a>
+<a href="/graph/2?style=gitweb&revcount=120">more</a>
 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a> 
 </div>
 
--- a/tests/test-hgweb-empty.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hgweb-empty.out	Sat Feb 13 23:50:38 2010 -0600
@@ -47,7 +47,11 @@
 files, or words in the commit message</div>
 </form>
 
-<div class="navigate">rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> </div>
+<div class="navigate">
+<a href="/shortlog/-1?revcount=30">less</a>
+<a href="/shortlog/-1?revcount=120">more</a>
+| rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> 
+</div>
 
 <table class="bigtable">
  <tr>
@@ -58,7 +62,12 @@
 
 </table>
 
-<div class="navigate">rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> </div>
+<div class="navigate">
+<a href="/shortlog/-1?revcount=30">less</a>
+<a href="/shortlog/-1?revcount=120">more</a>
+| rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> 
+</div>
+
 </div>
 </div>
 
@@ -116,7 +125,11 @@
 files, or words in the commit message</div>
 </form>
 
-<div class="navigate">rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> </div>
+<div class="navigate">
+<a href="/shortlog/-1?revcount=5">less</a>
+<a href="/shortlog/-1?revcount=20">more</a>
+| rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> 
+</div>
 
 <table class="bigtable">
  <tr>
@@ -127,7 +140,12 @@
 
 </table>
 
-<div class="navigate">rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> </div>
+<div class="navigate">
+<a href="/shortlog/-1?revcount=5">less</a>
+<a href="/shortlog/-1?revcount=20">more</a>
+| rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a> 
+</div>
+
 </div>
 </div>
 
@@ -184,8 +202,8 @@
 </form>
 
 <div class="navigate">
-<a href="/graph/-1?revcount=12">less</a>
-<a href="/graph/-1?revcount=50">more</a>
+<a href="/graph/-1?revcount=30">less</a>
+<a href="/graph/-1?revcount=120">more</a>
 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a> 
 </div>
 
@@ -267,8 +285,8 @@
 </script>
 
 <div class="navigate">
-<a href="/graph/-1?revcount=12">less</a>
-<a href="/graph/-1?revcount=50">more</a>
+<a href="/graph/-1?revcount=30">less</a>
+<a href="/graph/-1?revcount=120">more</a>
 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a> 
 </div>
 
--- a/tests/test-hgweb-filelog.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hgweb-filelog.out	Sat Feb 13 23:50:38 2010 -0600
@@ -139,7 +139,10 @@
 files, or words in the commit message</div>
 </form>
 
-<div class="navigate"><a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
+<div class="navigate">
+<a href="/log/01de2d66a28d/a?revcount=30">less</a>
+<a href="/log/01de2d66a28d/a?revcount=120">more</a>
+| <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
 
 <table class="bigtable">
  <tr>
@@ -160,6 +163,12 @@
 
 </table>
 
+<div class="navigate">
+<a href="/log/01de2d66a28d/a?revcount=30">less</a>
+<a href="/log/01de2d66a28d/a?revcount=120">more</a>
+| <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> 
+</div>
+
 </div>
 </div>
 
@@ -222,7 +231,10 @@
 files, or words in the commit message</div>
 </form>
 
-<div class="navigate"><a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
+<div class="navigate">
+<a href="/log/01de2d66a28d/a?revcount=30">less</a>
+<a href="/log/01de2d66a28d/a?revcount=120">more</a>
+| <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
 
 <table class="bigtable">
  <tr>
@@ -243,6 +255,12 @@
 
 </table>
 
+<div class="navigate">
+<a href="/log/01de2d66a28d/a?revcount=30">less</a>
+<a href="/log/01de2d66a28d/a?revcount=120">more</a>
+| <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> 
+</div>
+
 </div>
 </div>
 
@@ -305,7 +323,10 @@
 files, or words in the commit message</div>
 </form>
 
-<div class="navigate"><a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
+<div class="navigate">
+<a href="/log/5ed941583260/a?revcount=30">less</a>
+<a href="/log/5ed941583260/a?revcount=120">more</a>
+| <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
 
 <table class="bigtable">
  <tr>
@@ -321,6 +342,12 @@
 
 </table>
 
+<div class="navigate">
+<a href="/log/5ed941583260/a?revcount=30">less</a>
+<a href="/log/5ed941583260/a?revcount=120">more</a>
+| <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> 
+</div>
+
 </div>
 </div>
 
@@ -383,7 +410,10 @@
 files, or words in the commit message</div>
 </form>
 
-<div class="navigate"><a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
+<div class="navigate">
+<a href="/log/5ed941583260/a?revcount=30">less</a>
+<a href="/log/5ed941583260/a?revcount=120">more</a>
+| <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
 
 <table class="bigtable">
  <tr>
@@ -399,6 +429,12 @@
 
 </table>
 
+<div class="navigate">
+<a href="/log/5ed941583260/a?revcount=30">less</a>
+<a href="/log/5ed941583260/a?revcount=120">more</a>
+| <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> 
+</div>
+
 </div>
 </div>
 
--- a/tests/test-hgwebdir.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-hgwebdir.out	Sat Feb 13 23:50:38 2010 -0600
@@ -67,7 +67,7 @@
         <th><a href="?sort=name">Name</a></th>
         <th><a href="?sort=description">Description</a></th>
         <th><a href="?sort=contact">Contact</a></th>
-        <th><a href="?sort=lastchange">Last change</a></th>
+        <th><a href="?sort=lastchange">Last modified</a></th>
         <th>&nbsp;</th>
     </tr>
     
@@ -203,7 +203,7 @@
         <th><a href="?sort=name">Name</a></th>
         <th><a href="?sort=description">Description</a></th>
         <th><a href="?sort=contact">Contact</a></th>
-        <th><a href="?sort=lastchange">Last change</a></th>
+        <th><a href="?sort=lastchange">Last modified</a></th>
         <th>&nbsp;</th>
     </tr>
     
--- a/tests/test-highlight	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-highlight	Sat Feb 13 23:50:38 2010 -0600
@@ -4,7 +4,7 @@
 
 cat <<EOF >> $HGRCPATH
 [extensions]
-hgext.highlight =
+highlight =
 [web]
 pygments_style = friendly
 EOF
--- a/tests/test-http	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-http	Sat Feb 13 23:50:38 2010 -0600
@@ -11,10 +11,10 @@
 echo bar>foo.d/baR.d.hg/bAR
 
 hg commit -A -m 1
-hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=../hg1.pid
-hg serve -p $HGPORT1 -d --pid-file=../hg2.pid
+hg serve -p $HGPORT -d --pid-file=../hg1.pid
+hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid
 # Test server address cannot be reused
-hg serve -p $HGPORT1 2>&1 | sed -e "s/abort: cannot start server at ':$HGPORT1':.*/abort: cannot start server at ':20060':/"
+hg serve -p $HGPORT1 2>&1 | sed -e "s/abort: cannot start server at ':$HGPORT1':.*/abort: cannot start server at ':\$HGPORT1':/"
 cd ..
 cat hg1.pid hg2.pid >> $DAEMON_PIDS
 
@@ -39,5 +39,5 @@
 cd copy-pull
 echo '[hooks]' >> .hg/hgrc
 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
-hg pull | sed -e 's,:[0-9][0-9]*/,/,'
+hg pull | sed -e "s,:$HGPORT1/,:\$HGPORT1/,"
 cd ..
--- a/tests/test-http-clone-r	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-http-clone-r	Sat Feb 13 23:50:38 2010 -0600
@@ -66,14 +66,14 @@
 hg verify
 cd ..
 cd test-1
-hg pull -r 4 http://localhost:$HGPORT/ 2>&1 | sed -e 's,:[0-9][0-9]*/,/,'
+hg pull -r 4 http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 hg verify
-hg pull http://localhost:$HGPORT/ 2>&1 | sed -e 's,:[0-9][0-9]*/,/,'
+hg pull http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 cd ..
 cd test-2
-hg pull -r 5 http://localhost:$HGPORT/ 2>&1 | sed -e 's,:[0-9][0-9]*/,/,'
+hg pull -r 5 http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 hg verify
-hg pull http://localhost:$HGPORT/ 2>&1 | sed -e 's,:[0-9][0-9]*/,/,'
+hg pull http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 hg verify
 cd ..
 cat error.log
--- a/tests/test-http-clone-r.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-http-clone-r.out	Sat Feb 13 23:50:38 2010 -0600
@@ -148,7 +148,7 @@
 crosschecking files in changesets and manifests
 checking files
 4 files, 9 changesets, 7 total revisions
-pulling from http://localhost/
+pulling from http://localhost:$HGPORT/
 searching for changes
 adding changesets
 adding manifests
@@ -160,14 +160,14 @@
 crosschecking files in changesets and manifests
 checking files
 1 files, 3 changesets, 2 total revisions
-pulling from http://localhost/
+pulling from http://localhost:$HGPORT/
 searching for changes
 adding changesets
 adding manifests
 adding file changes
 added 6 changesets with 5 changes to 4 files
 (run 'hg update' to get a working copy)
-pulling from http://localhost/
+pulling from http://localhost:$HGPORT/
 searching for changes
 adding changesets
 adding manifests
@@ -179,7 +179,7 @@
 crosschecking files in changesets and manifests
 checking files
 1 files, 5 changesets, 3 total revisions
-pulling from http://localhost/
+pulling from http://localhost:$HGPORT/
 searching for changes
 adding changesets
 adding manifests
--- a/tests/test-http.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-http.out	Sat Feb 13 23:50:38 2010 -0600
@@ -2,7 +2,7 @@
 adding foo.d/bAr.hg.d/BaR
 adding foo.d/baR.d.hg/bAR
 adding foo.d/foo
-abort: cannot start server at ':20060':
+abort: cannot start server at ':$HGPORT1':
 % clone via stream
 streaming all changes
 XXX files to transfer, XXX bytes of data
@@ -37,8 +37,8 @@
 4 files, 1 changesets, 4 total revisions
 adding bar
 % pull
-changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost/ 
-pulling from http://localhost/
+changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT1/ 
+pulling from http://localhost:$HGPORT1/
 searching for changes
 adding changesets
 adding manifests
--- a/tests/test-import	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-import	Sat Feb 13 23:50:38 2010 -0600
@@ -74,6 +74,13 @@
 hg --cwd a export tip | hg --cwd b import -
 rm -r b
 
+echo % import two patches in one stream
+hg init b
+hg --cwd a export 0:tip | hg --cwd b import -
+hg --cwd a id
+hg --cwd b id
+rm -r b
+
 echo % override commit message
 hg clone -r0 a b
 hg --cwd a export tip | hg --cwd b import -m 'override' -
--- a/tests/test-import-eol	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-import-eol	Sat Feb 13 23:50:38 2010 -0600
@@ -28,23 +28,54 @@
 python -c 'file("a", "wb").write("a\nbbb\ncc\n\nd\ne")'
 hg ci -Am adda
 python ../makepatch.py
+
 echo % invalid eol
 hg --config patch.eol='LFCR' import eol.diff
 hg revert -a
+
 echo % force LF
 hg --traceback --config patch.eol='LF' import eol.diff
 python -c 'print repr(file("a","rb").read())'
 hg st
+
 echo % force CRLF
 hg up -C 0
 hg --traceback --config patch.eol='CRLF' import eol.diff
 python -c 'print repr(file("a","rb").read())'
 hg st
 
+echo % auto EOL on LF file
+hg up -C 0
+hg --traceback --config patch.eol='auto' import eol.diff
+python -c 'print repr(file("a","rb").read())'
+hg st
+
+echo % auto EOL on CRLF file
+python -c 'file("a", "wb").write("a\r\nbbb\r\ncc\r\n\r\nd\r\ne")'
+hg commit -m 'switch EOLs in a'
+hg --traceback --config patch.eol='auto' import eol.diff
+python -c 'print repr(file("a","rb").read())'
+hg st
+
+echo % auto EOL on new file or source without any EOL
+python -c 'file("noeol", "wb").write("noeol")'
+hg add noeol
+hg commit -m 'add noeol'
+python -c 'file("noeol", "wb").write("noeol\r\nnoeol\n")'
+python -c 'file("neweol", "wb").write("neweol\nneweol\r\n")'
+hg add neweol
+hg diff --git > noeol.diff
+hg revert --no-backup noeol neweol
+rm neweol
+hg --traceback --config patch.eol='auto' import -m noeol noeol.diff
+python -c 'print repr(file("noeol","rb").read())'
+python -c 'print repr(file("neweol","rb").read())'
+hg st
+
 # Test --eol and binary patches
-python -c 'file("b", "wb").write("a\x00\nb")'
+python -c 'file("b", "wb").write("a\x00\nb\r\nd")'
 hg ci -Am addb
-python -c 'file("b", "wb").write("a\x00\nc")'
+python -c 'file("b", "wb").write("a\x00\nc\r\nd")'
 hg diff --git > bin.diff
 hg revert --no-backup b
 echo % binary patch with --eol
--- a/tests/test-import-eol.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-import-eol.out	Sat Feb 13 23:50:38 2010 -0600
@@ -10,7 +10,18 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 applying eol.diff
 'a\r\nyyyy\r\ncc\r\n\r\nd\r\ne'
+% auto EOL on LF file
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+applying eol.diff
+'a\nyyyy\ncc\n\nd\ne'
+% auto EOL on CRLF file
+applying eol.diff
+'a\r\nyyyy\r\ncc\r\n\r\nd\r\ne'
+% auto EOL on new file or source without any EOL
+applying noeol.diff
+'noeol\r\nnoeol\n'
+'neweol\nneweol\r\n'
 adding b
 % binary patch with --eol
 applying bin.diff
-'a\x00\nc'
+'a\x00\nc\r\nd'
--- a/tests/test-import.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-import.out	Sat Feb 13 23:50:38 2010 -0600
@@ -100,6 +100,11 @@
 updating to branch default
 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 applying patch from stdin
+% import two patches in one stream
+applying patch from stdin
+applied 80971e65b431
+1d4bd90af0e4 tip
+1d4bd90af0e4 tip
 % override commit message
 requesting all changes
 adding changesets
@@ -176,6 +181,7 @@
 parent: 0
 applying ../patch1
 applying ../patch2
+applied 1d4bd90af0e4
 rolling back last transaction
 parent: 1
 % hg import in a subdirectory
--- a/tests/test-incoming-outgoing	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-incoming-outgoing	Sat Feb 13 23:50:38 2010 -0600
@@ -14,8 +14,8 @@
 
 hg init new
 # http incoming
-hg -R new incoming http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
-hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+hg -R new incoming http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
+hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 # local incoming
 hg -R new incoming test
 hg -R new incoming -r 4 test
@@ -25,7 +25,7 @@
 hg -R new incoming -l 2 -p --git test
 
 # test with --bundle
-hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 hg -R new incoming --bundle test2.hg test
 
 # test the resulting bundles
@@ -50,5 +50,5 @@
 hg -R test-dev outgoing test
 echo "% limit to 3 changesets"
 hg -R test-dev outgoing -l 3 test
-hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
-hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
+hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
--- a/tests/test-incoming-outgoing.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-incoming-outgoing.out	Sat Feb 13 23:50:38 2010 -0600
@@ -4,7 +4,7 @@
 crosschecking files in changesets and manifests
 checking files
 1 files, 9 changesets, 9 total revisions
-comparing with http://localhost/
+comparing with http://localhost:$HGPORT/
 changeset:   0:9cb21d99fe27
 user:        test
 date:        Mon Jan 12 13:46:40 1970 +0000
@@ -51,7 +51,7 @@
 date:        Mon Jan 12 13:46:40 1970 +0000
 summary:     8
 
-comparing with http://localhost/
+comparing with http://localhost:$HGPORT/
 changeset:   0:9cb21d99fe27
 user:        test
 date:        Mon Jan 12 13:46:40 1970 +0000
@@ -189,7 +189,7 @@
  0
 +1
 
-comparing with http://localhost/
+comparing with http://localhost:$HGPORT/
 changeset:   0:9cb21d99fe27
 user:        test
 date:        Mon Jan 12 13:46:40 1970 +0000
@@ -358,7 +358,7 @@
 date:        Mon Jan 12 13:46:40 1970 +0000
 summary:     11
 
-comparing with http://localhost/
+comparing with http://localhost:$HGPORT/
 searching for changes
 changeset:   9:3741c3ad1096
 user:        test
@@ -386,7 +386,7 @@
 date:        Mon Jan 12 13:46:40 1970 +0000
 summary:     13
 
-comparing with http://localhost/
+comparing with http://localhost:$HGPORT/
 searching for changes
 changeset:   9:3741c3ad1096
 user:        test
--- a/tests/test-inherit-mode.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-inherit-mode.out	Sat Feb 13 23:50:38 2010 -0600
@@ -14,6 +14,7 @@
 00700 ./.hg/
 00600 ./.hg/00changelog.i
 00660 ./.hg/dirstate
+00660 ./.hg/last-message.txt
 00600 ./.hg/requires
 00770 ./.hg/store/
 00660 ./.hg/store/00changelog.i
--- a/tests/test-inotify-issue1208.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-inotify-issue1208.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,6 +1,6 @@
 % fail
 abort: inotify-server: cannot start: .hg/inotify.sock is a broken symlink
-inotify-client: could not talk to new inotify server: No such file or directory
+inotify-client: could not start inotify server: child process failed to start
 abort: inotify-server: cannot start: .hg/inotify.sock is a broken symlink
 % inserve
 % status
--- a/tests/test-issue522.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-issue522.out	Sat Feb 13 23:50:38 2010 -0600
@@ -8,6 +8,7 @@
  overwrite None partial False
  ancestor bbd179dfa0a7 local 71766447bdbb+ remote 4d9e78aaceee
  foo: remote is newer -> g
+update: foo 1/1 files (100.00%)
 getting foo
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
--- a/tests/test-issue672.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-issue672.out	Sat Feb 13 23:50:38 2010 -0600
@@ -13,7 +13,9 @@
  ancestor 81f4b099af3d local c64f439569a9+ remote 2f8037f47a5c
  1: other deleted -> r
  1a: remote created -> g
+update: 1 1/2 files (50.00%)
 removing 1
+update: 1a 2/2 files (100.00%)
 getting 1a
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
@@ -31,6 +33,7 @@
  ancestor c64f439569a9 local ac7575e3c052+ remote 746e9549ea96
  1a: local copied/moved to 1 -> m
 preserving 1a for resolve of 1a
+update: 1a 1/1 files (100.00%)
 picked tool 'internal:merge' for 1a (binary False symlink False)
 merging 1a and 1 to 1a
 my 1a@ac7575e3c052+ other 1@746e9549ea96 ancestor 1@81f4b099af3d
@@ -50,6 +53,7 @@
  1: remote moved to 1a -> m
 preserving 1 for resolve of 1a
 removing 1
+update: 1 1/1 files (100.00%)
 picked tool 'internal:merge' for 1a (binary False symlink False)
 merging 1 and 1a to 1a
 my 1a@746e9549ea96+ other 1a@ac7575e3c052 ancestor 1@81f4b099af3d
--- a/tests/test-keyword	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-keyword	Sat Feb 13 23:50:38 2010 -0600
@@ -2,10 +2,10 @@
 
 cat <<EOF >> $HGRCPATH
 [extensions]
-hgext.keyword =
-hgext.mq =
-hgext.notify =
-hgext.transplant =
+keyword =
+mq =
+notify =
+transplant =
 EOF
 
 # demo before [keyword] files are set up
--- a/tests/test-keyword.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-keyword.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,6 +1,6 @@
 % hg kwdemo
 [extensions]
-hgext.keyword = 
+keyword = 
 [keyword]
 demo.txt = 
 [keywordmaps]
@@ -21,7 +21,7 @@
 $Revision: xxxxxxxxxxxx $
 $Source: /TMP/demo.txt,v $
 [extensions]
-hgext.keyword = 
+keyword = 
 [keyword]
 demo.txt = 
 [keywordmaps]
@@ -206,7 +206,7 @@
 % custom keyword expansion
 % try with kwdemo
 [extensions]
-hgext.keyword = 
+keyword = 
 [keyword]
 * = 
 b = ignore
--- a/tests/test-log	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-log	Sat Feb 13 23:50:38 2010 -0600
@@ -31,20 +31,24 @@
 echo % many renames
 hg log -vf e
 
-echo % log copies
-hg log -vC --template '{rev} {file_copies%filecopy}\n'
+echo '% log copies with --copies'
+hg log -vC --template '{rev} {file_copies}\n'
+echo '% log copies switch without --copies, with old filecopy template'
+hg log -v --template '{rev} {file_copies_switch%filecopy}\n'
+echo '% log copies switch with --copies'
+hg log -vC --template '{rev} {file_copies_switch}\n'
 
 echo % log copies, non-linear manifest
 hg up -C 3
 hg mv dir/b e
 echo foo > foo
 hg ci -Ame2 -d '6 0'
-hg log -vC --template '{rev} {file_copies%filecopy}\n' -r 5
+hg log -v --template '{rev} {file_copies}\n' -r 5
 
 echo % log copies, execute bit set
 chmod +x e
 hg ci -me3 -d '7 0'
-hg log -vC --template '{rev} {file_copies%filecopy}\n' -r 6
+hg log -v --template '{rev} {file_copies}\n' -r 6
 
 echo '% log -p d'
 hg log -pv d
--- a/tests/test-log.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-log.out	Sat Feb 13 23:50:38 2010 -0600
@@ -76,7 +76,19 @@
 a
 
 
-% log copies
+% log copies with --copies
+4 e (dir/b)
+3 b (a)
+2 dir/b (b)
+1 b (a)
+0 
+% log copies switch without --copies, with old filecopy template
+4 
+3 
+2 
+1 
+0 
+% log copies switch with --copies
 4 e (dir/b)
 3 b (a)
 2 dir/b (b)
--- a/tests/test-merge-closedheads.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-merge-closedheads.out	Sat Feb 13 23:50:38 2010 -0600
@@ -8,6 +8,7 @@
 % fail with three heads
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 abort: branch 'default' has 3 heads - please merge with an explicit rev
+(run 'hg heads .' to see heads)
 % close one of the heads
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 % succeed with two open heads
--- a/tests/test-merge-commit.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-merge-commit.out	Sat Feb 13 23:50:38 2010 -0600
@@ -28,6 +28,7 @@
  ancestor 0a3ab4856510 local 2d2f9a22c82b+ remote 7d3b554bfdf1
  bar: versions differ -> m
 preserving bar for resolve of bar
+update: bar 1/1 files (100.00%)
 picked tool 'internal:merge' for bar (binary False symlink False)
 merging bar
 my bar@2d2f9a22c82b+ other bar@7d3b554bfdf1 ancestor bar@0a3ab4856510
@@ -78,6 +79,7 @@
  ancestor 0a3ab4856510 local 2d2f9a22c82b+ remote 96ab80c60897
  bar: versions differ -> m
 preserving bar for resolve of bar
+update: bar 1/1 files (100.00%)
 picked tool 'internal:merge' for bar (binary False symlink False)
 merging bar
 my bar@2d2f9a22c82b+ other bar@96ab80c60897 ancestor bar@0a3ab4856510
--- a/tests/test-merge-default	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-merge-default	Sat Feb 13 23:50:38 2010 -0600
@@ -42,4 +42,11 @@
 echo % should fail because 1 head
 hg merge
 
+hg up 3
+echo a >> a
+hg branch foobranch
+hg commit -mf
+echo % should fail because merge with other branch
+hg merge
+
 true
--- a/tests/test-merge-default.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-merge-default.out	Sat Feb 13 23:50:38 2010 -0600
@@ -6,9 +6,11 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % should fail because not at a head
 abort: branch 'default' has 3 heads - please merge with an explicit rev
+(run 'hg heads .' to see heads)
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % should fail because > 2 heads
 abort: branch 'default' has 3 heads - please merge with an explicit rev
+(run 'hg heads .' to see heads)
 % should succeed
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
@@ -26,3 +28,9 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % should fail because 1 head
 abort: there is nothing to merge - use "hg update" instead
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+marked working directory as branch foobranch
+created new head
+% should fail because merge with other branch
+abort: branch 'foobranch' has one head - please merge with an explicit rev
+(run 'hg heads' to see all heads)
--- a/tests/test-merge-tools	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-merge-tools	Sat Feb 13 23:50:38 2010 -0600
@@ -83,7 +83,7 @@
 domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool
 
 echo "# or true.executable with bogus path:"
-domerge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool
+domerge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
 
 echo "# but true.executable set to cat found in PATH works:"
 echo "true.executable=cat" >> .hg/hgrc
@@ -103,7 +103,7 @@
 domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
 
 echo "# merge-patterns specifies executable with bogus path and gets warning:"
-domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool
+domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
 
 echo
 echo ui.merge overrules priority
--- a/tests/test-merge-tools.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-merge-tools.out	Sat Feb 13 23:50:38 2010 -0600
@@ -116,7 +116,7 @@
 false.whatever=
 true.priority=1
 # hg update -C 1
-# hg merge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool
+# hg merge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
 merging f
 merging f failed!
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
@@ -218,7 +218,7 @@
 true.priority=1
 true.executable=cat
 # hg update -C 1
-# hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool
+# hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
 couldn't find merge tool true specified for f
 merging f
 merging f failed!
--- a/tests/test-merge-types.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-merge-types.out	Sat Feb 13 23:50:38 2010 -0600
@@ -8,6 +8,7 @@
  conflicting flags for a
 (n)one, e(x)ec or sym(l)ink? n
  a: update permissions -> e
+update: a 1/1 files (100.00%)
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
 % symlink is local parent, executable is other
@@ -20,6 +21,7 @@
  conflicting flags for a
 (n)one, e(x)ec or sym(l)ink? n
  a: remote is newer -> g
+update: a 1/1 files (100.00%)
 getting a
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
--- a/tests/test-merge7.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-merge7.out	Sat Feb 13 23:50:38 2010 -0600
@@ -25,6 +25,7 @@
  ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360
  test.txt: versions differ -> m
 preserving test.txt for resolve of test.txt
+update: test.txt 1/1 files (100.00%)
 picked tool 'internal:merge' for test.txt (binary False symlink False)
 merging test.txt
 my test.txt@451c744aabcc+ other test.txt@a070d41e8360 ancestor test.txt@faaea63e63a9
--- a/tests/test-minirst.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-minirst.py	Sat Feb 13 23:50:38 2010 -0600
@@ -1,11 +1,18 @@
 #!/usr/bin/env python
 
+from pprint import pprint
 from mercurial import minirst
 
-def debugformat(title, text, width):
+def debugformat(title, text, width, **kwargs):
     print "%s formatted to fit within %d characters:" % (title, width)
     print "-" * 70
-    print minirst.format(text, width)
+    formatted = minirst.format(text, width, **kwargs)
+    if type(formatted) == tuple:
+        print formatted[0]
+        print "-" * 70
+        pprint(formatted[1])
+    else:
+        print formatted
     print "-" * 70
     print
 
@@ -15,10 +22,7 @@
   A small indented paragraph.
   It is followed by some lines
   containing random whitespace.
- 
-  
-   
-The third and final paragraph.
+ \n  \n   \nThe third and final paragraph.
 """
 
 debugformat('paragraphs', paragraphs, 60)
@@ -102,6 +106,12 @@
 
 1) Another
 2) List
+
+Line blocks are also a form of list:
+
+| This is the first line.
+  The line continues here.
+| This is the second line.
 """
 
 debugformat('lists', lists, 60)
@@ -134,14 +144,37 @@
 
 
 fields = """
-Field lists give a simple two-column layout:
+:a: First item.
+:ab: Second item. Indentation and wrapping
+     is handled automatically.
 
-:key:         The whitespace following the key is
-  significant for the wrapping of this text.
-:another key: More text.
-    The indentation on the following
-    lines is not significant.
+Next list:
+
+:small: The larger key below triggers full indentation here.
+:much too large: This key is big enough to get its own line.
 """
 
 debugformat('fields', fields, 60)
 debugformat('fields', fields, 30)
+
+containers = """
+Normal output.
+
+.. container:: debug
+
+   Initial debug output.
+
+.. container:: verbose
+
+   Verbose output.
+
+   .. container:: debug
+
+      Debug output.
+"""
+
+debugformat('containers (normal)', containers, 60)
+debugformat('containers (verbose)', containers, 60, keep=['verbose'])
+debugformat('containers (debug)', containers, 60, keep=['debug'])
+debugformat('containers (verbose debug)', containers, 60,
+            keep=['verbose', 'debug'])
--- a/tests/test-minirst.py.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-minirst.py.out	Sat Feb 13 23:50:38 2010 -0600
@@ -120,6 +120,11 @@
 (2) bar
 1) Another
 2) List
+
+Line blocks are also a form of list:
+
+This is the first line. The line continues here.
+This is the second line.
 ----------------------------------------------------------------------
 
 lists formatted to fit within 30 characters:
@@ -157,6 +162,13 @@
 (2) bar
 1) Another
 2) List
+
+Line blocks are also a form of
+list:
+
+This is the first line. The
+line continues here.
+This is the second line.
 ----------------------------------------------------------------------
 
 options formatted to fit within 60 characters:
@@ -215,29 +227,70 @@
 
 fields formatted to fit within 60 characters:
 ----------------------------------------------------------------------
-Field lists give a simple two-column layout:
+a   First item.
+ab  Second item. Indentation and wrapping is handled
+    automatically.
 
-key           The whitespace following the key is
-              significant for the wrapping of this text.
-another key   More text. The indentation on the following
-              lines is not significant.
+Next list:
+
+small       The larger key below triggers full indentation
+            here.
+much too large
+            This key is big enough to get its own line.
 ----------------------------------------------------------------------
 
 fields formatted to fit within 30 characters:
 ----------------------------------------------------------------------
-Field lists give a simple two-
-column layout:
+a   First item.
+ab  Second item. Indentation
+    and wrapping is handled
+    automatically.
+
+Next list:
 
-key           The whitespace
-              following the
-              key is
-              significant for
-              the wrapping of
-              this text.
-another key   More text. The
-              indentation on
-              the following
-              lines is not
-              significant.
+small       The larger key
+            below triggers
+            full indentation
+            here.
+much too large
+            This key is big
+            enough to get its
+            own line.
+----------------------------------------------------------------------
+
+containers (normal) formatted to fit within 60 characters:
+----------------------------------------------------------------------
+Normal output.
 ----------------------------------------------------------------------
 
+containers (verbose) formatted to fit within 60 characters:
+----------------------------------------------------------------------
+Normal output.
+
+Verbose output.
+----------------------------------------------------------------------
+['debug', 'debug']
+----------------------------------------------------------------------
+
+containers (debug) formatted to fit within 60 characters:
+----------------------------------------------------------------------
+Normal output.
+
+Initial debug output.
+----------------------------------------------------------------------
+['verbose']
+----------------------------------------------------------------------
+
+containers (verbose debug) formatted to fit within 60 characters:
+----------------------------------------------------------------------
+Normal output.
+
+Initial debug output.
+
+Verbose output.
+
+Debug output.
+----------------------------------------------------------------------
+[]
+----------------------------------------------------------------------
+
--- a/tests/test-mq	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq	Sat Feb 13 23:50:38 2010 -0600
@@ -10,6 +10,9 @@
 echo "[extensions]" >> $HGRCPATH
 echo "mq=" >> $HGRCPATH
 
+echo "[mq]" >> $HGRCPATH
+echo "plain=true" >> $HGRCPATH
+
 echo % help
 hg help mq
 
@@ -368,8 +371,9 @@
 git = False
 EOF
 hg qdiff --git
+cd ..
 
-cd ..
+echo % test file addition in slow path
 hg init slow
 cd slow
 hg qinit
@@ -387,14 +391,14 @@
 hg up -C 1
 hg qrefresh --git 2>&1 | grep -v 'saving bundle'
 cat .hg/patches/bar
-hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
+hg log -v --template '{rev} {file_copies}\n' -r .
 hg qrefresh --git
 cat .hg/patches/bar
-hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
+hg log -v --template '{rev} {file_copies}\n' -r .
 hg qrefresh
 grep 'diff --git' .hg/patches/bar
 
-echo
+echo % test file move chains in the slow path
 hg up -C 1
 echo >> foo
 hg ci -m 'change foo again'
@@ -403,12 +407,12 @@
 hg mv baz bleh
 hg qrefresh --git 2>&1 | grep -v 'saving bundle'
 cat .hg/patches/bar
-hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
+hg log -v --template '{rev} {file_copies}\n' -r .
 hg mv quux fred
 hg mv bleh barney
 hg qrefresh --git
 cat .hg/patches/bar
-hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
+hg log -v --template '{rev} {file_copies}\n' -r .
 
 echo % refresh omitting an added file
 hg qnew baz
--- a/tests/test-mq-caches	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-caches	Sat Feb 13 23:50:38 2010 -0600
@@ -2,7 +2,7 @@
 
 branches=.hg/branchheads.cache
 echo '[extensions]' >> $HGRCPATH
-echo 'hgext.mq=' >> $HGRCPATH
+echo 'mq =' >> $HGRCPATH
 
 show_branch_cache()
 {
--- a/tests/test-mq-eol	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-eol	Sat Feb 13 23:50:38 2010 -0600
@@ -4,6 +4,8 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "mq=" >> $HGRCPATH
+echo "[diff]" >> $HGRCPATH
+echo "nodates=1" >> $HGRCPATH
 
 cat > makepatch.py <<EOF
 f = file('eol.diff', 'wb')
--- a/tests/test-mq-eol.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-eol.out	Sat Feb 13 23:50:38 2010 -0600
@@ -23,7 +23,7 @@
 now at: eol.diff
 test message<LF>
 <LF>
-diff --git a/a b/a<LF>
+diff -r 0d0bf99a8b7a a<LF>
 --- a/a<LF>
 +++ b/a<LF>
 @@ -1,5 +1,5 @@<LF>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-git	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# Test the plumbing of mq.git option
+# Automatic upgrade itself is tested elsewhere.
+
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
+echo "[diff]" >> $HGRCPATH
+echo "nodates=1" >> $HGRCPATH
+
+hg init repo-auto
+cd repo-auto
+echo '% git=auto: regular patch creation'
+echo a > a
+hg add a
+hg qnew -d '0 0' -f adda
+cat .hg/patches/adda
+echo '% git=auto: git patch creation with copy'
+hg cp a b
+hg qnew -d '0 0' -f copy
+cat .hg/patches/copy
+echo '% git=auto: git patch when using --git'
+echo regular > regular
+hg add regular
+hg qnew -d '0 0' --git -f git
+cat .hg/patches/git
+echo '% git=auto: regular patch after qrefresh without --git'
+hg qrefresh -d '0 0'
+cat .hg/patches/git
+cd ..
+
+hg init repo-keep
+cd repo-keep
+echo '[mq]' > .hg/hgrc
+echo 'git = KEEP' >> .hg/hgrc
+echo '% git=keep: git patch with --git'
+echo a > a
+hg add a
+hg qnew -d '0 0' -f --git git
+cat .hg/patches/git
+echo '% git=keep: git patch after qrefresh without --git'
+echo a >> a
+hg qrefresh -d '0 0'
+cat .hg/patches/git
+cd ..
+
+hg init repo-yes
+cd repo-yes
+echo '[mq]' > .hg/hgrc
+echo 'git = yes' >> .hg/hgrc
+echo '% git=yes: git patch'
+echo a > a
+hg add a
+hg qnew -d '0 0' -f git
+cat .hg/patches/git
+echo '% git=yes: git patch after qrefresh'
+echo a >> a
+hg qrefresh -d '0 0'
+cat .hg/patches/git
+cd ..
+
+hg init repo-no
+cd repo-no
+echo '[diff]' > .hg/hgrc
+echo 'git = True' >> .hg/hgrc
+echo '[mq]' > .hg/hgrc
+echo 'git = False' >> .hg/hgrc
+echo '% git=no: regular patch with copy'
+echo a > a
+hg add a
+hg qnew -d '0 0' -f adda
+hg cp a b
+hg qnew -d '0 0' -f regular
+cat .hg/patches/regular
+echo '% git=no: regular patch after qrefresh with copy'
+hg cp a c
+hg qrefresh -d '0 0'
+cat .hg/patches/regular
+cd ..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-git.out	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,110 @@
+% git=auto: regular patch creation
+# HG changeset patch
+# Parent 0000000000000000000000000000000000000000
+# Date 0 0
+
+diff -r 000000000000 -r ef8dafc9fa4c a
+--- /dev/null
++++ b/a
+@@ -0,0 +1,1 @@
++a
+% git=auto: git patch creation with copy
+# HG changeset patch
+# Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
+# Date 0 0
+
+diff --git a/a b/b
+copy from a
+copy to b
+% git=auto: git patch when using --git
+# HG changeset patch
+# Parent 2962f232b49d41ebc26c591ec8d556724be213ab
+# Date 0 0
+
+diff --git a/regular b/regular
+new file mode 100644
+--- /dev/null
++++ b/regular
+@@ -0,0 +1,1 @@
++regular
+% git=auto: regular patch after qrefresh without --git
+# HG changeset patch
+# Parent 2962f232b49d41ebc26c591ec8d556724be213ab
+# Date 0 0
+
+diff -r 2962f232b49d regular
+--- /dev/null
++++ b/regular
+@@ -0,0 +1,1 @@
++regular
+% git=keep: git patch with --git
+# HG changeset patch
+# Parent 0000000000000000000000000000000000000000
+# Date 0 0
+
+diff --git a/a b/a
+new file mode 100644
+--- /dev/null
++++ b/a
+@@ -0,0 +1,1 @@
++a
+% git=keep: git patch after qrefresh without --git
+# HG changeset patch
+# Parent 0000000000000000000000000000000000000000
+# Date 0 0
+
+diff --git a/a b/a
+new file mode 100644
+--- /dev/null
++++ b/a
+@@ -0,0 +1,2 @@
++a
++a
+% git=yes: git patch
+# HG changeset patch
+# Parent 0000000000000000000000000000000000000000
+# Date 0 0
+
+diff --git a/a b/a
+new file mode 100644
+--- /dev/null
++++ b/a
+@@ -0,0 +1,1 @@
++a
+% git=yes: git patch after qrefresh
+# HG changeset patch
+# Parent 0000000000000000000000000000000000000000
+# Date 0 0
+
+diff --git a/a b/a
+new file mode 100644
+--- /dev/null
++++ b/a
+@@ -0,0 +1,2 @@
++a
++a
+% git=no: regular patch with copy
+# HG changeset patch
+# Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
+# Date 0 0
+
+diff -r ef8dafc9fa4c -r 110cde11d262 b
+--- /dev/null
++++ b/b
+@@ -0,0 +1,1 @@
++a
+% git=no: regular patch after qrefresh with copy
+# HG changeset patch
+# Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
+# Date 0 0
+
+diff -r ef8dafc9fa4c b
+--- /dev/null
++++ b/b
+@@ -0,0 +1,1 @@
++a
+diff -r ef8dafc9fa4c c
+--- /dev/null
++++ b/c
+@@ -0,0 +1,1 @@
++a
--- a/tests/test-mq-header-date	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-header-date	Sat Feb 13 23:50:38 2010 -0600
@@ -7,7 +7,8 @@
 
 
 catpatch() {
-    cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /"
+    cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \
+                                   -e "s/^\(# Parent \).*/\1/"
 }
 
 catlog() {
@@ -25,153 +26,192 @@
     hg qdel $1.patch
 }
 
-
-echo ==== init
-hg init a
-cd a
-hg qinit
+runtest() {
+    echo ==== init
+    hg init a
+    cd a
+    hg qinit
 
 
-echo ==== qnew -d
-hg qnew -d '3 0' 1.patch
-catlogd 1
+    echo ==== qnew -d
+    hg qnew -d '3 0' 1.patch
+    catlogd 1
 
-echo ==== qref
-echo "1" >1
-hg add
-hg qref
-catlogd 1
+    echo ==== qref
+    echo "1" >1
+    hg add
+    hg qref
+    catlogd 1
 
-echo ==== qref -d
-hg qref -d '4 0'
-catlogd 1
+    echo ==== qref -d
+    hg qref -d '4 0'
+    catlogd 1
 
 
-echo ==== qnew
-hg qnew 2.patch
-echo "2" >2
-hg add
-hg qref
-catlog 2
+    echo ==== qnew
+    hg qnew 2.patch
+    echo "2" >2
+    hg add
+    hg qref
+    catlog 2
 
-echo ==== qref -d
-hg qref -d '5 0'
-catlog 2
+    echo ==== qref -d
+    hg qref -d '5 0'
+    catlog 2
 
-drop 2
+    drop 2
 
 
-echo ==== qnew -d -m
-hg qnew -d '6 0' -m "Three" 3.patch
-catlogd 3
+    echo ==== qnew -d -m
+    hg qnew -d '6 0' -m "Three" 3.patch
+    catlogd 3
 
-echo ==== qref
-echo "3" >3
-hg add
-hg qref
-catlogd 3
+    echo ==== qref
+    echo "3" >3
+    hg add
+    hg qref
+    catlogd 3
 
-echo ==== qref -m
-hg qref -m "Drei"
-catlogd 3
+    echo ==== qref -m
+    hg qref -m "Drei"
+    catlogd 3
 
-echo ==== qref -d
-hg qref -d '7 0'
-catlogd 3
+    echo ==== qref -d
+    hg qref -d '7 0'
+    catlogd 3
 
-echo ==== qref -d -m
-hg qref -d '8 0' -m "Three (again)"
-catlogd 3
+    echo ==== qref -d -m
+    hg qref -d '8 0' -m "Three (again)"
+    catlogd 3
 
 
-echo ==== qnew -m
-hg qnew -m "Four" 4.patch
-echo "4" >4
-hg add
-hg qref
-catlog 4
+    echo ==== qnew -m
+    hg qnew -m "Four" 4.patch
+    echo "4" >4
+    hg add
+    hg qref
+    catlog 4
+
+    echo ==== qref -d
+    hg qref -d '9 0'
+    catlog 4
+
+    drop 4
+
 
-echo ==== qref -d
-hg qref -d '9 0'
-catlog 4
+    echo ==== qnew with HG header
+    hg qnew --config 'mq.plain=true' 5.patch
+    hg qpop
+    echo "# HG changeset patch" >>.hg/patches/5.patch
+    echo "# Date 10 0" >>.hg/patches/5.patch
+    hg qpush 2>&1 | grep 'Now at'
+    catlogd 5
 
-drop 4
+    echo ==== hg qref
+    echo "5" >5
+    hg add
+    hg qref
+    catlogd 5
+
+    echo ==== hg qref -d
+    hg qref -d '11 0'
+    catlogd 5
 
 
-echo ==== qnew with HG header
-hg qnew 5.patch
-hg qpop
-echo "# HG changeset patch" >>.hg/patches/5.patch
-echo "# Date 10 0" >>.hg/patches/5.patch
-hg qpush 2>&1 | grep 'Now at'
-catlogd 5
+    echo ==== qnew with plain header
+    hg qnew --config 'mq.plain=true' -d '12 0' 6.patch
+    hg qpop
+    hg qpush 2>&1 | grep 'now at'
+    catlog 6
+
+    echo ==== hg qref
+    echo "6" >6
+    hg add
+    hg qref
+    catlogd 6
+
+    echo ==== hg qref -d
+    hg qref -d '13 0'
+    catlogd 6
 
-echo ==== hg qref
-echo "5" >5
-hg add
-hg qref
-catlogd 5
+    drop 6
+    
 
-echo ==== hg qref -d
-hg qref -d '11 0'
-catlogd 5
+    echo ==== qnew -u
+    hg qnew -u jane 6.patch
+    echo "6" >6
+    hg add
+    hg qref
+    catlog 6
+
+    echo ==== qref -d
+    hg qref -d '12 0'
+    catlog 6
+
+    drop 6
 
 
-echo ==== qnew -u
-hg qnew -u jane 6.patch
-echo "6" >6
-hg add
-hg qref
-catlog 6
+    echo ==== qnew -d
+    hg qnew -d '13 0' 7.patch
+    echo "7" >7
+    hg add
+    hg qref
+    catlog 7
 
-echo ==== qref -d
-hg qref -d '12 0'
-catlog 6
-
-drop 6
+    echo ==== qref -u
+    hg qref -u john
+    catlogd 7
 
 
-echo ==== qnew -d
-hg qnew -d '13 0' 7.patch
-echo "7" >7
-hg add
-hg qref
-catlog 7
+    echo ==== qnew
+    hg qnew 8.patch
+    echo "8" >8
+    hg add
+    hg qref
+    catlog 8
 
-echo ==== qref -u
-hg qref -u john
-catlogd 7
+    echo ==== qref -u -d
+    hg qref -u john -d '14 0'
+    catlog 8
+
+    drop 8
 
 
-echo ==== qnew
-hg qnew 8.patch
-echo "8" >8
-hg add
-hg qref
-catlog 8
+    echo ==== qnew -m
+    hg qnew -m "Nine" 9.patch
+    echo "9" >9
+    hg add
+    hg qref
+    catlog 9
 
-echo ==== qref -u -d
-hg qref -u john -d '14 0'
-catlog 8
+    echo ==== qref -u -d
+    hg qref -u john -d '15 0'
+    catlog 9
 
-drop 8
+    drop 9
 
 
-echo ==== qnew -m
-hg qnew -m "Nine" 9.patch
-echo "9" >9
-hg add
-hg qref
-catlog 9
-
-echo ==== qref -u -d
-hg qref -u john -d '15 0'
-catlog 9
-
-drop 9
+    echo ==== "qpop -a / qpush -a"
+    hg qpop -a
+    hg qpush -a
+    hg log --template "{rev}: {desc} - {author} - {date}\n"
+}
 
 
-echo ==== "qpop -a / qpush -a"
-hg qpop -a
-hg qpush -a
-hg log --template "{rev}: {desc} - {author} - {date}\n"
+echo ======= plain headers
+
+echo "[mq]" >> $HGRCPATH
+echo "plain=true" >> $HGRCPATH
+
+mkdir sandbox
+(cd sandbox ; runtest)
+rm -r sandbox
+
+
+echo ======= hg headers
+
+echo "plain=false" >> $HGRCPATH
+
+mkdir sandbox
+(cd sandbox ; runtest)
+rm -r sandbox
--- a/tests/test-mq-header-date.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-header-date.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,13 +1,12 @@
+======= plain headers
 ==== init
 ==== qnew -d
-# HG changeset patch
-# Date 3 0
+Date: 3 0
 
 0: [mq]: 1.patch - test - 3.00
 ==== qref
 adding 1
-# HG changeset patch
-# Date 3 0
+Date: 3 0
 
 diff -r ... 1
 --- /dev/null
@@ -16,8 +15,7 @@
 +1
 0: [mq]: 1.patch - test - 3.00
 ==== qref -d
-# HG changeset patch
-# Date 4 0
+Date: 4 0
 
 diff -r ... 1
 --- /dev/null
@@ -35,9 +33,7 @@
 1: [mq]: 2.patch - test
 0: [mq]: 1.patch - test
 ==== qref -d
-# HG changeset patch
-# Date 5 0
-
+Date: 5 0
 
 diff -r ... 2
 --- /dev/null
@@ -49,8 +45,7 @@
 popping 2.patch
 now at: 1.patch
 ==== qnew -d -m
-# HG changeset patch
-# Date 6 0
+Date: 6 0
 
 Three
 
@@ -58,8 +53,7 @@
 0: [mq]: 1.patch - test - 4.00
 ==== qref
 adding 3
-# HG changeset patch
-# Date 6 0
+Date: 6 0
 
 Three
 
@@ -71,8 +65,7 @@
 1: Three - test - 6.00
 0: [mq]: 1.patch - test - 4.00
 ==== qref -m
-# HG changeset patch
-# Date 6 0
+Date: 6 0
 
 Drei
 
@@ -84,8 +77,7 @@
 1: Drei - test - 6.00
 0: [mq]: 1.patch - test - 4.00
 ==== qref -d
-# HG changeset patch
-# Date 7 0
+Date: 7 0
 
 Drei
 
@@ -97,8 +89,7 @@
 1: Drei - test - 7.00
 0: [mq]: 1.patch - test - 4.00
 ==== qref -d -m
-# HG changeset patch
-# Date 8 0
+Date: 8 0
 
 Three (again)
 
@@ -122,9 +113,7 @@
 1: Three (again) - test
 0: [mq]: 1.patch - test
 ==== qref -d
-# HG changeset patch
-# Date 9 0
-
+Date: 9 0
 Four
 
 diff -r ... 4
@@ -148,6 +137,7 @@
 ==== hg qref
 adding 5
 # HG changeset patch
+# Parent 
 # Date 10 0
 
 diff -r ... 5
@@ -160,6 +150,7 @@
 0: [mq]: 1.patch - test - 4.00
 ==== hg qref -d
 # HG changeset patch
+# Parent 
 # Date 11 0
 
 diff -r ... 5
@@ -170,6 +161,43 @@
 2: [mq]: 5.patch - test - 11.00
 1: Three (again) - test - 8.00
 0: [mq]: 1.patch - test - 4.00
+==== qnew with plain header
+popping 6.patch
+now at: 5.patch
+now at: 6.patch
+Date: 12 0
+
+3: imported patch 6.patch - test
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+==== hg qref
+adding 6
+Date: 12 0
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+3: [mq]: 6.patch - test - 12.00
+2: [mq]: 5.patch - test - 11.00
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+==== hg qref -d
+Date: 13 0
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+3: [mq]: 6.patch - test - 13.00
+2: [mq]: 5.patch - test - 11.00
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+popping 6.patch
+now at: 5.patch
 ==== qnew -u
 adding 6
 From: jane
@@ -200,8 +228,7 @@
 now at: 5.patch
 ==== qnew -d
 adding 7
-# HG changeset patch
-# Date 13 0
+Date: 13 0
 
 diff -r ... 7
 --- /dev/null
@@ -213,9 +240,8 @@
 1: Three (again) - test
 0: [mq]: 1.patch - test
 ==== qref -u
-# HG changeset patch
-# User john
-# Date 13 0
+From: john
+Date: 13 0
 
 diff -r ... 7
 --- /dev/null
@@ -239,10 +265,8 @@
 1: Three (again) - test
 0: [mq]: 1.patch - test
 ==== qref -u -d
-# HG changeset patch
-# Date 14 0
-# User john
-
+Date: 14 0
+From: john
 
 diff -r ... 8
 --- /dev/null
@@ -271,10 +295,8 @@
 1: Three (again) - test
 0: [mq]: 1.patch - test
 ==== qref -u -d
-# HG changeset patch
-# Date 15 0
-# User john
-
+Date: 15 0
+From: john
 Nine
 
 diff -r ... 9
@@ -304,3 +326,373 @@
 2: imported patch 5.patch - test - 11.00
 1: Three (again) - test - 8.00
 0: imported patch 1.patch - test - 4.00
+======= hg headers
+==== init
+==== qnew -d
+# HG changeset patch
+# Parent 
+# Date 3 0
+
+0: [mq]: 1.patch - test - 3.00
+==== qref
+adding 1
+# HG changeset patch
+# Parent 
+# Date 3 0
+
+diff -r ... 1
+--- /dev/null
++++ b/1
+@@ -0,0 +1,1 @@
++1
+0: [mq]: 1.patch - test - 3.00
+==== qref -d
+# HG changeset patch
+# Parent 
+# Date 4 0
+
+diff -r ... 1
+--- /dev/null
++++ b/1
+@@ -0,0 +1,1 @@
++1
+0: [mq]: 1.patch - test - 4.00
+==== qnew
+adding 2
+# HG changeset patch
+# Parent 
+
+diff -r ... 2
+--- /dev/null
++++ b/2
+@@ -0,0 +1,1 @@
++2
+1: [mq]: 2.patch - test
+0: [mq]: 1.patch - test
+==== qref -d
+# HG changeset patch
+# Date 5 0
+# Parent 
+
+diff -r ... 2
+--- /dev/null
++++ b/2
+@@ -0,0 +1,1 @@
++2
+1: [mq]: 2.patch - test
+0: [mq]: 1.patch - test
+popping 2.patch
+now at: 1.patch
+==== qnew -d -m
+# HG changeset patch
+# Parent 
+# Date 6 0
+
+Three
+
+1: Three - test - 6.00
+0: [mq]: 1.patch - test - 4.00
+==== qref
+adding 3
+# HG changeset patch
+# Parent 
+# Date 6 0
+
+Three
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+1: Three - test - 6.00
+0: [mq]: 1.patch - test - 4.00
+==== qref -m
+# HG changeset patch
+# Parent 
+# Date 6 0
+
+Drei
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+1: Drei - test - 6.00
+0: [mq]: 1.patch - test - 4.00
+==== qref -d
+# HG changeset patch
+# Parent 
+# Date 7 0
+
+Drei
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+1: Drei - test - 7.00
+0: [mq]: 1.patch - test - 4.00
+==== qref -d -m
+# HG changeset patch
+# Parent 
+# Date 8 0
+
+Three (again)
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+==== qnew -m
+adding 4
+# HG changeset patch
+# Parent 
+Four
+
+diff -r ... 4
+--- /dev/null
++++ b/4
+@@ -0,0 +1,1 @@
++4
+2: Four - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+==== qref -d
+# HG changeset patch
+# Date 9 0
+# Parent 
+Four
+
+diff -r ... 4
+--- /dev/null
++++ b/4
+@@ -0,0 +1,1 @@
++4
+2: Four - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+popping 4.patch
+now at: 3.patch
+==== qnew with HG header
+popping 5.patch
+now at: 3.patch
+# HG changeset patch
+# Date 10 0
+2: imported patch 5.patch - test - 10.00
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+==== hg qref
+adding 5
+# HG changeset patch
+# Parent 
+# Date 10 0
+
+diff -r ... 5
+--- /dev/null
++++ b/5
+@@ -0,0 +1,1 @@
++5
+2: [mq]: 5.patch - test - 10.00
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+==== hg qref -d
+# HG changeset patch
+# Parent 
+# Date 11 0
+
+diff -r ... 5
+--- /dev/null
++++ b/5
+@@ -0,0 +1,1 @@
++5
+2: [mq]: 5.patch - test - 11.00
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+==== qnew with plain header
+popping 6.patch
+now at: 5.patch
+now at: 6.patch
+Date: 12 0
+
+3: imported patch 6.patch - test
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+==== hg qref
+adding 6
+Date: 12 0
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+3: [mq]: 6.patch - test - 12.00
+2: [mq]: 5.patch - test - 11.00
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+==== hg qref -d
+Date: 13 0
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+3: [mq]: 6.patch - test - 13.00
+2: [mq]: 5.patch - test - 11.00
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+popping 6.patch
+now at: 5.patch
+==== qnew -u
+adding 6
+# HG changeset patch
+# Parent 
+# User jane
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+3: [mq]: 6.patch - jane
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+==== qref -d
+# HG changeset patch
+# Date 12 0
+# Parent 
+# User jane
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+3: [mq]: 6.patch - jane
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+popping 6.patch
+now at: 5.patch
+==== qnew -d
+adding 7
+# HG changeset patch
+# Parent 
+# Date 13 0
+
+diff -r ... 7
+--- /dev/null
++++ b/7
+@@ -0,0 +1,1 @@
++7
+3: [mq]: 7.patch - test
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+==== qref -u
+# HG changeset patch
+# User john
+# Parent 
+# Date 13 0
+
+diff -r ... 7
+--- /dev/null
++++ b/7
+@@ -0,0 +1,1 @@
++7
+3: [mq]: 7.patch - john - 13.00
+2: [mq]: 5.patch - test - 11.00
+1: Three (again) - test - 8.00
+0: [mq]: 1.patch - test - 4.00
+==== qnew
+adding 8
+# HG changeset patch
+# Parent 
+
+diff -r ... 8
+--- /dev/null
++++ b/8
+@@ -0,0 +1,1 @@
++8
+4: [mq]: 8.patch - test
+3: [mq]: 7.patch - john
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+==== qref -u -d
+# HG changeset patch
+# Date 14 0
+# User john
+# Parent 
+
+diff -r ... 8
+--- /dev/null
++++ b/8
+@@ -0,0 +1,1 @@
++8
+4: [mq]: 8.patch - john
+3: [mq]: 7.patch - john
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+popping 8.patch
+now at: 7.patch
+==== qnew -m
+adding 9
+# HG changeset patch
+# Parent 
+Nine
+
+diff -r ... 9
+--- /dev/null
++++ b/9
+@@ -0,0 +1,1 @@
++9
+4: Nine - test
+3: [mq]: 7.patch - john
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+==== qref -u -d
+# HG changeset patch
+# Date 15 0
+# User john
+# Parent 
+Nine
+
+diff -r ... 9
+--- /dev/null
++++ b/9
+@@ -0,0 +1,1 @@
++9
+4: Nine - john
+3: [mq]: 7.patch - john
+2: [mq]: 5.patch - test
+1: Three (again) - test
+0: [mq]: 1.patch - test
+popping 9.patch
+now at: 7.patch
+==== qpop -a / qpush -a
+popping 7.patch
+popping 5.patch
+popping 3.patch
+popping 1.patch
+patch queue now empty
+applying 1.patch
+applying 3.patch
+applying 5.patch
+applying 7.patch
+now at: 7.patch
+3: imported patch 7.patch - john - 13.00
+2: imported patch 5.patch - test - 11.00
+1: Three (again) - test - 8.00
+0: imported patch 1.patch - test - 4.00
--- a/tests/test-mq-header-from	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-header-from	Sat Feb 13 23:50:38 2010 -0600
@@ -7,101 +7,145 @@
 
 
 catlog() {
-    cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /"
+    cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \
+                                   -e "s/^\(# Parent \).*/\1/"
+    hg log --template "{rev}: {desc} - {author}\n"
+}
+
+runtest() {
+    echo ==== init
+    hg init a
+    cd a
+    hg qinit
+
+
+    echo ==== qnew -U
+    hg qnew -U 1.patch
+    catlog 1
+
+    echo ==== qref
+    echo "1" >1
+    hg add
+    hg qref
+    catlog 1
+
+    echo ==== qref -u
+    hg qref -u mary
+    catlog 1
+
+    echo ==== qnew
+    hg qnew 2.patch
+    echo "2" >2
+    hg add
+    hg qref
+    catlog 2
+
+    echo ==== qref -u
+    hg qref -u jane
+    catlog 2
+
+
+    echo ==== qnew -U -m
+    hg qnew -U -m "Three" 3.patch
+    catlog 3
+
+    echo ==== qref
+    echo "3" >3
+    hg add
+    hg qref
+    catlog 3
+
+    echo ==== qref -m
+    hg qref -m "Drei"
+    catlog 3
+
+    echo ==== qref -u
+    hg qref -u mary
+    catlog 3
+
+    echo ==== qref -u -m
+    hg qref -u maria -m "Three (again)"
+    catlog 3
+
+    echo ==== qnew -m
+    hg qnew -m "Four" 4.patch
+    echo "4" >4of t
+    hg add
+    hg qref
+    catlog 4
+
+    echo ==== qref -u
+    hg qref -u jane
+    catlog 4
+
+
+    echo ==== qnew with HG header
+    hg qnew --config 'mq.plain=true' 5.patch
+    hg qpop
+    echo "# HG changeset patch" >>.hg/patches/5.patch
+    echo "# User johndoe" >>.hg/patches/5.patch
+    hg qpush 2>&1 | grep 'now at'
+    catlog 5
+
+    echo ==== hg qref
+    echo "5" >5
+    hg add
+    hg qref
+    catlog 5
+
+    echo ==== hg qref -U
+    hg qref -U
+    catlog 5
+
+    echo ==== hg qref -u
+    hg qref -u johndeere
+    catlog 5
+
+
+    echo ==== qnew with plain header
+    hg qnew --config 'mq.plain=true' -U 6.patch
+    hg qpop
+    hg qpush 2>&1 | grep 'now at'
+    catlog 6
+
+    echo ==== hg qref
+    echo "6" >6
+    hg add
+    hg qref
+    catlog 6
+
+    echo ==== hg qref -U
+    hg qref -U
+    catlog 6
+
+    echo ==== hg qref -u
+    hg qref -u johndeere
+    catlog 6
+
+
+    echo ==== "qpop -a / qpush -a"
+    hg qpop -a
+    hg qpush -a
     hg log --template "{rev}: {desc} - {author}\n"
 }
 
 
-echo ==== init
-hg init a
-cd a
-hg qinit
-
-
-echo ==== qnew -U
-hg qnew -U 1.patch
-catlog 1
+echo ======= plain headers
 
-echo ==== qref
-echo "1" >1
-hg add
-hg qref
-catlog 1
-
-echo ==== qref -u
-hg qref -u mary
-catlog 1
+echo "[mq]" >> $HGRCPATH
+echo "plain=true" >> $HGRCPATH
 
-echo ==== qnew
-hg qnew 2.patch
-echo "2" >2
-hg add
-hg qref
-catlog 2
-
-echo ==== qref -u
-hg qref -u jane
-catlog 2
+mkdir sandbox
+(cd sandbox ; runtest)
+rm -r sandbox
 
 
-echo ==== qnew -U -m
-hg qnew -U -m "Three" 3.patch
-catlog 3
-
-echo ==== qref
-echo "3" >3
-hg add
-hg qref
-catlog 3
-
-echo ==== qref -m
-hg qref -m "Drei"
-catlog 3
+echo ======= hg headers
 
-echo ==== qref -u
-hg qref -u mary
-catlog 3
-
-echo ==== qref -u -m
-hg qref -u maria -m "Three (again)"
-catlog 3
-
-echo ==== qnew -m
-hg qnew -m "Four" 4.patch
-echo "4" >4
-hg add
-hg qref
-catlog 4
+echo "plain=false" >> $HGRCPATH
 
-echo ==== qref -u
-hg qref -u jane
-catlog 4
-
-
-echo ==== qnew with HG header
-hg qnew 5.patch
-hg qpop
-echo "# HG changeset patch" >>.hg/patches/5.patch
-echo "# User johndoe" >>.hg/patches/5.patch
-hg qpush 2>&1 | grep 'now at'
-catlog 5
+mkdir sandbox
+(cd sandbox ; runtest)
+rm -r sandbox
 
-echo ==== hg qref
-echo "5" >5
-hg add
-hg qref
-catlog 5
-
-echo ==== hg qref -U
-hg qref -U
-catlog 5
-
-echo ==== hg qref -u
-hg qref -u johndeere
-catlog 5
-
-
-echo ==== "qpop -a / qpush -a"
-hg qpop -a
-hg qpush -a
-hg log --template "{rev}: {desc} - {author}\n"
+runtest
--- a/tests/test-mq-header-from.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-header-from.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,3 +1,4 @@
+======= plain headers
 ==== init
 ==== qnew -U
 From: test
@@ -32,9 +33,7 @@
 1: [mq]: 2.patch - test
 0: [mq]: 1.patch - mary
 ==== qref -u
-# HG changeset patch
-# User jane
-
+From: jane
 
 diff -r ... 2
 --- /dev/null
@@ -105,14 +104,295 @@
 1: [mq]: 2.patch - jane
 0: [mq]: 1.patch - mary
 ==== qnew -m
-adding 4
+adding 4of
+Four
+
+diff -r ... 4of
+--- /dev/null
++++ b/4of
+@@ -0,0 +1,1 @@
++4 t
+3: Four - test
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref -u
+From: jane
 Four
 
-diff -r ... 4
+diff -r ... 4of
+--- /dev/null
++++ b/4of
+@@ -0,0 +1,1 @@
++4 t
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qnew with HG header
+popping 5.patch
+now at: 4.patch
+now at: 5.patch
+# HG changeset patch
+# User johndoe
+4: imported patch 5.patch - johndoe
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref
+adding 5
+# HG changeset patch
+# Parent 
+# User johndoe
+
+diff -r ... 5
+--- /dev/null
++++ b/5
+@@ -0,0 +1,1 @@
++5
+4: [mq]: 5.patch - johndoe
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -U
+# HG changeset patch
+# Parent 
+# User test
+
+diff -r ... 5
+--- /dev/null
++++ b/5
+@@ -0,0 +1,1 @@
++5
+4: [mq]: 5.patch - test
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -u
+# HG changeset patch
+# Parent 
+# User johndeere
+
+diff -r ... 5
+--- /dev/null
++++ b/5
+@@ -0,0 +1,1 @@
++5
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qnew with plain header
+popping 6.patch
+now at: 5.patch
+now at: 6.patch
+From: test
+
+5: imported patch 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref
+adding 6
+From: test
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -U
+From: test
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -u
+From: johndeere
+
+diff -r ... 6
 --- /dev/null
-+++ b/4
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - johndeere
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qpop -a / qpush -a
+popping 6.patch
+popping 5.patch
+popping 4.patch
+popping 3.patch
+popping 2.patch
+popping 1.patch
+patch queue now empty
+applying 1.patch
+applying 2.patch
+applying 3.patch
+applying 4.patch
+applying 5.patch
+applying 6.patch
+now at: 6.patch
+5: imported patch 6.patch - johndeere
+4: imported patch 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: imported patch 2.patch - jane
+0: imported patch 1.patch - mary
+======= hg headers
+==== init
+==== qnew -U
+# HG changeset patch
+# Parent 
+# User test
+0: [mq]: 1.patch - test
+==== qref
+adding 1
+# HG changeset patch
+# Parent 
+# User test
+
+diff -r ... 1
+--- /dev/null
++++ b/1
+@@ -0,0 +1,1 @@
++1
+0: [mq]: 1.patch - test
+==== qref -u
+# HG changeset patch
+# Parent 
+# User mary
+
+diff -r ... 1
+--- /dev/null
++++ b/1
+@@ -0,0 +1,1 @@
++1
+0: [mq]: 1.patch - mary
+==== qnew
+adding 2
+# HG changeset patch
+# Parent 
+
+diff -r ... 2
+--- /dev/null
++++ b/2
+@@ -0,0 +1,1 @@
++2
+1: [mq]: 2.patch - test
+0: [mq]: 1.patch - mary
+==== qref -u
+# HG changeset patch
+# User jane
+# Parent 
+
+diff -r ... 2
+--- /dev/null
++++ b/2
 @@ -0,0 +1,1 @@
-+4
++2
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qnew -U -m
+# HG changeset patch
+# Parent 
+# User test
+Three
+
+2: Three - test
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref
+adding 3
+# HG changeset patch
+# Parent 
+# User test
+Three
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+2: Three - test
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref -m
+# HG changeset patch
+# Parent 
+# User test
+Drei
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+2: Drei - test
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref -u
+# HG changeset patch
+# Parent 
+# User mary
+Drei
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+2: Drei - mary
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref -u -m
+# HG changeset patch
+# Parent 
+# User maria
+Three (again)
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qnew -m
+adding 4of
+# HG changeset patch
+# Parent 
+Four
+
+diff -r ... 4of
+--- /dev/null
++++ b/4of
+@@ -0,0 +1,1 @@
++4 t
 3: Four - test
 2: Three (again) - maria
 1: [mq]: 2.patch - jane
@@ -120,14 +400,14 @@
 ==== qref -u
 # HG changeset patch
 # User jane
-
+# Parent 
 Four
 
-diff -r ... 4
+diff -r ... 4of
 --- /dev/null
-+++ b/4
++++ b/4of
 @@ -0,0 +1,1 @@
-+4
++4 t
 3: Four - jane
 2: Three (again) - maria
 1: [mq]: 2.patch - jane
@@ -146,6 +426,7 @@
 ==== hg qref
 adding 5
 # HG changeset patch
+# Parent 
 # User johndoe
 
 diff -r ... 5
@@ -160,6 +441,7 @@
 0: [mq]: 1.patch - mary
 ==== hg qref -U
 # HG changeset patch
+# Parent 
 # User test
 
 diff -r ... 5
@@ -174,6 +456,7 @@
 0: [mq]: 1.patch - mary
 ==== hg qref -u
 # HG changeset patch
+# Parent 
 # User johndeere
 
 diff -r ... 5
@@ -186,7 +469,63 @@
 2: Three (again) - maria
 1: [mq]: 2.patch - jane
 0: [mq]: 1.patch - mary
+==== qnew with plain header
+popping 6.patch
+now at: 5.patch
+now at: 6.patch
+From: test
+
+5: imported patch 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref
+adding 6
+From: test
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -U
+From: test
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -u
+From: johndeere
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - johndeere
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
 ==== qpop -a / qpush -a
+popping 6.patch
 popping 5.patch
 popping 4.patch
 popping 3.patch
@@ -198,9 +537,293 @@
 applying 3.patch
 applying 4.patch
 applying 5.patch
-now at: 5.patch
+applying 6.patch
+now at: 6.patch
+5: imported patch 6.patch - johndeere
 4: imported patch 5.patch - johndeere
 3: Four - jane
 2: Three (again) - maria
 1: imported patch 2.patch - jane
 0: imported patch 1.patch - mary
+==== init
+==== qnew -U
+# HG changeset patch
+# Parent 
+# User test
+0: [mq]: 1.patch - test
+==== qref
+adding 1
+# HG changeset patch
+# Parent 
+# User test
+
+diff -r ... 1
+--- /dev/null
++++ b/1
+@@ -0,0 +1,1 @@
++1
+0: [mq]: 1.patch - test
+==== qref -u
+# HG changeset patch
+# Parent 
+# User mary
+
+diff -r ... 1
+--- /dev/null
++++ b/1
+@@ -0,0 +1,1 @@
++1
+0: [mq]: 1.patch - mary
+==== qnew
+adding 2
+# HG changeset patch
+# Parent 
+
+diff -r ... 2
+--- /dev/null
++++ b/2
+@@ -0,0 +1,1 @@
++2
+1: [mq]: 2.patch - test
+0: [mq]: 1.patch - mary
+==== qref -u
+# HG changeset patch
+# User jane
+# Parent 
+
+diff -r ... 2
+--- /dev/null
++++ b/2
+@@ -0,0 +1,1 @@
++2
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qnew -U -m
+# HG changeset patch
+# Parent 
+# User test
+Three
+
+2: Three - test
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref
+adding 3
+# HG changeset patch
+# Parent 
+# User test
+Three
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+2: Three - test
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref -m
+# HG changeset patch
+# Parent 
+# User test
+Drei
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+2: Drei - test
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref -u
+# HG changeset patch
+# Parent 
+# User mary
+Drei
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+2: Drei - mary
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref -u -m
+# HG changeset patch
+# Parent 
+# User maria
+Three (again)
+
+diff -r ... 3
+--- /dev/null
++++ b/3
+@@ -0,0 +1,1 @@
++3
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qnew -m
+adding 4of
+# HG changeset patch
+# Parent 
+Four
+
+diff -r ... 4of
+--- /dev/null
++++ b/4of
+@@ -0,0 +1,1 @@
++4 t
+3: Four - test
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qref -u
+# HG changeset patch
+# User jane
+# Parent 
+Four
+
+diff -r ... 4of
+--- /dev/null
++++ b/4of
+@@ -0,0 +1,1 @@
++4 t
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qnew with HG header
+popping 5.patch
+now at: 4.patch
+now at: 5.patch
+# HG changeset patch
+# User johndoe
+4: imported patch 5.patch - johndoe
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref
+adding 5
+# HG changeset patch
+# Parent 
+# User johndoe
+
+diff -r ... 5
+--- /dev/null
++++ b/5
+@@ -0,0 +1,1 @@
++5
+4: [mq]: 5.patch - johndoe
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -U
+# HG changeset patch
+# Parent 
+# User test
+
+diff -r ... 5
+--- /dev/null
++++ b/5
+@@ -0,0 +1,1 @@
++5
+4: [mq]: 5.patch - test
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -u
+# HG changeset patch
+# Parent 
+# User johndeere
+
+diff -r ... 5
+--- /dev/null
++++ b/5
+@@ -0,0 +1,1 @@
++5
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qnew with plain header
+popping 6.patch
+now at: 5.patch
+now at: 6.patch
+From: test
+
+5: imported patch 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref
+adding 6
+From: test
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -U
+From: test
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - test
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== hg qref -u
+From: johndeere
+
+diff -r ... 6
+--- /dev/null
++++ b/6
+@@ -0,0 +1,1 @@
++6
+5: [mq]: 6.patch - johndeere
+4: [mq]: 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: [mq]: 2.patch - jane
+0: [mq]: 1.patch - mary
+==== qpop -a / qpush -a
+popping 6.patch
+popping 5.patch
+popping 4.patch
+popping 3.patch
+popping 2.patch
+popping 1.patch
+patch queue now empty
+applying 1.patch
+applying 2.patch
+applying 3.patch
+applying 4.patch
+applying 5.patch
+applying 6.patch
+now at: 6.patch
+5: imported patch 6.patch - johndeere
+4: imported patch 5.patch - johndeere
+3: Four - jane
+2: Three (again) - maria
+1: imported patch 2.patch - jane
+0: imported patch 1.patch - mary
--- a/tests/test-mq-merge	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-merge	Sat Feb 13 23:50:38 2010 -0600
@@ -15,7 +15,9 @@
 }
 
 echo "[extensions]" >> $HGRCPATH
-echo "hgext.mq=" >> $HGRCPATH
+echo "mq =" >> $HGRCPATH
+echo "[mq]" >> $HGRCPATH
+echo "git = keep" >> $HGRCPATH
 
 # Commit two dummy files in "init" changeset
 hg init t
--- a/tests/test-mq-merge.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-merge.out	Sat Feb 13 23:50:38 2010 -0600
@@ -34,6 +34,9 @@
 applying patcha2
 now at: patcha2
 % check patcha is still a git patch
+# HG changeset patch
+# Parent d3873e73d99ef67873dac33fbcc66268d5d2b6f4
+
 diff --git a/a b/a
 --- a/a
 +++ b/a
--- a/tests/test-mq-qclone-http	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qclone-http	Sat Feb 13 23:50:38 2010 -0600
@@ -75,3 +75,7 @@
 hg --cwd d log --template "{desc}\n"
 hg --cwd d qpush -a
 hg --cwd d log --template "{desc}\n"
+
+echo '% test --mq works and uses correct repository config'
+hg --cwd d outgoing --mq | sed "s|$HGPORT2|\$HGPORT2|"
+hg --cwd d log --mq --template '{rev} {desc|firstline}\n'
--- a/tests/test-mq-qclone-http.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qclone-http.out	Sat Feb 13 23:50:38 2010 -0600
@@ -78,3 +78,8 @@
 now at: b.patch
 imported patch b.patch
 a
+% test --mq works and uses correct repository config
+comparing with http://localhost:$HGPORT2/a/.hg/patches
+searching for changes
+no changes found
+0 b.patch
--- a/tests/test-mq-qdiff	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qdiff	Sat Feb 13 23:50:38 2010 -0600
@@ -2,6 +2,8 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "mq=" >> $HGRCPATH
+echo "[mq]" >> $HGRCPATH
+echo "git=keep" >> $HGRCPATH
 
 echo % init
 hg init a
@@ -60,3 +62,9 @@
 
 echo % qdiff --reverse
 hg qdiff --nodates --reverse
+
+echo % qdiff preserve existing git flag
+hg qrefresh --git
+echo a >> lines
+hg qdiff
+
--- a/tests/test-mq-qdiff.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qdiff.out	Sat Feb 13 23:50:38 2010 -0600
@@ -103,3 +103,22 @@
  7
  8
  9
+% qdiff preserve existing git flag
+diff --git a/lines b/lines
+--- a/lines
++++ b/lines
+@@ -1,9 +1,12 @@
++
++
+ 1
+ 2
+ 3
+ 4
+-hello world
+-goodbye world
++hello  world
++     goodbye world
+ 7
+ 8
+ 9
++a
--- a/tests/test-mq-qfold	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qfold	Sat Feb 13 23:50:38 2010 -0600
@@ -2,6 +2,8 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "mq=" >> $HGRCPATH
+echo "[mq]" >> $HGRCPATH
+echo "git=keep" >> $HGRCPATH
 
 filterdiff()
 {
@@ -10,6 +12,11 @@
 	-e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 }
 
+filterpatch()
+{
+    sed -e "s/\(# Parent \).*/\1/"
+}
+
 echo '% init'
 hg init repo
 cd repo
@@ -41,7 +48,7 @@
 hg qnew --git -f git
 hg qpop
 hg qfold git
-cat .hg/patches/regular
+cat .hg/patches/regular | filterpatch
 hg qpop
 hg qdel regular
 
@@ -52,7 +59,7 @@
 hg qnew -f regular
 hg qpop
 hg qfold regular
-cat .hg/patches/git
+cat .hg/patches/git | filterpatch
 
 cd ..
 
--- a/tests/test-mq-qfold.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qfold.out	Sat Feb 13 23:50:38 2010 -0600
@@ -29,6 +29,9 @@
 % fold git patch into a regular patch, expect git patch
 popping git
 now at: regular
+# HG changeset patch
+# Parent 
+
 diff --git a/a b/a
 --- a/a
 +++ b/a
@@ -52,6 +55,9 @@
 % fold regular patch into a git patch, expect git patch
 popping regular
 now at: git
+# HG changeset patch
+# Parent 
+
 diff --git a/a b/aa
 copy from a
 copy to aa
--- a/tests/test-mq-qnew	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qnew	Sat Feb 13 23:50:38 2010 -0600
@@ -1,76 +1,102 @@
 #!/bin/sh
 
+catpatch() {
+    cat $1 | sed -e "s/^\(# Parent \).*/\1/"
+}
+
 echo "[extensions]" >> $HGRCPATH
 echo "mq=" >> $HGRCPATH
 
-hg init mq
-cd mq
+runtest() {
+    hg init mq
+    cd mq
 
-echo a > a
-hg ci -Ama
+    echo a > a
+    hg ci -Ama
 
-echo '% qnew should refuse bad patch names'
-hg qnew series
-hg qnew status
-hg qnew guards
-hg qnew .hgignore
+    echo '% qnew should refuse bad patch names'
+    hg qnew series
+    hg qnew status
+    hg qnew guards
+    hg qnew .hgignore
 
-hg qinit -c
+    hg qinit -c
 
-echo '% qnew with uncommitted changes'
-echo a > somefile
-hg add somefile
-hg qnew uncommitted.patch
-hg st
-hg qseries
-hg revert --no-backup somefile
-rm somefile
+    echo '% qnew with uncommitted changes'
+    echo a > somefile
+    hg add somefile
+    hg qnew uncommitted.patch
+    hg st
+    hg qseries
+
+    echo '% qnew implies add'
+    hg -R .hg/patches st
 
-echo '% qnew implies add'
-hg qnew test.patch
-hg -R .hg/patches st
+    echo '% qnew missing'
+    hg qnew missing.patch missing
+
+    echo '% qnew -m'
+    hg qnew -m 'foo bar' mtest.patch
+    catpatch .hg/patches/mtest.patch
 
-echo '% qnew missing'
-hg qnew missing.patch missing
+    echo '% qnew twice'
+    hg qnew first.patch
+    hg qnew first.patch
 
-echo '% qnew -m'
-hg qnew -m 'foo bar' mtest.patch
-cat .hg/patches/mtest.patch
+    touch ../first.patch
+    hg qimport ../first.patch
 
-echo '% qnew twice'
-hg qnew first.patch
-hg qnew first.patch
-
-touch ../first.patch
-hg qimport ../first.patch
+    echo '% qnew -f from a subdirectory'
+    hg qpop -a
+    mkdir d
+    cd d
+    echo b > b
+    hg ci -Am t
+    echo b >> b
+    hg st
+    hg qnew -g -f p
+    catpatch ../.hg/patches/p
 
-echo '% qnew -f from a subdirectory'
-hg qpop -a
-mkdir d
-cd d
-echo b > b
-hg ci -Am t
-echo b >> b
-hg st
-hg qnew -g -f p
-cat ../.hg/patches/p
+    echo '% qnew -u with no username configured'
+    HGUSER= hg qnew -u blue red
+    catpatch ../.hg/patches/red
 
-echo '% qnew -u with no username configured'
-HGUSER= hg qnew -u blue red
-cat ../.hg/patches/red
+    echo '% fail when trying to import a merge'
+    hg init merge
+    cd merge
+    touch a
+    hg ci -Am null
+    echo a >> a
+    hg ci -m a
+    hg up -r 0
+    echo b >> a
+    hg ci -m b
+    hg merge -f 1
+    hg resolve --mark a
+    hg qnew -f merge
+
+    cd ../../..
+    rm -r mq
+}
+
 
-echo '% fail when trying to import a merge'
-hg init merge
-cd merge
-touch a
-hg ci -Am null
-echo a >> a
-hg ci -m a
-hg up -r 0
-echo b >> a
-hg ci -m b
-hg merge -f 1
-hg resolve --mark a
-hg qnew -f merge
+echo '%%% plain headers'
+
+echo "[mq]" >> $HGRCPATH
+echo "plain=true" >> $HGRCPATH
+
+mkdir sandbox
+(cd sandbox ; runtest)
+rm -r sandbox
+
+
+echo '%%% hg headers'
+
+echo "plain=false" >> $HGRCPATH
+
+mkdir sandbox
+(cd sandbox ; runtest)
+rm -r sandbox
+
 
 exit 0
--- a/tests/test-mq-qnew.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qnew.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1,3 +1,4 @@
+%%% plain headers
 adding a
 % qnew should refuse bad patch names
 abort: "series" cannot be used as the name of a patch
@@ -5,12 +6,11 @@
 abort: "guards" cannot be used as the name of a patch
 abort: ".hgignore" cannot be used as the name of a patch
 % qnew with uncommitted changes
-abort: local changes found, refresh first
-A somefile
+uncommitted.patch
 % qnew implies add
 A .hgignore
 A series
-A test.patch
+A uncommitted.patch
 % qnew missing
 abort: missing: No such file or directory
 % qnew -m
@@ -22,7 +22,7 @@
 % qnew -f from a subdirectory
 popping first.patch
 popping mtest.patch
-popping test.patch
+popping uncommitted.patch
 patch queue now empty
 adding d/b
 M d/b
@@ -45,3 +45,55 @@
 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
 abort: cannot manage merge changesets
+%%% hg headers
+adding a
+% qnew should refuse bad patch names
+abort: "series" cannot be used as the name of a patch
+abort: "status" cannot be used as the name of a patch
+abort: "guards" cannot be used as the name of a patch
+abort: ".hgignore" cannot be used as the name of a patch
+% qnew with uncommitted changes
+uncommitted.patch
+% qnew implies add
+A .hgignore
+A series
+A uncommitted.patch
+% qnew missing
+abort: missing: No such file or directory
+% qnew -m
+# HG changeset patch
+# Parent 
+foo bar
+
+% qnew twice
+abort: patch "first.patch" already exists
+abort: patch "first.patch" already exists
+% qnew -f from a subdirectory
+popping first.patch
+popping mtest.patch
+popping uncommitted.patch
+patch queue now empty
+adding d/b
+M d/b
+# HG changeset patch
+# Parent 
+diff --git a/d/b b/d/b
+--- a/d/b
++++ b/d/b
+@@ -1,1 +1,2 @@
+ b
++b
+% qnew -u with no username configured
+# HG changeset patch
+# Parent 
+# User blue
+% fail when trying to import a merge
+adding a
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+created new head
+merging a
+warning: conflicts during merge.
+merging a failed!
+0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
+abort: cannot manage merge changesets
--- a/tests/test-mq-qpush-fail	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qpush-fail	Sat Feb 13 23:50:38 2010 -0600
@@ -29,7 +29,7 @@
 hg add bar
 hg qrefresh -m 'patch 2'
 
-hg qnew bad-patch
+hg qnew --config 'mq.plain=true' bad-patch
 echo >> foo
 hg qrefresh
 
--- a/tests/test-mq-qrefresh	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qrefresh	Sat Feb 13 23:50:38 2010 -0600
@@ -3,6 +3,10 @@
 echo "[extensions]" >> $HGRCPATH
 echo "mq=" >> $HGRCPATH
 
+catpatch() {
+    cat $1 | sed -e "s/^\(# Parent \).*/\1/"
+}
+
 echo % init
 hg init a
 cd a
@@ -30,7 +34,7 @@
                  -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
 echo % patch file contents
-cat .hg/patches/mqbase | \
+catpatch .hg/patches/mqbase | \
 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
@@ -47,7 +51,7 @@
                  -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
 echo % patch file contents
-cat .hg/patches/mqbase | \
+catpatch .hg/patches/mqbase | \
 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
@@ -63,7 +67,7 @@
                  -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
 echo % patch file contents
-cat .hg/patches/mqbase | \
+catpatch .hg/patches/mqbase | \
 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
@@ -79,7 +83,7 @@
                  -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
 echo % patch file contents
-cat .hg/patches/mqbase | \
+catpatch .hg/patches/mqbase | \
 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
@@ -98,7 +102,7 @@
                -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 
 echo % -- patch file content
-cat .hg/patches/mqbase | \
+catpatch .hg/patches/mqbase | \
 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
     -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
 hg st
@@ -176,7 +180,7 @@
 echo '% b after refresh'
 cat b
 echo '% patch file after refresh'
-cat .hg/patches/patch
+catpatch .hg/patches/patch
 cd ..
 
 
@@ -191,4 +195,4 @@
 hg mv a b
 hg qrefresh
 hg qdiff --nodates
-cd ..
\ No newline at end of file
+cd ..
--- a/tests/test-mq-qrefresh.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-qrefresh.out	Sat Feb 13 23:50:38 2010 -0600
@@ -31,6 +31,8 @@
 -base
 +patched
 % patch file contents
+# HG changeset patch
+# Parent 
 mqbase
 
 diff -r b55ecdccb5cf 1/base
@@ -73,6 +75,8 @@
 -base
 +patched
 % patch file contents
+# HG changeset patch
+# Parent 
 mqbase
 
 diff -r b55ecdccb5cf 1/base
@@ -109,6 +113,8 @@
 -base
 +patched
 % patch file contents
+# HG changeset patch
+# Parent 
 mqbase
 
 diff -r b55ecdccb5cf 1/base
@@ -145,6 +151,8 @@
 -base
 +patched
 % patch file contents
+# HG changeset patch
+# Parent 
 mqbase
 
 diff -r b55ecdccb5cf 1/base
@@ -181,6 +189,8 @@
 @@ -0,0 +1,1 @@
 +orphan
 % -- patch file content
+# HG changeset patch
+# Parent 
 mqbase
 
 diff -r b55ecdccb5cf 1/base
@@ -273,6 +283,9 @@
 b
 b
 % patch file after refresh
+# HG changeset patch
+# Parent 
+
 diff -r 1a60229be7ac b
 --- a/b
 +++ b/b
--- a/tests/test-mq-safety	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-safety	Sat Feb 13 23:50:38 2010 -0600
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 echo '[extensions]' >> $HGRCPATH
-echo 'hgext.mq =' >> $HGRCPATH
+echo 'mq =' >> $HGRCPATH
 
 hg init repo
 cd repo
@@ -42,3 +42,23 @@
 
 echo '% tip:'
 hg tip --template '{rev} {desc}\n'
+
+echo '% qpush warning branchheads'
+cd ..
+hg init branchy
+cd branchy
+echo q > q
+hg add q
+hg qnew -f qp
+hg qpop
+echo a > a
+hg ci -Ama
+hg up null
+hg branch b
+echo c > c
+hg ci -Amc
+hg merge default
+hg ci -mmerge
+hg up default
+hg log
+hg qpush
--- a/tests/test-mq-safety.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-safety.out	Sat Feb 13 23:50:38 2010 -0600
@@ -12,3 +12,37 @@
 abort: cannot refresh a revision with children
 % tip:
 3 append quux
+% qpush warning branchheads
+popping qp
+patch queue now empty
+adding a
+0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+marked working directory as branch b
+adding c
+created new head
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+changeset:   2:65309210bf4e
+branch:      b
+tag:         tip
+parent:      1:707adb4c8ae1
+parent:      0:cb9a9f314b8b
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     merge
+
+changeset:   1:707adb4c8ae1
+branch:      b
+parent:      -1:000000000000
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     c
+
+changeset:   0:cb9a9f314b8b
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     a
+
+applying qp
+now at: qp
--- a/tests/test-mq-symlinks	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq-symlinks	Sat Feb 13 23:50:38 2010 -0600
@@ -48,7 +48,7 @@
 cat s
 hg st
 
-echo '% test symlink removal' 
+echo '% test symlink removal'
 hg qnew removesl.patch
 hg rm a
 hg qrefresh --git
--- a/tests/test-mq.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-mq.out	Sat Feb 13 23:50:38 2010 -0600
@@ -21,11 +21,22 @@
   remove patch from applied stack           qpop
   refresh contents of top applied patch     qrefresh
 
+By default, mq will automatically use git patches when required to avoid
+losing file mode changes, copy records, binary files or empty files creations
+or deletions. This behaviour can be configured with:
+
+  [mq]
+  git = auto/keep/yes/no
+
+If set to 'keep', mq will obey the [diff] section configuration while
+preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
+will override the [diff] section and always generate git or regular patches,
+possibly losing data in the second case.
+
 list of commands:
 
  qapplied     print the patches already applied
  qclone       clone main and patch repository at same time
- qcommit      commit changes in the queue repository
  qdelete      remove patches from queue
  qdiff        diff of the current patch and subsequent modifications
  qfinish      move applied patches into repository history
@@ -34,7 +45,6 @@
  qguard       set or print guards for a patch
  qheader      print the header of the topmost or specified patch
  qimport      import a patch
- qinit        init a new queue repository
  qnew         create a new patch
  qnext        print the name of the next patch
  qpop         pop the current patch off the stack
@@ -42,8 +52,6 @@
  qpush        push the next patch onto the stack
  qrefresh     update the current patch
  qrename      rename a patch
- qrestore     restore the queue state saved by a revision
- qsave        save current queue state
  qselect      set or print guarded patches to push
  qseries      print the entire series file
  qtop         print the name of the current patch
@@ -380,6 +388,7 @@
 diff --git a/new b/copy
 copy from new
 copy to copy
+% test file addition in slow path
 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 created new head
 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -410,7 +419,7 @@
 2 baz (foo)
 diff --git a/bar b/bar
 diff --git a/foo b/baz
-
+% test file move chains in the slow path
 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
 adding branch
--- a/tests/test-newbranch.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-newbranch.out	Sat Feb 13 23:50:38 2010 -0600
@@ -168,9 +168,11 @@
 
 % implicit merge with test branch as parent
 abort: branch 'test' has one head - please merge with an explicit rev
+(run 'hg heads' to see all heads)
 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 % implicit merge with default branch as parent
 abort: branch 'default' has 3 heads - please merge with an explicit rev
+(run 'hg heads .' to see heads)
 % 3 branch heads, explicit merge required
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
--- a/tests/test-non-interactive-wsgi	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-non-interactive-wsgi	Sat Feb 13 23:50:38 2010 -0600
@@ -60,9 +60,14 @@
 	'SERVER_PROTOCOL': 'HTTP/1.0'
 }
 
-hgweb('.')(env, startrsp)
+i = hgweb('.')
+i(env, startrsp)
 print '---- ERRORS'
 print errors.getvalue()
+print '---- OS.ENVIRON wsgi variables'
+print sorted([x for x in os.environ if x.startswith('wsgi')])
+print '---- request.ENVIRON wsgi variables'
+print sorted([x for x in i.repo.ui.environ if x.startswith('wsgi')])
 EOF
 
 python request.py
--- a/tests/test-non-interactive-wsgi.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-non-interactive-wsgi.out	Sat Feb 13 23:50:38 2010 -0600
@@ -10,3 +10,7 @@
 [('Content-Type', 'text/html; charset=ascii')]
 ---- ERRORS
 
+---- OS.ENVIRON wsgi variables
+[]
+---- request.ENVIRON wsgi variables
+['wsgi.errors', 'wsgi.input', 'wsgi.multiprocess', 'wsgi.multithread', 'wsgi.run_once', 'wsgi.url_scheme', 'wsgi.version']
--- a/tests/test-parentrevspec	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-parentrevspec	Sat Feb 13 23:50:38 2010 -0600
@@ -23,7 +23,7 @@
 cd repo
 
 echo '[extensions]' > .hg/hgrc
-echo 'hgext.parentrevspec =' >> .hg/hgrc
+echo 'parentrevspec =' >> .hg/hgrc
 
 commit '0: add foo'
 commit '1: change foo 1'
--- a/tests/test-parse-date	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-parse-date	Sat Feb 13 23:50:38 2010 -0600
@@ -84,4 +84,4 @@
 hg log -d '< 02/01 ' --template '{date|date}\n'
 
 hg log -d ' > 02/01 ' --template '{date|date}\n'
-hg log -d ' < 02/01 ' --template '{date|date}\n'
\ No newline at end of file
+hg log -d ' < 02/01 ' --template '{date|date}\n'
--- a/tests/test-patchbomb	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-patchbomb	Sat Feb 13 23:50:38 2010 -0600
@@ -169,6 +169,12 @@
 hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
  -c bar -s test -r 0:1 | fixheaders
 
+echo "% test multi-address parsing"
+hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \
+ -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \
+ --config email.bcc='"Quux, A." <quux>'
+cat tmp.mbox | fixheaders
+
 echo "% test multi-byte domain parsing"
 UUML=`python -c 'import sys; sys.stdout.write("\374")'`
 HGENCODING=iso-8859-1
--- a/tests/test-patchbomb.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-patchbomb.out	Sat Feb 13 23:50:38 2010 -0600
@@ -1469,6 +1469,39 @@
 @@ -0,0 +1,1 @@
 +b
 
+% test multi-address parsing
+This patch series consists of 1 patches.
+
+
+Writing [PATCH] test ...
+From quux Tue Jan 01 00:01:01 1980
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [PATCH] test
+X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
+Message-Id: <8580ff50825a50c8f716.315532860@
+User-Agent: Mercurial-patchbomb
+Date: Tue, 01 Jan 1980 00:01:00 +0000
+From: quux
+To: spam <spam>, eggs, toast
+Cc: foo, bar@example.com, "A, B <>" <a@example.com>
+Bcc: "Quux, A." <quux>
+
+# HG changeset patch
+# User test
+# Date 1 0
+# Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
+# Parent  0000000000000000000000000000000000000000
+a
+
+diff -r 000000000000 -r 8580ff50825a a
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/a	Thu Jan 01 00:00:01 1970 +0000
+@@ -0,0 +1,1 @@
++a
+
+
 % test multi-byte domain parsing
 This patch series consists of 1 patches.
 
--- a/tests/test-pull	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-pull	Sat Feb 13 23:50:38 2010 -0600
@@ -11,13 +11,13 @@
 cat hg.pid >> $DAEMON_PIDS
 cd ..
 
-hg clone --pull http://localhost:$HGPORT/ copy | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone --pull http://localhost:$HGPORT/ copy | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 cd copy
 hg verify
 hg co
 cat foo
 hg manifest --debug
-hg pull | sed -e 's,:[0-9][0-9]*/,/,'
+hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 echo % issue 622
 cd ..
--- a/tests/test-pull-http	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-pull-http	Sat Feb 13 23:50:38 2010 -0600
@@ -18,7 +18,7 @@
 echo 'allowpull = false' >> .hg/hgrc
 hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
 cat hg.pid >> $DAEMON_PIDS
-hg clone http://localhost:$HGPORT/ test3 | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone http://localhost:$HGPORT/ test3 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 "$TESTDIR/killdaemons.py"
 echo % serve errors
 cat errors.log
@@ -26,7 +26,7 @@
 req() {
 	hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
 	cat hg.pid >> $DAEMON_PIDS
-	hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+	hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 	kill `cat hg.pid`
 	echo % serve errors
 	cat errors.log
--- a/tests/test-pull-http.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-pull-http.out	Sat Feb 13 23:50:38 2010 -0600
@@ -7,6 +7,6 @@
 % serve errors
 % expect error, pulling not allowed
 abort: authorization failed
-pulling from http://localhost/
+pulling from http://localhost:$HGPORT/
 searching for changes
 % serve errors
--- a/tests/test-pull-r	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-pull-r	Sat Feb 13 23:50:38 2010 -0600
@@ -17,6 +17,11 @@
 echo '% pull a missing revision'
 hg pull -qr missing ../repo
 
+echo '% pull multiple revisions with update'
+hg pull -qu -r 0 -r 1 ../repo
+hg -q parents
+hg rollback
+
 echo '% pull -r 0'
 hg pull -qr 0 ../repo
 hg log
--- a/tests/test-pull-r.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-pull-r.out	Sat Feb 13 23:50:38 2010 -0600
@@ -17,6 +17,9 @@
 
 % pull a missing revision
 abort: unknown revision 'missing'!
+% pull multiple revisions with update
+0:bbd179dfa0a7
+rolling back last transaction
 % pull -r 0
 changeset:   0:bbd179dfa0a7
 tag:         tip
--- a/tests/test-pull.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-pull.out	Sat Feb 13 23:50:38 2010 -0600
@@ -19,7 +19,7 @@
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 foo
 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644   foo
-pulling from http://localhost/
+pulling from http://localhost:$HGPORT/
 searching for changes
 no changes found
 % issue 622
--- a/tests/test-purge	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-purge	Sat Feb 13 23:50:38 2010 -0600
@@ -2,7 +2,7 @@
 
 cat <<EOF >> $HGRCPATH
 [extensions]
-hgext.purge=
+purge =
 EOF
 
 echo % init
--- a/tests/test-push-http	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-push-http	Sat Feb 13 23:50:38 2010 -0600
@@ -16,7 +16,7 @@
 req() {
 	hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
 	cat hg.pid >> $DAEMON_PIDS
-	hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,'
+	hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 	kill `cat hg.pid`
 	echo % serve errors
 	cat errors.log
--- a/tests/test-push-http.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-push-http.out	Sat Feb 13 23:50:38 2010 -0600
@@ -2,22 +2,22 @@
 updating to branch default
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % expect ssl error
-pushing to http://localhost/
+pushing to http://localhost:$HGPORT/
 searching for changes
 ssl required
 % serve errors
 % expect authorization error
 abort: authorization failed
-pushing to http://localhost/
+pushing to http://localhost:$HGPORT/
 searching for changes
 % serve errors
 % expect authorization error: must have authorized user
 abort: authorization failed
-pushing to http://localhost/
+pushing to http://localhost:$HGPORT/
 searching for changes
 % serve errors
 % expect success
-pushing to http://localhost/
+pushing to http://localhost:$HGPORT/
 searching for changes
 adding changesets
 adding manifests
@@ -28,11 +28,11 @@
 rolling back last transaction
 % expect authorization error: all users denied
 abort: authorization failed
-pushing to http://localhost/
+pushing to http://localhost:$HGPORT/
 searching for changes
 % serve errors
 % expect authorization error: some users denied, users must be authenticated
 abort: authorization failed
-pushing to http://localhost/
+pushing to http://localhost:$HGPORT/
 searching for changes
 % serve errors
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-validation	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+STRIP=`pwd`
+
+hg init test
+cd test
+cat > .hg/hgrc <<EOF
+[server]
+validate=1
+EOF
+echo alpha > alpha
+echo beta > beta
+hg addr
+hg ci -m 1
+
+cd ..
+hg clone test test-clone
+
+cd test-clone
+cp .hg/store/data/beta.i tmp
+echo blah >> beta
+hg ci -m '2 (corrupt)'
+mv tmp .hg/store/data/beta.i
+hg push 2>&1 | sed "s%$STRIP%test-root%"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-validation.out	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,12 @@
+adding alpha
+adding beta
+updating to branch default
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+pushing to test-root/test
+searching for changes
+adding changesets
+adding manifests
+adding file changes
+transaction abort!
+rollback completed
+abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify
--- a/tests/test-push-warn	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-push-warn	Sat Feb 13 23:50:38 2010 -0600
@@ -90,38 +90,47 @@
 echo 5 > foo
 hg -q branch c
 hg -q ci -d "1000000 0" -m 5
+hg push ../f; echo $?
 hg push -r 4 -r 5 ../f; echo $?
 
+echo % multiple new branches
+hg -q branch d
+echo 6 > foo
+hg -q ci -d "1000000 0" -m 6
+hg push ../f; echo $?
+hg push -r 4 -r 6 ../f; echo $?
+cd ../g
+
 echo % fail on multiple head push
 hg -q up 1
-echo 6 > foo
-hg -q ci -d "1000000 0" -m 6
-hg push -r 4 -r 6 ../f; echo $?
+echo 7 > foo
+hg -q ci -d "1000000 0" -m 7
+hg push -r 4 -r 7 ../f; echo $?
 
 echo % push replacement head on existing branches
 hg -q up 3
-echo 7 > foo
-hg -q ci -d "1000000 0" -m 7
-hg push -r 6 -r 7 ../f; echo $?
+echo 8 > foo
+hg -q ci -d "1000000 0" -m 8
+hg push -r 7 -r 8 ../f; echo $?
 
 echo % merge of branch a to other branch b followed by unrelated push on branch a
-hg -q up 6
-HGMERGE=true hg -q merge 7
-hg -q ci -d "1000000 0" -m 8
 hg -q up 7
-echo 9 > foo
+HGMERGE=true hg -q merge 8
 hg -q ci -d "1000000 0" -m 9
-hg push -r 8 ../f; echo $?
+hg -q up 8
+echo 10 > foo
+hg -q ci -d "1000000 0" -m 10
 hg push -r 9 ../f; echo $?
+hg push -r 10 ../f; echo $?
 
 echo % cheating the counting algorithm
-hg -q up 8
+hg -q up 9
 HGMERGE=true hg -q merge 2
-hg -q ci -d "1000000 0" -m 10
+hg -q ci -d "1000000 0" -m 11
 hg -q up 1
-echo 11 > foo
-hg -q ci -d "1000000 0" -m 11
-hg push -r 10 -r 11 ../f; echo $?
+echo 12 > foo
+hg -q ci -d "1000000 0" -m 12
+hg push -r 11 -r 12 ../f; echo $?
 
 echo % checking prepush logic does not allow silently pushing multiple new heads
 cd ..
--- a/tests/test-push-warn.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-push-warn.out	Sat Feb 13 23:50:38 2010 -0600
@@ -2,8 +2,8 @@
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 pushing to ../a
 searching for changes
-abort: push creates new remote heads!
-(did you forget to merge? use push -f to force)
+abort: push creates new remote heads on branch 'default'!
+(you should pull and merge or use push -f to force)
 pulling from ../a
 searching for changes
 adding changesets
@@ -13,7 +13,7 @@
 (run 'hg heads' to see heads, 'hg merge' to merge)
 pushing to ../a
 searching for changes
-abort: push creates new remote heads!
+abort: push creates new remote heads on branch 'default'!
 (did you forget to merge? use push -f to force)
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
@@ -35,7 +35,7 @@
 (branch merge, don't forget to commit)
 pushing to ../c
 searching for changes
-abort: push creates new remote heads!
+abort: push creates new remote heads on branch 'default'!
 (did you forget to merge? use push -f to force)
 1
 pushing to ../c
@@ -44,12 +44,12 @@
 0
 pushing to ../c
 searching for changes
-abort: push creates new remote heads!
-(did you forget to merge? use push -f to force)
+abort: push creates new remote heads on branch 'default'!
+(you should pull and merge or use push -f to force)
 1
 pushing to ../c
 searching for changes
-abort: push creates new remote heads!
+abort: push creates new remote heads on branch 'default'!
 (did you forget to merge? use push -f to force)
 1
 pushing to ../c
@@ -84,14 +84,30 @@
 % push on existing branch and new branch
 pushing to ../f
 searching for changes
-abort: push creates new remote branch 'c'!
-(did you forget to merge? use push -f to force)
+abort: push creates new remote branches: c!
+(use 'hg push -f' to force)
+1
+pushing to ../f
+searching for changes
+abort: push creates new remote branches: c!
+(use 'hg push -f' to force)
+1
+% multiple new branches
+pushing to ../f
+searching for changes
+abort: push creates new remote branches: c, d!
+(use 'hg push -f' to force)
+1
+pushing to ../f
+searching for changes
+abort: push creates new remote branches: d!
+(use 'hg push -f' to force)
 1
 % fail on multiple head push
 pushing to ../f
 searching for changes
-abort: push creates new remote heads!
-(did you forget to merge? use push -f to force)
+abort: push creates new remote heads on branch 'a'!
+(you should pull and merge or use push -f to force)
 1
 % push replacement head on existing branches
 pushing to ../f
@@ -137,8 +153,8 @@
 created new head
 pushing to h
 searching for changes
-abort: push creates new remote heads!
-(did you forget to merge? use push -f to force)
+abort: push creates new remote heads on branch 'default'!
+(you should pull and merge or use push -f to force)
 
 % check prepush logic with merged branches
 marked working directory as branch a
@@ -151,6 +167,6 @@
 (branch merge, don't forget to commit)
 pushing to j
 searching for changes
-abort: push creates new remote heads!
-(did you forget to merge? use push -f to force)
+abort: push creates new remote heads on branch 'a'!
+(you should pull and merge or use push -f to force)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rebase-detach	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+echo "[extensions]" >> $HGRCPATH
+echo "graphlog=" >> $HGRCPATH
+echo "rebase=" >> $HGRCPATH
+
+BASE=`pwd`
+
+addcommit () {
+    echo $1 > $1
+    hg add $1
+    hg commit -d "${2} 0" -m $1
+}
+
+commit () {
+    hg commit -d "${2} 0" -m $1
+}
+
+createrepo () {
+    cd $BASE
+    rm -rf a
+    hg init a
+    cd a
+    addcommit "A" 0
+    addcommit "B" 1
+    addcommit "C" 2
+    addcommit "D" 3
+
+    hg update -C 0
+    addcommit "E" 4
+}
+
+createrepo > /dev/null 2>&1
+hg glog  --template '{rev}: {desc}\n'
+echo '% Rebasing D onto E detaching from C'
+hg rebase --detach -s 3 -d 4 2>&1 | sed 's/\(saving bundle to \).*/\1/'
+hg glog  --template '{rev}: {desc}\n'
+echo "Expected A, D, E"
+hg manifest
+
+echo
+createrepo > /dev/null 2>&1
+hg glog  --template '{rev}: {desc}\n'
+echo '% Rebasing C onto E detaching from B'
+hg rebase --detach -s 2 -d 4 2>&1 | sed 's/\(saving bundle to \).*/\1/'
+hg glog  --template '{rev}: {desc}\n'
+echo "Expected A, C, D, E"
+hg manifest
+
+echo
+createrepo > /dev/null 2>&1
+hg glog  --template '{rev}: {desc}\n'
+echo '% Rebasing B onto E using detach (same as not using it)'
+hg rebase --detach -s 1 -d 4 2>&1 | sed 's/\(saving bundle to \).*/\1/'
+hg glog  --template '{rev}: {desc}\n'
+echo "Expected A, B, C, D, E"
+hg manifest
+
+echo
+createrepo > /dev/null 2>&1
+hg glog  --template '{rev}: {desc}\n'
+echo '% Rebasing C onto E detaching from B and collapsing'
+hg rebase --detach --collapse -s 2 -d 4 2>&1 | sed 's/\(saving bundle to \).*/\1/'
+hg glog  --template '{rev}: {desc}\n'
+echo "Expected A, C, D, E"
+hg manifest
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rebase-detach.out	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,134 @@
+@  4: E
+|
+| o  3: D
+| |
+| o  2: C
+| |
+| o  1: B
+|/
+o  0: A
+
+% Rebasing D onto E detaching from C
+saving bundle to 
+adding branch
+adding changesets
+adding manifests
+adding file changes
+added 2 changesets with 2 changes to 2 files (+1 heads)
+rebase completed
+@  4: D
+|
+o  3: E
+|
+| o  2: C
+| |
+| o  1: B
+|/
+o  0: A
+
+Expected A, D, E
+A
+D
+E
+
+@  4: E
+|
+| o  3: D
+| |
+| o  2: C
+| |
+| o  1: B
+|/
+o  0: A
+
+% Rebasing C onto E detaching from B
+saving bundle to 
+adding branch
+adding changesets
+adding manifests
+adding file changes
+added 3 changesets with 3 changes to 3 files (+1 heads)
+rebase completed
+@  4: D
+|
+o  3: C
+|
+o  2: E
+|
+| o  1: B
+|/
+o  0: A
+
+Expected A, C, D, E
+A
+C
+D
+E
+
+@  4: E
+|
+| o  3: D
+| |
+| o  2: C
+| |
+| o  1: B
+|/
+o  0: A
+
+% Rebasing B onto E using detach (same as not using it)
+saving bundle to 
+adding branch
+adding changesets
+adding manifests
+adding file changes
+added 4 changesets with 4 changes to 4 files
+rebase completed
+@  4: D
+|
+o  3: C
+|
+o  2: B
+|
+o  1: E
+|
+o  0: A
+
+Expected A, B, C, D, E
+A
+B
+C
+D
+E
+
+@  4: E
+|
+| o  3: D
+| |
+| o  2: C
+| |
+| o  1: B
+|/
+o  0: A
+
+% Rebasing C onto E detaching from B and collapsing
+saving bundle to 
+adding branch
+adding changesets
+adding manifests
+adding file changes
+added 2 changesets with 3 changes to 3 files (+1 heads)
+rebase completed
+@  3: Collapsed revision
+|  * C
+|  * D
+o  2: E
+|
+| o  1: B
+|/
+o  0: A
+
+Expected A, C, D, E
+A
+C
+D
+E
--- a/tests/test-rebase-mq	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-rebase-mq	Sat Feb 13 23:50:38 2010 -0600
@@ -5,6 +5,9 @@
 echo "rebase=" >> $HGRCPATH
 echo "mq=" >> $HGRCPATH
 
+echo "[mq]" >> $HGRCPATH
+echo "plain=true" >> $HGRCPATH
+
 filterpatch()
 {
     sed -e "s/^\(# Date\).*/\1/" \
--- a/tests/test-rebase-parameters.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-rebase-parameters.out	Sat Feb 13 23:50:38 2010 -0600
@@ -2,7 +2,7 @@
 
 % Use continue and abort
 hg rebase: cannot use both abort and continue
-hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--keep] [--keepbranches] | [-c] | [-a]
+hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--detach] [--keep] [--keepbranches] | [-c] | [-a]
 
 move changeset (and descendants) to a different branch
 
@@ -21,6 +21,7 @@
     --collapse      collapse the rebased changesets
     --keep          keep original changesets
     --keepbranches  keep original branch names
+    --detach        force detaching of source from its original branch
  -c --continue      continue an interrupted rebase
  -a --abort         abort an interrupted rebase
     --style         display using template map file
@@ -30,7 +31,7 @@
 
 % Use continue and collapse
 hg rebase: cannot use collapse with continue or abort
-hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--keep] [--keepbranches] | [-c] | [-a]
+hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--detach] [--keep] [--keepbranches] | [-c] | [-a]
 
 move changeset (and descendants) to a different branch
 
@@ -49,6 +50,7 @@
     --collapse      collapse the rebased changesets
     --keep          keep original changesets
     --keepbranches  keep original branch names
+    --detach        force detaching of source from its original branch
  -c --continue      continue an interrupted rebase
  -a --abort         abort an interrupted rebase
     --style         display using template map file
@@ -58,7 +60,7 @@
 
 % Use continue/abort and dest/source
 hg rebase: abort and continue do not allow specifying revisions
-hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--keep] [--keepbranches] | [-c] | [-a]
+hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--detach] [--keep] [--keepbranches] | [-c] | [-a]
 
 move changeset (and descendants) to a different branch
 
@@ -77,6 +79,7 @@
     --collapse      collapse the rebased changesets
     --keep          keep original changesets
     --keepbranches  keep original branch names
+    --detach        force detaching of source from its original branch
  -c --continue      continue an interrupted rebase
  -a --abort         abort an interrupted rebase
     --style         display using template map file
@@ -86,7 +89,7 @@
 
 % Use source and base
 hg rebase: cannot specify both a revision and a base
-hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--keep] [--keepbranches] | [-c] | [-a]
+hg rebase [-s REV | -b REV] [-d REV] [--collapse] [--detach] [--keep] [--keepbranches] | [-c] | [-a]
 
 move changeset (and descendants) to a different branch
 
@@ -105,6 +108,7 @@
     --collapse      collapse the rebased changesets
     --keep          keep original changesets
     --keepbranches  keep original branch names
+    --detach        force detaching of source from its original branch
  -c --continue      continue an interrupted rebase
  -a --abort         abort an interrupted rebase
     --style         display using template map file
--- a/tests/test-rename-dir-merge.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-rename-dir-merge.out	Sat Feb 13 23:50:38 2010 -0600
@@ -28,11 +28,17 @@
  a/a: other deleted -> r
  b/a: remote created -> g
  b/b: remote created -> g
+update: a/a 1/6 files (16.67%)
 removing a/a
+update: a/b 2/6 files (33.33%)
 removing a/b
+update: a/c 3/6 files (50.00%)
 moving a/c to b/c
+update: a/d 4/6 files (66.67%)
 moving a/d to b/d
+update: b/a 5/6 files (83.33%)
 getting b/a
+update: b/b 6/6 files (100.00%)
 getting b/b
 4 files updated, 0 files merged, 2 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
@@ -64,6 +70,7 @@
  overwrite None partial False
  ancestor f9b20c0d4c51 local 55119e611c80+ remote ce36d17b18fb
  None: local renamed directory to b/c -> d
+update:None 1/1 files (100.00%)
 getting a/c to b/c
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
--- a/tests/test-rename-merge1.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-rename-merge1.out	Sat Feb 13 23:50:38 2010 -0600
@@ -21,13 +21,16 @@
  b2: remote created -> g
 preserving a for resolve of b
 removing a
+update: a 1/3 files (33.33%)
 picked tool 'internal:merge' for b (binary False symlink False)
 merging a and b to b
 my b@f26ec4fc3fa3+ other b@8e765a822af2 ancestor a@af1939970a1c
  premerge successful
+update: a2 2/3 files (66.67%)
 warning: detected divergent renames of a2 to:
  c2
  b2
+update: b2 3/3 files (100.00%)
 getting b2
 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
--- a/tests/test-rename-merge2.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-rename-merge2.out	Sat Feb 13 23:50:38 2010 -0600
@@ -15,10 +15,12 @@
  a: remote copied to b -> m
 preserving a for resolve of b
 preserving rev for resolve of rev
+update: a 1/2 files (50.00%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging a and b to b
 my b@e300d1c794ec+ other b@735846fee2d7 ancestor a@924404dff337
  premerge successful
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@e300d1c794ec+ other rev@735846fee2d7 ancestor rev@924404dff337
@@ -48,11 +50,14 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
 getting a
+update: b 2/3 files (66.67%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b and a to b
 my b@ac809aeed39a+ other a@f4db7e329e71 ancestor a@924404dff337
  premerge successful
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ac809aeed39a+ other rev@f4db7e329e71 ancestor rev@924404dff337
@@ -82,10 +87,12 @@
 preserving a for resolve of b
 preserving rev for resolve of rev
 removing a
+update: a 1/2 files (50.00%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging a and b to b
 my b@e300d1c794ec+ other b@e03727d2d66b ancestor a@924404dff337
  premerge successful
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@e300d1c794ec+ other rev@e03727d2d66b ancestor rev@924404dff337
@@ -113,10 +120,12 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: b 1/2 files (50.00%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b and a to b
 my b@ecf3cb2a4219+ other a@f4db7e329e71 ancestor a@924404dff337
  premerge successful
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ecf3cb2a4219+ other rev@f4db7e329e71 ancestor rev@924404dff337
@@ -143,7 +152,9 @@
  rev: versions differ -> m
  b: remote created -> g
 preserving rev for resolve of rev
+update: b 1/2 files (50.00%)
 getting b
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@94b33a1b7f2d+ other rev@735846fee2d7 ancestor rev@924404dff337
@@ -169,6 +180,7 @@
  ancestor 924404dff337 local ac809aeed39a+ remote 97c705ade336
  rev: versions differ -> m
 preserving rev for resolve of rev
+update: rev 1/1 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ac809aeed39a+ other rev@97c705ade336 ancestor rev@924404dff337
@@ -196,8 +208,11 @@
  rev: versions differ -> m
  b: remote created -> g
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
 removing a
+update: b 2/3 files (66.67%)
 getting b
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@94b33a1b7f2d+ other rev@e03727d2d66b ancestor rev@924404dff337
@@ -222,6 +237,7 @@
  ancestor 924404dff337 local ecf3cb2a4219+ remote 97c705ade336
  rev: versions differ -> m
 preserving rev for resolve of rev
+update: rev 1/1 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ecf3cb2a4219+ other rev@97c705ade336 ancestor rev@924404dff337
@@ -243,9 +259,11 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: b 1/2 files (50.00%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@ec03c2ca8642+ other b@79cc6877a3b7 ancestor a@924404dff337
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ec03c2ca8642+ other rev@79cc6877a3b7 ancestor rev@924404dff337
@@ -275,10 +293,13 @@
  rev: versions differ -> m
  c: remote created -> g
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
 warning: detected divergent renames of a to:
  b
  c
+update: c 2/3 files (66.67%)
 getting c
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ecf3cb2a4219+ other rev@e6abcc1a30c2 ancestor rev@924404dff337
@@ -301,9 +322,11 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: b 1/2 files (50.00%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@ac809aeed39a+ other b@af30c7647fc7 ancestor b@000000000000
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ac809aeed39a+ other rev@af30c7647fc7 ancestor rev@924404dff337
@@ -327,10 +350,13 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
 removing a
+update: b 2/3 files (66.67%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@59318016310c+ other b@e03727d2d66b ancestor b@000000000000
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@59318016310c+ other rev@e03727d2d66b ancestor rev@924404dff337
@@ -353,10 +379,13 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
 getting a
+update: b 2/3 files (66.67%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@ac809aeed39a+ other b@8dbce441892a ancestor b@000000000000
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ac809aeed39a+ other rev@8dbce441892a ancestor rev@924404dff337
@@ -380,10 +409,13 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
 removing a
+update: b 2/3 files (66.67%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@59318016310c+ other b@e03727d2d66b ancestor b@000000000000
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@59318016310c+ other rev@e03727d2d66b ancestor rev@924404dff337
@@ -406,10 +438,13 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
 getting a
+update: b 2/3 files (66.67%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@ac809aeed39a+ other b@8dbce441892a ancestor b@000000000000
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ac809aeed39a+ other rev@8dbce441892a ancestor rev@924404dff337
@@ -432,9 +467,11 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: b 1/2 files (50.00%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@0b76e65c8289+ other b@735846fee2d7 ancestor b@000000000000
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@0b76e65c8289+ other rev@735846fee2d7 ancestor rev@924404dff337
@@ -460,10 +497,13 @@
  a: prompt recreating -> g
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
 getting a
+update: b 2/3 files (66.67%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@ecf3cb2a4219+ other b@8dbce441892a ancestor b@000000000000
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ecf3cb2a4219+ other rev@8dbce441892a ancestor rev@924404dff337
@@ -489,9 +529,12 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: a 1/3 files (33.33%)
+update: b 2/3 files (66.67%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b
 my b@0b76e65c8289+ other b@e03727d2d66b ancestor b@000000000000
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@0b76e65c8289+ other rev@e03727d2d66b ancestor rev@924404dff337
@@ -520,9 +563,11 @@
 preserving a for resolve of b
 preserving rev for resolve of rev
 removing a
+update: a 1/2 files (50.00%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging a and b to b
 my b@e300d1c794ec+ other b@79cc6877a3b7 ancestor a@924404dff337
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@e300d1c794ec+ other rev@79cc6877a3b7 ancestor rev@924404dff337
@@ -550,9 +595,11 @@
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: b 1/2 files (50.00%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b and a to b
 my b@ec03c2ca8642+ other a@f4db7e329e71 ancestor a@924404dff337
+update: rev 2/2 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ec03c2ca8642+ other rev@f4db7e329e71 ancestor rev@924404dff337
@@ -583,11 +630,14 @@
  c: remote created -> g
 preserving b for resolve of b
 preserving rev for resolve of rev
+update: b 1/3 files (33.33%)
 picked tool 'python ../merge' for b (binary False symlink False)
 merging b and a to b
 my b@ecf3cb2a4219+ other a@2b958612230f ancestor a@924404dff337
  premerge successful
+update: c 2/3 files (66.67%)
 getting c
+update: rev 3/3 files (100.00%)
 picked tool 'python ../merge' for rev (binary False symlink False)
 merging rev
 my rev@ecf3cb2a4219+ other rev@2b958612230f ancestor rev@924404dff337
--- a/tests/test-rollback	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-rollback	Sat Feb 13 23:50:38 2010 -0600
@@ -15,14 +15,34 @@
 hg status
 
 echo % Test issue 902
-hg commit -m "test"
+hg commit -m "test2"
 hg branch test
 hg rollback
 hg branch
 
+echo '% Test issue 1635 (commit message saved)'
+echo '.hg/last-message.txt:'
+cat .hg/last-message.txt ; echo
+
 echo % Test rollback of hg before issue 902 was fixed
-hg commit -m "test"
+hg commit -m "test3"
 hg branch test
 rm .hg/undo.branch
 hg rollback
 hg branch
+
+echo '% rollback by pretxncommit saves commit message (issue 1635)'
+echo a >> a
+hg --config hooks.pretxncommit=false commit -m"precious commit message" 2>&1 | sed 's,exited with status .*,exited ...,g'
+echo '.hg/last-message.txt:'
+cat .hg/last-message.txt ; echo
+
+echo '% same thing, but run $EDITOR'
+cat > $HGTMP/editor <<'__EOF__'
+#!/bin/sh
+echo "another precious commit message" > "$1"
+__EOF__
+chmod +x $HGTMP/editor
+HGEDITOR=$HGTMP/editor hg --config hooks.pretxncommit=false commit 2>&1 | sed 's,exited with status .*,exited ...,g'
+echo '.hg/last-message.txt:'
+cat .hg/last-message.txt
--- a/tests/test-rollback.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-rollback.out	Sat Feb 13 23:50:38 2010 -0600
@@ -20,8 +20,24 @@
 marked working directory as branch test
 rolling back last transaction
 default
+% Test issue 1635 (commit message saved)
+.hg/last-message.txt:
+test2
 % Test rollback of hg before issue 902 was fixed
 marked working directory as branch test
 rolling back last transaction
 Named branch could not be reset, current branch still is: test
 test
+% rollback by pretxncommit saves commit message (issue 1635)
+transaction abort!
+rollback completed
+abort: pretxncommit hook exited ...
+.hg/last-message.txt:
+precious commit message
+% same thing, but run $EDITOR
+transaction abort!
+rollback completed
+note: commit message saved in .hg/last-message.txt
+abort: pretxncommit hook exited ...
+.hg/last-message.txt:
+another precious commit message
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-share	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+echo "[extensions]"      >> $HGRCPATH
+echo "share = "          >> $HGRCPATH
+
+echo % prepare repo1
+hg init repo1
+cd repo1
+echo a > a
+hg commit -A -m'init'
+
+echo % share it
+cd ..
+hg share repo1 repo2
+
+echo % contents of repo2/.hg
+cd repo2
+[ -d .hg/store ] \
+  && echo "fail: .hg/store should not exist" \
+  || echo "pass: .hg/store does not exist"
+# Some sed versions appends newline, some don't, and some just fails
+(cat .hg/sharedpath; echo) | head -n1 | sed "s:$HGTMP:*HGTMP*:"
+
+echo % commit in shared clone
+echo a >> a
+hg commit -m'change in shared clone'
+
+echo % check original
+cd ../repo1
+hg log
+hg update
+cat a             # should be two lines of "a"
+
+echo % commit in original
+echo b > b
+hg commit -A -m'another file'
+
+echo % check in shared clone
+cd ../repo2
+hg log
+hg update
+cat b             # should exist with one "b"
+
+echo % hg serve shared clone
+hg serve -n test -p $HGPORT -d --pid-file=hg.pid
+cat hg.pid >> $DAEMON_PIDS
+
+"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-share.out	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,53 @@
+% prepare repo1
+adding a
+% share it
+updating working directory
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+% contents of repo2/.hg
+pass: .hg/store does not exist
+*HGTMP*/test-share/repo1/.hg
+% commit in shared clone
+% check original
+changeset:   1:8af4dc49db9e
+tag:         tip
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     change in shared clone
+
+changeset:   0:d3873e73d99e
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     init
+
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+a
+a
+% commit in original
+adding b
+% check in shared clone
+changeset:   2:c2e0ac586386
+tag:         tip
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     another file
+
+changeset:   1:8af4dc49db9e
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     change in shared clone
+
+changeset:   0:d3873e73d99e
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     init
+
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+b
+% hg serve shared clone
+200 Script output follows
+
+
+-rw-r--r-- 4 a
+-rw-r--r-- 2 b
+
+
--- a/tests/test-simplemerge.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-simplemerge.py	Sat Feb 13 23:50:38 2010 -0600
@@ -89,7 +89,8 @@
 
 """)
 
-MERGED_RESULT = split_lines("""     The Way that can be told of is not the eternal Way;
+MERGED_RESULT = split_lines("""\
+     The Way that can be told of is not the eternal Way;
      The name that can be named is not the eternal name.
      The Nameless is the origin of Heaven and Earth;
      The Named is the mother of all things.
@@ -125,7 +126,7 @@
                           [(0, 2,
                             0, 2,
                             0, 2),
-                           (2,2, 2,2, 2,2)])
+                           (2, 2,  2, 2,  2, 2)])
 
         self.assertEquals(list(m3.merge_regions()),
                           [('unchanged', 0, 2)])
@@ -141,8 +142,8 @@
         # todo: should use a sentinal at end as from get_matching_blocks
         # to match without zz
         self.assertEquals(list(m3.find_sync_regions()),
-                          [(0,1, 2,3, 0,1),
-                           (1,1, 3,3, 1,1),])
+                          [(0, 1,  2, 3,  0, 1),
+                           (1, 1,  3, 3,  1, 1)])
 
         self.assertEquals(list(m3.merge_regions()),
                           [('a', 0, 2),
@@ -159,7 +160,7 @@
         # todo: should use a sentinal at end as from get_matching_blocks
         # to match without zz
         self.assertEquals(list(m3.find_sync_regions()),
-                          [(0,0, 2,2, 0,0)])
+                          [(0, 0,  2, 2,  0, 0)])
 
         self.assertEquals(list(m3.merge_regions()),
                           [('a', 0, 2)])
@@ -177,14 +178,14 @@
                           [(0, 1), (1, 2)])
 
         self.assertEquals(list(m3.find_sync_regions()),
-                          [(0,1, 0,1, 0,1),
-                           (1,2, 2,3, 1,2),
-                           (2,2, 3,3, 2,2),])
+                          [(0, 1,  0, 1,  0, 1),
+                           (1, 2,  2, 3,  1, 2),
+                           (2, 2,  3, 3,  2, 2)])
 
         self.assertEquals(list(m3.merge_regions()),
                           [('unchanged', 0, 1),
                            ('a', 1, 2),
-                           ('unchanged', 1, 2),])
+                           ('unchanged', 1, 2)])
 
     def test_append_a(self):
         m3 = Merge3(['aaa\n', 'bbb\n'],
@@ -253,14 +254,14 @@
                           [(0, 1), (1, 2)])
 
         self.assertEquals(list(m3.find_sync_regions()),
-                          [(0,1, 0,1, 0,1),
-                           (1,2, 2,3, 2,3),
-                           (2,2, 3,3, 3,3),])
+                          [(0, 1,  0, 1,  0, 1),
+                           (1, 2,  2, 3,  2, 3),
+                           (2, 2,  3, 3,  3, 3)])
 
         self.assertEquals(list(m3.merge_regions()),
-                          [('unchanged', 0,1),
-                           ('conflict', 1,1, 1,2, 1,2),
-                           ('unchanged', 1,2)])
+                          [('unchanged', 0, 1),
+                           ('conflict', 1, 1,  1, 2,  1, 2),
+                           ('unchanged', 1, 2)])
 
         self.assertEquals(list(m3.merge_groups()),
                           [('unchanged', ['aaa\n']),
@@ -293,9 +294,9 @@
                           [(0, 1), (2, 3)])
 
         self.assertEquals(list(m3.find_sync_regions()),
-                          [(0,1, 0,1, 0,1),
-                           (2,3, 2,3, 2,3),
-                           (3,3, 3,3, 3,3),])
+                          [(0, 1,  0, 1,  0, 1),
+                           (2, 3,  2, 3,  2, 3),
+                           (3, 3,  3, 3,  3, 3)])
 
     def test_replace_multi(self):
         """Replacement with regions of different size."""
@@ -308,9 +309,9 @@
 
 
         self.assertEquals(list(m3.find_sync_regions()),
-                          [(0,1, 0,1, 0,1),
-                           (3,4, 4,5, 5,6),
-                           (4,4, 5,5, 6,6),])
+                          [(0, 1,  0, 1,  0, 1),
+                           (3, 4,  4, 5,  5, 6),
+                           (4, 4,  5, 5,  6, 6)])
 
     def test_merge_poem(self):
         """Test case from diff3 manual"""
--- a/tests/test-static-http	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-static-http	Sat Feb 13 23:50:38 2010 -0600
@@ -34,7 +34,7 @@
 
 cd ..
 
-hg clone static-http://localhost:$HGPORT/remote local | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone static-http://localhost:$HGPORT/remote local | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 cd local
 hg verify
@@ -47,13 +47,13 @@
 cd ../local
 echo '[hooks]' >> .hg/hgrc
 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
-hg pull | sed -e 's,:[0-9][0-9]*/,/,'
+hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 echo '% trying to push'
 hg update
 echo more foo >> bar
 hg commit -m"test" -d "100000000 0"
-hg push | sed -e 's,:[0-9][0-9]*/,/,'
+hg push | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 echo '% test with "/" URI (issue 747)'
 cd ..
@@ -62,26 +62,26 @@
 hg add a
 hg ci -ma
 
-hg clone static-http://localhost:$HGPORT/ local2 | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone static-http://localhost:$HGPORT/ local2 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 cd local2
 hg verify
 cat a
-hg paths | sed -e 's,:[0-9][0-9]*/,/,'
+hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 echo '% test with empty repo (issue965)'
 cd ..
 hg init remotempty
 
-hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 cd local3
 hg verify
-hg paths | sed -e 's,:[0-9][0-9]*/,/,'
+hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 echo '% test with non-repo'
 cd ..
 mkdir notarepo
-hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e 's,:[0-9][0-9]*/,/,'
+hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/,"
 
 kill $!
--- a/tests/test-static-http.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-static-http.out	Sat Feb 13 23:50:38 2010 -0600
@@ -21,8 +21,8 @@
 1 files, 1 changesets, 1 total revisions
 foo
 adding quux
-changegroup hook: HG_NODE=34401e0e9971e9720b613d9089ffa9a6eefb3d2d HG_SOURCE=pull HG_URL=http://localhost/remote 
-pulling from static-http://localhost/remote
+changegroup hook: HG_NODE=34401e0e9971e9720b613d9089ffa9a6eefb3d2d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote 
+pulling from static-http://localhost:$HGPORT/remote
 searching for changes
 adding changesets
 adding manifests
@@ -32,7 +32,7 @@
 % trying to push
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 abort: cannot lock static-http repository
-pushing to static-http://localhost/remote
+pushing to static-http://localhost:$HGPORT/remote
 % test with "/" URI (issue 747)
 requesting all changes
 adding changesets
@@ -47,7 +47,7 @@
 checking files
 1 files, 1 changesets, 1 total revisions
 a
-default = static-http://localhost/
+default = static-http://localhost:$HGPORT/
 % test with empty repo (issue965)
 no changes found
 updating to branch default
@@ -57,6 +57,6 @@
 crosschecking files in changesets and manifests
 checking files
 0 files, 0 changesets, 0 total revisions
-default = static-http://localhost/remotempty
+default = static-http://localhost:$HGPORT/remotempty
 % test with non-repo
-abort: 'http://localhost/notarepo' does not appear to be an hg repository!
+abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
--- a/tests/test-status	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-status	Sat Feb 13 23:50:38 2010 -0600
@@ -91,4 +91,27 @@
 assert "-q" "-u"         1
 assert "-m" "-a"         1
 assert "-r" "-d"         1
+cd ..
 
+hg init repo4
+cd repo4
+touch modified removed deleted
+hg ci -q -A -m 'initial checkin' -d "1000000 0"
+touch added unknown
+hg add added
+hg remove removed
+rm deleted
+echo x > modified
+hg copy modified copied
+hg ci -m 'test checkin' -d "1000001 0"
+rm *
+touch unrelated
+hg ci -q -A -m 'unrelated checkin' -d "1000002 0"
+echo "hg status --change 1:"
+hg status --change 1
+echo "hg status --change 1 unrelated:"
+hg status --change 1 unrelated
+echo "hg status -C --change 1 added modified copied removed deleted:"
+hg status -C --change 1 added modified copied removed deleted
+echo "hg status -A --change 1"
+hg status -A --change 1
--- a/tests/test-status-color	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-status-color	Sat Feb 13 23:50:38 2010 -0600
@@ -98,3 +98,23 @@
 assert "-m" "-a"         1
 assert "-r" "-d"         1
 
+cd ..
+
+# test 'resolve -l'
+hg init repo4
+cd repo4
+echo "file a" > a
+echo "file b" > b
+hg add a b
+hg commit -m "initial"
+echo "file a change 1" > a
+echo "file b change 1" > b
+hg commit -m "head 1"
+hg update 0
+echo "file a change 2" > a
+echo "file b change 2" > b
+hg commit -m "head 2"
+hg merge
+hg resolve -m b
+echo "hg resolve with one unresolved, one resolved:"
+hg resolve --color=always -l
--- a/tests/test-status-color.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-status-color.out	Sat Feb 13 23:50:38 2010 -0600
@@ -132,3 +132,16 @@
 R removed
 ! deleted
 ? unknown
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+created new head
+merging a
+warning: conflicts during merge.
+merging a failed!
+merging b
+warning: conflicts during merge.
+merging b failed!
+0 files updated, 0 files merged, 0 files removed, 2 files unresolved
+use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
+hg resolve with one unresolved, one resolved:
+U a
+R b
--- a/tests/test-status.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-status.out	Sat Feb 13 23:50:38 2010 -0600
@@ -124,3 +124,22 @@
 adding deleted
 adding modified
 adding removed
+hg status --change 1:
+M modified
+A added
+A copied
+R removed
+hg status --change 1 unrelated:
+hg status -C --change 1 added modified copied removed deleted:
+M modified
+A added
+A copied
+  modified
+R removed
+hg status -A --change 1
+M modified
+A added
+A copied
+  modified
+R removed
+C deleted
--- a/tests/test-subrepo	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-subrepo	Sat Feb 13 23:50:38 2010 -0600
@@ -105,6 +105,10 @@
 hg up # should pull t
 cat t/t
 
+echo % bogus subrepo path aborts
+echo 'bogus=[boguspath' >> .hgsub
+hg ci -m 'bogus subrepo path'
+
 echo % issue 1986
 cd ..
 rm -rf sub
@@ -156,5 +160,27 @@
 
 hg up 5
 hg merge 4    # try to merge default into br again
+cd ..
+
+echo % test repository cloning
+mkdir mercurial mercurial2
+hg init nested_absolute
+echo test > nested_absolute/foo
+hg -R nested_absolute add
+hg -R nested_absolute ci -mtest
+cd mercurial
+hg init nested_relative
+echo test2 > nested_relative/foo2
+hg -R nested_relative add
+hg -R nested_relative ci -mtest2
+hg init main
+echo nested_relative = ../nested_relative > main/.hgsub
+echo nested_absolute = `pwd`/nested_absolute >> main/.hgsub
+hg -R main add
+hg -R main ci -m "add subrepos"
+cd ..
+hg clone mercurial/main mercurial2/main
+cat mercurial2/main/nested_absolute/.hg/hgrc mercurial2/main/nested_relative/.hg/hgrc | sed "s:${PWD}:/tmp:"
+rm -rf mercurial mercurial2
 
 exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-subrepo-svn	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+"$TESTDIR/hghave" svn || exit 80
+
+fix_path()
+{
+    tr '\\' /
+}
+
+escapedwd=`pwd | fix_path`
+# SVN wants all paths to start with a slash. Unfortunately,
+# Windows ones don't. Handle that.
+expr $escapedwd : "\/" > /dev/null
+if [ $? -ne 0 ]; then
+    escapedwd='/'$escapedwd
+fi
+filterpath="sed s|$escapedwd|/root|"
+filtersvn='s/ in transaction.*/ is out of date/;s/Out of date: /File /'
+
+echo % create subversion repo
+
+SVNREPO="file://$escapedwd/svn-repo"
+WCROOT="`pwd`/svn-wc"
+svnadmin create svn-repo
+svn co $SVNREPO svn-wc
+cd svn-wc
+mkdir src
+echo alpha > src/alpha
+svn add src
+mkdir externals
+echo other > externals/other
+svn add externals
+svn ci -m 'Add alpha'
+svn up
+cat > extdef <<EOF
+externals -r1 $SVNREPO/externals
+EOF
+svn propset -F extdef svn:externals src
+svn ci -m 'Setting externals'
+cd ..
+
+echo % create hg repo
+mkdir sub
+cd sub
+hg init t
+cd t
+
+echo % first revision, no sub
+echo a > a
+hg ci -Am0
+
+echo % add first svn sub
+echo "s = [svn]$SVNREPO/src" >> .hgsub
+svn co --quiet $SVNREPO/src s
+hg add .hgsub
+hg ci -m1
+echo % debugsub
+hg debugsub | $filterpath
+
+echo
+echo % change file in svn and hg, commit
+echo a >> a
+echo alpha >> s/alpha
+hg commit -m 'Message!'
+hg debugsub | $filterpath
+
+echo
+echo a > s/a
+echo % should be empty despite change to s/a
+hg st
+
+echo
+echo % add a commit from svn
+cd "$WCROOT"/src
+svn up
+echo xyz >> alpha
+svn propset svn:mime-type 'text/xml' alpha
+svn ci -m 'amend a from svn'
+cd ../../sub/t
+
+echo % this commit from hg will fail
+echo zzz >> s/alpha
+hg ci -m 'amend alpha from hg' 2>&1 | sed "$filtersvn"
+svn revert -q s/alpha
+
+echo % this commit fails because of meta changes
+svn propset svn:mime-type 'text/html' s/alpha
+hg ci -m 'amend alpha from hg' 2>&1 | sed "$filtersvn"
+svn revert -q s/alpha
+
+echo % this commit fails because of externals changes
+echo zzz > s/externals/other
+hg ci -m 'amend externals from hg'
+svn revert -q s/externals/other
+
+echo % this commit fails because of externals meta changes
+svn propset svn:mime-type 'text/html' s/externals/other
+hg ci -m 'amend externals from hg'
+svn revert -q s/externals/other
+
+echo
+echo % clone
+cd ..
+hg clone t tc | fix_path
+cd tc
+echo % debugsub in clone
+hg debugsub | $filterpath
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-subrepo-svn.out	Sat Feb 13 23:50:38 2010 -0600
@@ -0,0 +1,87 @@
+% create subversion repo
+Checked out revision 0.
+A         src
+A         src/alpha
+A         externals
+A         externals/other
+Adding         externals
+Adding         externals/other
+Adding         src
+Adding         src/alpha
+Transmitting file data ..
+Committed revision 1.
+At revision 1.
+property 'svn:externals' set on 'src'
+Sending        src
+
+Committed revision 2.
+% create hg repo
+% first revision, no sub
+adding a
+% add first svn sub
+committing subrepository s
+% debugsub
+path s
+ source   file:///root/svn-repo/src
+ revision 2
+
+% change file in svn and hg, commit
+committing subrepository s
+Sending        s/alpha
+Transmitting file data .
+Committed revision 3.
+
+Fetching external item into 's/externals'
+External at revision 1.
+
+At revision 3.
+path s
+ source   file:///root/svn-repo/src
+ revision 3
+
+% should be empty despite change to s/a
+
+% add a commit from svn
+U    alpha
+
+Fetching external item into 'externals'
+A    externals/other
+Updated external to revision 1.
+
+Updated to revision 3.
+property 'svn:mime-type' set on 'alpha'
+Sending        src/alpha
+Transmitting file data .
+Committed revision 4.
+% this commit from hg will fail
+committing subrepository s
+abort: svn: Commit failed (details follow):
+svn: File '/src/alpha' is out of date
+% this commit fails because of meta changes
+property 'svn:mime-type' set on 's/alpha'
+committing subrepository s
+abort: svn: Commit failed (details follow):
+svn: File '/src/alpha' is out of date
+% this commit fails because of externals changes
+committing subrepository s
+abort: cannot commit svn externals
+% this commit fails because of externals meta changes
+property 'svn:mime-type' set on 's/externals/other'
+committing subrepository s
+abort: cannot commit svn externals
+
+% clone
+updating to branch default
+A    s/alpha
+ U   s
+
+Fetching external item into 's/externals'
+A    s/externals/other
+Checked out external at revision 1.
+
+Checked out revision 3.
+3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+% debugsub in clone
+path s
+ source   file:///root/svn-repo/src
+ revision 3
--- a/tests/test-subrepo.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-subrepo.out	Sat Feb 13 23:50:38 2010 -0600
@@ -56,13 +56,15 @@
  overwrite None partial False
  ancestor 1f14a2e2d3ec local f0d2028bf86d+ remote 1831e14459c4
  .hgsubstate: versions differ -> m
+update: .hgsubstate 1/1 files (100.00%)
 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
-  subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad
+  subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
 getting subrepo t
 resolving manifests
  overwrite True partial False
  ancestor 60ca1237c194+ local 60ca1237c194+ remote 6747d179aa9a
  t: remote is newer -> g
+update: t 1/1 files (100.00%)
 getting t
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
@@ -78,8 +80,9 @@
  overwrite None partial False
  ancestor 1831e14459c4 local e45c8b14af55+ remote f94576341bcf
  .hgsubstate: versions differ -> m
+update: .hgsubstate 1/1 files (100.00%)
 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
-  subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4
+  subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
 merging subrepo t
   searching for copies back to rev 2
 resolving manifests
@@ -87,6 +90,7 @@
  ancestor 6747d179aa9a local 20a0db6fbf6c+ remote 7af322bc1198
  t: versions differ -> m
 preserving t for resolve of t
+update: t 1/1 files (100.00%)
 picked tool 'internal:merge' for t (binary False symlink False)
 merging t
 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
@@ -151,7 +155,7 @@
 added 1 changesets with 1 changes to 1 files
 % push -f
 committing subrepository s
-abort: push creates new remote heads!
+abort: push creates new remote heads on branch 'default'!
 pushing ...sub/t
 pushing ...subrepo ss
 searching for changes
@@ -201,6 +205,8 @@
 added 1 changesets with 1 changes to 1 files
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 blah
+% bogus subrepo path aborts
+abort: missing ] in subrepo source
 % issue 1986
 adding a
 marked working directory as branch br
@@ -241,3 +247,15 @@
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 (branch merge, don't forget to commit)
+% test repository cloning
+adding nested_absolute/foo
+adding nested_relative/foo2
+adding main/.hgsub
+committing subrepository nested_relative
+committing subrepository nested_absolute
+updating to branch default
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+[paths]
+default = /tmp/mercurial/main/nested_absolute
+[paths]
+default = /tmp/mercurial/main/nested_relative
--- a/tests/test-template-engine	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-template-engine	Sat Feb 13 23:50:38 2010 -0600
@@ -11,6 +11,10 @@
     def process(self, t, map):
         tmpl = self.loader(t)
         for k, v in map.iteritems():
+            if k in ('templ', 'ctx', 'repo', 'revcache', 'cache'):
+                continue
+            if hasattr(v, '__call__'):
+                v = v(**map)
             v = templater.stringify(v)
             tmpl = tmpl.replace('{{%s}}' % k, v)
         yield tmpl
--- a/tests/test-up-local-change.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-up-local-change.out	Sat Feb 13 23:50:38 2010 -0600
@@ -24,9 +24,11 @@
  a: versions differ -> m
  b: remote created -> g
 preserving a for resolve of a
+update: a 1/2 files (50.00%)
 picked tool 'true' for a (binary False symlink False)
 merging a
 my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b
+update: b 2/2 files (100.00%)
 getting b
 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
 changeset:   1:802f095af299
@@ -41,7 +43,9 @@
  a: versions differ -> m
  b: other deleted -> r
 preserving a for resolve of a
+update: b 1/2 files (50.00%)
 removing b
+update: a 2/2 files (100.00%)
 picked tool 'true' for a (binary False symlink False)
 merging a
 my a@802f095af299+ other a@33aaa84a386b ancestor a@33aaa84a386b
@@ -68,9 +72,11 @@
  a: versions differ -> m
  b: remote created -> g
 preserving a for resolve of a
+update: a 1/2 files (50.00%)
 picked tool 'true' for a (binary False symlink False)
 merging a
 my a@33aaa84a386b+ other a@802f095af299 ancestor a@33aaa84a386b
+update: b 2/2 files (100.00%)
 getting b
 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
 changeset:   1:802f095af299
@@ -123,9 +129,11 @@
  b: versions differ -> m
 preserving a for resolve of a
 preserving b for resolve of b
+update: a 1/2 files (50.00%)
 picked tool 'true' for a (binary False symlink False)
 merging a
 my a@802f095af299+ other a@030602aee63d ancestor a@33aaa84a386b
+update: b 2/2 files (100.00%)
 picked tool 'true' for b (binary False symlink False)
 merging b
 my b@802f095af299+ other b@030602aee63d ancestor b@000000000000
--- a/tests/test-update-reverse.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-update-reverse.out	Sat Feb 13 23:50:38 2010 -0600
@@ -46,8 +46,11 @@
  side2: other deleted -> r
  side1: other deleted -> r
  main: remote created -> g
+update: side1 1/3 files (33.33%)
 removing side1
+update: side2 2/3 files (66.67%)
 removing side2
+update: main 3/3 files (100.00%)
 getting main
 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
 Should only show a main
--- a/tests/test-url-rev.out	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/test-url-rev.out	Sat Feb 13 23:50:38 2010 -0600
@@ -15,6 +15,11 @@
 date:        Thu Jan 01 00:00:00 1970 +0000
 summary:     change a
 
+changeset:   0:1f0dee641bb7
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     add a
+
 % parents
 changeset:   1:cd2a86ecc814
 branch:      foo
@@ -63,6 +68,11 @@
 date:        Thu Jan 01 00:00:00 1970 +0000
 summary:     new head of branch foo
 
+changeset:   0:1f0dee641bb7
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     add a
+
 
 % rolling back
 rolling back last transaction
@@ -76,6 +86,11 @@
 date:        Thu Jan 01 00:00:00 1970 +0000
 summary:     new head of branch foo
 
+changeset:   0:1f0dee641bb7
+user:        test
+date:        Thu Jan 01 00:00:00 1970 +0000
+summary:     add a
+
 
 % pull should not have updated
 1:cd2a86ecc814
@@ -107,6 +122,7 @@
 0:1f0dee641bb7
 % heads
 1:cd2a86ecc814
+0:1f0dee641bb7
 % pull -u -r otherrev url#rev updates to rev
 % parents
 changeset:   3:4cd725637392
--- a/tests/tinyproxy.py	Thu Feb 11 23:15:42 2010 +0200
+++ b/tests/tinyproxy.py	Sat Feb 13 23:50:38 2010 -0600
@@ -25,14 +25,15 @@
         (ip, port) =  self.client_address
         if hasattr(self, 'allowed_clients') and ip not in self.allowed_clients:
             self.raw_requestline = self.rfile.readline()
-            if self.parse_request(): self.send_error(403)
+            if self.parse_request():
+                self.send_error(403)
         else:
             self.__base_handle()
 
     def _connect_to(self, netloc, soc):
         i = netloc.find(':')
         if i >= 0:
-            host_port = netloc[:i], int(netloc[i+1:])
+            host_port = netloc[:i], int(netloc[i + 1:])
         else:
             host_port = netloc, 80
         print "\t" "connect to %s:%d" % host_port
@@ -91,7 +92,8 @@
         while 1:
             count += 1
             (ins, _, exs) = select.select(iw, ow, iw, 3)
-            if exs: break
+            if exs:
+                break
             if ins:
                 for i in ins:
                     if i is soc:
@@ -104,12 +106,13 @@
                         count = 0
             else:
                 print "\t" "idle", count
-            if count == max_idling: break
+            if count == max_idling:
+                break
 
     do_HEAD = do_GET
     do_POST = do_GET
     do_PUT  = do_GET
-    do_DELETE=do_GET
+    do_DELETE = do_GET
 
 class ThreadingHTTPServer (SocketServer.ThreadingMixIn,
                            BaseHTTPServer.HTTPServer): pass