Commits

ZyX_I committed 658dc80

Fixed cs.(renames|copies|files|changes|removes) in non-python driver for non-trivial merge revisions
Fixed getcsprop(..., "removes") for non-python driver (it is not used though)
Added log-styles test

  • Participants
  • Parent commits cd6fbfd

Comments (0)

Files changed (7)

 syntax: glob
 python/*.pyc
+test/dummy.in

File misc/map-cmdline.files

+changeset = '{files}{file_dels}{file_copies}'
+file      = 'F{file}\n'
+file_del  = 'R{file_del}\n'
+file_copy = 'D{name}\nS{source}\n'

File plugin/aurum/cmdutils.vim

                 let rev=repo.functions.getrevhex(repo, rev)
             endif
         else
-            " TODO opts.rev may be ignored. This should be documented
             let rev=repo.functions.getrevhex(repo, get(a:opts, 'rev', '.'))
         endif
         "▲2
 endfunction
 "▶1 closebuf :: bvar → + buf
 function s:F.closebuf(bvar)
-    let r="\<C-\>\<C-n>"
+    let r=''
     if has_key(a:bvar, 'prevbuf') && bufexists(a:bvar.prevbuf)
-        return ':buffer '.a:bvar.prevbuf."\n"
+        let r.=':buffer '.a:bvar.prevbuf."\n"
     endif
-    return ':bwipeout '.bufnr('%')."\n"
+    return r.':bwipeout '.bufnr('%')."\n"
 endfunction
 "▶1 Post cmdutils resource
 call s:_f.postresource('cmdutils', {'globtopat': s:F.globtopattern,

File plugin/aurum/drivers/mercurial.vim

 endfunction
 else "▶3
 "▶4 getrfc :: repo, cs[, _] → _ + cs
+let s:erfcstylefile=shellescape(s:_r.os.path.join(s:_frawor.runtimepath,
+                \                                 'misc', 'map-cmdline.files'))
 function s:F.getrfc(repo, cs, ...)
     if has_key(a:cs, 'gotrenames')
         return
         let a:cs.files=allfiles
         let a:cs.changes=allfiles
         let a:cs.removes=[]
-    elseif len(a:cs.parents)>1
-        " TODO Ask whether merge can have a changed file list
-        let a:cs.renames={}
-        let a:cs.copies={}
-        let a:cs.files=[]
-        let a:cs.changes=[]
-        let a:cs.removes=[]
     else
-        let slines=s:F.hg(a:repo, 'status --rev '.a:cs.parents[0].' '.
-                    \                    '--rev '.a:cs.rev.' -armC', 0,
+        let slines=s:F.hg(a:repo, 'log --rev '.a:cs.rev.' '.
+                    \     '--style '.s:erfcstylefile, 0,
                     \     'ren', a:cs.rev)[:-2]
+        let files=[]
+        let removes=[]
         let copies={}
-        let removed=[]
-        let addedmodified=[]
         let prevfile=0
         for line in slines
             let s=line[0]
-            let file=line[2:]
-            if s is# ' '
+            let file=line[1:]
+            if s is# 'F'
+                let files+=[file]
+            elseif s is# 'R'
+                let removes+=[file]
+            elseif s is# 'D'
+                let prevfile=file
+            elseif s is# 'S'
                 let copies[prevfile]=file
-            elseif s is# 'R'
-                let removed+=[file]
-            else
-                let addedmodified+=[file]
             endif
-            let prevfile=file
         endfor
-        let a:cs.renames = filter(copy(copies), 'index(removed, v:val)!=-1')
-        let a:cs.copies  = filter(copy(copies), '!has_key(a:cs.renames, v:key)')
-        let a:cs.files=sort(addedmodified)
-        let a:cs.changes=sort(addedmodified+removed)
-        let a:cs.removes=sort(removed)
+        let a:cs.copies  = filter(copy(copies), 'index(removes, v:val)==-1')
+        let a:cs.renames = filter(copy(copies), '!has_key(a:cs.copies, v:key)')
+        let a:cs.files   = filter(copy(files), 'index(removes, v:val)==-1')
+        let a:cs.changes = files
+        let a:cs.removes = filter(copy(files), 'index(removes, v:val)!=-1')
     endif
     lockvar! a:cs.renames a:cs.copies a:cs.files a:cs.changes a:cs.removes
     let a:cs.gotrenames=1
     if a:propname is# 'allfiles'
         let r=s:F.hg(a:repo, 'manifest -r '.a:cs.rev, 0,
                     \'csp', a:propname, a:cs.rev)[:-2]
-    elseif a:propname is# 'changes' || a:propname is# 'files'
+    elseif a:propname is# 'changes' || a:propname is# 'files' ||
+                \a:propname is# 'removes'
         call s:F.getrfc(a:repo, a:cs)
         return a:cs[a:propname]
     elseif a:propname is# 'children'

File test/createrepo.zsh

 local B='B <b@example.org>'
 local C='C <c@example.gov>'
 (
+    # TODO two tags on one revision
+    # TODO merges with merge conflicts
+    # TODO copy during merge
     set -e
     hg init testrepo
     cd testrepo

File test/log-styles.in

+:command -nargs=1 ST :W{{{1 <args> | exe 'Run AuLog showfiles patch stat showrenames showcopies style '.<q-args> | bwipeout!
+:ST default
+:ST hgdef
+:ST hgdescr
+:ST compact
+:ST cdescr
+:source addmessages.vim

File test/log-styles.ok

+{{{1 default
+@  Changeset 22:54d2db605eec15091bb4b194499d6db40e2af027
+|  Commited 11 Feb 2002 05:43 by A <a@example.com>
+|  Tags: tip
+|  Files: .hgignore
+|  @ Added .hgignore
+|  $  .hgignore | 2 0
+|  $1 files changed, 2 insertions, 0 deletions
+|  :diff -r 214bbd7a8f11 -r 54d2db605eec .hgignore
+|  :--- /dev/null
+|  :+++ b/.hgignore
+|  :@@ -0,0 +1,2 @@
+|  :+syntax: glob
+|  :+ignored*
+|  :
+|  
+o  Changeset 21:214bbd7a8f1198ea9a78a01edf38a3fa8d2ad2ae
+|  Commited 11 Feb 2002 03:15 by A <a@example.com>
+|  Files: ignored10.lst
+|  @ Added ignored10.lst
+|  $  ignored10.lst | 10 0
+|  $1 files changed, 10 insertions, 0 deletions
+|  :diff -r 2c2d8b2b8164 -r 214bbd7a8f11 ignored10.lst
+|  :--- /dev/null
+|  :+++ b/ignored10.lst
+|  :@@ -0,0 +1,10 @@
+|  :+1
+|  :+2
+|  :+3
+|  :+4
+|  :+5
+|  :+6
+|  :+7
+|  :+8
+|  :+9
+|  :+10
+|  :
+|  
+o  Changeset 20:2c2d8b2b8164681fcc1ea55bf8e086f034ddc70e
+|  Commited 10 Feb 2002 16:01 by B <b@example.org>
+|  Files: nohglinesrev.lst
+|  @ Added nohglinesrev.lst
+|  $  nohglinesrev.lst | 53 0
+|  $1 files changed, 53 insertions, 0 deletions
+|  :diff -r a38ec092ab72 -r 2c2d8b2b8164 nohglinesrev.lst
+|  :--- /dev/null
+|  :+++ b/nohglinesrev.lst
+|  :@@ -0,0 +1,53 @@
+|  :+hsz/nib/!#
+|  :+hsz L- etalume
+|  :+e- tes
+|  :+'>moc.elpmaxe@a< A'=A lacol
+|  :+'>gro.elpmaxe@b< B'=B lacol
+|  :+'>vog.elpmaxe@c< C'=C lacol
+|  :+{
+|  :+e- tes    
+|  :+opertset dc    
+|  :+. hsz.operetaerc/.. pc    
+|  :+9902 llit ylno krow lliw tset etaD XXX #    
+|  :+A$ resu-- '02:5 20-10-9991' etad--        
+|  :+A$ resu-- '03:7 50-10-0002' etad--        
+|  :+hsz.operc '/}{/}{/rt' e- i- p- lrep    
+|  :+B$ resu-- '00:51 51-10-0002' etad--        
+|  :+B$ resu-- '00:41 10-20-0002' etad--        
+|  :+tsl.senilgh > '/ gh    ^/ sselnu _$ fednu' e- i- p- lrep | hsz.operghc tac    
+|  :+tsl.seniletad > '/ gh    ^/ sselnu _$ fednu' e- i- p- lrep | hsz.operghc tac    
+|  :+A$ resu-- '32:4 01-50-0002' etad--        
+|  :+tsl.senild > 'd' perg | hsz.operghc tac    
+|  :+B$ resu-- '42:31 10-11-0002' etad--        
+|  :+tsl.senila > 'a' perg | hsz.operghc tac    
+|  :+A$ resu-- '44:5 20-11-0002' etad--        
+|  :+tsl.senilba > 'b' perg | tsl.senila tac    
+|  :+B$ resu-- '31:41 20-11-0002' etad--        
+|  :+B$ resu-- '41:41 20-11-0002' etad--        
+|  :+C$ resu-- '00:00 10-10-1002' etad--        
+|  :+tsl.senilb > 'b' perg | hsz.operghc tac    
+|  :+A$ resu-- '81:50 10-20-1002' etad--        
+|  :+A$ resu-- '91:50 10-20-1002' etad--        
+|  :+tsl.senilc > 'c' perg | tros | hsz.operghc tac    
+|  :+B$ resu-- '65:41 10-20-1002' etad--        
+|  :+B$ resu-- '25:65:41 10-20-1002' etad--        
+|  :+C$ resu-- '00:00 10-10-2002' etad--        
+|  :+C$ resu-- '51:00:00 10-10-2002' etad--        
+|  :+C$ resu-- '03:00:00 10-10-2002' etad--        
+|  :+C$ resu-- '54:00:00 10-10-2002' etad--        
+|  :+A$ resu-- '00:50 01-20-2002' etad--        
+|  :+tsl.senilghon > '/ gh    ^/ fi _$ fednu' e- i- p- lrep | hsz.operghc tac    
+|  :+B$ resu-- '33:51 01-20-2002' etad--        
+|  :+tsl.versenilghon > ver | tsl.senilghon tac    
+|  :+B$ resu-- '10:61 01-20-2002' etad--        
+|  :+tsl.01derongi > 'n\'$ ' ' rt | 01 1 qes    
+|  :+A$ resu-- '51:30 11-20-2002' etad--        
+|  :+erongigh. > '*derongin\bolg :xatnys'$ ohce    
+|  :+A$ resu-- '34:50 11-20-2002' etad--        
+|  :+tsl.versenilghon >> cba ohce    
+|  :+feddedda dda gh && feddedda > 'feD' ohce    
+|  :+tsl.senilghon mr    
+|  :+tsl.versenilgh > ver | tsl.senilgh tac    
+|  :+cbaderongi > 'cbA' ohce    
+|  :+}
+|  :+opertset zx.rat.opertset fJc rat
+|  :
+|  
+o  Changeset 19:a38ec092ab72534eae6240c4378f4e4da9fb7e74
+|  Commited 10 Feb 2002 15:33 by B <b@example.org>
+|  Files: nohglines.lst
+|  @ Added nohglines.lst
+|  $  nohglines.lst | 53 0
+|  $1 files changed, 53 insertions, 0 deletions
+|  :diff -r 5b7ed139504a -r a38ec092ab72 nohglines.lst
+|  :--- /dev/null
+|  :+++ b/nohglines.lst
+|  :@@ -0,0 +1,53 @@
+|  :+#!/bin/zsh
+|  :+emulate -L zsh
+|  :+set -e
+|  :+local A='A <a@example.com>'
+|  :+local B='B <b@example.org>'
+|  :+local C='C <c@example.gov>'
+|  :+{
+|  :+    set -e
+|  :+    cd testrepo
+|  :+    cp ../createrepo.zsh .
+|  :+    # XXX Date test will work only till 2099
+|  :+        --date '1999-01-02 5:20' --user $A
+|  :+        --date '2000-01-05 7:30' --user $A
+|  :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+|  :+        --date '2000-01-15 15:00' --user $B
+|  :+        --date '2000-02-01 14:00' --user $B
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+|  :+        --date '2000-05-10 4:23' --user $A
+|  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+|  :+        --date '2000-11-01 13:24' --user $B
+|  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+|  :+        --date '2000-11-02 5:44' --user $A
+|  :+    cat alines.lst | grep 'b' > ablines.lst
+|  :+        --date '2000-11-02 14:13' --user $B
+|  :+        --date '2000-11-02 14:14' --user $B
+|  :+        --date '2001-01-01 00:00' --user $C
+|  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+|  :+        --date '2001-02-01 05:18' --user $A
+|  :+        --date '2001-02-01 05:19' --user $A
+|  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+|  :+        --date '2001-02-01 14:56' --user $B
+|  :+        --date '2001-02-01 14:56:52' --user $B
+|  :+        --date '2002-01-01 00:00' --user $C
+|  :+        --date '2002-01-01 00:00:15' --user $C
+|  :+        --date '2002-01-01 00:00:30' --user $C
+|  :+        --date '2002-01-01 00:00:45' --user $C
+|  :+        --date '2002-02-10 05:00' --user $A
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|  :+        --date '2002-02-10 15:33' --user $B
+|  :+    cat nohglines.lst | rev > nohglinesrev.lst
+|  :+        --date '2002-02-10 16:01' --user $B
+|  :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|  :+        --date '2002-02-11 03:15' --user $A
+|  :+    echo $'syntax: glob\nignored*' > .hgignore
+|  :+        --date '2002-02-11 05:43' --user $A
+|  :+    echo abc >> nohglinesrev.lst
+|  :+    echo 'Def' > addeddef && hg add addeddef
+|  :+    rm nohglines.lst
+|  :+    cat hglines.lst | rev > hglinesrev.lst
+|  :+    echo 'Abc' > ignoredabc
+|  :+}
+|  :+tar cJf testrepo.tar.xz testrepo
+|  :
+|  
+o  Changeset 18:5b7ed139504a773cacfda7307e92cfba9a602d7f
+|  Commited 10 Feb 2002 05:00 by A <a@example.com>
+|  Files: hglines2.lst
+|  Copied hglines.lst to hglines2.lst
+|  @ Copied “hglines.lst” to “hglines2.lst”
+|  $  hglines2.lst | 41 0
+|  $1 files changed, 41 insertions, 0 deletions
+|  :diff -r 21d58f7d0c8a -r 5b7ed139504a hglines2.lst
+|  :--- /dev/null
+|  :+++ b/hglines2.lst
+|  :@@ -0,0 +1,41 @@
+|  :+    hg init testrepo
+|  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :+    hg mv createrepo.zsh crepo.zsh
+|  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+|  :+    hg mv crepo.zsh chgrepo.zsh
+|  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :+    hg branch A
+|  :+    hg commit -A -m 'Added dlines.lst' \
+|  :+    hg branch B
+|  :+    hg commit -A -m 'Added alines.lst' \
+|  :+    hg branch C
+|  :+    hg commit -A -m 'Added ablines.lst' \
+|  :+    hg tag ablines \
+|  :+    hg update default
+|  :+    hg merge -r ablines
+|  :+    hg commit -m 'Merge from C' \
+|  :+    hg update C
+|  :+    hg commit -A -m 'Added blines.lst' \
+|  :+    hg tag blines \
+|  :+    hg update -r -2
+|  :+    hg commit -A -m 'Added clines.lst' \
+|  :+    hg tag clines \
+|  :+    hg update A
+|  :+    hg merge -r B
+|  :+    hg commit -m 'Merge from B' \
+|  :+    hg merge -r clines
+|  :+    hg commit -m 'Merge from C:2' \
+|  :+    hg update default
+|  :+    hg merge -r blines
+|  :+    hg commit -m 'Merge from C:1' \
+|  :+    hg merge -r A
+|  :+    hg commit -m 'Merge from A' \
+|  :+    hg cp hglines.lst hglines2.lst
+|  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :+    hg commit -A -m 'Added nohglines.lst' \
+|  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :+    hg commit -A -m 'Added ignored10.lst' \
+|  :+    hg commit -A -m 'Added .hgignore' \
+|  :+    hg rm hglines2.lst
+|  :
+|  
+o    Changeset 17:21d58f7d0c8a0b75eb5b27fe97e78690c1a18be8
+|\   Commited 01 Jan 2002 00:00 by C <c@example.gov>
+| |  @ Merge from A
+| |  $  clines.lst | 49 0
+| |  $1 files changed, 49 insertions, 0 deletions
+| |  :diff -r 90772a14fa55 -r 21d58f7d0c8a clines.lst
+| |  :--- /dev/null
+| |  :+++ b/clines.lst
+| |  :@@ -0,0 +1,49 @@
+| |  :+    cat alines.lst | grep 'b' > ablines.lst
+| |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |  :+    cat hglines.lst | rev > hglinesrev.lst
+| |  :+    cat nohglines.lst | rev > nohglinesrev.lst
+| |  :+    cd testrepo
+| |  :+    cp ../createrepo.zsh .
+| |  :+    echo 'Abc' > ignoredabc
+| |  :+    echo abc >> nohglinesrev.lst
+| |  :+    echo 'Def' > addeddef && hg add addeddef
+| |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| |  :+    hg branch A
+| |  :+    hg branch B
+| |  :+    hg branch C
+| |  :+    hg commit -A -m 'Added ablines.lst' \
+| |  :+    hg commit -A -m 'Added alines.lst' \
+| |  :+    hg commit -A -m 'Added blines.lst' \
+| |  :+    hg commit -A -m 'Added clines.lst' \
+| |  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| |  :+    hg commit -A -m 'Added dlines.lst' \
+| |  :+    hg commit -A -m 'Added .hgignore' \
+| |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| |  :+    hg commit -A -m 'Added ignored10.lst' \
+| |  :+    hg commit -A -m 'Added nohglines.lst' \
+| |  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+| |  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+| |  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| |  :+    hg commit -m 'Merge from A' \
+| |  :+    hg commit -m 'Merge from B' \
+| |  :+    hg commit -m 'Merge from C' \
+| |  :+    hg commit -m 'Merge from C:1' \
+| |  :+    hg commit -m 'Merge from C:2' \
+| |  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| |  :+    hg cp hglines.lst hglines2.lst
+| |  :+    hg merge -r clines
+| |  :+    hg mv createrepo.zsh crepo.zsh
+| |  :+    hg mv crepo.zsh chgrepo.zsh
+| |  :+    hg tag clines \
+| |  :+local A='A <a@example.com>'
+| |  :+local B='B <b@example.org>'
+| |  :+local C='C <c@example.gov>'
+| |  :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+| |  :+tar cJf testrepo.tar.xz testrepo
+| |  :
+| |  
+o |    Changeset 16:90772a14fa550b47e27709d36a7c9efd506ba239
+|\ \   Commited 01 Jan 2002 00:00 by C <c@example.gov>
+| | |  @ Merge from C:1
+| | |  $  .hgtags    |  1 0
+| | |  $  blines.lst | 16 0
+| | |  $2 files changed, 17 insertions, 0 deletions
+| | |  :diff -r 00cf93136629 -r 90772a14fa55 .hgtags
+| | |  :--- /dev/null
+| | |  :+++ b/.hgtags
+| | |  :@@ -0,0 +1,1 @@
+| | |  :+0b4ef1ee673d958bfa691f07fdbb4369b24904fa ablines
+| | |  :diff -r 00cf93136629 -r 90772a14fa55 blines.lst
+| | |  :--- /dev/null
+| | |  :+++ b/blines.lst
+| | |  :@@ -0,0 +1,16 @@
+| | |  :+#!/bin/zsh
+| | |  :+local B='B <b@example.org>'
+| | |  :+    hg branch A
+| | |  :+    hg branch B
+| | |  :+    hg branch C
+| | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | |  :+    hg tag ablines \
+| | |  :+    hg merge -r ablines
+| | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | |  :+    hg commit -A -m 'Added blines.lst' \
+| | |  :+    hg tag blines \
+| | |  :+    hg merge -r blines
+| | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | |  :+    echo abc >> nohglinesrev.lst
+| | |  :+    echo 'Abc' > ignoredabc
+| | |  :
+| | |  
+| | o    Changeset 15:3ced0ae2c577db232d151d5aca4b64aab1ebcf75 (branch A)
+| | |\   Commited 01 Jan 2002 00:00 by C <c@example.gov>
+| | | |  @ Merge from C:2
+| | | |  $  .hgtags     |  1 0
+| | | |  $  ablines.lst | 13 0
+| | | |  $  blines.lst  | 16 0
+| | | |  $  clines.lst  | 49 0
+| | | |  $4 files changed, 79 insertions, 0 deletions
+| | | |  :diff -r 4f33ce8791eb -r 3ced0ae2c577 .hgtags
+| | | |  :--- /dev/null
+| | | |  :+++ b/.hgtags
+| | | |  :@@ -0,0 +1,1 @@
+| | | |  :+0b4ef1ee673d958bfa691f07fdbb4369b24904fa ablines
+| | | |  :diff -r 4f33ce8791eb -r 3ced0ae2c577 ablines.lst
+| | | |  :--- /dev/null
+| | | |  :+++ b/ablines.lst
+| | | |  :@@ -0,0 +1,13 @@
+| | | |  :+local B='B <b@example.org>'
+| | | |  :+    hg branch A
+| | | |  :+    hg branch B
+| | | |  :+    hg branch C
+| | | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | |  :+    hg tag ablines \
+| | | |  :+    hg merge -r ablines
+| | | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | |  :+    hg tag blines \
+| | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | |  :+    echo abc >> nohglinesrev.lst
+| | | |  :+    echo 'Abc' > ignoredabc
+| | | |  :diff -r 4f33ce8791eb -r 3ced0ae2c577 blines.lst
+| | | |  :--- /dev/null
+| | | |  :+++ b/blines.lst
+| | | |  :@@ -0,0 +1,16 @@
+| | | |  :+#!/bin/zsh
+| | | |  :+local B='B <b@example.org>'
+| | | |  :+    hg branch A
+| | | |  :+    hg branch B
+| | | |  :+    hg branch C
+| | | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | |  :+    hg tag ablines \
+| | | |  :+    hg merge -r ablines
+| | | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | |  :+    hg commit -A -m 'Added blines.lst' \
+| | | |  :+    hg tag blines \
+| | | |  :+    hg merge -r blines
+| | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | |  :+    echo abc >> nohglinesrev.lst
+| | | |  :+    echo 'Abc' > ignoredabc
+| | | |  :diff -r 4f33ce8791eb -r 3ced0ae2c577 clines.lst
+| | | |  :--- /dev/null
+| | | |  :+++ b/clines.lst
+| | | |  :@@ -0,0 +1,49 @@
+| | | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | | |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| | | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| | | |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| | | |  :+    cat hglines.lst | rev > hglinesrev.lst
+| | | |  :+    cat nohglines.lst | rev > nohglinesrev.lst
+| | | |  :+    cd testrepo
+| | | |  :+    cp ../createrepo.zsh .
+| | | |  :+    echo 'Abc' > ignoredabc
+| | | |  :+    echo abc >> nohglinesrev.lst
+| | | |  :+    echo 'Def' > addeddef && hg add addeddef
+| | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | |  :+    hg branch A
+| | | |  :+    hg branch B
+| | | |  :+    hg branch C
+| | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | |  :+    hg commit -A -m 'Added alines.lst' \
+| | | |  :+    hg commit -A -m 'Added blines.lst' \
+| | | |  :+    hg commit -A -m 'Added clines.lst' \
+| | | |  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| | | |  :+    hg commit -A -m 'Added dlines.lst' \
+| | | |  :+    hg commit -A -m 'Added .hgignore' \
+| | | |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| | | |  :+    hg commit -A -m 'Added ignored10.lst' \
+| | | |  :+    hg commit -A -m 'Added nohglines.lst' \
+| | | |  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+| | | |  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+| | | |  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| | | |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| | | |  :+    hg commit -m 'Merge from A' \
+| | | |  :+    hg commit -m 'Merge from B' \
+| | | |  :+    hg commit -m 'Merge from C' \
+| | | |  :+    hg commit -m 'Merge from C:1' \
+| | | |  :+    hg commit -m 'Merge from C:2' \
+| | | |  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| | | |  :+    hg cp hglines.lst hglines2.lst
+| | | |  :+    hg merge -r clines
+| | | |  :+    hg mv createrepo.zsh crepo.zsh
+| | | |  :+    hg mv crepo.zsh chgrepo.zsh
+| | | |  :+    hg tag clines \
+| | | |  :+local A='A <a@example.com>'
+| | | |  :+local B='B <b@example.org>'
+| | | |  :+local C='C <c@example.gov>'
+| | | |  :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+| | | |  :+tar cJf testrepo.tar.xz testrepo
+| | | |  :
+| | | |  
+| | o |    Changeset 14:4f33ce8791eb9481ed5e4e198641d6e69fc11ec0 (branch A)
+| | |\ \   Commited 01 Jan 2002 00:00 by C <c@example.gov>
+| | | | |  @ Merge from B
+| | | | |  $  alines.lst | 64 0
+| | | | |  $1 files changed, 64 insertions, 0 deletions
+| | | | |  :diff -r 4654f8e4bccd -r 4f33ce8791eb alines.lst
+| | | | |  :--- /dev/null
+| | | | |  :+++ b/alines.lst
+| | | | |  :@@ -0,0 +1,64 @@
+| | | | |  :+emulate -L zsh
+| | | | |  :+local A='A <a@example.com>'
+| | | | |  :+local B='B <b@example.org>'
+| | | | |  :+local C='C <c@example.gov>'
+| | | | |  :+    cp ../createrepo.zsh .
+| | | | |  :+    # XXX Date test will work only till 2099
+| | | | |  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| | | | |  :+        --date '1999-01-02 5:20' --user $A
+| | | | |  :+    hg mv createrepo.zsh crepo.zsh
+| | | | |  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| | | | |  :+        --date '2000-01-05 7:30' --user $A
+| | | | |  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| | | | |  :+        --date '2000-01-15 15:00' --user $B
+| | | | |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| | | | |  :+        --date '2000-02-01 14:00' --user $B
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| | | | |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| | | | |  :+        --date '2000-05-10 4:23' --user $A
+| | | | |  :+    hg branch A
+| | | | |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| | | | |  :+        --date '2000-11-01 13:24' --user $B
+| | | | |  :+    hg branch B
+| | | | |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| | | | |  :+    hg commit -A -m 'Added alines.lst' \
+| | | | |  :+        --date '2000-11-02 5:44' --user $A
+| | | | |  :+    hg branch C
+| | | | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | | |  :+        --date '2000-11-02 14:13' --user $B
+| | | | |  :+    hg tag ablines \
+| | | | |  :+        --date '2000-11-02 14:14' --user $B
+| | | | |  :+    hg update default
+| | | | |  :+    hg merge -r ablines
+| | | | |  :+        --date '2001-01-01 00:00' --user $C
+| | | | |  :+    hg update C
+| | | | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | | |  :+        --date '2001-02-01 05:18' --user $A
+| | | | |  :+    hg tag blines \
+| | | | |  :+        --date '2001-02-01 05:19' --user $A
+| | | | |  :+    hg update -r -2
+| | | | |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| | | | |  :+        --date '2001-02-01 14:56' --user $B
+| | | | |  :+    hg tag clines \
+| | | | |  :+        --date '2001-02-01 14:56:52' --user $B
+| | | | |  :+    hg update A
+| | | | |  :+        --date '2002-01-01 00:00' --user $C
+| | | | |  :+        --date '2002-01-01 00:00:15' --user $C
+| | | | |  :+    hg update default
+| | | | |  :+        --date '2002-01-01 00:00:30' --user $C
+| | | | |  :+        --date '2002-01-01 00:00:45' --user $C
+| | | | |  :+        --date '2002-02-10 05:00' --user $A
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| | | | |  :+        --date '2002-02-10 15:33' --user $B
+| | | | |  :+    cat nohglines.lst | rev > nohglinesrev.lst
+| | | | |  :+        --date '2002-02-10 16:01' --user $B
+| | | | |  :+        --date '2002-02-11 03:15' --user $A
+| | | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | | |  :+        --date '2002-02-11 05:43' --user $A
+| | | | |  :+    echo abc >> nohglinesrev.lst
+| | | | |  :+    echo 'Def' > addeddef && hg add addeddef
+| | | | |  :+    cat hglines.lst | rev > hglinesrev.lst
+| | | | |  :+    echo 'Abc' > ignoredabc
+| | | | |  :+tar cJf testrepo.tar.xz testrepo
+| | | | |  :
+| | | | |  
+| | | | | o  Changeset 13:331b232648474c521c7f9d96865421698e8936da (branch C)
+| | | | |/   Commited 01 Feb 2001 14:56 by B <b@example.org>
+| | | | |    Files: .hgtags
+| | | | |    @ Added tag clines for changeset c767dffcf34d
+| | | | |    $  .hgtags | 1 0
+| | | | |    $1 files changed, 1 insertions, 0 deletions
+| | | | |    :diff -r c767dffcf34d -r 331b23264847 .hgtags
+| | | | |    :--- a/.hgtags
+| | | | |    :+++ b/.hgtags
+| | | | |    :@@ -1,1 +1,2 @@
+| | | | |    : 0b4ef1ee673d958bfa691f07fdbb4369b24904fa ablines
+| | | | |    :+c767dffcf34d1d43e8fb4ec1d4ac83e929c68ccc clines
+| | | | |    :
+| | | | |    
+| +-----o  Changeset 12:c767dffcf34d1d43e8fb4ec1d4ac83e929c68ccc (branch C)
+| | | |    Commited 01 Feb 2001 14:56 by B <b@example.org>
+| | | |    Tags: clines
+| | | |    Files: clines.lst
+| | | |    @ Added clines.lst
+| | | |    $  clines.lst | 49 0
+| | | |    $1 files changed, 49 insertions, 0 deletions
+| | | |    :diff -r 235d6a7d7b43 -r c767dffcf34d clines.lst
+| | | |    :--- /dev/null
+| | | |    :+++ b/clines.lst
+| | | |    :@@ -0,0 +1,49 @@
+| | | |    :+    cat alines.lst | grep 'b' > ablines.lst
+| | | |    :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| | | |    :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | |    :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| | | |    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| | | |    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| | | |    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| | | |    :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| | | |    :+    cat hglines.lst | rev > hglinesrev.lst
+| | | |    :+    cat nohglines.lst | rev > nohglinesrev.lst
+| | | |    :+    cd testrepo
+| | | |    :+    cp ../createrepo.zsh .
+| | | |    :+    echo 'Abc' > ignoredabc
+| | | |    :+    echo abc >> nohglinesrev.lst
+| | | |    :+    echo 'Def' > addeddef && hg add addeddef
+| | | |    :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | |    :+    hg branch A
+| | | |    :+    hg branch B
+| | | |    :+    hg branch C
+| | | |    :+    hg commit -A -m 'Added ablines.lst' \
+| | | |    :+    hg commit -A -m 'Added alines.lst' \
+| | | |    :+    hg commit -A -m 'Added blines.lst' \
+| | | |    :+    hg commit -A -m 'Added clines.lst' \
+| | | |    :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| | | |    :+    hg commit -A -m 'Added dlines.lst' \
+| | | |    :+    hg commit -A -m 'Added .hgignore' \
+| | | |    :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| | | |    :+    hg commit -A -m 'Added ignored10.lst' \
+| | | |    :+    hg commit -A -m 'Added nohglines.lst' \
+| | | |    :+    hg commit -A -m 'Added nohglinesrev.lst' \
+| | | |    :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+| | | |    :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| | | |    :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| | | |    :+    hg commit -m 'Merge from A' \
+| | | |    :+    hg commit -m 'Merge from B' \
+| | | |    :+    hg commit -m 'Merge from C' \
+| | | |    :+    hg commit -m 'Merge from C:1' \
+| | | |    :+    hg commit -m 'Merge from C:2' \
+| | | |    :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| | | |    :+    hg cp hglines.lst hglines2.lst
+| | | |    :+    hg merge -r clines
+| | | |    :+    hg mv createrepo.zsh crepo.zsh
+| | | |    :+    hg mv crepo.zsh chgrepo.zsh
+| | | |    :+    hg tag clines \
+| | | |    :+local A='A <a@example.com>'
+| | | |    :+local B='B <b@example.org>'
+| | | |    :+local C='C <c@example.gov>'
+| | | |    :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+| | | |    :+tar cJf testrepo.tar.xz testrepo
+| | | |    :
+| | | |    
+| +-----o  Changeset 11:e2b6fb70c2c7d6bd3f1d5bff65a7de6681976743 (branch C)
+| | | |    Commited 01 Feb 2001 05:19 by A <a@example.com>
+| | | |    Files: .hgtags
+| | | |    @ Added tag blines for changeset 235d6a7d7b43
+| | | |    $  .hgtags | 1 0
+| | | |    $1 files changed, 1 insertions, 0 deletions
+| | | |    :diff -r 235d6a7d7b43 -r e2b6fb70c2c7 .hgtags
+| | | |    :--- a/.hgtags
+| | | |    :+++ b/.hgtags
+| | | |    :@@ -1,1 +1,2 @@
+| | | |    : 0b4ef1ee673d958bfa691f07fdbb4369b24904fa ablines
+| | | |    :+235d6a7d7b435cd3452b4c84f74fe9bad4b91a59 blines
+| | | |    :
+| | | |    
+| o | |  Changeset 10:235d6a7d7b435cd3452b4c84f74fe9bad4b91a59 (branch C)
+| | | |  Commited 01 Feb 2001 05:18 by A <a@example.com>
+| | | |  Tags: blines
+| | | |  Files: blines.lst
+| | | |  @ Added blines.lst
+| | | |  $  blines.lst | 16 0
+| | | |  $1 files changed, 16 insertions, 0 deletions
+| | | |  :diff -r 5c5f63aea57f -r 235d6a7d7b43 blines.lst
+| | | |  :--- /dev/null
+| | | |  :+++ b/blines.lst
+| | | |  :@@ -0,0 +1,16 @@
+| | | |  :+#!/bin/zsh
+| | | |  :+local B='B <b@example.org>'
+| | | |  :+    hg branch A
+| | | |  :+    hg branch B
+| | | |  :+    hg branch C
+| | | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | |  :+    hg tag ablines \
+| | | |  :+    hg merge -r ablines
+| | | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | |  :+    hg commit -A -m 'Added blines.lst' \
+| | | |  :+    hg tag blines \
+| | | |  :+    hg merge -r blines
+| | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | |  :+    echo abc >> nohglinesrev.lst
+| | | |  :+    echo 'Abc' > ignoredabc
+| | | |  :
+| | | |  
+o | | |    Changeset 9:00cf93136629e2fbbca9464205bbd381c0451d23
+|\ \ \ \   Commited 01 Jan 2001 00:00 by C <c@example.gov>
+| | | | |  @ Merge from C
+| | | | |  $  ablines.lst |  13 0
+| | | | |  $  alines.lst  |  64 0
+| | | | |  $  dlines.lst  |  52 0
+| | | | |  $3 files changed, 129 insertions, 0 deletions
+| | | | |  :diff -r aa37b7dd6c39 -r 00cf93136629 ablines.lst
+| | | | |  :--- /dev/null
+| | | | |  :+++ b/ablines.lst
+| | | | |  :@@ -0,0 +1,13 @@
+| | | | |  :+local B='B <b@example.org>'
+| | | | |  :+    hg branch A
+| | | | |  :+    hg branch B
+| | | | |  :+    hg branch C
+| | | | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | | |  :+    hg tag ablines \
+| | | | |  :+    hg merge -r ablines
+| | | | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | | |  :+    hg tag blines \
+| | | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | | |  :+    echo abc >> nohglinesrev.lst
+| | | | |  :+    echo 'Abc' > ignoredabc
+| | | | |  :diff -r aa37b7dd6c39 -r 00cf93136629 alines.lst
+| | | | |  :--- /dev/null
+| | | | |  :+++ b/alines.lst
+| | | | |  :@@ -0,0 +1,64 @@
+| | | | |  :+emulate -L zsh
+| | | | |  :+local A='A <a@example.com>'
+| | | | |  :+local B='B <b@example.org>'
+| | | | |  :+local C='C <c@example.gov>'
+| | | | |  :+    cp ../createrepo.zsh .
+| | | | |  :+    # XXX Date test will work only till 2099
+| | | | |  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| | | | |  :+        --date '1999-01-02 5:20' --user $A
+| | | | |  :+    hg mv createrepo.zsh crepo.zsh
+| | | | |  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| | | | |  :+        --date '2000-01-05 7:30' --user $A
+| | | | |  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| | | | |  :+        --date '2000-01-15 15:00' --user $B
+| | | | |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| | | | |  :+        --date '2000-02-01 14:00' --user $B
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| | | | |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| | | | |  :+        --date '2000-05-10 4:23' --user $A
+| | | | |  :+    hg branch A
+| | | | |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| | | | |  :+        --date '2000-11-01 13:24' --user $B
+| | | | |  :+    hg branch B
+| | | | |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| | | | |  :+    hg commit -A -m 'Added alines.lst' \
+| | | | |  :+        --date '2000-11-02 5:44' --user $A
+| | | | |  :+    hg branch C
+| | | | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | | |  :+        --date '2000-11-02 14:13' --user $B
+| | | | |  :+    hg tag ablines \
+| | | | |  :+        --date '2000-11-02 14:14' --user $B
+| | | | |  :+    hg update default
+| | | | |  :+    hg merge -r ablines
+| | | | |  :+        --date '2001-01-01 00:00' --user $C
+| | | | |  :+    hg update C
+| | | | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | | |  :+        --date '2001-02-01 05:18' --user $A
+| | | | |  :+    hg tag blines \
+| | | | |  :+        --date '2001-02-01 05:19' --user $A
+| | | | |  :+    hg update -r -2
+| | | | |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| | | | |  :+        --date '2001-02-01 14:56' --user $B
+| | | | |  :+    hg tag clines \
+| | | | |  :+        --date '2001-02-01 14:56:52' --user $B
+| | | | |  :+    hg update A
+| | | | |  :+        --date '2002-01-01 00:00' --user $C
+| | | | |  :+        --date '2002-01-01 00:00:15' --user $C
+| | | | |  :+    hg update default
+| | | | |  :+        --date '2002-01-01 00:00:30' --user $C
+| | | | |  :+        --date '2002-01-01 00:00:45' --user $C
+| | | | |  :+        --date '2002-02-10 05:00' --user $A
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| | | | |  :+        --date '2002-02-10 15:33' --user $B
+| | | | |  :+    cat nohglines.lst | rev > nohglinesrev.lst
+| | | | |  :+        --date '2002-02-10 16:01' --user $B
+| | | | |  :+        --date '2002-02-11 03:15' --user $A
+| | | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | | |  :+        --date '2002-02-11 05:43' --user $A
+| | | | |  :+    echo abc >> nohglinesrev.lst
+| | | | |  :+    echo 'Def' > addeddef && hg add addeddef
+| | | | |  :+    cat hglines.lst | rev > hglinesrev.lst
+| | | | |  :+    echo 'Abc' > ignoredabc
+| | | | |  :+tar cJf testrepo.tar.xz testrepo
+| | | | |  :diff -r aa37b7dd6c39 -r 00cf93136629 dlines.lst
+| | | | |  :--- /dev/null
+| | | | |  :+++ b/dlines.lst
+| | | | |  :@@ -0,0 +1,52 @@
+| | | | |  :+    cd testrepo
+| | | | |  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| | | | |  :+        --date '1999-01-02 5:20' --user $A
+| | | | |  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| | | | |  :+        --date '2000-01-05 7:30' --user $A
+| | | | |  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| | | | |  :+        --date '2000-01-15 15:00' --user $B
+| | | | |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| | | | |  :+        --date '2000-02-01 14:00' --user $B
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| | | | |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| | | | |  :+        --date '2000-05-10 4:23' --user $A
+| | | | |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| | | | |  :+    hg commit -A -m 'Added dlines.lst' \
+| | | | |  :+        --date '2000-11-01 13:24' --user $B
+| | | | |  :+    hg commit -A -m 'Added alines.lst' \
+| | | | |  :+        --date '2000-11-02 5:44' --user $A
+| | | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | | |  :+        --date '2000-11-02 14:13' --user $B
+| | | | |  :+        --date '2000-11-02 14:14' --user $B
+| | | | |  :+    hg update default
+| | | | |  :+        --date '2001-01-01 00:00' --user $C
+| | | | |  :+    hg update C
+| | | | |  :+    hg commit -A -m 'Added blines.lst' \
+| | | | |  :+        --date '2001-02-01 05:18' --user $A
+| | | | |  :+        --date '2001-02-01 05:19' --user $A
+| | | | |  :+    hg update -r -2
+| | | | |  :+    hg commit -A -m 'Added clines.lst' \
+| | | | |  :+        --date '2001-02-01 14:56' --user $B
+| | | | |  :+        --date '2001-02-01 14:56:52' --user $B
+| | | | |  :+    hg update A
+| | | | |  :+        --date '2002-01-01 00:00' --user $C
+| | | | |  :+        --date '2002-01-01 00:00:15' --user $C
+| | | | |  :+    hg update default
+| | | | |  :+        --date '2002-01-01 00:00:30' --user $C
+| | | | |  :+        --date '2002-01-01 00:00:45' --user $C
+| | | | |  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+| | | | |  :+        --date '2002-02-10 05:00' --user $A
+| | | | |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| | | | |  :+    hg commit -A -m 'Added nohglines.lst' \
+| | | | |  :+        --date '2002-02-10 15:33' --user $B
+| | | | |  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+| | | | |  :+        --date '2002-02-10 16:01' --user $B
+| | | | |  :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+| | | | |  :+    hg commit -A -m 'Added ignored10.lst' \
+| | | | |  :+        --date '2002-02-11 03:15' --user $A
+| | | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | | |  :+    hg commit -A -m 'Added .hgignore' \
+| | | | |  :+        --date '2002-02-11 05:43' --user $A
+| | | | |  :+    echo 'Def' > addeddef && hg add addeddef
+| | | | |  :+    echo 'Abc' > ignoredabc
+| | | | |  :
+| | | | |  
+| | o | |  Changeset 8:5c5f63aea57fbe740977648a1315f3369cb43663 (branch C)
+| |/ / /   Commited 02 Nov 2000 14:14 by B <b@example.org>
+| | | |    Files: .hgtags
+| | | |    @ Added tag ablines for changeset 0b4ef1ee673d
+| | | |    $  .hgtags | 1 0
+| | | |    $1 files changed, 1 insertions, 0 deletions
+| | | |    :diff -r 0b4ef1ee673d -r 5c5f63aea57f .hgtags
+| | | |    :--- /dev/null
+| | | |    :+++ b/.hgtags
+| | | |    :@@ -0,0 +1,1 @@
+| | | |    :+0b4ef1ee673d958bfa691f07fdbb4369b24904fa ablines
+| | | |    :
+| | | |    
+| o---+  Changeset 7:0b4ef1ee673d958bfa691f07fdbb4369b24904fa (branch C)
+|   | |  Commited 02 Nov 2000 14:13 by B <b@example.org>
+|  / /   Tags: ablines
+| | |    Files: ablines.lst
+| | |    @ Added ablines.lst
+| | |    $  ablines.lst | 13 0
+| | |    $1 files changed, 13 insertions, 0 deletions
+| | |    :diff -r 5cd1070d0a39 -r 0b4ef1ee673d ablines.lst
+| | |    :--- /dev/null
+| | |    :+++ b/ablines.lst
+| | |    :@@ -0,0 +1,13 @@
+| | |    :+local B='B <b@example.org>'
+| | |    :+    hg branch A
+| | |    :+    hg branch B
+| | |    :+    hg branch C
+| | |    :+    cat alines.lst | grep 'b' > ablines.lst
+| | |    :+    hg commit -A -m 'Added ablines.lst' \
+| | |    :+    hg tag ablines \
+| | |    :+    hg merge -r ablines
+| | |    :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | |    :+    hg tag blines \
+| | |    :+    echo $'syntax: glob\nignored*' > .hgignore
+| | |    :+    echo abc >> nohglinesrev.lst
+| | |    :+    echo 'Abc' > ignoredabc
+| | |    :
+| | |    
+| | o  Changeset 6:5cd1070d0a3933f74c9d34e7f5e515d20931bccc (branch B)
+| |/   Commited 02 Nov 2000 05:44 by A <a@example.com>
+| |    Files: alines.lst
+| |    @ Added alines.lst
+| |    $  alines.lst | 64 0
+| |    $1 files changed, 64 insertions, 0 deletions
+| |    :diff -r 4654f8e4bccd -r 5cd1070d0a39 alines.lst
+| |    :--- /dev/null
+| |    :+++ b/alines.lst
+| |    :@@ -0,0 +1,64 @@
+| |    :+emulate -L zsh
+| |    :+local A='A <a@example.com>'
+| |    :+local B='B <b@example.org>'
+| |    :+local C='C <c@example.gov>'
+| |    :+    cp ../createrepo.zsh .
+| |    :+    # XXX Date test will work only till 2099
+| |    :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| |    :+        --date '1999-01-02 5:20' --user $A
+| |    :+    hg mv createrepo.zsh crepo.zsh
+| |    :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| |    :+        --date '2000-01-05 7:30' --user $A
+| |    :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| |    :+        --date '2000-01-15 15:00' --user $B
+| |    :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| |    :+        --date '2000-02-01 14:00' --user $B
+| |    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |    :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| |    :+        --date '2000-05-10 4:23' --user $A
+| |    :+    hg branch A
+| |    :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| |    :+        --date '2000-11-01 13:24' --user $B
+| |    :+    hg branch B
+| |    :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| |    :+    hg commit -A -m 'Added alines.lst' \
+| |    :+        --date '2000-11-02 5:44' --user $A
+| |    :+    hg branch C
+| |    :+    cat alines.lst | grep 'b' > ablines.lst
+| |    :+    hg commit -A -m 'Added ablines.lst' \
+| |    :+        --date '2000-11-02 14:13' --user $B
+| |    :+    hg tag ablines \
+| |    :+        --date '2000-11-02 14:14' --user $B
+| |    :+    hg update default
+| |    :+    hg merge -r ablines
+| |    :+        --date '2001-01-01 00:00' --user $C
+| |    :+    hg update C
+| |    :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| |    :+        --date '2001-02-01 05:18' --user $A
+| |    :+    hg tag blines \
+| |    :+        --date '2001-02-01 05:19' --user $A
+| |    :+    hg update -r -2
+| |    :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |    :+        --date '2001-02-01 14:56' --user $B
+| |    :+    hg tag clines \
+| |    :+        --date '2001-02-01 14:56:52' --user $B
+| |    :+    hg update A
+| |    :+        --date '2002-01-01 00:00' --user $C
+| |    :+        --date '2002-01-01 00:00:15' --user $C
+| |    :+    hg update default
+| |    :+        --date '2002-01-01 00:00:30' --user $C
+| |    :+        --date '2002-01-01 00:00:45' --user $C
+| |    :+        --date '2002-02-10 05:00' --user $A
+| |    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |    :+        --date '2002-02-10 15:33' --user $B
+| |    :+    cat nohglines.lst | rev > nohglinesrev.lst
+| |    :+        --date '2002-02-10 16:01' --user $B
+| |    :+        --date '2002-02-11 03:15' --user $A
+| |    :+    echo $'syntax: glob\nignored*' > .hgignore
+| |    :+        --date '2002-02-11 05:43' --user $A
+| |    :+    echo abc >> nohglinesrev.lst
+| |    :+    echo 'Def' > addeddef && hg add addeddef
+| |    :+    cat hglines.lst | rev > hglinesrev.lst
+| |    :+    echo 'Abc' > ignoredabc
+| |    :+tar cJf testrepo.tar.xz testrepo
+| |    :
+| |    
+| o  Changeset 5:4654f8e4bccd8ba0e40479e6ba7f4a61874bbcb6 (branch A)
+|/   Commited 01 Nov 2000 13:24 by B <b@example.org>
+|    Files: dlines.lst
+|    @ Added dlines.lst
+|    $  dlines.lst | 52 0
+|    $1 files changed, 52 insertions, 0 deletions
+|    :diff -r aa37b7dd6c39 -r 4654f8e4bccd dlines.lst
+|    :--- /dev/null
+|    :+++ b/dlines.lst
+|    :@@ -0,0 +1,52 @@
+|    :+    cd testrepo
+|    :+    hg commit -A -m 'Added «createrepo.zsh»' \
+|    :+        --date '1999-01-02 5:20' --user $A
+|    :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|    :+        --date '2000-01-05 7:30' --user $A
+|    :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+|    :+        --date '2000-01-15 15:00' --user $B
+|    :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|    :+        --date '2000-02-01 14:00' --user $B
+|    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+|    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+|    :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|    :+        --date '2000-05-10 4:23' --user $A
+|    :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+|    :+    hg commit -A -m 'Added dlines.lst' \
+|    :+        --date '2000-11-01 13:24' --user $B
+|    :+    hg commit -A -m 'Added alines.lst' \
+|    :+        --date '2000-11-02 5:44' --user $A
+|    :+    hg commit -A -m 'Added ablines.lst' \
+|    :+        --date '2000-11-02 14:13' --user $B
+|    :+        --date '2000-11-02 14:14' --user $B
+|    :+    hg update default
+|    :+        --date '2001-01-01 00:00' --user $C
+|    :+    hg update C
+|    :+    hg commit -A -m 'Added blines.lst' \
+|    :+        --date '2001-02-01 05:18' --user $A
+|    :+        --date '2001-02-01 05:19' --user $A
+|    :+    hg update -r -2
+|    :+    hg commit -A -m 'Added clines.lst' \
+|    :+        --date '2001-02-01 14:56' --user $B
+|    :+        --date '2001-02-01 14:56:52' --user $B
+|    :+    hg update A
+|    :+        --date '2002-01-01 00:00' --user $C
+|    :+        --date '2002-01-01 00:00:15' --user $C
+|    :+    hg update default
+|    :+        --date '2002-01-01 00:00:30' --user $C
+|    :+        --date '2002-01-01 00:00:45' --user $C
+|    :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|    :+        --date '2002-02-10 05:00' --user $A
+|    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|    :+    hg commit -A -m 'Added nohglines.lst' \
+|    :+        --date '2002-02-10 15:33' --user $B
+|    :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|    :+        --date '2002-02-10 16:01' --user $B
+|    :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|    :+    hg commit -A -m 'Added ignored10.lst' \
+|    :+        --date '2002-02-11 03:15' --user $A
+|    :+    echo $'syntax: glob\nignored*' > .hgignore
+|    :+    hg commit -A -m 'Added .hgignore' \
+|    :+        --date '2002-02-11 05:43' --user $A
+|    :+    echo 'Def' > addeddef && hg add addeddef
+|    :+    echo 'Abc' > ignoredabc
+|    :
+|    
+o  Changeset 4:aa37b7dd6c397b16a77b1f405d49828aa6434bb2
+|  Commited 10 May 2000 04:23 by A <a@example.com>
+|  Files: datelines.lst, hglines.lst
+|  @ Added «hglines.lst» and «datelines.lst»
+|  $  datelines.lst | 41 0
+|  $  hglines.lst   | 41 0
+|  $2 files changed, 82 insertions, 0 deletions
+|  :diff -r ccf3e1d04180 -r aa37b7dd6c39 datelines.lst
+|  :--- /dev/null
+|  :+++ b/datelines.lst
+|  :@@ -0,0 +1,41 @@
+|  :+    hg init testrepo
+|  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :+    hg mv createrepo.zsh crepo.zsh
+|  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+|  :+    hg mv crepo.zsh chgrepo.zsh
+|  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :+    hg branch A
+|  :+    hg commit -A -m 'Added dlines.lst' \
+|  :+    hg branch B
+|  :+    hg commit -A -m 'Added alines.lst' \
+|  :+    hg branch C
+|  :+    hg commit -A -m 'Added ablines.lst' \
+|  :+    hg tag ablines \
+|  :+    hg update default
+|  :+    hg merge -r ablines
+|  :+    hg commit -m 'Merge from C' \
+|  :+    hg update C
+|  :+    hg commit -A -m 'Added blines.lst' \
+|  :+    hg tag blines \
+|  :+    hg update -r -2
+|  :+    hg commit -A -m 'Added clines.lst' \
+|  :+    hg tag clines \
+|  :+    hg update A
+|  :+    hg merge -r B
+|  :+    hg commit -m 'Merge from B' \
+|  :+    hg merge -r clines
+|  :+    hg commit -m 'Merge from C:2' \
+|  :+    hg update default
+|  :+    hg merge -r blines
+|  :+    hg commit -m 'Merge from C:1' \
+|  :+    hg merge -r A
+|  :+    hg commit -m 'Merge from A' \
+|  :+    hg cp hglines.lst hglines2.lst
+|  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :+    hg commit -A -m 'Added nohglines.lst' \
+|  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :+    hg commit -A -m 'Added ignored10.lst' \
+|  :+    hg commit -A -m 'Added .hgignore' \
+|  :+    hg rm hglines2.lst
+|  :diff -r ccf3e1d04180 -r aa37b7dd6c39 hglines.lst
+|  :--- /dev/null
+|  :+++ b/hglines.lst
+|  :@@ -0,0 +1,41 @@
+|  :+    hg init testrepo
+|  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :+    hg mv createrepo.zsh crepo.zsh
+|  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+|  :+    hg mv crepo.zsh chgrepo.zsh
+|  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :+    hg branch A
+|  :+    hg commit -A -m 'Added dlines.lst' \
+|  :+    hg branch B
+|  :+    hg commit -A -m 'Added alines.lst' \
+|  :+    hg branch C
+|  :+    hg commit -A -m 'Added ablines.lst' \
+|  :+    hg tag ablines \
+|  :+    hg update default
+|  :+    hg merge -r ablines
+|  :+    hg commit -m 'Merge from C' \
+|  :+    hg update C
+|  :+    hg commit -A -m 'Added blines.lst' \
+|  :+    hg tag blines \
+|  :+    hg update -r -2
+|  :+    hg commit -A -m 'Added clines.lst' \
+|  :+    hg tag clines \
+|  :+    hg update A
+|  :+    hg merge -r B
+|  :+    hg commit -m 'Merge from B' \
+|  :+    hg merge -r clines
+|  :+    hg commit -m 'Merge from C:2' \
+|  :+    hg update default
+|  :+    hg merge -r blines
+|  :+    hg commit -m 'Merge from C:1' \
+|  :+    hg merge -r A
+|  :+    hg commit -m 'Merge from A' \
+|  :+    hg cp hglines.lst hglines2.lst
+|  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :+    hg commit -A -m 'Added nohglines.lst' \
+|  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :+    hg commit -A -m 'Added ignored10.lst' \
+|  :+    hg commit -A -m 'Added .hgignore' \
+|  :+    hg rm hglines2.lst
+|  :
+|  
+o  Changeset 3:ccf3e1d041800ad99d46dcdec6e12c8a770456f9
+|  Commited 01 Feb 2000 14:00 by B <b@example.org>
+|  Files: chgrepo.zsh, crepo.zsh
+|  Renamed crepo.zsh to chgrepo.zsh
+|  @ Renamed «crepo.zsh» to «chgrepo.zsh»
+|  $  chgrepo.zsh | 94  0
+|  $  crepo.zsh   |  0 94
+|  $2 files changed, 94 insertions, 94 deletions
+|  :diff -r 41c3d8d71ffe -r ccf3e1d04180 chgrepo.zsh
+|  :--- /dev/null
+|  :+++ b/chgrepo.zsh
+|  :@@ -0,0 +1,94 @@
+|  :+#!/bin/zsh
+|  :+emulate -L zsh
+|  :+set -e
+|  :+local A='A <a@example.com>'
+|  :+local B='B <b@example.org>'
+|  :+local C='C <c@example.gov>'
+|  :+{
+|  :+    set -e
+|  :+    hg init testrepo
+|  :+    cd testrepo
+|  :+    cp ../createrepo.zsh .
+|  :+    # XXX Date test will work only till 2099
+|  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :+        --date '1999-01-02 5:20' --user $A
+|  :+    hg mv createrepo.zsh crepo.zsh
+|  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :+        --date '2000-01-05 7:30' --user $A
+|  :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+|  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+|  :+        --date '2000-01-15 15:00' --user $B
+|  :+    hg mv crepo.zsh chgrepo.zsh
+|  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :+        --date '2000-02-01 14:00' --user $B
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+|  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :+        --date '2000-05-10 4:23' --user $A
+|  :+    hg branch A
+|  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+|  :+    hg commit -A -m 'Added dlines.lst' \
+|  :+        --date '2000-11-01 13:24' --user $B
+|  :+    hg branch B
+|  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+|  :+    hg commit -A -m 'Added alines.lst' \
+|  :+        --date '2000-11-02 5:44' --user $A
+|  :+    hg branch C
+|  :+    cat alines.lst | grep 'b' > ablines.lst
+|  :+    hg commit -A -m 'Added ablines.lst' \
+|  :+        --date '2000-11-02 14:13' --user $B
+|  :+    hg tag ablines \
+|  :+        --date '2000-11-02 14:14' --user $B
+|  :+    hg update default
+|  :+    hg merge -r ablines
+|  :+    hg commit -m 'Merge from C' \
+|  :+        --date '2001-01-01 00:00' --user $C
+|  :+    hg update C
+|  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+|  :+    hg commit -A -m 'Added blines.lst' \
+|  :+        --date '2001-02-01 05:18' --user $A
+|  :+    hg tag blines \
+|  :+        --date '2001-02-01 05:19' --user $A
+|  :+    hg update -r -2
+|  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+|  :+    hg commit -A -m 'Added clines.lst' \
+|  :+        --date '2001-02-01 14:56' --user $B
+|  :+    hg tag clines \
+|  :+        --date '2001-02-01 14:56:52' --user $B
+|  :+    hg update A
+|  :+    hg merge -r B
+|  :+    hg commit -m 'Merge from B' \
+|  :+        --date '2002-01-01 00:00' --user $C
+|  :+    hg merge -r clines
+|  :+    hg commit -m 'Merge from C:2' \
+|  :+        --date '2002-01-01 00:00:15' --user $C
+|  :+    hg update default
+|  :+    hg merge -r blines
+|  :+    hg commit -m 'Merge from C:1' \
+|  :+        --date '2002-01-01 00:00:30' --user $C
+|  :+    hg merge -r A
+|  :+    hg commit -m 'Merge from A' \
+|  :+        --date '2002-01-01 00:00:45' --user $C
+|  :+    hg cp hglines.lst hglines2.lst
+|  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :+        --date '2002-02-10 05:00' --user $A
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|  :+    hg commit -A -m 'Added nohglines.lst' \
+|  :+        --date '2002-02-10 15:33' --user $B
+|  :+    cat nohglines.lst | rev > nohglinesrev.lst
+|  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :+        --date '2002-02-10 16:01' --user $B
+|  :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|  :+    hg commit -A -m 'Added ignored10.lst' \
+|  :+        --date '2002-02-11 03:15' --user $A
+|  :+    echo $'syntax: glob\nignored*' > .hgignore
+|  :+    hg commit -A -m 'Added .hgignore' \
+|  :+        --date '2002-02-11 05:43' --user $A
+|  :+    echo abc >> nohglinesrev.lst
+|  :+    echo 'Def' > addeddef && hg add addeddef
+|  :+    hg rm hglines2.lst
+|  :+    rm nohglines.lst
+|  :+    cat hglines.lst | rev > hglinesrev.lst
+|  :+    echo 'Abc' > ignoredabc
+|  :+}
+|  :+tar cJf testrepo.tar.xz testrepo
+|  :diff -r 41c3d8d71ffe -r ccf3e1d04180 crepo.zsh
+|  :--- a/crepo.zsh
+|  :+++ /dev/null
+|  :@@ -1,94 +0,0 @@
+|  :-#!/bin/zsh
+|  :-emulate -L zsh
+|  :-set -e
+|  :-local A='A <a@example.com>'
+|  :-local B='B <b@example.org>'
+|  :-local C='C <c@example.gov>'
+|  :-{
+|  :-    set -e
+|  :-    hg init testrepo
+|  :-    cd testrepo
+|  :-    cp ../createrepo.zsh .
+|  :-    # XXX Date test will work only till 2099
+|  :-    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :-        --date '1999-01-02 5:20' --user $A
+|  :-    hg mv createrepo.zsh crepo.zsh
+|  :-    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :-        --date '2000-01-05 7:30' --user $A
+|  :-    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+|  :-    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+|  :-        --date '2000-01-15 15:00' --user $B
+|  :-    hg mv crepo.zsh chgrepo.zsh
+|  :-    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :-        --date '2000-02-01 14:00' --user $B
+|  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+|  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+|  :-    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :-        --date '2000-05-10 4:23' --user $A
+|  :-    hg branch A
+|  :-    cat chgrepo.zsh | grep 'd' > dlines.lst
+|  :-    hg commit -A -m 'Added dlines.lst' \
+|  :-        --date '2000-11-01 13:24' --user $B
+|  :-    hg branch B
+|  :-    cat chgrepo.zsh | grep 'a' > alines.lst
+|  :-    hg commit -A -m 'Added alines.lst' \
+|  :-        --date '2000-11-02 5:44' --user $A
+|  :-    hg branch C
+|  :-    cat alines.lst | grep 'b' > ablines.lst
+|  :-    hg commit -A -m 'Added ablines.lst' \
+|  :-        --date '2000-11-02 14:13' --user $B
+|  :-    hg tag ablines \
+|  :-        --date '2000-11-02 14:14' --user $B
+|  :-    hg update default
+|  :-    hg merge -r ablines
+|  :-    hg commit -m 'Merge from C' \
+|  :-        --date '2001-01-01 00:00' --user $C
+|  :-    hg update C
+|  :-    cat chgrepo.zsh | grep 'b' > blines.lst
+|  :-    hg commit -A -m 'Added blines.lst' \
+|  :-        --date '2001-02-01 05:18' --user $A
+|  :-    hg tag blines \
+|  :-        --date '2001-02-01 05:19' --user $A
+|  :-    hg update -r -2
+|  :-    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+|  :-    hg commit -A -m 'Added clines.lst' \
+|  :-        --date '2001-02-01 14:56' --user $B
+|  :-    hg tag clines \
+|  :-        --date '2001-02-01 14:56:52' --user $B
+|  :-    hg update A
+|  :-    hg merge -r B
+|  :-    hg commit -m 'Merge from B' \
+|  :-        --date '2002-01-01 00:00' --user $C
+|  :-    hg merge -r clines
+|  :-    hg commit -m 'Merge from C:2' \
+|  :-        --date '2002-01-01 00:00:15' --user $C
+|  :-    hg update default
+|  :-    hg merge -r blines
+|  :-    hg commit -m 'Merge from C:1' \
+|  :-        --date '2002-01-01 00:00:30' --user $C
+|  :-    hg merge -r A
+|  :-    hg commit -m 'Merge from A' \
+|  :-        --date '2002-01-01 00:00:45' --user $C
+|  :-    hg cp hglines.lst hglines2.lst
+|  :-    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :-        --date '2002-02-10 05:00' --user $A
+|  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|  :-    hg commit -A -m 'Added nohglines.lst' \
+|  :-        --date '2002-02-10 15:33' --user $B
+|  :-    cat nohglines.lst | rev > nohglinesrev.lst
+|  :-    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :-        --date '2002-02-10 16:01' --user $B
+|  :-    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|  :-    hg commit -A -m 'Added ignored10.lst' \
+|  :-        --date '2002-02-11 03:15' --user $A
+|  :-    echo $'syntax: glob\nignored*' > .hgignore
+|  :-    hg commit -A -m 'Added .hgignore' \
+|  :-        --date '2002-02-11 05:43' --user $A
+|  :-    echo abc >> nohglinesrev.lst
+|  :-    echo 'Def' > addeddef && hg add addeddef
+|  :-    hg rm hglines2.lst
+|  :-    rm nohglines.lst
+|  :-    cat hglines.lst | rev > hglinesrev.lst
+|  :-    echo 'Abc' > ignoredabc
+|  :-}
+|  :-tar cJf testrepo.tar.xz testrepo
+|  :
+|  
+o  Changeset 2:41c3d8d71ffecac8d1d2e4ac56b8a36c038290e1
+|  Commited 15 Jan 2000 15:00 by B <b@example.org>
+|  Files: crepo.zsh
+|  @ Replaced
+|  @     (
+|  @         ...
+|  @     )
+|  @ with
+|  @     {
+|  @         ...
+|  @     }
+|  $  crepo.zsh | 4 4
+|  $1 files changed, 4 insertions, 4 deletions
+|  :diff -r fe851681c15e -r 41c3d8d71ffe crepo.zsh
+|  :--- a/crepo.zsh
+|  :+++ b/crepo.zsh
+|  :@@ -4,7 +4,7 @@
+|  : local A='A <a@example.com>'
+|  : local B='B <b@example.org>'
+|  : local C='C <c@example.gov>'
+|  :-(
+|  :+{
+|  :     set -e
+|  :     hg init testrepo
+|  :     cd testrepo
+|  :@@ -15,8 +15,8 @@
+|  :     hg mv createrepo.zsh crepo.zsh
+|  :     hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :         --date '2000-01-05 7:30' --user $A
+|  :-    perl -p -i -e 'tr/()/{}/' crepo.zsh
+|  :-    hg commit -m $'Replaced\n    (\n        ...\n    )\nwith\n    {\n        ...\n    }' \
+|  :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+|  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+|  :         --date '2000-01-15 15:00' --user $B
+|  :     hg mv crepo.zsh chgrepo.zsh
+|  :     hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :@@ -90,5 +90,5 @@
+|  :     rm nohglines.lst
+|  :     cat hglines.lst | rev > hglinesrev.lst
+|  :     echo 'Abc' > ignoredabc
+|  :-)
+|  :+}
+|  : tar cJf testrepo.tar.xz testrepo
+|  :
+|  
+o  Changeset 1:fe851681c15eb282a18ab7660f85a677ee1e577c
+|  Commited 05 Jan 2000 07:30 by A <a@example.com>
+|  Files: createrepo.zsh, crepo.zsh
+|  Renamed createrepo.zsh to crepo.zsh
+|  @ Renamed «createrepo.zsh» to «crepo.zsh»
+|  $  createrepo.zsh |  0 94
+|  $  crepo.zsh      | 94  0
+|  $2 files changed, 94 insertions, 94 deletions
+|  :diff -r 00b61a9315e2 -r fe851681c15e createrepo.zsh
+|  :--- a/createrepo.zsh
+|  :+++ /dev/null
+|  :@@ -1,94 +0,0 @@
+|  :-#!/bin/zsh
+|  :-emulate -L zsh
+|  :-set -e
+|  :-local A='A <a@example.com>'
+|  :-local B='B <b@example.org>'
+|  :-local C='C <c@example.gov>'
+|  :-(
+|  :-    set -e
+|  :-    hg init testrepo
+|  :-    cd testrepo
+|  :-    cp ../createrepo.zsh .
+|  :-    # XXX Date test will work only till 2099
+|  :-    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :-        --date '1999-01-02 5:20' --user $A
+|  :-    hg mv createrepo.zsh crepo.zsh
+|  :-    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :-        --date '2000-01-05 7:30' --user $A
+|  :-    perl -p -i -e 'tr/()/{}/' crepo.zsh
+|  :-    hg commit -m $'Replaced\n    (\n        ...\n    )\nwith\n    {\n        ...\n    }' \
+|  :-        --date '2000-01-15 15:00' --user $B
+|  :-    hg mv crepo.zsh chgrepo.zsh
+|  :-    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :-        --date '2000-02-01 14:00' --user $B
+|  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+|  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+|  :-    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :-        --date '2000-05-10 4:23' --user $A
+|  :-    hg branch A
+|  :-    cat chgrepo.zsh | grep 'd' > dlines.lst
+|  :-    hg commit -A -m 'Added dlines.lst' \
+|  :-        --date '2000-11-01 13:24' --user $B
+|  :-    hg branch B
+|  :-    cat chgrepo.zsh | grep 'a' > alines.lst
+|  :-    hg commit -A -m 'Added alines.lst' \
+|  :-        --date '2000-11-02 5:44' --user $A
+|  :-    hg branch C
+|  :-    cat alines.lst | grep 'b' > ablines.lst
+|  :-    hg commit -A -m 'Added ablines.lst' \
+|  :-        --date '2000-11-02 14:13' --user $B
+|  :-    hg tag ablines \
+|  :-        --date '2000-11-02 14:14' --user $B
+|  :-    hg update default
+|  :-    hg merge -r ablines
+|  :-    hg commit -m 'Merge from C' \
+|  :-        --date '2001-01-01 00:00' --user $C
+|  :-    hg update C
+|  :-    cat chgrepo.zsh | grep 'b' > blines.lst
+|  :-    hg commit -A -m 'Added blines.lst' \
+|  :-        --date '2001-02-01 05:18' --user $A
+|  :-    hg tag blines \
+|  :-        --date '2001-02-01 05:19' --user $A
+|  :-    hg update -r -2
+|  :-    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+|  :-    hg commit -A -m 'Added clines.lst' \
+|  :-        --date '2001-02-01 14:56' --user $B
+|  :-    hg tag clines \
+|  :-        --date '2001-02-01 14:56:52' --user $B
+|  :-    hg update A
+|  :-    hg merge -r B
+|  :-    hg commit -m 'Merge from B' \
+|  :-        --date '2002-01-01 00:00' --user $C
+|  :-    hg merge -r clines
+|  :-    hg commit -m 'Merge from C:2' \
+|  :-        --date '2002-01-01 00:00:15' --user $C
+|  :-    hg update default
+|  :-    hg merge -r blines
+|  :-    hg commit -m 'Merge from C:1' \
+|  :-        --date '2002-01-01 00:00:30' --user $C
+|  :-    hg merge -r A
+|  :-    hg commit -m 'Merge from A' \
+|  :-        --date '2002-01-01 00:00:45' --user $C
+|  :-    hg cp hglines.lst hglines2.lst
+|  :-    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :-        --date '2002-02-10 05:00' --user $A
+|  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|  :-    hg commit -A -m 'Added nohglines.lst' \
+|  :-        --date '2002-02-10 15:33' --user $B
+|  :-    cat nohglines.lst | rev > nohglinesrev.lst
+|  :-    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :-        --date '2002-02-10 16:01' --user $B
+|  :-    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|  :-    hg commit -A -m 'Added ignored10.lst' \
+|  :-        --date '2002-02-11 03:15' --user $A
+|  :-    echo $'syntax: glob\nignored*' > .hgignore
+|  :-    hg commit -A -m 'Added .hgignore' \
+|  :-        --date '2002-02-11 05:43' --user $A
+|  :-    echo abc >> nohglinesrev.lst
+|  :-    echo 'Def' > addeddef && hg add addeddef
+|  :-    hg rm hglines2.lst
+|  :-    rm nohglines.lst
+|  :-    cat hglines.lst | rev > hglinesrev.lst
+|  :-    echo 'Abc' > ignoredabc
+|  :-)
+|  :-tar cJf testrepo.tar.xz testrepo
+|  :diff -r 00b61a9315e2 -r fe851681c15e crepo.zsh
+|  :--- /dev/null
+|  :+++ b/crepo.zsh
+|  :@@ -0,0 +1,94 @@
+|  :+#!/bin/zsh
+|  :+emulate -L zsh
+|  :+set -e
+|  :+local A='A <a@example.com>'
+|  :+local B='B <b@example.org>'
+|  :+local C='C <c@example.gov>'
+|  :+(
+|  :+    set -e
+|  :+    hg init testrepo
+|  :+    cd testrepo
+|  :+    cp ../createrepo.zsh .
+|  :+    # XXX Date test will work only till 2099
+|  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :+        --date '1999-01-02 5:20' --user $A
+|  :+    hg mv createrepo.zsh crepo.zsh
+|  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :+        --date '2000-01-05 7:30' --user $A
+|  :+    perl -p -i -e 'tr/()/{}/' crepo.zsh
+|  :+    hg commit -m $'Replaced\n    (\n        ...\n    )\nwith\n    {\n        ...\n    }' \
+|  :+        --date '2000-01-15 15:00' --user $B
+|  :+    hg mv crepo.zsh chgrepo.zsh
+|  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :+        --date '2000-02-01 14:00' --user $B
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+|  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :+        --date '2000-05-10 4:23' --user $A
+|  :+    hg branch A
+|  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+|  :+    hg commit -A -m 'Added dlines.lst' \
+|  :+        --date '2000-11-01 13:24' --user $B
+|  :+    hg branch B
+|  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+|  :+    hg commit -A -m 'Added alines.lst' \
+|  :+        --date '2000-11-02 5:44' --user $A
+|  :+    hg branch C
+|  :+    cat alines.lst | grep 'b' > ablines.lst
+|  :+    hg commit -A -m 'Added ablines.lst' \
+|  :+        --date '2000-11-02 14:13' --user $B
+|  :+    hg tag ablines \
+|  :+        --date '2000-11-02 14:14' --user $B
+|  :+    hg update default
+|  :+    hg merge -r ablines
+|  :+    hg commit -m 'Merge from C' \
+|  :+        --date '2001-01-01 00:00' --user $C
+|  :+    hg update C
+|  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+|  :+    hg commit -A -m 'Added blines.lst' \
+|  :+        --date '2001-02-01 05:18' --user $A
+|  :+    hg tag blines \
+|  :+        --date '2001-02-01 05:19' --user $A
+|  :+    hg update -r -2
+|  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+|  :+    hg commit -A -m 'Added clines.lst' \
+|  :+        --date '2001-02-01 14:56' --user $B
+|  :+    hg tag clines \
+|  :+        --date '2001-02-01 14:56:52' --user $B
+|  :+    hg update A
+|  :+    hg merge -r B
+|  :+    hg commit -m 'Merge from B' \
+|  :+        --date '2002-01-01 00:00' --user $C
+|  :+    hg merge -r clines
+|  :+    hg commit -m 'Merge from C:2' \
+|  :+        --date '2002-01-01 00:00:15' --user $C
+|  :+    hg update default
+|  :+    hg merge -r blines
+|  :+    hg commit -m 'Merge from C:1' \
+|  :+        --date '2002-01-01 00:00:30' --user $C
+|  :+    hg merge -r A
+|  :+    hg commit -m 'Merge from A' \
+|  :+        --date '2002-01-01 00:00:45' --user $C
+|  :+    hg cp hglines.lst hglines2.lst
+|  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :+        --date '2002-02-10 05:00' --user $A
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|  :+    hg commit -A -m 'Added nohglines.lst' \
+|  :+        --date '2002-02-10 15:33' --user $B
+|  :+    cat nohglines.lst | rev > nohglinesrev.lst
+|  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :+        --date '2002-02-10 16:01' --user $B
+|  :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|  :+    hg commit -A -m 'Added ignored10.lst' \
+|  :+        --date '2002-02-11 03:15' --user $A
+|  :+    echo $'syntax: glob\nignored*' > .hgignore
+|  :+    hg commit -A -m 'Added .hgignore' \
+|  :+        --date '2002-02-11 05:43' --user $A
+|  :+    echo abc >> nohglinesrev.lst
+|  :+    echo 'Def' > addeddef && hg add addeddef
+|  :+    hg rm hglines2.lst
+|  :+    rm nohglines.lst
+|  :+    cat hglines.lst | rev > hglinesrev.lst
+|  :+    echo 'Abc' > ignoredabc
+|  :+)
+|  :+tar cJf testrepo.tar.xz testrepo
+|  :
+|  
+o  Changeset 0:00b61a9315e2ecb239feba3bc44b2ef3af4c7dd1
+|  Commited 02 Jan 1999 05:20 by A <a@example.com>
+|  Files: createrepo.zsh
+|  @ Added «createrepo.zsh»
+|  $  createrepo.zsh | 94 0
+|  $1 files changed, 94 insertions, 0 deletions
+|  :diff -r 000000000000 -r 00b61a9315e2 createrepo.zsh
+|  :--- /dev/null
+|  :+++ b/createrepo.zsh
+|  :@@ -0,0 +1,94 @@
+|  :+#!/bin/zsh
+|  :+emulate -L zsh
+|  :+set -e
+|  :+local A='A <a@example.com>'
+|  :+local B='B <b@example.org>'
+|  :+local C='C <c@example.gov>'
+|  :+(
+|  :+    set -e
+|  :+    hg init testrepo
+|  :+    cd testrepo
+|  :+    cp ../createrepo.zsh .
+|  :+    # XXX Date test will work only till 2099
+|  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :+        --date '1999-01-02 5:20' --user $A
+|  :+    hg mv createrepo.zsh crepo.zsh
+|  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :+        --date '2000-01-05 7:30' --user $A
+|  :+    perl -p -i -e 'tr/()/{}/' crepo.zsh
+|  :+    hg commit -m $'Replaced\n    (\n        ...\n    )\nwith\n    {\n        ...\n    }' \
+|  :+        --date '2000-01-15 15:00' --user $B
+|  :+    hg mv crepo.zsh chgrepo.zsh
+|  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :+        --date '2000-02-01 14:00' --user $B
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+|  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :+        --date '2000-05-10 4:23' --user $A
+|  :+    hg branch A
+|  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+|  :+    hg commit -A -m 'Added dlines.lst' \
+|  :+        --date '2000-11-01 13:24' --user $B
+|  :+    hg branch B
+|  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+|  :+    hg commit -A -m 'Added alines.lst' \
+|  :+        --date '2000-11-02 5:44' --user $A
+|  :+    hg branch C
+|  :+    cat alines.lst | grep 'b' > ablines.lst
+|  :+    hg commit -A -m 'Added ablines.lst' \
+|  :+        --date '2000-11-02 14:13' --user $B
+|  :+    hg tag ablines \
+|  :+        --date '2000-11-02 14:14' --user $B
+|  :+    hg update default
+|  :+    hg merge -r ablines
+|  :+    hg commit -m 'Merge from C' \
+|  :+        --date '2001-01-01 00:00' --user $C
+|  :+    hg update C
+|  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+|  :+    hg commit -A -m 'Added blines.lst' \
+|  :+        --date '2001-02-01 05:18' --user $A
+|  :+    hg tag blines \
+|  :+        --date '2001-02-01 05:19' --user $A
+|  :+    hg update -r -2
+|  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+|  :+    hg commit -A -m 'Added clines.lst' \
+|  :+        --date '2001-02-01 14:56' --user $B
+|  :+    hg tag clines \
+|  :+        --date '2001-02-01 14:56:52' --user $B
+|  :+    hg update A
+|  :+    hg merge -r B
+|  :+    hg commit -m 'Merge from B' \
+|  :+        --date '2002-01-01 00:00' --user $C
+|  :+    hg merge -r clines
+|  :+    hg commit -m 'Merge from C:2' \
+|  :+        --date '2002-01-01 00:00:15' --user $C
+|  :+    hg update default
+|  :+    hg merge -r blines
+|  :+    hg commit -m 'Merge from C:1' \
+|  :+        --date '2002-01-01 00:00:30' --user $C
+|  :+    hg merge -r A
+|  :+    hg commit -m 'Merge from A' \
+|  :+        --date '2002-01-01 00:00:45' --user $C
+|  :+    hg cp hglines.lst hglines2.lst
+|  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :+        --date '2002-02-10 05:00' --user $A
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|  :+    hg commit -A -m 'Added nohglines.lst' \
+|  :+        --date '2002-02-10 15:33' --user $B
+|  :+    cat nohglines.lst | rev > nohglinesrev.lst
+|  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :+        --date '2002-02-10 16:01' --user $B
+|  :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|  :+    hg commit -A -m 'Added ignored10.lst' \
+|  :+        --date '2002-02-11 03:15' --user $A
+|  :+    echo $'syntax: glob\nignored*' > .hgignore
+|  :+    hg commit -A -m 'Added .hgignore' \
+|  :+        --date '2002-02-11 05:43' --user $A
+|  :+    echo abc >> nohglinesrev.lst
+|  :+    echo 'Def' > addeddef && hg add addeddef
+|  :+    hg rm hglines2.lst
+|  :+    rm nohglines.lst
+|  :+    cat hglines.lst | rev > hglinesrev.lst
+|  :+    echo 'Abc' > ignoredabc
+|  :+)
+|  :+tar cJf testrepo.tar.xz testrepo
+|  :
+|  
+{{{1 hgdef
+@  changeset:   22:54d2db605eec15091bb4b194499d6db40e2af027
+|  tags:        tip
+|  user:        A <a@example.com>
+|  date:        Пнд Фев 11 05:43:00 2002
+|  files:       .hgignore
+|  summary:     Added .hgignore
+|  $  .hgignore | 2 0
+|  $1 files changed, 2 insertions, 0 deletions
+|  :diff -r 214bbd7a8f11 -r 54d2db605eec .hgignore
+|  :--- /dev/null
+|  :+++ b/.hgignore
+|  :@@ -0,0 +1,2 @@
+|  :+syntax: glob
+|  :+ignored*
+|  :
+|  
+o  changeset:   21:214bbd7a8f1198ea9a78a01edf38a3fa8d2ad2ae
+|  user:        A <a@example.com>
+|  date:        Пнд Фев 11 03:15:00 2002
+|  files:       ignored10.lst
+|  summary:     Added ignored10.lst
+|  $  ignored10.lst | 10 0
+|  $1 files changed, 10 insertions, 0 deletions
+|  :diff -r 2c2d8b2b8164 -r 214bbd7a8f11 ignored10.lst
+|  :--- /dev/null
+|  :+++ b/ignored10.lst
+|  :@@ -0,0 +1,10 @@
+|  :+1
+|  :+2
+|  :+3
+|  :+4
+|  :+5
+|  :+6
+|  :+7
+|  :+8
+|  :+9
+|  :+10
+|  :
+|  
+o  changeset:   20:2c2d8b2b8164681fcc1ea55bf8e086f034ddc70e
+|  user:        B <b@example.org>
+|  date:        Вск Фев 10 16:01:00 2002
+|  files:       nohglinesrev.lst
+|  summary:     Added nohglinesrev.lst
+|  $  nohglinesrev.lst | 53 0
+|  $1 files changed, 53 insertions, 0 deletions
+|  :diff -r a38ec092ab72 -r 2c2d8b2b8164 nohglinesrev.lst
+|  :--- /dev/null
+|  :+++ b/nohglinesrev.lst
+|  :@@ -0,0 +1,53 @@
+|  :+hsz/nib/!#
+|  :+hsz L- etalume
+|  :+e- tes
+|  :+'>moc.elpmaxe@a< A'=A lacol
+|  :+'>gro.elpmaxe@b< B'=B lacol
+|  :+'>vog.elpmaxe@c< C'=C lacol
+|  :+{
+|  :+e- tes    
+|  :+opertset dc    
+|  :+. hsz.operetaerc/.. pc    
+|  :+9902 llit ylno krow lliw tset etaD XXX #    
+|  :+A$ resu-- '02:5 20-10-9991' etad--        
+|  :+A$ resu-- '03:7 50-10-0002' etad--        
+|  :+hsz.operc '/}{/}{/rt' e- i- p- lrep    
+|  :+B$ resu-- '00:51 51-10-0002' etad--        
+|  :+B$ resu-- '00:41 10-20-0002' etad--        
+|  :+tsl.senilgh > '/ gh    ^/ sselnu _$ fednu' e- i- p- lrep | hsz.operghc tac    
+|  :+tsl.seniletad > '/ gh    ^/ sselnu _$ fednu' e- i- p- lrep | hsz.operghc tac    
+|  :+A$ resu-- '32:4 01-50-0002' etad--        
+|  :+tsl.senild > 'd' perg | hsz.operghc tac    
+|  :+B$ resu-- '42:31 10-11-0002' etad--        
+|  :+tsl.senila > 'a' perg | hsz.operghc tac    
+|  :+A$ resu-- '44:5 20-11-0002' etad--        
+|  :+tsl.senilba > 'b' perg | tsl.senila tac    
+|  :+B$ resu-- '31:41 20-11-0002' etad--        
+|  :+B$ resu-- '41:41 20-11-0002' etad--        
+|  :+C$ resu-- '00:00 10-10-1002' etad--        
+|  :+tsl.senilb > 'b' perg | hsz.operghc tac    
+|  :+A$ resu-- '81:50 10-20-1002' etad--        
+|  :+A$ resu-- '91:50 10-20-1002' etad--        
+|  :+tsl.senilc > 'c' perg | tros | hsz.operghc tac    
+|  :+B$ resu-- '65:41 10-20-1002' etad--        
+|  :+B$ resu-- '25:65:41 10-20-1002' etad--        
+|  :+C$ resu-- '00:00 10-10-2002' etad--        
+|  :+C$ resu-- '51:00:00 10-10-2002' etad--        
+|  :+C$ resu-- '03:00:00 10-10-2002' etad--        
+|  :+C$ resu-- '54:00:00 10-10-2002' etad--        
+|  :+A$ resu-- '00:50 01-20-2002' etad--        
+|  :+tsl.senilghon > '/ gh    ^/ fi _$ fednu' e- i- p- lrep | hsz.operghc tac    
+|  :+B$ resu-- '33:51 01-20-2002' etad--        
+|  :+tsl.versenilghon > ver | tsl.senilghon tac    
+|  :+B$ resu-- '10:61 01-20-2002' etad--        
+|  :+tsl.01derongi > 'n\'$ ' ' rt | 01 1 qes    
+|  :+A$ resu-- '51:30 11-20-2002' etad--        
+|  :+erongigh. > '*derongin\bolg :xatnys'$ ohce    
+|  :+A$ resu-- '34:50 11-20-2002' etad--        
+|  :+tsl.versenilghon >> cba ohce    
+|  :+feddedda dda gh && feddedda > 'feD' ohce    
+|  :+tsl.senilghon mr    
+|  :+tsl.versenilgh > ver | tsl.senilgh tac    
+|  :+cbaderongi > 'cbA' ohce    
+|  :+}
+|  :+opertset zx.rat.opertset fJc rat
+|  :
+|  
+o  changeset:   19:a38ec092ab72534eae6240c4378f4e4da9fb7e74
+|  user:        B <b@example.org>
+|  date:        Вск Фев 10 15:33:00 2002
+|  files:       nohglines.lst
+|  summary:     Added nohglines.lst
+|  $  nohglines.lst | 53 0
+|  $1 files changed, 53 insertions, 0 deletions
+|  :diff -r 5b7ed139504a -r a38ec092ab72 nohglines.lst
+|  :--- /dev/null
+|  :+++ b/nohglines.lst
+|  :@@ -0,0 +1,53 @@
+|  :+#!/bin/zsh
+|  :+emulate -L zsh
+|  :+set -e
+|  :+local A='A <a@example.com>'
+|  :+local B='B <b@example.org>'
+|  :+local C='C <c@example.gov>'
+|  :+{
+|  :+    set -e
+|  :+    cd testrepo
+|  :+    cp ../createrepo.zsh .
+|  :+    # XXX Date test will work only till 2099
+|  :+        --date '1999-01-02 5:20' --user $A
+|  :+        --date '2000-01-05 7:30' --user $A
+|  :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+|  :+        --date '2000-01-15 15:00' --user $B
+|  :+        --date '2000-02-01 14:00' --user $B
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+|  :+        --date '2000-05-10 4:23' --user $A
+|  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+|  :+        --date '2000-11-01 13:24' --user $B
+|  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+|  :+        --date '2000-11-02 5:44' --user $A
+|  :+    cat alines.lst | grep 'b' > ablines.lst
+|  :+        --date '2000-11-02 14:13' --user $B
+|  :+        --date '2000-11-02 14:14' --user $B
+|  :+        --date '2001-01-01 00:00' --user $C
+|  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+|  :+        --date '2001-02-01 05:18' --user $A
+|  :+        --date '2001-02-01 05:19' --user $A
+|  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+|  :+        --date '2001-02-01 14:56' --user $B
+|  :+        --date '2001-02-01 14:56:52' --user $B
+|  :+        --date '2002-01-01 00:00' --user $C
+|  :+        --date '2002-01-01 00:00:15' --user $C
+|  :+        --date '2002-01-01 00:00:30' --user $C
+|  :+        --date '2002-01-01 00:00:45' --user $C
+|  :+        --date '2002-02-10 05:00' --user $A
+|  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|  :+        --date '2002-02-10 15:33' --user $B
+|  :+    cat nohglines.lst | rev > nohglinesrev.lst
+|  :+        --date '2002-02-10 16:01' --user $B
+|  :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|  :+        --date '2002-02-11 03:15' --user $A
+|  :+    echo $'syntax: glob\nignored*' > .hgignore
+|  :+        --date '2002-02-11 05:43' --user $A
+|  :+    echo abc >> nohglinesrev.lst
+|  :+    echo 'Def' > addeddef && hg add addeddef
+|  :+    rm nohglines.lst
+|  :+    cat hglines.lst | rev > hglinesrev.lst
+|  :+    echo 'Abc' > ignoredabc
+|  :+}
+|  :+tar cJf testrepo.tar.xz testrepo
+|  :
+|  
+o  changeset:   18:5b7ed139504a773cacfda7307e92cfba9a602d7f
+|  user:        A <a@example.com>
+|  date:        Вск Фев 10 05:00:00 2002
+|  files:       hglines2.lst
+|  summary:     Copied “hglines.lst” to “hglines2.lst”
+|  $  hglines2.lst | 41 0
+|  $1 files changed, 41 insertions, 0 deletions
+|  :diff -r 21d58f7d0c8a -r 5b7ed139504a hglines2.lst
+|  :--- /dev/null
+|  :+++ b/hglines2.lst
+|  :@@ -0,0 +1,41 @@
+|  :+    hg init testrepo
+|  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+|  :+    hg mv createrepo.zsh crepo.zsh
+|  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+|  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+|  :+    hg mv crepo.zsh chgrepo.zsh
+|  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+|  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+|  :+    hg branch A
+|  :+    hg commit -A -m 'Added dlines.lst' \
+|  :+    hg branch B
+|  :+    hg commit -A -m 'Added alines.lst' \
+|  :+    hg branch C
+|  :+    hg commit -A -m 'Added ablines.lst' \
+|  :+    hg tag ablines \
+|  :+    hg update default
+|  :+    hg merge -r ablines
+|  :+    hg commit -m 'Merge from C' \
+|  :+    hg update C
+|  :+    hg commit -A -m 'Added blines.lst' \
+|  :+    hg tag blines \
+|  :+    hg update -r -2
+|  :+    hg commit -A -m 'Added clines.lst' \
+|  :+    hg tag clines \
+|  :+    hg update A
+|  :+    hg merge -r B
+|  :+    hg commit -m 'Merge from B' \
+|  :+    hg merge -r clines
+|  :+    hg commit -m 'Merge from C:2' \
+|  :+    hg update default
+|  :+    hg merge -r blines
+|  :+    hg commit -m 'Merge from C:1' \
+|  :+    hg merge -r A
+|  :+    hg commit -m 'Merge from A' \
+|  :+    hg cp hglines.lst hglines2.lst
+|  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+|  :+    hg commit -A -m 'Added nohglines.lst' \
+|  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|  :+    hg commit -A -m 'Added ignored10.lst' \
+|  :+    hg commit -A -m 'Added .hgignore' \
+|  :+    hg rm hglines2.lst
+|  :
+|  
+o    changeset:   17:21d58f7d0c8a0b75eb5b27fe97e78690c1a18be8
+|\   user:        C <c@example.gov>
+| |  date:        Втр Янв 01 00:00:45 2002
+| |  summary:     Merge from A
+| |  $  clines.lst | 49 0
+| |  $1 files changed, 49 insertions, 0 deletions
+| |  :diff -r 90772a14fa55 -r 21d58f7d0c8a clines.lst
+| |  :--- /dev/null
+| |  :+++ b/clines.lst
+| |  :@@ -0,0 +1,49 @@
+| |  :+    cat alines.lst | grep 'b' > ablines.lst
+| |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |  :+    cat hglines.lst | rev > hglinesrev.lst
+| |  :+    cat nohglines.lst | rev > nohglinesrev.lst
+| |  :+    cd testrepo
+| |  :+    cp ../createrepo.zsh .
+| |  :+    echo 'Abc' > ignoredabc
+| |  :+    echo abc >> nohglinesrev.lst
+| |  :+    echo 'Def' > addeddef && hg add addeddef
+| |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| |  :+    hg branch A
+| |  :+    hg branch B
+| |  :+    hg branch C
+| |  :+    hg commit -A -m 'Added ablines.lst' \
+| |  :+    hg commit -A -m 'Added alines.lst' \
+| |  :+    hg commit -A -m 'Added blines.lst' \
+| |  :+    hg commit -A -m 'Added clines.lst' \
+| |  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| |  :+    hg commit -A -m 'Added dlines.lst' \
+| |  :+    hg commit -A -m 'Added .hgignore' \
+| |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| |  :+    hg commit -A -m 'Added ignored10.lst' \
+| |  :+    hg commit -A -m 'Added nohglines.lst' \
+| |  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+| |  :+    hg commit -A -m 'Copied “hglines.lst” to “hglines2.lst”' \
+| |  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| |  :+    hg commit -m 'Merge from A' \
+| |  :+    hg commit -m 'Merge from B' \
+| |  :+    hg commit -m 'Merge from C' \
+| |  :+    hg commit -m 'Merge from C:1' \
+| |  :+    hg commit -m 'Merge from C:2' \
+| |  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| |  :+    hg cp hglines.lst hglines2.lst
+| |  :+    hg merge -r clines
+| |  :+    hg mv createrepo.zsh crepo.zsh
+| |  :+    hg mv crepo.zsh chgrepo.zsh
+| |  :+    hg tag clines \
+| |  :+local A='A <a@example.com>'
+| |  :+local B='B <b@example.org>'
+| |  :+local C='C <c@example.gov>'
+| |  :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+| |  :+tar cJf testrepo.tar.xz testrepo
+| |  :
+| |  
+o |    changeset:   16:90772a14fa550b47e27709d36a7c9efd506ba239
+|\ \   user:        C <c@example.gov>
+| | |  date:        Втр Янв 01 00:00:30 2002
+| | |  summary:     Merge from C:1
+| | |  $  .hgtags    |  1 0
+| | |  $  blines.lst | 16 0
+| | |  $2 files changed, 17 insertions, 0 deletions
+| | |  :diff -r 00cf93136629 -r 90772a14fa55 .hgtags
+| | |  :--- /dev/null
+| | |  :+++ b/.hgtags
+| | |  :@@ -0,0 +1,1 @@
+| | |  :+0b4ef1ee673d958bfa691f07fdbb4369b24904fa ablines
+| | |  :diff -r 00cf93136629 -r 90772a14fa55 blines.lst
+| | |  :--- /dev/null
+| | |  :+++ b/blines.lst
+| | |  :@@ -0,0 +1,16 @@
+| | |  :+#!/bin/zsh
+| | |  :+local B='B <b@example.org>'
+| | |  :+    hg branch A
+| | |  :+    hg branch B
+| | |  :+    hg branch C
+| | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | |  :+    hg tag ablines \
+| | |  :+    hg merge -r ablines
+| | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | |  :+    hg commit -A -m 'Added blines.lst' \
+| | |  :+    hg tag blines \
+| | |  :+    hg merge -r blines
+| | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | |  :+    echo abc >> nohglinesrev.lst
+| | |  :+    echo 'Abc' > ignoredabc
+| | |  :
+| | |  
+| | o    changeset:   15:3ced0ae2c577db232d151d5aca4b64aab1ebcf75
+| | |\   branch:      A
+| | | |  user:        C <c@example.gov>
+| | | |  date:        Втр Янв 01 00:00:15 2002
+| | | |  summary:     Merge from C:2
+| | | |  $  .hgtags     |  1 0
+| | | |  $  ablines.lst | 13 0
+| | | |  $  blines.lst  | 16 0
+| | | |  $  clines.lst  | 49 0
+| | | |  $4 files changed, 79 insertions, 0 deletions
+| | | |  :diff -r 4f33ce8791eb -r 3ced0ae2c577 .hgtags
+| | | |  :--- /dev/null
+| | | |  :+++ b/.hgtags
+| | | |  :@@ -0,0 +1,1 @@
+| | | |  :+0b4ef1ee673d958bfa691f07fdbb4369b24904fa ablines
+| | | |  :diff -r 4f33ce8791eb -r 3ced0ae2c577 ablines.lst
+| | | |  :--- /dev/null
+| | | |  :+++ b/ablines.lst
+| | | |  :@@ -0,0 +1,13 @@
+| | | |  :+local B='B <b@example.org>'
+| | | |  :+    hg branch A
+| | | |  :+    hg branch B
+| | | |  :+    hg branch C
+| | | |  :+    cat alines.lst | grep 'b' > ablines.lst
+| | | |  :+    hg commit -A -m 'Added ablines.lst' \
+| | | |  :+    hg tag ablines \
+| | | |  :+    hg merge -r ablines
+| | | |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| | | |  :+    hg tag blines \
+| | | |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| | | |  :+    echo abc >> nohglinesrev.lst
+| | | |  :+    echo 'Abc' > ignoredabc
+| | | |  :diff -r 4f33ce8791eb -r 3ced0ae2c577 blines.lst
+| | | |  :--- /dev/null
+| | | |  :+++ b/blines.lst
+| | | |  :@@ -0,0 +1,16 @@
+| | | |  :+#!/bin/zsh
+| | | |  :+local B='B <b@example.org>'
+| | | |  :+    hg branch A
+| | | |  :+    hg branch B