changeset 17406:fc14953e8e34

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 28 Aug 2012 17:59:08 -0500
parents 81b115385bc7 (diff) b0aad9fb87f9 (current diff)
children 31c123a2f273 e7cfe3587ea4
files
diffstat 53 files changed, 500 insertions(+), 175 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Tue Aug 28 11:15:34 2012 -0500
+++ b/contrib/check-code.py	Tue Aug 28 17:59:08 2012 -0500
@@ -91,7 +91,7 @@
 uprefix = r"^  \$ "
 utestpats = [
   [
-    (r'^(\S|  $ ).*(\S[ \t]+|^[ \t]+)\n', "trailing whitespace on non-output"),
+    (r'^(\S.*||  [$>] .*)[ \t]\n', "trailing whitespace on non-output"),
     (uprefix + r'.*\|\s*sed[^|>\n]*\n',
      "use regex test output patterns instead of sed"),
     (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),
--- a/contrib/zsh_completion	Tue Aug 28 11:15:34 2012 -0500
+++ b/contrib/zsh_completion	Tue Aug 28 17:59:08 2012 -0500
@@ -361,6 +361,19 @@
     'urls:URL:_hg_urls'
 }
 
+_hg_add_help_topics=(
+    config dates diffs environment extensions filesets glossary hgignore hgweb
+    merge-tools multirevs obsolescence patterns phases revisions revsets
+    subrepos templating urls
+)
+
+_hg_help_topics() {
+    local topics
+    (( $#_hg_cmd_list )) || _hg_get_commands
+    topics=($_hg_cmd_list $_hg_add_help_topics)
+    _describe -t help_topics 'help topics' topics
+}
+
 # Common options
 _hg_global_opts=(
     '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/'
@@ -385,18 +398,49 @@
   '*'{-I+,--include}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/'
   '*'{-X+,--exclude}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/')
 
+_hg_clone_opts=(
+  $_hg_remote_opts
+  '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]'
+  '--pull[use pull protocol to copy metadata]'
+  '--uncompressed[use uncompressed transfer (fast over LAN)]')
+
+_hg_date_user_opts=(
+  '(--currentdate -D)'{-D,--currentdate}'[record the current date as commit date]'
+  '(--currentuser -U)'{-U,--currentuser}'[record the current user as committer]'
+  '(--date -d)'{-d+,--date}'[record the specified date as commit date]:date:'
+  '(--user -u)'{-u+,--user}'[record the specified user as committer]:user:')
+
+_hg_gitlike_opts=(
+  '(--git -g)'{-g,--git}'[use git extended diff format]')
+
 _hg_diff_opts=(
+  $_hg_gitlike_opts
   '(--text -a)'{-a,--text}'[treat all files as text]'
-  '(--git -g)'{-g,--git}'[use git extended diff format]'
-  "--nodates[omit dates from diff headers]")
+  '--nodates[omit dates from diff headers]')
+
+_hg_mergetool_opts=(
+  '(--tool -t)'{-t+,--tool}'[specify merge tool]:tool:')
 
 _hg_dryrun_opts=(
   '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
 
+_hg_ignore_space_opts=(
+  '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]'
+  '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]'
+  '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]')
+
 _hg_style_opts=(
   '--style[display using template map file]:'
   '--template[display with template]:')
 
+_hg_log_opts=(
+  $_hg_global_opts $_hg_style_opts $_hg_gitlike_opts
+  '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:'
+  '(--no-merges -M)'{-M,--no-merges}'[do not show merges]'
+  '(--patch -p)'{-p,--patch}'[show patch]'
+  '--stat[output diffstat-style summary of changes]'
+)
+
 _hg_commit_opts=(
   '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]'
   '(-e --edit -l --logfile --message -m)'{-m+,--message}'[use <text> as commit message]:message:'
@@ -406,12 +450,20 @@
   '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:'
   '--remotecmd[specify hg command to run on the remote side]:')
 
+_hg_branch_bmark_opts=(
+  '(--bookmark -B)'{-B+,--bookmark}'[specify bookmark(s)]:bookmark:_hg_bookmarks'
+  '(--branch -b)'{-b+,--branch}'[specify branch(es)]:branch:_hg_branches'
+)
+
+_hg_subrepos_opts=(
+  '(--subrepos -S)'{-S,--subrepos}'[recurse into subrepositories]')
+
 _hg_cmd() {
   _call_program hg HGPLAIN=1 hg "$_hg_cmd_globals[@]" "$@" 2> /dev/null
 }
 
 _hg_cmd_add() {
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts $_hg_subrepos_opts \
   '*:unknown files:_hg_unknown'
 }
 
@@ -434,7 +486,7 @@
 }
 
 _hg_cmd_archive() {
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
   '--no-decode[do not pass files through decoders]' \
   '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \
   '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_labels' \
@@ -443,7 +495,7 @@
 }
 
 _hg_cmd_backout() {
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \
     '--merge[merge with old dirstate parent after backout]' \
     '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
     '--parent[parent to choose when backing out merge]' \
@@ -456,6 +508,7 @@
 _hg_cmd_bisect() {
   _arguments -s -w : $_hg_global_opts \
   '(-)'{-r,--reset}'[reset bisect state]' \
+  '(--extend -e)'{-e,--extend}'[extend the bisect range]' \
   '(--good -g --bad -b --skip -s --reset -r)'{-g,--good}'[mark changeset good]'::revision:_hg_labels \
   '(--good -g --bad -b --skip -s --reset -r)'{-b,--bad}'[mark changeset bad]'::revision:_hg_labels \
   '(--good -g --bad -b --skip -s --reset -r)'{-s,--skip}'[skip testing changeset]' \
@@ -466,6 +519,7 @@
 _hg_cmd_bookmarks() {
   _arguments -s -w : $_hg_global_opts \
   '(--force -f)'{-f,--force}'[force]' \
+  '(--inactive -i)'{-i,--inactive}'[mark a bookmark inactive]' \
   '(--rev -r --delete -d --rename -m)'{-r+,--rev}'[revision]:revision:_hg_labels' \
   '(--rev -r --delete -d --rename -m)'{-d,--delete}'[delete a given bookmark]' \
   '(--rev -r --delete -d --rename -m)'{-m+,--rename}'[rename a given bookmark]:bookmark:_hg_bookmarks' \
@@ -480,13 +534,17 @@
 
 _hg_cmd_branches() {
   _arguments -s -w : $_hg_global_opts \
-  '(--active -a)'{-a,--active}'[show only branches that have unmerge heads]'
+  '(--active -a)'{-a,--active}'[show only branches that have unmerge heads]' \
+  '(--closed -c)'{-c,--closed}'[show normal and closed branches]'
 }
 
 _hg_cmd_bundle() {
   _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
   '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \
   '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_labels' \
+  '(--branch -b)'{-b+,--branch}'[a specific branch to bundle]' \
+  '(--rev -r)'{-r+,--rev}'[changeset(s) to bundle]:' \
+  '--all[bundle all changesets in the repository]' \
   ':output file:_files' \
   ':destination repository:_files -/'
 }
@@ -495,26 +553,28 @@
   _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
   '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \
   '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
+  '--decode[apply any matching decode filter]' \
   '*:file:_hg_files'
 }
 
 _hg_cmd_clone() {
-  _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
-  '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' \
+  _arguments -s -w : $_hg_global_opts $_hg_clone_opts \
   '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \
-  '--uncompressed[use uncompressed transfer (fast over LAN)]' \
+  '(--updaterev -u)'{-u+,--updaterev}'[revision, tag or branch to check out]' \
+  '(--branch -b)'{-b+,--branch}'[clone only the specified branch]' \
   ':source repository:_hg_remote' \
   ':destination:_hg_clone_dest'
 }
 
 _hg_cmd_commit() {
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
   '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
   '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
   '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
   '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
   '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
   '--amend[amend the parent of the working dir]' \
+  '--close-branch[mark a branch as closed]' \
   '*:file:_hg_files'
 }
 
@@ -527,12 +587,15 @@
 
 _hg_cmd_diff() {
   typeset -A opt_args
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_diff_opts $_hg_ignore_space_opts \
+                     $_hg_pat_opts $_hg_subrepos_opts \
   '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \
   '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
-  '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \
-  '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \
-  '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \
+  '(--change -c)'{-c,--change}'[change made by revision]' \
+  '(--text -a)'{-a,--text}'[treat all files as text]' \
+  '--reverse[produce a diff that undoes the changes]' \
+  '(--unified -U)'{-U,--unified}'[number of lines of context to show]' \
+  '--stat[output diffstat-style summary of changes]' \
   '*:file:->diff_files'
 
   if [[ $state == 'diff_files' ]]
@@ -550,20 +613,21 @@
   _arguments -s -w : $_hg_global_opts $_hg_diff_opts \
   '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \
   '--switch-parent[diff against the second parent]' \
+  '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
   '*:revision:_hg_labels'
 }
 
+_hg_cmd_forget() {
+  _arguments -s -w : $_hg_global_opts \
+  '*:file:_hg_files'
+}
+
 _hg_cmd_graft() {
-  _arguments -s -w : $_hg_global_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_dryrun_opts \
+                     $_hg_date_user_opts $_hg_mergetool_opts \
   '(--continue -c)'{-c,--continue}'[resume interrupted graft]' \
   '(--edit -e)'{-e,--edit}'[invoke editor on commit messages]' \
   '--log[append graft info to log message]' \
-  '(--currentdate -D)'{-D,--currentdate}'[record the current date as commit date]' \
-  '(--currentuser -U)'{-U,--currentuser}'[record the current user as committer]' \
-  '(--date -d)'{-d,--date}'[record the specified date as commit date]' \
-  '(--user -u)'{-u,--user}'[record the specified user as committer]' \
-  '(--tool -t)'{-t,--tool}'[specify merge tool]' \
-  '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]' \
   '*:revision:_hg_labels'
 }
 
@@ -577,44 +641,55 @@
   '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \
   '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \
   '(--user -u)'{-u,--user}'[print user who committed change]' \
+  '(--date -d)'{-d,--date}'[print date of a changeset]' \
   '1:search pattern:' \
   '*:files:_hg_files'
 }
 
 _hg_cmd_heads() {
   _arguments -s -w : $_hg_global_opts $_hg_style_opts \
+  '(--topo -t)'{-t,--topo}'[show topological heads only]' \
+  '(--closed -c)'{-c,--closed}'[show normal and closed branch heads]' \
   '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_labels'
 }
 
 _hg_cmd_help() {
   _arguments -s -w : $_hg_global_opts \
-  '*:mercurial command:_hg_commands'
+  '(--extension -e)'{-e,--extension}'[show only help for extensions]' \
+  '(--command -c)'{-c,--command}'[show only help for commands]' \
+  '(--keyword -k)'{-k+,--keyword}'[show topics matching keyword]' \
+  '*:mercurial help topic:_hg_help_topics'
 }
 
 _hg_cmd_identify() {
-  _arguments -s -w : $_hg_global_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
   '(--rev -r)'{-r+,--rev}'[identify the specified rev]:revision:_hg_labels' \
   '(--num -n)'{-n+,--num}'[show local revision number]' \
   '(--id -i)'{-i+,--id}'[show global revision id]' \
   '(--branch -b)'{-b+,--branch}'[show branch]' \
+  '(--bookmark -B)'{-B+,--bookmark}'[show bookmarks]' \
   '(--tags -t)'{-t+,--tags}'[show tags]'
 }
 
 _hg_cmd_import() {
-  _arguments -s -w : $_hg_global_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_commit_opts \
   '(--strip -p)'{-p+,--strip}'[directory strip option for patch (default: 1)]:count:' \
-  '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
   '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \
   '--bypass[apply patch without touching the working directory]' \
+  '--no-commit[do not commit, just update the working directory]' \
+  '--exact[apply patch to the nodes from which it was generated]' \
+  '--import-branch[use any branch information in patch (implied by --exact)]' \
+  '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
+  '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
+  '(--similarity -s)'{-s+,--similarity}'[guess renamed files by similarity (0<=s<=100)]:' \
   '*:patch:_files'
 }
 
 _hg_cmd_incoming() {
-  _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \
-  '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \
+  _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
+                     $_hg_subrepos_opts \
   '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
-  '(--patch -p)'{-p,--patch}'[show patch]' \
-  '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_tags' \
+  '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_labels' \
   '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
   '--bundle[file to store the bundles into]:bundle file:_files' \
   ':source:_hg_remote'
@@ -634,42 +709,41 @@
 }
 
 _hg_cmd_log() {
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_style_opts \
+  _arguments -s -w : $_hg_log_opts $_hg_pat_opts \
   '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \
   '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
   '(--copies -C)'{-C,--copies}'[show copied files]' \
   '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \
-  '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \
   '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \
-  '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \
   '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
-  '(--patch -p)'{-p,--patch}'[show patch]' \
   '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_labels' \
+  '(--graph -G)'{-G+,--graph}'[show the revision DAG]' \
   '(--branch -b)'{-b+,--branch}'[show changesets within the given named branch]:branch:_hg_branches' \
+  '(--user -u)'{-u+,--user}'[revisions committed by user]:user:' \
+  '(--date -d)'{-d+,--date}'[show revisions matching date spec]:date:' \
   '*:files:_hg_files'
 }
 
 _hg_cmd_manifest() {
   _arguments -s -w : $_hg_global_opts \
   '--all[list files from all revisions]' \
+  '(--rev -r)'{-r+,--rev}'[revision to display]:revision:_hg_labels' \
   ':revision:_hg_labels'
 }
 
 _hg_cmd_merge() {
-  _arguments -s -w : $_hg_global_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_mergetool_opts \
   '(--force -f)'{-f,--force}'[force a merge with outstanding changes]' \
   '(--rev -r 1)'{-r,--rev}'[revision to merge]:revision:_hg_mergerevs' \
   '(--preview -P)'{-P,--preview}'[review revisions to merge (no merge is performed)]' \
-  '(--tool -t)'{-t,--tool}'[specify merge tool]' \
   ':revision:_hg_mergerevs'
 }
 
 _hg_cmd_outgoing() {
-  _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \
-  '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \
+  _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
+                     $_hg_subrepos_opts \
   '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
-  '(--patch -p)'{-p,--patch}'[show patch]' \
-  '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \
+  '*'{-r,--rev}'[a specific revision you would like to push]:revision:_hg_revrange' \
   '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
   ':destination:_hg_remote'
 }
@@ -696,7 +770,7 @@
 }
 
 _hg_cmd_pull() {
-  _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
   '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
   '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \
   '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:' \
@@ -704,9 +778,10 @@
 }
 
 _hg_cmd_push() {
-  _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
   '(--force -f)'{-f,--force}'[force push]' \
   '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]:revision:_hg_labels' \
+  '--new-branch[allow pushing a new branch]' \
   ':destination:_hg_remote'
 }
 
@@ -728,7 +803,9 @@
   local context state line
   typeset -A opt_args
 
-  _arguments -s -w : $_hg_global_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_mergetool_opts $_hg_pat_opts \
+  '(--all -a)'{-a,--all}'[select all unresolved files]' \
+  '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
   '(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \
   '(--mark -m --list -l --unmark -u)'{-m,--mark}'[mark files as resolved]:*:unresolved files:_hg_unresolved' \
   '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[unmark files as resolved]:*:resolved files:_hg_resolved' \
@@ -749,6 +826,7 @@
   '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
   '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_labels' \
   '(--no-backup -C)'{-C,--no-backup}'[do not save backup copies of files]' \
+  '(--date -d)'{-d+,--date}'[tipmost revision matching date]:date code:' \
   '*:file:->diff_files'
 
   if [[ $state == 'diff_files' ]]
@@ -764,6 +842,11 @@
   fi
 }
 
+_hg_cmd_rollback() {
+  _arguments -s -w : $_hg_global_opts $_hg_dryrun_opts \
+  '(--force -f)'{-f,--force}'[ignore safety measures]' \
+}
+
 _hg_cmd_serve() {
   _arguments -s -w : $_hg_global_opts \
   '(--accesslog -A)'{-A+,--accesslog}'[name of access log file]:log file:_files' \
@@ -771,10 +854,15 @@
   '(--daemon -d)'{-d,--daemon}'[run server in background]' \
   '(--port -p)'{-p+,--port}'[listen port]:listen port:' \
   '(--address -a)'{-a+,--address}'[interface address]:interface address:' \
+  '--prefix[prefix path to serve from]:directory:_files' \
   '(--name -n)'{-n+,--name}'[name to show in web pages]:repository name:' \
+  '--web-conf[name of the hgweb config file]:webconf_file:_files' \
+  '--pid-file[name of file to write process ID to]:pid_file:_files' \
+  '--cmdserver[cmdserver mode]:mode:' \
   '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \
   '--style[web template style]:style' \
   '--stdio[for remote clients]' \
+  '--certificate[certificate file]:cert_file:_files' \
   '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]'
 }
 
@@ -785,7 +873,7 @@
 }
 
 _hg_cmd_status() {
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
   '(--all -A)'{-A,--all}'[show status of all files]' \
   '(--modified -m)'{-m,--modified}'[show only modified files]' \
   '(--added -a)'{-a,--added}'[show only added files]' \
@@ -798,6 +886,7 @@
   '(--copies -C)'{-C,--copies}'[show source of copied files]' \
   '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
   '--rev[show difference from revision]:revision:_hg_labels' \
+  '--change[list the changed files of a revision]:revision:_hg_labels' \
   '*:files:_files'
 }
 
@@ -813,11 +902,14 @@
   '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
   '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
   '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_labels' \
+  '(--force -f)'{-f,--force}'[force tag]' \
+  '--remove[remove a tag]' \
+  '(--edit -e)'{-e,--edit}'[edit commit message]' \
   ':tag name:'
 }
 
 _hg_cmd_tip() {
-  _arguments -s -w : $_hg_global_opts $_hg_style_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_gitlike_opts $_hg_style_opts \
   '(--patch -p)'{-p,--patch}'[show patch]'
 }
 
@@ -831,6 +923,8 @@
   _arguments -s -w : $_hg_global_opts \
   '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \
   '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
+  '(--check -c)'{-c,--check}'[update across branches if no uncommitted changes]' \
+  '(--date -d)'{-d+,--date}'[tipmost revision matching date]' \
   ':revision:_hg_labels'
 }
 
@@ -893,7 +987,16 @@
   '(--summary -s)'{-s,--summary}'[print first line of patch header]')
 
 _hg_cmd_qapplied() {
-  _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
+  _arguments -s -w : $_hg_global_opts $_hg_qseries_opts \
+  '(--last -1)'{-1,--last}'[show only the preceding applied patch]' \
+  '*:patch:_hg_qapplied'
+}
+
+_hg_cmd_qclone() {
+  _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_clone_opts \
+  '(--patches -p)'{-p+,--patches}'[location of source patch repository]' \
+  ':source repository:_hg_remote' \
+  ':destination:_hg_clone_dest'
 }
 
 _hg_cmd_qdelete() {
@@ -904,7 +1007,8 @@
 }
 
 _hg_cmd_qdiff() {
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
+                     $_hg_ignore_space_opts \
   '*:pattern:_hg_files'
 }
 
@@ -917,12 +1021,15 @@
 _hg_cmd_qfold() {
   _arguments -s -w : $_hg_global_opts $_h_commit_opts \
   '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \
+  '(--force -f)'{-f,--force}'[overwrite any local changes]' \
+  '--no-backup[do not save backup copies of files]' \
   '*:unapplied patch:_hg_qunapplied'
 }
 
 _hg_cmd_qgoto() {
   _arguments -s -w : $_hg_global_opts \
   '(--force -f)'{-f,--force}'[overwrite any local changes]' \
+  '--keep-changes[tolerate non-conflicting local changes]' \
   ':patch:_hg_qseries'
 }
 
@@ -940,17 +1047,17 @@
 }
 
 _hg_cmd_qimport() {
-  _arguments -s -w : $_hg_global_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_gitlike_opts \
   '(--existing -e)'{-e,--existing}'[import file in patch dir]' \
   '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \
   '(--force -f)'{-f,--force}'[overwrite existing files]' \
   '*'{-r+,--rev}'[place existing revisions under mq control]:revision:_hg_revrange' \
+  '(--push -P)'{-P,--push}'[qpush after importing]' \
   '*:patch:_files'
 }
 
 _hg_cmd_qnew() {
-  _arguments -s -w : $_hg_global_opts $_hg_commit_opts \
-  '(--force -f)'{-f,--force}'[import uncommitted changes into patch]' \
+  _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \
   ':patch:'
 }
 
@@ -961,8 +1068,9 @@
 _hg_cmd_qpop() {
   _arguments -s -w : $_hg_global_opts \
   '(--all -a :)'{-a,--all}'[pop all patches]' \
-  '(--name -n)'{-n+,--name}'[queue name to pop]:' \
   '(--force -f)'{-f,--force}'[forget any local changes]' \
+  '--keep-changes[tolerate non-conflicting local changes]' \
+  '--no-backup[do not save backup copies of files]' \
   ':patch:_hg_qapplied'
 }
 
@@ -974,24 +1082,23 @@
   _arguments -s -w : $_hg_global_opts \
   '(--all -a :)'{-a,--all}'[apply all patches]' \
   '(--list -l)'{-l,--list}'[list patch name in commit text]' \
-  '(--merge -m)'{-m+,--merge}'[merge from another queue]:' \
-  '(--name -n)'{-n+,--name}'[merge queue name]:' \
   '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \
   '(--exact -e)'{-e,--exact}'[apply the target patch to its recorded parent]' \
   '--move[reorder patch series and apply only the patch]' \
+  '--keep-changes[tolerate non-conflicting local changes]' \
+  '--no-backup[do not save backup copies of files]' \
   ':patch:_hg_qunapplied'
 }
 
 _hg_cmd_qrefresh() {
-  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts \
-  '(--git -g)'{-g,--git}'[use git extended diff format]' \
+  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_gitlike_opts \
   '(--short -s)'{-s,--short}'[short refresh]' \
   '*:files:_hg_files'
 }
 
 _hg_cmd_qrename() {
   _arguments -s -w : $_hg_global_opts \
-  ':patch:_hg_qseries' \
+  ':patch:_hg_qunapplied' \
   ':destination:'
 }
 
@@ -1010,7 +1117,8 @@
 }
 
 _hg_cmd_qunapplied() {
-  _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
+  _arguments -s -w : $_hg_global_opts $_hg_qseries_opts \
+  '(--first -1)'{-1,--first}'[show only the first patch]'
 }
 
 _hg_cmd_qtop() {
@@ -1019,16 +1127,17 @@
 
 _hg_cmd_strip() {
   _arguments -s -w : $_hg_global_opts \
-  '(--force -f)'{-f,--force}'[force multi-head removal]' \
-  '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \
-  '(--nobackup -n)'{-n,--nobackup}'[no backups]' \
+  '(--force -f)'{-f,--force}'[force removal, discard uncommitted changes, no backup]' \
+  '(--no-backup -n)'{-n,--no-backup}'[no backups]' \
+  '(--keep -k)'{-k,--keep}'[do not modify working copy during strip]' \
+  '(--bookmark -B)'{-B+,--bookmark}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \
+  '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
   ':revision:_hg_labels'
 }
 
 # Patchbomb
 _hg_cmd_email() {
-  _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
-  '(--git -g)'{-g,--git}'[use git extended diff format]' \
+  _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_gitlike_opts \
   '--plain[omit hg patch header]' \
   '--body[send patches as inline message text (default)]' \
   '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \
@@ -1058,20 +1167,61 @@
 
 # Rebase
 _hg_cmd_rebase() {
-  _arguments -s -w : $_hg_global_opts \
+  _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \
   '*'{-r,--rev}'[rebase these revisions]:revision:_hg_revrange' \
-  '(--source -s)'{-s,--source}'[rebase from the specified changeset]:revision:_hg_labels' \
-  '(--base -b)'{-b,--base}'[rebase from the base of the specified changeset]:revision:_hg_labels' \
-  '(--dest -d)'{-d,--dest}'[rebase onto the specified changeset]' \
+  '(--source -s)'{-s+,--source}'[rebase from the specified changeset]:revision:_hg_labels' \
+  '(--base -b)'{-b+,--base}'[rebase from the base of the specified changeset]:revision:_hg_labels' \
+  '(--dest -d)'{-d+,--dest}'[rebase onto the specified changeset]:revision:_hg_labels' \
   '--collapse[collapse the rebased changeset]' \
-  '(--message -m)'{-m+,--message}'[use <text> as collapse commit message]:text:' \
-  '(--edit -e)'{-e,--edit}'[invoke editor on commit messages]' \
-  '(--logfile -l)'{-l+,--logfile}'[read collapse commit message from <file>]:log file:_files -g \*.txt' \
   '--keep[keep original changeset]' \
   '--keepbranches[keep original branch name]' \
-  '(--tool -t)'{-t,--tool}'[specify merge tool]' \
   '(--continue -c)'{-c,--continue}'[continue an interrupted rebase]' \
   '(--abort -a)'{-a,--abort}'[abort an interrupted rebase]' \
 }
 
+# Record
+_hg_cmd_record() {
+  _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_pat_opts \
+                     $_hg_ignore_space_opts $_hg_subrepos_opts \
+  '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
+  '--close-branch[mark a branch as closed, hiding it from the branch list]' \
+  '--amend[amend the parent of the working dir]' \
+  '(--date -d)'{-d+,--date}'[record the specified date as commit date]:date:' \
+  '(--user -u)'{-u+,--user}'[record the specified user as committer]:user:'
+}
+
+_hg_cmd_qrecord() {
+  _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \
+                     $_hg_pat_opts $_hg_ignore_space_opts $_hg_subrepos_opts
+}
+
+# Convert
+_hg_cmd_convert() {
+_arguments -s -w : $_hg_global_opts \
+  '(--source-type -s)'{-s,--source-type}'[source repository type]' \
+  '(--dest-type -d)'{-d,--dest-type}'[destination repository type]' \
+  '(--rev -r)'{-r+,--rev}'[import up to target revision]:revision:' \
+  '(--authormap -A)'{-A+,--authormap}'[remap usernames using this file]:file:_files' \
+  '--filemap[remap file names using contents of file]:file:_files' \
+  '--splicemap[splice synthesized history into place]:file:_files' \
+  '--branchmap[change branch names while converting]:file:_files' \
+  '--branchsort[try to sort changesets by branches]' \
+  '--datesort[try to sort changesets by date]' \
+  '--sourcesort[preserve source changesets order]'
+}
+
+# Graphlog
+_hg_cmd_glog() {
+  _hg_cmd_log $@
+}
+
+# Purge
+_hg_cmd_purge() {
+  _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
+  '(--abort-on-err -a)'{-a,--abort-on-err}'[abort if an error occurs]' \
+  '--all[purge ignored files too]' \
+  '(--print -p)'{-p,--print}'[print filenames instead of deleting them]' \
+  '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs (implies -p/--print)]'
+}
+
 _hg "$@"
--- a/i18n/ru.po	Tue Aug 28 11:15:34 2012 -0500
+++ b/i18n/ru.po	Tue Aug 28 17:59:08 2012 -0500
@@ -173,7 +173,7 @@
 msgstr ""
 "Project-Id-Version: Mercurial\n"
 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
-"POT-Creation-Date: 2012-08-09 13:23+0400\n"
+"POT-Creation-Date: 2012-08-13 16:01+0400\n"
 "PO-Revision-Date: 2011-05-12 23:48+0400\n"
 "Last-Translator: Alexander Sauta <demosito@gmail.com>\n"
 "Language-Team: Russian\n"
@@ -14542,11 +14542,11 @@
 "    bookmarks`)."
 
 msgid ""
-"    Update sets the working directory's parent revison to the specified\n"
+"    Update sets the working directory's parent revision to the specified\n"
 "    changeset (see :hg:`help parents`)."
 msgstr ""
-"    Update устанавливает ревизию родителя рабочего каталога в заданный\n"
-"    набор изменений (см. :hg:`help update`)."
+"    Update делает заданный набор изменений родительской ревизией рабочего\n"
+"    каталога (см. :hg:`help parents`)."
 
 msgid ""
 "    If the changeset is not a descendant or ancestor of the working\n"
--- a/mercurial/commands.py	Tue Aug 28 11:15:34 2012 -0500
+++ b/mercurial/commands.py	Tue Aug 28 17:59:08 2012 -0500
@@ -4181,7 +4181,7 @@
                     res.append(fn[plen:-slen])
         finally:
             lock.release()
-        for f in sorted(res):
+        for f in res:
             ui.write("%s\n" % f)
         return
 
--- a/mercurial/context.py	Tue Aug 28 11:15:34 2012 -0500
+++ b/mercurial/context.py	Tue Aug 28 17:59:08 2012 -0500
@@ -885,8 +885,7 @@
         p = self._repo.dirstate.parents()
         if p[1] == nullid:
             p = p[:-1]
-        self._parents = [changectx(self._repo, x) for x in p]
-        return self._parents
+        return [changectx(self._repo, x) for x in p]
 
     def status(self, ignored=False, clean=False, unknown=False):
         """Explicit status query
--- a/mercurial/parsers.c	Tue Aug 28 11:15:34 2012 -0500
+++ b/mercurial/parsers.c	Tue Aug 28 17:59:08 2012 -0500
@@ -9,6 +9,7 @@
 
 #include <Python.h>
 #include <ctype.h>
+#include <stddef.h>
 #include <string.h>
 
 #include "util.h"
@@ -72,7 +73,7 @@
 	for (start = cur = str, zero = NULL; cur < str + len; cur++) {
 		PyObject *file = NULL, *node = NULL;
 		PyObject *flags = NULL;
-		int nlen;
+		ptrdiff_t nlen;
 
 		if (!*cur) {
 			zero = cur;
@@ -94,7 +95,7 @@
 
 		nlen = cur - zero - 1;
 
-		node = unhexlify(zero + 1, nlen > 40 ? 40 : nlen);
+		node = unhexlify(zero + 1, nlen > 40 ? 40 : (int)nlen);
 		if (!node)
 			goto bail;
 
--- a/mercurial/revset.py	Tue Aug 28 11:15:34 2012 -0500
+++ b/mercurial/revset.py	Tue Aug 28 17:59:08 2012 -0500
@@ -838,6 +838,14 @@
     ps = set(parents(repo, subset, x))
     return [r for r in s if r not in ps]
 
+def hidden(repo, subset, x):
+    """``hidden()``
+    Hidden changesets.
+    """
+    # i18n: "hidden" is a keyword
+    getargs(x, 0, 0, _("hidden takes no arguments"))
+    return [r for r in subset if r in repo.hiddenrevs]
+
 def keyword(repo, subset, x):
     """``keyword(string)``
     Search commit message, user name, and names of changed files for
@@ -1484,6 +1492,7 @@
     "grep": grep,
     "head": head,
     "heads": heads,
+    "hidden": hidden,
     "id": node_,
     "keyword": keyword,
     "last": last,
--- a/mercurial/templatekw.py	Tue Aug 28 11:15:34 2012 -0500
+++ b/mercurial/templatekw.py	Tue Aug 28 17:59:08 2012 -0500
@@ -275,6 +275,28 @@
     """
     return ctx.hex()
 
+def showp1rev(repo, ctx, templ, **args):
+    """:p1rev: Integer. The repository-local revision number of the changeset's
+    first parent, or -1 if the changeset has no parents."""
+    return ctx.p1().rev()
+
+def showp2rev(repo, ctx, templ, **args):
+    """:p2rev: Integer. The repository-local revision number of the changeset's
+    second parent, or -1 if the changeset has no second parent."""
+    return ctx.p2().rev()
+
+def showp1node(repo, ctx, templ, **args):
+    """:p1node: String. The identification hash of the changeset's first parent,
+    as a 40 digit hexadecimal string. If the changeset has no parents, all
+    digits are 0."""
+    return ctx.p1().hex()
+
+def showp2node(repo, ctx, templ, **args):
+    """:p2node: String. The identification hash of the changeset's second
+    parent, as a 40 digit hexadecimal string. If the changeset has no second
+    parent, all digits are 0."""
+    return ctx.p2().hex()
+
 def showphase(repo, ctx, templ, **args):
     """:phase: String. The changeset phase name."""
     return ctx.phasestr()
@@ -320,6 +342,10 @@
     'latesttagdistance': showlatesttagdistance,
     'manifest': showmanifest,
     'node': shownode,
+    'p1rev': showp1rev,
+    'p1node': showp1node,
+    'p2rev': showp2rev,
+    'p2node': showp2node,
     'phase': showphase,
     'phaseidx': showphaseidx,
     'rev': showrev,
--- a/mercurial/templater.py	Tue Aug 28 11:15:34 2012 -0500
+++ b/mercurial/templater.py	Tue Aug 28 17:59:08 2012 -0500
@@ -146,7 +146,15 @@
 
 def runfilter(context, mapping, data):
     func, data, filt = data
-    return filt(func(context, mapping, data))
+    try:
+        return filt(func(context, mapping, data))
+    except (ValueError, AttributeError, TypeError):
+        if isinstance(data, tuple):
+            dt = data[1]
+        else:
+            dt = data
+        raise util.Abort(_("template filter '%s' is not compatible with "
+                           "keyword '%s'") % (filt.func_name, dt))
 
 def buildmap(exp, context):
     func, data = compileexp(exp[1], context)
--- a/tests/test-annotate.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-annotate.t	Tue Aug 28 17:59:08 2012 -0500
@@ -279,10 +279,10 @@
   > EOF
   $ hg ci -Am "adda"
   adding a
-  $ cat > a <<EOF
+  $ sed 's/EOL$//g' > a <<EOF
   > a  a
   > 
-  >  
+  >  EOL
   > b  b
   > EOF
   $ hg ci -m "changea"
--- a/tests/test-basic.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-basic.t	Tue Aug 28 17:59:08 2012 -0500
@@ -33,7 +33,7 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg identify -n
   0
- 
+
 
 Poke around at hashes:
 
--- a/tests/test-bookmarks-pushpull.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-bookmarks-pushpull.t	Tue Aug 28 17:59:08 2012 -0500
@@ -210,7 +210,7 @@
   $ cat ../hg.pid >> $DAEMON_PIDS
   $ cd ../a
 
-  $ hg debugpushkey http://localhost:$HGPORT/ namespaces 
+  $ hg debugpushkey http://localhost:$HGPORT/ namespaces
   bookmarks	
   phases	
   namespaces	
@@ -260,7 +260,7 @@
      Z                         2:0d2164f0ce0d
      foo                       -1:000000000000
      foobar                    1:9b140be10808
- 
+
   $ cd ..
 
 Pushing a bookmark should only push the changes required by that
--- a/tests/test-clone.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-clone.t	Tue Aug 28 17:59:08 2012 -0500
@@ -533,7 +533,7 @@
 
 destination directory not empty
 
-  $ mkdir a 
+  $ mkdir a
   $ echo stuff > a/a
   $ hg clone q a
   abort: destination 'a' is not empty
--- a/tests/test-command-template.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-command-template.t	Tue Aug 28 17:59:08 2012 -0500
@@ -592,7 +592,8 @@
 
   $ for key in author branch branches date desc file_adds file_dels file_mods \
   >         file_copies file_copies_switch files \
-  >         manifest node parents rev tags diffstat extras; do
+  >         manifest node parents rev tags diffstat extras \
+  >         p1rev p2rev p1node p2node; do
   >     for mode in '' --verbose --debug; do
   >         hg log $mode --template "$key$mode: {$key}\n"
   >     done
@@ -1095,7 +1096,114 @@
   extras--debug: branch=default
   extras--debug: branch=default
   extras--debug: branch=default
-
+  p1rev: 7
+  p1rev: -1
+  p1rev: 5
+  p1rev: 3
+  p1rev: 3
+  p1rev: 2
+  p1rev: 1
+  p1rev: 0
+  p1rev: -1
+  p1rev--verbose: 7
+  p1rev--verbose: -1
+  p1rev--verbose: 5
+  p1rev--verbose: 3
+  p1rev--verbose: 3
+  p1rev--verbose: 2
+  p1rev--verbose: 1
+  p1rev--verbose: 0
+  p1rev--verbose: -1
+  p1rev--debug: 7
+  p1rev--debug: -1
+  p1rev--debug: 5
+  p1rev--debug: 3
+  p1rev--debug: 3
+  p1rev--debug: 2
+  p1rev--debug: 1
+  p1rev--debug: 0
+  p1rev--debug: -1
+  p2rev: -1
+  p2rev: -1
+  p2rev: 4
+  p2rev: -1
+  p2rev: -1
+  p2rev: -1
+  p2rev: -1
+  p2rev: -1
+  p2rev: -1
+  p2rev--verbose: -1
+  p2rev--verbose: -1
+  p2rev--verbose: 4
+  p2rev--verbose: -1
+  p2rev--verbose: -1
+  p2rev--verbose: -1
+  p2rev--verbose: -1
+  p2rev--verbose: -1
+  p2rev--verbose: -1
+  p2rev--debug: -1
+  p2rev--debug: -1
+  p2rev--debug: 4
+  p2rev--debug: -1
+  p2rev--debug: -1
+  p2rev--debug: -1
+  p2rev--debug: -1
+  p2rev--debug: -1
+  p2rev--debug: -1
+  p1node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
+  p1node: 0000000000000000000000000000000000000000
+  p1node: 13207e5a10d9fd28ec424934298e176197f2c67f
+  p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
+  p1node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
+  p1node: 97054abb4ab824450e9164180baf491ae0078465
+  p1node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
+  p1node: 1e4e1b8f71e05681d422154f5421e385fec3454f
+  p1node: 0000000000000000000000000000000000000000
+  p1node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
+  p1node--verbose: 0000000000000000000000000000000000000000
+  p1node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
+  p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
+  p1node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
+  p1node--verbose: 97054abb4ab824450e9164180baf491ae0078465
+  p1node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
+  p1node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
+  p1node--verbose: 0000000000000000000000000000000000000000
+  p1node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
+  p1node--debug: 0000000000000000000000000000000000000000
+  p1node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
+  p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
+  p1node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
+  p1node--debug: 97054abb4ab824450e9164180baf491ae0078465
+  p1node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
+  p1node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
+  p1node--debug: 0000000000000000000000000000000000000000
+  p2node: 0000000000000000000000000000000000000000
+  p2node: 0000000000000000000000000000000000000000
+  p2node: bbe44766e73d5f11ed2177f1838de10c53ef3e74
+  p2node: 0000000000000000000000000000000000000000
+  p2node: 0000000000000000000000000000000000000000
+  p2node: 0000000000000000000000000000000000000000
+  p2node: 0000000000000000000000000000000000000000
+  p2node: 0000000000000000000000000000000000000000
+  p2node: 0000000000000000000000000000000000000000
+  p2node--verbose: 0000000000000000000000000000000000000000
+  p2node--verbose: 0000000000000000000000000000000000000000
+  p2node--verbose: bbe44766e73d5f11ed2177f1838de10c53ef3e74
+  p2node--verbose: 0000000000000000000000000000000000000000
+  p2node--verbose: 0000000000000000000000000000000000000000
+  p2node--verbose: 0000000000000000000000000000000000000000
+  p2node--verbose: 0000000000000000000000000000000000000000
+  p2node--verbose: 0000000000000000000000000000000000000000
+  p2node--verbose: 0000000000000000000000000000000000000000
+  p2node--debug: 0000000000000000000000000000000000000000
+  p2node--debug: 0000000000000000000000000000000000000000
+  p2node--debug: bbe44766e73d5f11ed2177f1838de10c53ef3e74
+  p2node--debug: 0000000000000000000000000000000000000000
+  p2node--debug: 0000000000000000000000000000000000000000
+  p2node--debug: 0000000000000000000000000000000000000000
+  p2node--debug: 0000000000000000000000000000000000000000
+  p2node--debug: 0000000000000000000000000000000000000000
+  p2node--debug: 0000000000000000000000000000000000000000
 
 Filters work:
 
@@ -1245,7 +1353,7 @@
   $ hg add a
   $ hg commit -m future -d "`cat a`"
 
-  $ hg log -l1 --template '{date|age}\n' 
+  $ hg log -l1 --template '{date|age}\n'
   7 years from now
 
 Error on syntax:
@@ -1255,6 +1363,30 @@
   abort: t:3: unmatched quotes
   [255]
 
+Behind the scenes, this will throw TypeError
+
+  $ hg log -l 3 --template '{date|obfuscate}\n'
+  abort: template filter 'obfuscate' is not compatible with keyword 'date'
+  [255]
+
+Behind the scenes, this will throw a ValueError
+
+  $ hg log -l 3 --template 'line: {desc|shortdate}\n'
+  abort: template filter 'shortdate' is not compatible with keyword 'desc'
+  [255]
+
+Behind the scenes, this will throw AttributeError
+
+  $ hg log -l 3 --template 'line: {date|escape}\n'
+  abort: template filter 'escape' is not compatible with keyword 'date'
+  [255]
+
+Behind the scenes, this will throw ValueError
+
+  $ hg tip --template '{author|email|date}\n'
+  abort: template filter 'datefilter' is not compatible with keyword 'author'
+  [255]
+
   $ cd ..
 
 
--- a/tests/test-convert-cvsnt-mergepoints.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert-cvsnt-mergepoints.t	Tue Aug 28 17:59:08 2012 -0500
@@ -43,7 +43,7 @@
   $ cvscall -Q add foo
   $ cd foo
   $ echo foo > foo.txt
-  $ cvscall -Q add foo.txt 
+  $ cvscall -Q add foo.txt
   $ cvsci -m "add foo.txt" foo.txt
   $ cd ../..
   $ rm -rf cvsworktmp
--- a/tests/test-convert-mtn-rename-directory.out	Tue Aug 28 11:15:34 2012 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-% tedious monotone keys configuration
-% create monotone repository
-mtn: adding dir1 to workspace manifest
-mtn: adding dir1/subdir1 to workspace manifest
-mtn: adding dir1/subdir1/file1 to workspace manifest
-mtn: beginning commit on branch 'com.selenic.test'
-mtn: committed revision 5ed13ff5582d8d1e319f079b694a37d2b45edfc8
-% rename directory
-mtn: skipping dir1, already accounted for in workspace
-mtn: renaming dir1/subdir1 to dir1/subdir2 in workspace manifest
-mtn: beginning commit on branch 'com.selenic.test'
-mtn: committed revision 985204142a822b22ee86b509d61f3c5ab6857d2b
-% convert
-assuming destination repo.mtn-hg
-initializing destination repo.mtn-hg repository
-scanning source...
-sorting...
-converting...
-1 initialize
-0 rename
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-% manifest
-dir1/subdir2/file1
--- a/tests/test-convert-svn-branches.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert-svn-branches.t	Tue Aug 28 17:59:08 2012 -0500
@@ -3,7 +3,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > convert = 
+  > convert =
   > graphlog =
   > EOF
 
@@ -14,7 +14,7 @@
 
   $ cat > branchmap <<EOF
   > old3 newbranch
-  >     
+  > 
   > 
   > EOF
   $ hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg
--- a/tests/test-convert-svn-encoding.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert-svn-encoding.t	Tue Aug 28 17:59:08 2012 -0500
@@ -3,7 +3,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > convert = 
+  > convert =
   > graphlog =
   > EOF
 
--- a/tests/test-convert-svn-move.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert-svn-move.t	Tue Aug 28 17:59:08 2012 -0500
@@ -3,7 +3,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > convert = 
+  > convert =
   > graphlog =
   > EOF
 
@@ -155,7 +155,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > progress = 
+  > progress =
   > [progress]
   > assume-tty = 1
   > delay = 0
--- a/tests/test-convert-svn-sink.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert-svn-sink.t	Tue Aug 28 17:59:08 2012 -0500
@@ -16,7 +16,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > convert = 
+  > convert =
   > graphlog =
   > EOF
 
--- a/tests/test-convert-svn-source.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert-svn-source.t	Tue Aug 28 17:59:08 2012 -0500
@@ -3,7 +3,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > convert = 
+  > convert =
   > graphlog =
   > [convert]
   > svn.trunk = mytrunk
--- a/tests/test-convert-svn-startrev.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert-svn-startrev.t	Tue Aug 28 17:59:08 2012 -0500
@@ -3,7 +3,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > convert = 
+  > convert =
   > graphlog =
   > EOF
   $ convert()
--- a/tests/test-convert-svn-tags.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert-svn-tags.t	Tue Aug 28 17:59:08 2012 -0500
@@ -3,7 +3,7 @@
 
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > convert = 
+  > convert =
   > graphlog =
   > EOF
 
--- a/tests/test-convert.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-convert.t	Tue Aug 28 17:59:08 2012 -0500
@@ -399,7 +399,7 @@
 
 test revset converted() lookup
 
-  $ hg --config convert.hg.saverev=True convert a c  
+  $ hg --config convert.hg.saverev=True convert a c
   initializing destination c repository
   scanning source...
   sorting...
--- a/tests/test-diffstat.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-diffstat.t	Tue Aug 28 17:59:08 2012 -0500
@@ -68,5 +68,5 @@
   $ hg diff --stat --git
    file with spaces |  Bin 
    1 files changed, 0 insertions(+), 0 deletions(-)
-	
+
   $ cd ..
--- a/tests/test-encoding.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-encoding.t	Tue Aug 28 17:59:08 2012 -0500
@@ -252,5 +252,5 @@
 
   $ HGENCODING=latin-1 hg up `cat latin-1-tag`
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- 
+
   $ cd ..
--- a/tests/test-export.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-export.t	Tue Aug 28 17:59:08 2012 -0500
@@ -124,7 +124,7 @@
 Checking if only alphanumeric characters are used in the file name (%m option):
 
   $ echo "line" >> foo
-  $ hg commit -m " !\"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~" 
+  $ hg commit -m " !\"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~"
   $ hg export -v -o %m.patch tip
   exporting patch:
   ____________0123456789_______ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz____.patch
--- a/tests/test-glog.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-glog.t	Tue Aug 28 17:59:08 2012 -0500
@@ -83,7 +83,7 @@
 
   $ cat > printrevset.py <<EOF
   > from mercurial import extensions, revset, commands, cmdutil
-  >  
+  > 
   > def uisetup(ui):
   >     def printrevset(orig, ui, repo, *pats, **opts):
   >         if opts.get('print_revset'):
--- a/tests/test-hybridencode.py	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-hybridencode.py	Tue Aug 28 17:59:08 2012 -0500
@@ -24,4 +24,5 @@
 show('data/Project.Planning/Resources/AnotherLongDirectoryName/'
      'Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt')
 show('data/foo.../foo   / /a./_. /__/.x../    bla/.FOO/something.i')
-
+show('data/com0/com1/com2/com3/com4/com5/com6/com7/com8/com9')
+show('data/lpt0/lpt1/lpt2/lpt3/lpt4/lpt5/lpt6/lpt7/lpt8/lpt9')
--- a/tests/test-hybridencode.py.out	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-hybridencode.py.out	Tue Aug 28 17:59:08 2012 -0500
@@ -19,3 +19,9 @@
 A = 'data/foo.../foo   / /a./_. /__/.x../    bla/.FOO/something.i'
 B = 'data/foo..~2e/foo  ~20/~20/a~2e/__.~20/____/~2ex.~2e/~20   bla/~2e_f_o_o/something.i'
 
+A = 'data/com0/com1/com2/com3/com4/com5/com6/com7/com8/com9'
+B = 'data/com0/co~6d1/co~6d2/co~6d3/co~6d4/co~6d5/co~6d6/co~6d7/co~6d8/co~6d9'
+
+A = 'data/lpt0/lpt1/lpt2/lpt3/lpt4/lpt5/lpt6/lpt7/lpt8/lpt9'
+B = 'data/lpt0/lp~741/lp~742/lp~743/lp~744/lp~745/lp~746/lp~747/lp~748/lp~749'
+
--- a/tests/test-import-git.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-import-git.t	Tue Aug 28 17:59:08 2012 -0500
@@ -322,12 +322,12 @@
 
 Filenames with spaces:
 
-  $ hg import -d "1000000 0" -m spaces - <<EOF
+  $ sed 's,EOL$,,g' <<EOF | hg import -d "1000000 0" -m spaces -
   > diff --git a/foo bar b/foo bar
   > new file mode 100644
   > index 0000000..257cc56
   > --- /dev/null
-  > +++ b/foo bar	
+  > +++ b/foo bar	EOL
   > @@ -0,0 +1 @@
   > +foo
   > EOF
@@ -384,7 +384,7 @@
   b
   \x00 (no-eol) (esc)
 
-  $ hg st --copies --change . 
+  $ hg st --copies --change .
   A binary2
     text2
   R text2
--- a/tests/test-inotify-issue1371.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-inotify-issue1371.t	Tue Aug 28 17:59:08 2012 -0500
@@ -1,6 +1,6 @@
 
   $ "$TESTDIR/hghave" inotify || exit 80
-  $ hg init 
+  $ hg init
   $ touch a b c d e f
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "inotify=" >> $HGRCPATH
@@ -41,4 +41,4 @@
 
 Are we able to kill the service? if not, the service died on some error
 
-  $ kill `cat hg.pid` 
+  $ kill `cat hg.pid`
--- a/tests/test-keyword.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-keyword.t	Tue Aug 28 17:59:08 2012 -0500
@@ -998,7 +998,7 @@
 
   $ echo '$Id$' > m
   $ hg add m
-  $ hg commit -m 4kw 
+  $ hg commit -m 4kw
   $ echo foo >> m
   $ hg commit -m 5foo
 
--- a/tests/test-largefiles.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-largefiles.t	Tue Aug 28 17:59:08 2012 -0500
@@ -80,7 +80,7 @@
   $ rm sub/unknown
 
 Remove both largefiles and normal files.
- 
+
   $ hg remove normal1 large1
   $ hg status large1
   R large1
@@ -212,7 +212,7 @@
   $ hg archive -r 3 ../archive3
   $ hg archive -r 4 ../archive4
   $ cd ../archive0
-  $ cat normal1 
+  $ cat normal1
   normal1
   $ cat large1
   large1
@@ -632,7 +632,7 @@
 Old revisions of a clone have correct largefiles content (this also
 tests update).
 
-  $ hg update -r 1 
+  $ hg update -r 1
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   getting changed largefiles
   1 largefiles updated, 0 removed
@@ -785,7 +785,7 @@
 
 Rollback on largefiles.
 
-  $ echo large4-modified-again > sub/large4 
+  $ echo large4-modified-again > sub/large4
   $ hg commit -m "Modify large4 again"
   Invoking status precommit hook
   M sub/large4
@@ -815,7 +815,7 @@
 
 "update --clean" leaves correct largefiles in working copy.
 
-  $ hg update --clean 
+  $ hg update --clean
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   getting changed largefiles
   1 largefiles updated, 0 removed
@@ -1019,7 +1019,7 @@
   getting changed largefiles
   3 largefiles updated, 0 removed
   $ cd g
-  $ hg transplant -s ../d 598410d3eb9a 
+  $ hg transplant -s ../d 598410d3eb9a
   searching for changes
   searching for changes
   adding changesets
--- a/tests/test-mq-header-date.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-mq-header-date.t	Tue Aug 28 17:59:08 2012 -0500
@@ -128,7 +128,7 @@
   >     catlogd 6
   > 
   >     drop 6
-  >     
+  > 
   > 
   >     echo ==== qnew -u
   >     hg qnew -u jane 6.patch
--- a/tests/test-mq-qimport.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-mq-qimport.t	Tue Aug 28 17:59:08 2012 -0500
@@ -169,7 +169,7 @@
 
   $ cat > appendfoo.diff <<EOF
   > append foo
-  >  
+  > 
   > diff -r 07f494440405 -r 261500830e46 baz
   > --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   > +++ b/baz	Thu Jan 01 00:00:00 1970 +0000
@@ -179,7 +179,7 @@
 
   $ cat > appendbar.diff <<EOF
   > append bar
-  >  
+  > 
   > diff -r 07f494440405 -r 261500830e46 baz
   > --- a/baz	Thu Jan 01 00:00:00 1970 +0000
   > +++ b/baz	Thu Jan 01 00:00:00 1970 +0000
--- a/tests/test-mv-cp-st-diff.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-mv-cp-st-diff.t	Tue Aug 28 17:59:08 2012 -0500
@@ -187,7 +187,7 @@
   +y1
   
   
-  $ tb "add a a1" "add a a2" "hg cp a b" "copy in working dir" 
+  $ tb "add a a1" "add a a2" "hg cp a b" "copy in working dir"
   updating to branch default
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   created new head
--- a/tests/test-obsolete.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-obsolete.t	Tue Aug 28 17:59:08 2012 -0500
@@ -68,7 +68,10 @@
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ mkcommit new_c
   created new head
+  $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
   $ hg debugobsolete `getid original_c`  `getid new_c` -d '56 12'
+  $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
+  2:245bde4270cd add original_c
   $ hg debugobsolete
   245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
 
--- a/tests/test-pull-branch.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-pull-branch.t	Tue Aug 28 17:59:08 2012 -0500
@@ -142,7 +142,7 @@
   $ hg branch branchC
   marked working directory as branch branchC
   (branches are permanent and global, did you want a bookmark?)
-  $ echo b1 > bar 
+  $ echo b1 > bar
   $ hg ci -Am "commit on branchC on tt"
   adding bar
 
@@ -151,7 +151,7 @@
   $ cd ../t
   $ hg up -C default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ echo a1 > bar 
+  $ echo a1 > bar
   $ hg ci -Am "commit on default on t"
   adding bar
 
--- a/tests/test-rebase-bookmarks.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-rebase-bookmarks.t	Tue Aug 28 17:59:08 2012 -0500
@@ -23,7 +23,7 @@
   adding b
   $ hg book 'X'
   $ hg book 'Y'
- 
+
   $ echo c > c
   $ hg ci -Am C
   adding c
@@ -38,7 +38,7 @@
 
   $ hg book W
 
-  $ hg tglog 
+  $ hg tglog
   @  3: 'D' bookmarks: W
   |
   | o  2: 'C' bookmarks: Y Z
@@ -47,7 +47,7 @@
   |/
   o  0: 'A' bookmarks:
   
- 
+
 Move only rebased bookmarks
 
   $ cd ..
@@ -59,7 +59,7 @@
   $ hg rebase -s Y -d 3
   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
 
-  $ hg tglog 
+  $ hg tglog
   @  3: 'C' bookmarks: Y Z
   |
   o  2: 'D' bookmarks: W
@@ -79,7 +79,7 @@
   $ hg rebase -s 1 -d 3
   saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
 
-  $ hg tglog 
+  $ hg tglog
   @  3: 'C' bookmarks: Y Z
   |
   o  2: 'B' bookmarks: X
--- a/tests/test-rebase-cache.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-rebase-cache.t	Tue Aug 28 17:59:08 2012 -0500
@@ -73,7 +73,7 @@
   $ hg clone -q -u . a a1
   $ cd a1
 
-  $ hg tglog  
+  $ hg tglog
   @  8: 'F' branch3
   |
   o  7: 'branch3' branch3
@@ -120,7 +120,7 @@
   2: 'B' branch1
   0: 'A' 
 
-  $ hg tglog  
+  $ hg tglog
   @  8: 'E' branch3
   |
   o  7: 'D' branch3
@@ -244,7 +244,7 @@
   2: 'B' branch1
   0: 'A' 
 
-  $ hg tglog   
+  $ hg tglog
   @  7: 'F' branch2
   |
   o  6: 'E' branch2
--- a/tests/test-rebase-conflicts.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-rebase-conflicts.t	Tue Aug 28 17:59:08 2012 -0500
@@ -69,7 +69,7 @@
 
 Try to continue without solving the conflict:
 
-  $ hg rebase --continue 
+  $ hg rebase --continue
   abort: unresolved merge conflicts (see hg help resolve)
   [255]
 
--- a/tests/test-rebase-mq-skip.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-rebase-mq-skip.t	Tue Aug 28 17:59:08 2012 -0500
@@ -39,7 +39,7 @@
   $ hg add p1
   $ hg qref -m P1
 
-  $ hg export qtip > p1.patch 
+  $ hg export qtip > p1.patch
 
   $ hg up -q -C 1
 
--- a/tests/test-run-tests.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-run-tests.t	Tue Aug 28 17:59:08 2012 -0500
@@ -95,5 +95,5 @@
 
 Exit code:
 
-  $ (exit 1) 
+  $ (exit 1)
   [1]
--- a/tests/test-status.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-status.t	Tue Aug 28 17:59:08 2012 -0500
@@ -330,4 +330,9 @@
   $ hg status -A --rev 1 1
   R 1/2/3/4/5/b.txt
 
+#if windows
+  $ hg --config ui.slash=false status -A --rev 1 1
+  R 1\2\3\4\5\b.txt
+#endif
+
   $ cd ..
--- a/tests/test-subrepo-deep-nested-change.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-subrepo-deep-nested-change.t	Tue Aug 28 17:59:08 2012 -0500
@@ -100,7 +100,7 @@
    revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
 
 Check that deep archiving works
- 
+
   $ cd cloned
   $ echo 'test' > sub1/sub2/test.txt
   $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
--- a/tests/test-subrepo-git.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-subrepo-git.t	Tue Aug 28 17:59:08 2012 -0500
@@ -446,7 +446,7 @@
   $ git rev-parse HEAD
   da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
   $ cd ..
-  $ hg update --clean tip > /dev/null 2>&1 
+  $ hg update --clean tip > /dev/null 2>&1
 
 Sticky subrepository, revision updates
   $ hg id -n
--- a/tests/test-subrepo-missing.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-subrepo-missing.t	Tue Aug 28 17:59:08 2012 -0500
@@ -60,7 +60,7 @@
   warning: subrepo spec file .hgsub not found
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ rm .hgsubstate
-  $ hg up 0  
+  $ hg up 0
   remote changed .hgsubstate which local deleted
   use (c)hanged version or leave (d)eleted? c
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-subrepo.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-subrepo.t	Tue Aug 28 17:59:08 2012 -0500
@@ -730,7 +730,7 @@
   925c17564ef8 tip
   $ hg -R s id
   12a213df6fa9 tip
-  $ hg -R t id  
+  $ hg -R t id
   52c0adc0515a tip
   $ hg update 11
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -738,7 +738,7 @@
   365661e5936a
   $ hg -R s id
   fc627a69481f
-  $ hg -R t id  
+  $ hg -R t id
   e95bcfa18a35
 
 Sticky subrepositorys, file changes
@@ -750,7 +750,7 @@
   365661e5936a+
   $ hg -R s id
   fc627a69481f+
-  $ hg -R t id  
+  $ hg -R t id
   e95bcfa18a35+
   $ hg update tip
    subrepository sources for s differ
@@ -764,7 +764,7 @@
   925c17564ef8+ tip
   $ hg -R s id
   fc627a69481f+
-  $ hg -R t id  
+  $ hg -R t id
   e95bcfa18a35+
   $ hg update --clean tip
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -774,7 +774,7 @@
   925c17564ef8 tip
   $ hg -R s id
   12a213df6fa9 tip
-  $ hg -R t id  
+  $ hg -R t id
   52c0adc0515a tip
   $ cd s
   $ hg update -r -2
@@ -792,7 +792,7 @@
   e45c8b14af55+
   $ hg -R s id
   02dcf1d70411
-  $ hg -R t id  
+  $ hg -R t id
   7af322bc1198
 
 Sticky subrepository, file changes and revision updates
@@ -804,7 +804,7 @@
   e45c8b14af55+
   $ hg -R s id
   02dcf1d70411+
-  $ hg -R t id  
+  $ hg -R t id
   7af322bc1198+
   $ hg update tip
    subrepository sources for s differ
@@ -818,7 +818,7 @@
   925c17564ef8+ tip
   $ hg -R s id
   02dcf1d70411+
-  $ hg -R t id  
+  $ hg -R t id
   7af322bc1198+
 
 Sticky repository, update --clean
@@ -828,7 +828,7 @@
   925c17564ef8 tip
   $ hg -R s id
   12a213df6fa9 tip
-  $ hg -R t id  
+  $ hg -R t id
   52c0adc0515a tip
 
 Test subrepo already at intended revision:
@@ -843,7 +843,7 @@
   11+
   $ hg -R s id
   fc627a69481f
-  $ hg -R t id 
+  $ hg -R t id
   e95bcfa18a35
 
 Test that removing .hgsubstate doesn't break anything:
--- a/tests/test-tags.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-tags.t	Tue Aug 28 17:59:08 2012 -0500
@@ -137,7 +137,7 @@
   $ echo >> .hgtags
   $ echo "foo bar" >> .hgtags
   $ echo "a5a5 invalid" >> .hg/localtags
-  $ cat .hgtags 
+  $ cat .hgtags
   acb14030fe0a21b60322c440ad2d20cf7685a376 first
   spam
   
--- a/tests/test-template-engine.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-template-engine.t	Tue Aug 28 17:59:08 2012 -0500
@@ -36,4 +36,12 @@
   $ hg log --style=./mymap
   0 97e5f848f0936960273bbf75be6388cd0350a32b test
 
+  $ cat > changeset.txt << EOF
+  > {{p1rev}} {{p1node}} {{p2rev}} {{p2node}}
+  > EOF
+  $ hg ci -Ama
+  $ hg log --style=./mymap
+  0 97e5f848f0936960273bbf75be6388cd0350a32b -1 0000000000000000000000000000000000000000
+  -1 0000000000000000000000000000000000000000 -1 0000000000000000000000000000000000000000
+
   $ cd ..
--- a/tests/test-treediscovery-legacy.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-treediscovery-legacy.t	Tue Aug 28 17:59:08 2012 -0500
@@ -330,7 +330,7 @@
   $ hg ci -Am A
   adding A
   $ cd ..
-  $ hg clone rlocal rremote  
+  $ hg clone rlocal rremote
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd rlocal
@@ -341,7 +341,7 @@
   $ tstart rremote
 
   $ cd rlocal
-  $ hg incoming $remote 
+  $ hg incoming $remote
   comparing with http://localhost:$HGPORT/
   searching for changes
   no changes found
--- a/tests/test-update-branches.t	Tue Aug 28 11:15:34 2012 -0500
+++ b/tests/test-update-branches.t	Tue Aug 28 17:59:08 2012 -0500
@@ -61,7 +61,7 @@
   >     hg up $opt $targetrev
   >     hg parent --template 'parent={rev}\n'
   >     hg stat -S
-  > }    
+  > }
 
   $ norevtest () {
   >     msg=$1
@@ -74,7 +74,7 @@
   >     hg up $opt
   >     hg parent --template 'parent={rev}\n'
   >     hg stat -S
-  > }    
+  > }
 
 Test cases are documented in a table in the update function of merge.py.
 Cases are run as shown in that table, row by row.