Commits

ZyX_I committed 4bc49d1 Merge

@%aurum/drivers/bazaar: Made driver use “author” changeset property in place of committer
@%aurum/log/templates: Added bzr, bzrshort and bzrline styles
tests: Added tests for new styles
Added explicit --author and --commit-time specifications to some merges
Added missing bzrtestrepo.tar.xz archive, drivers-bazaar.in and drivers-bazaar.pre

Comments (0)

Files changed (14)

autoload/aurum/drivers/bazaar.vim

             endif
         elseif spec is# 'parent'
             let cs.parents+=[value]
-        elseif spec is# 'committer'
+        elseif spec is# 'author'
+            let cs.user=value
+        elseif spec is# 'committer' && !has_key(cs, 'user')
             let cs.user=value
         elseif spec is# 'branch nick'
             let cs.branch=value

autoload/aurum/log/templates.vim

             \           "$empty",
             \'hgdef':   "changeset:   $rev#suf:\:#$hex\n".
             \           "branch:      $branch\n".
-            \           "tags:        $tags\n".
-            \           "bookmarks:   $bookmarks\n".
+            \           "tag:         $tags_\n".
+            \           "bookmark:    $bookmarks_\n".
             \           "user:        $user\n".
             \           "date:        $time#%a %b %d %H:%M:%S %Y#\n".
             \           "files:       $changes# #\n".
             \           "$empty",
             \'hgdescr': "changeset:   $rev#suf:\:#$hex\n".
             \           "branch:      $branch\n".
-            \           "tags:        $tags\n".
-            \           "bookmarks:   $bookmarks\n".
+            \           "tag:         $tags_\n".
+            \           "bookmark:    $bookmarks_\n".
             \           "user:        $user\n".
             \           "date:        $time#%a %b %d %H:%M:%S %Y#\n".
             \           "files:       $changes# #\n".
             \           "$empty\n".
             \           "$hide#$# $stat\n".
             \           "$hide#:#$patch\n",
+            \'bzr':     "revno: $rev\n".
+            \           "tags: $tags\n".
+            \           "revision-id: $hex\n".
+            \           "parent: $parents_\n".
+            \           "author: $user\n".
+            \           "branch nick: $branch\n".
+            \           "timestamp: $time#%a %Y-%m-%d %H:%M:%S#\n".
+            \           "message:\n".
+            \           "$hide#@# $description\n".
+            \           "$hide#$#$stat\n".
+            \           "$hide#:#$patch\n".
+            \           "$empty",
+            \'bzrshort': '$rev $user#expr:matchstr(@@@\,''\v^%(%(\ \<)@!.)*'')# '.
+            \               "$time#%Y-%m-%d#$tags#pref: {,suf:}#".
+            \               "$parents#expr:len(@@@)>1?' [merge]'\\:'',".
+            \                        "synreg:\\V\\( [merge]\\)\\?#\n".
+            \            "$hide#@# $description\n".
+            \            "$hide#$#$stat\n".
+            \            "$hide#:#$patch\n".
+            \            "$empty",
+            \'bzrline': '$rev: $user#expr:matchstr(@@@\,''\v^%(%(\ \<)@!.)*'')# '.
+            \               "$time#%Y-%m-%d#$tags#pref: {,suf:}#".
+            \               "$parents#expr:len(@@@)>1?' [merge]'\\:'',".
+            \                        "synreg:\\V\\( [merge]\\)\\?#".
+            \               " $summary\n".
+            \            "$hide#$#$stat\n".
+            \            "$hide#:#$patch",
         \}
 "▶1 s:kwexpr
 " TODO Add bisection status and phases
 " TODO Add tab expansion
 let s:kwexpr.description = [1, 'split(@@@, "\n")']
 let s:kwexpr.patch       = [1, '@@@']
+let s:kwexpr.parents_    = [1, '@@@']
+let s:kwexpr.children_   = [1, '@@@']
+let s:kwexpr.tags_       = [1, '@@@']
+let s:kwexpr.bookmarks_  = [1, '@@@']
 let s:kwexpr.stat        = [2, 's:F.stat(@@@, @.@.files, @<@)']
 let s:kwexpr.files       = [2, 's:F.multlfmt(@@@, @.@.files, '.
             \                                    '@<@, @0@, '.
             \                                   '@<@, @0@)', ' to ']
 let s:kwmarg={}
 let s:kwmarg.summary='matchstr(@.@.description, "\\\\v^[^\\n]*")'
-let s:kwmarg.stat='a:repo.functions.getstats(a:repo, diff, a:opts)'
+let s:kwmarg.stat='@:@.functions.getstats(@:@, diff, @o@)'
 let s:kwmarg.patch='diff'
 let s:kwmarg.empty=''''''
 let s:kwpempt=['parents', 'children', 'tags', 'bookmarks']
+let s:kwpemptml=['parents_', 'children_', 'tags_', 'bookmarks_',
+            \    'files', 'changes']
 let s:kwreg={
             \'phase': '\v(public|draft|secret)',
         \}
 let s:kwreqseqkw=['hex', 'branch', 'user', 'rev', 'time', 'parents', 'children',
             \     'tags', 'bookmarks', 'description', 'files', 'changes',
-            \     'phase']
+            \     'phase', 'parents_', 'children_', 'tags_', 'bookmarks_']
 let s:kwreqs = {'stat': {'files': 1},
             \'renames': {'files': 1, 'renames': 1},
             \ 'copies': {'files': 1, 'copies': 1},
             \}
-call map(s:kwreqseqkw, 'extend(s:kwreqs, {v:val : {v:val : 1}})')
+call map(s:kwreqseqkw, 'extend(s:kwreqs, {v:val : {substitute(v:val, "_$", "", "") : 1}})')
 unlet s:kwreqseqkw
 "▶1 beatycode       :: function::[String] → function::[String]
 let s:indents={
 let s:addexpr='((eval(submatch(1))!=0)?'.
             \           '(printf("%+i", eval(submatch(1)))):'.
             \           '(""))'
-function s:F.strappend(func, s)
+function s:F.strappend(func, s, nl)
     let func=a:func
-    if func[-1][:13] is# 'let text[-1].='
+    if a:nl
+        let i=len(func)
+        while i
+            let i-=1
+            if func[i] is# 'let text+=[""]'
+                call remove(func, i)
+                break
+            endif
+        endwhile
+        let func+=['let text+=['.a:s.']']
+    elseif func[-1][:13] is# 'let text[-1].='
         let func[-1].='.'.a:s
     elseif func[-1][:10] is# 'let text+=['
         let func[-1]=func[-1][:-2].'.'.a:s.']'
 "▶1 compile :: template, opts → Fref
 let s:add={}
 "▶2 add.ke2 : Add complex multiline statement
-function s:add.ke2(addedif, expr, kw, arg, func)
+function s:add.ke2(addedif, expr, kw, arg, func, nl)
     let addedif2=0
     let func=a:func
     let func+=[s:setlstrstr]
     endif
 endfunction
 "▶2 add.ke1 : Add simple multiline statements
-function s:add.ke1(addedif, expr, kw, arg, func)
+function s:add.ke1(addedif, expr, kw, arg, func, nl)
     let addedif2=0
     let func=a:func
     let func+=[s:setlstrstr]
         let func+=['if exists("diff")']
     endif
     "▲3
-    let func+=['let ntext='.a:expr,
+    let func+=['let ntext=copy('.a:expr.')',
                 \'call map(ntext, "lstr.v:val")']+
                 \   (has_key(a:arg, 'flbeg')?
                 \       ['let ntext[0]='.string(a:arg.flbeg).
     endif
 endfunction
 "▶2 add.ke0 : Add single-line statement
-function s:add.ke0(addedif, expr, kw, arg, func)
+function s:add.ke0(addedif, expr, kw, arg, func, nl)
     let func=a:func
     let add2if=0
     if a:kw is# 'branch' && a:arg.0 isnot# 'keep' && !a:addedif
         endif
     endif
     "▲3
+    if a:nl
+        let  lexpr='len(text)'
+        let llexpr='0'
+    else
+        let  lexpr='len(text)-1'
+        let llexpr='len(text[-1])'
+    endif
     let func+=['let special.'.a:kw.'_r='.
-                \  '[[len(text)-1, len(text[-1])], '.
-                \   '[len(text)-1, len(text[-1])-1+len(estr)]]',]
-    call s:F.strappend(func, 'estr')
+                \  '[['.lexpr.', '.llexpr.'], '.
+                \   '['.lexpr.', '.llexpr.'-1+len(estr)]]',]
+    call s:F.strappend(func, 'estr', a:nl)
     if add2if
         let func+=['endif']
     endif
         elseif lkw is# 'patch' || lkw is# 'stat'
             let addedif=1
             let func+=['if exists("diff")']
-        elseif lkw is# 'files' || lkw is# 'changes'
+        elseif index(s:kwpemptml, lkw)!=-1
             let addedif=1
-            let func+=['if !empty(a:cs.'.kw.')']
+            let func+=['if !empty(a:cs.'.substitute(lkw, '_$', '', '').')']
         elseif lkw is# 'renames' || lkw is# 'copies'
             let addedif=1
             let func+=['if !empty(filter(values(a:cs.'.lkw.'), '.
         "▲2
         let func+=['let text+=[""]']
         let i=-1
+        let nl=1
         for str in lit
             let i+=1
             if !empty(str)
-                if i==0
-                    let func[-1]='let text+=['.string(str).']'
-                else
-                    call s:F.strappend(func, string(str))
-                endif
+                call s:F.strappend(func, string(str), nl)
+                let nl=0
             endif
             if lmeta>i
                 "▶2 Define variables
                     let marg='filter(copy(a:cs.'.kw.'), '.
                                 \   '"index(files, v:val)!=-1")'
                 else
-                    let marg='a:cs.'.kw
+                    let marg='a:cs.'.substitute(kw, '_$', '', '')
                 endif
                 "▲3
-                let expr=substitute(substitute(substitute(expr,
+                let expr=substitute(substitute(substitute(substitute(
+                            \substitute(expr,
                             \'\V@@@', marg,      'g'),
                             \'\V@.@', 'a:cs',    'g'),
+                            \'\V@:@', 'a:repo',  'g'),
+                            \'\V@o@', 'a:opts',  'g'),
                             \'\V@-@', 'a:width', 'g')
                 "▶2 Process positional parameters
                 for j in range(len(ke)-2)
                     call extend(reqs, s:kwreqs[kw])
                 endif
                 "▲2
-                call s:add['ke'.ke[0]](addedif, expr, kw, arg, func)
+                call s:add['ke'.ke[0]](addedif, expr, kw, arg, func, nl)
+                let nl=0
             endif
         endfor
         if addedif
                     call s:F.addgroup(r, nlgroups, 'auLog_'.kw)
                     let r+=['syn match auLog_'.kw.' /'.arg.synreg.'/ '.
                                 \'contained nextgroup=']
-                elseif kw is# 'hex'
+                elseif kw is# 'hex' || kw is# 'parents_' || kw is# 'children_'
                     if has_key(a:repo, 'hexreg')
-                        call s:F.addgroup(r, nlgroups, 'auLog_hex')
-                        let r+=['syn match auLog_hex /'.a:repo.hexreg.'/ '.
+                        call s:F.addgroup(r, nlgroups, 'auLog_'.kw)
+                        let r+=['syn match auLog_'.kw.' /'.a:repo.hexreg.'/ '.
                                     \'contained nextgroup=']
                     else
-                        call s:F.addgroup(r, nlgroups, 'auLogHexStart')
-                        let r+=['syn match auLogHexStart /\v\x{12}/ contained'.
-                                    \' nextgroup=auLogHexEnd',
-                                \'syn match auLogHexEnd /\v\x+/ contained '.
-                                \   (has('conceal')?('conceal'):('')).
+                        call s:F.addgroup(r, nlgroups, 'auLogHexStart_'.kw)
+                        let r+=['syn match auLogHexStart_'.kw.' /\v\x{12}/'.
+                                    \' contained nextgroup=auLogHexEnd_'.kw,
+                                \'syn match auLogHexEnd_'.kw.' '.
+                                \   '/\v\x+/ contained'.
+                                \   (has('conceal')?(' conceal'):('')).
                                 \   ' nextgroup=']
                     endif
                 elseif kw is# 'patch'
 flbeg      For multiline template strings: determine what string should be 
            prepended to the first line.
 expr       Use this expression instead of default to get resulting string. 
-           Inside an expression “@@@” refers to original data, “@N@” - to Nth 
-           positional parameter (count starts from zero), “@-@” - to number of 
-           leading columns taken by graph lines, “@.@” - to current 
-           |aurum-changeset| object, “@<@” - to string that should be 
-           prepended to every line (valid for complex multiline template 
-           strings).
+           Inside an expression
+           String  What it refers to ~
+           @@@     original data
+           @N@     Nth positional parameter (count starts from zero)
+           @-@     number of leading colums taken by graph lines
+           @.@     current |aurum-changeset| object
+           @:@     current |aurum-repository| object
+           @o@     current options dictionary
+           @<@     (for complex multiline statement only) string that should 
+                   be prepended to every line
 synreg     Pass this regular expression to “syn match”. Useful if you override 
            output of the {word} using “expr” keyword.
 pref, suf  For some single-line statements (currently: rev, parents, children, 
 parents, children
              List of space-separated hashes designating parents or children of 
              current changeset.
+parents_, children_
+             List of hashes designating parents or children of current 
+             changeset, each on its own line.
 tags, bookmarks
              List of tags or bookmarks separated by the first positional 
              parameter (default value: ", ").
+tags_, bookmarks_
+             List of tags or bookmarks, each on its own line.
 summary      First line of description.
 description  (multiline) Description of a changeset.
 patch        (multiline) Differences introduced by processed changeset. Not 
     Style that mimics default “hg log” style: >
       changeset:   1:454ae580ce74
       branch:      A
-      tags:        tip
+      tag:         tip
       user:        Bob <bob@example.com>
       date:        Sun Jan 01 00:00:00 2011
       files:       foo/bar.txt foo/barbaz.txt foo/baz.txt
     controlled by other |:AuLog| options): >
       changeset:   1:454ae580ce74
       branch:      A
-      tags:        tip
+      tag:         tip
       user:        Bob <bob@example.com>
       date:        Sun Jan 01 00:00:00 2011
       files:       foo/bar.txt foo/barbaz.txt foo/baz.txt
       Guess bar is better name for baz
       And barbaz is not worse
 
+bzr                                                          *aurum-style-bzr*
+    Bzr-like style: >
+      revno: 1
+      tags: tip
+      revision-id: 454ae580ce74
+      parent: 000000000000
+      author: Bob <bob@example.com>
+      timestamp: Sun 2011-01-01 00:00:00
+      message:
+        Guess bar is better name for baz
+        And barbaz is not worse
+bzrshort                                                *aurum-style-bzrshort*
+    Bzr --short-like style: >
+      1 Bob 2011-01-01 {tip}
+        Guess bar is better name for baz
+        And barbaz is not worse
+
+bzrline                                                  *aurum-style-bzrline*
+    Bzr --line-like style: >
+      1 Bob 2011-01-01 {tip} Guess bar is better name for baz
+
 ==============================================================================
 7. Record mode                                                  *aurum-record*
 
 call s:_f.postresource('ignfiles', s:ignfiles)
 call s:_f.postresource('diffopts', s:diffoptslst)
 let s:tlist=['default', 'compact', 'git', 'svn', 'hgdef', 'hgdescr', 'cdescr',
-            \'gitoneline']
+            \'gitoneline', 'bzr', 'bzrshort', 'bzrline']
 call s:_f.postresource('tlist', s:tlist)
 call s:_f.postresource('allcachekeys', s:allcachekeys)
 "▶1 Completion helpers

syntax/aurumlog.vim

 
 hi def link auLogSkipBefore_hex    Comment
 hi def link auLog_rev_suf          Comment
-hi def link auLogHexEnd            Comment
 
 hi def link auLogPatchFile         diffFile
 hi def link auLogPatchNewFile      diffNewFile
     hi auLogHexStart       ctermfg=DarkYellow  guifg=DarkYellow
 endif
 hi def link auLog_hex auLogHexStart
+hi def link auLogHexStart_hex auLogHexStart
+hi def link auLogHexEnd_hex   auLogHexStart
+
+hi def link auLogHexEnd_parents_  auLogHexStart_parents_
+hi def link auLogHexEnd_children_ auLogHexStart_children_
 
 let b:current_syntax=expand('<sfile>:t:r')
 if exists('s:_pluginloaded')

test/bzrtestrepo.tar.xz

Binary file added.

test/cmd-log-styles.in

 :ST git
 :ST gitoneline
 :ST svn
+:ST bzr
+:ST bzrshort
+:ST bzrline
 :source addmessages.vim

test/cmd-log-styles.ok

 |  
 {{{1 hgdef
 @  changeset:   26:504f74154456dbb0e9441326514e42ce66279e62
-|  tags:        tip
+|  tag:         tip
 |  user:        A <a@example.com>
 |  date:        Mon Feb 11 05:43:00 2002
 |  files:       .hgignore directory/file
 | | | | |    
 | +-----o  changeset:   12:023aa55bd8062179ce36adbdd78363e9b88718c1
 | | | |    branch:      C
-| | | |    tags:        clines, oldtag
+| | | |    tag:         clines
+| | | |    tag:         oldtag
 | | | |    user:        B <b@example.org>
 | | | |    date:        Thu Feb 01 14:56:00 2001
 | | | |    files:       clines.lst
 | | | |    
 | o | |  changeset:   10:c4110a066208167dae46b08f4e0d8d2b37e842f3
 | | | |  branch:      C
-| | | |  tags:        blines
+| | | |  tag:         blines
 | | | |  user:        A <a@example.com>
 | | | |  date:        Thu Feb 01 05:18:00 2001
 | | | |  files:       blines.lst
 | | | |    
 | o---+  changeset:   7:c06107b7bcbe751d2dd40faf4179ee7d6aac44ac
 |   | |  branch:      C
-|  / /   tags:        ablines
+|  / /   tag:         ablines
 | | |    user:        B <b@example.org>
 | | |    date:        Thu Nov 02 14:13:00 2000
 | | |    files:       ablines.lst
 |  
 {{{1 hgdescr
 @  changeset:   26:504f74154456dbb0e9441326514e42ce66279e62
-|  tags:        tip
+|  tag:         tip
 |  user:        A <a@example.com>
 |  date:        Mon Feb 11 05:43:00 2002
 |  files:       .hgignore directory/file
 | | | | |    
 | +-----o  changeset:   12:023aa55bd8062179ce36adbdd78363e9b88718c1
 | | | |    branch:      C
-| | | |    tags:        clines, oldtag
+| | | |    tag:         clines
+| | | |    tag:         oldtag
 | | | |    user:        B <b@example.org>
 | | | |    date:        Thu Feb 01 14:56:00 2001
 | | | |    files:       clines.lst
 | | | |    
 | o | |  changeset:   10:c4110a066208167dae46b08f4e0d8d2b37e842f3
 | | | |  branch:      C
-| | | |  tags:        blines
+| | | |  tag:         blines
 | | | |  user:        A <a@example.com>
 | | | |  date:        Thu Feb 01 05:18:00 2001
 | | | |  files:       blines.lst
 | | | |    
 | o---+  changeset:   7:c06107b7bcbe751d2dd40faf4179ee7d6aac44ac
 |   | |  branch:      C
-|  / /   tags:        ablines
+|  / /   tag:         ablines
 | | |    user:        B <b@example.org>
 | | |    date:        Thu Nov 02 14:13:00 2000
 | | |    files:       ablines.lst
 |  :+)
 |  :+tar cJf testrepo.tar.xz testrepo
 |  :
+{{{1 bzr
+@  revno: 26
+|  tags: tip
+|  revision-id: 504f74154456dbb0e9441326514e42ce66279e62
+|  parent: d8140c0b7b0b670bafe0891bcf0c4582092de884
+|  author: A <a@example.com>
+|  timestamp: Mon 2002-02-11 05:43:00
+|  message:
+|  @ Added .hgignore
+|  @ Added directory/file
+|  $  .hgignore      | 2 0
+|  $  directory/file | 1 0
+|  $2 files changed, 3 insertions, 0 deletions
+|  :diff -r d8140c0b7b0b -r 504f74154456 .hgignore
+|  :--- /dev/null
+|  :+++ b/.hgignore
+|  :@@ -0,0 +1,2 @@
+|  :+syntax: glob
+|  :+ignored*
+|  :diff -r d8140c0b7b0b -r 504f74154456 directory/file
+|  :--- /dev/null
+|  :+++ b/directory/file
+|  :@@ -0,0 +1,1 @@
+|  :+File contents
+|  :
+|  
+o    revno: 25
+|\   revision-id: d8140c0b7b0b670bafe0891bcf0c4582092de884
+| |  parent: e021c634413b240b8c834a85200acc28d645f1f1
+| |  parent: e1eaeea486e48634588c778fd36a81ac5c8869a6
+| |  author: C <c@example.gov>
+| |  timestamp: Mon 2002-02-11 05:00:00
+| |  message:
+| |  @ Merge
+| |  $  elines.lst     |   0 19
+| |  $  emerged.lst    | 127  0
+| |  $  flines.lst     |   0  5
+| |  $  glines.lst     |  73  0
+| |  $  glinescopy.lst |  83  0
+| |  $5 files changed, 283 insertions, 24 deletions
+| |  :diff -r e021c634413b -r d8140c0b7b0b elines.lst
+| |  :--- a/elines.lst
+| |  :+++ /dev/null
+| |  :@@ -1,19 +0,0 @@
+| |  :-    hg init testrepo
+| |  :-    cd testrepo
+| |  :-    cp ../createrepo.zsh .
+| |  :-    hg commit -A -m 'Added «createrepo.zsh»' \
+| |  :-    hg mv createrepo.zsh crepo.zsh
+| |  :-    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| |  :-    perl -p -i -e 'tr/{}/{}/' 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»' \
+| |  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |  :-    cat chgrepo.zsh | grep 'd' > dlines.lst
+| |  :-    cat chgrepo.zsh | grep 'a' > alines.lst
+| |  :-    cat alines.lst | grep 'b' > ablines.lst
+| |  :-    cat chgrepo.zsh | grep 'b' > blines.lst
+| |  :-    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |  :-    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |  :-tar cJf testrepo.tar.xz testrepo
+| |  :diff -r e021c634413b -r d8140c0b7b0b emerged.lst
+| |  :--- /dev/null
+| |  :+++ b/emerged.lst
+| |  :@@ -0,0 +1,127 @@
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+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
+| |  :+>>>>>>> other
+| |  :+    hg init testrepo
+| |  :+    cd testrepo
+| |  :+    cp ../createrepo.zsh .
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    # XXX Date test will work only till 2099
+| |  :+>>>>>>> other
+| |  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+        --date '1999-01-02 5:20' --user $A
+| |  :+>>>>>>> other
+| |  :+    hg mv createrepo.zsh crepo.zsh
+| |  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+        --date '2000-01-05 7:30' --user $A
+| |  :+>>>>>>> other
+| |  :+    perl -p -i -e 'tr/{}/{}/' crepo.zsh
+| |  :+    hg commit -m $'Replaced\n    {\n        ...\n    }\nwith\n    {\n        ...\n    }' \
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+        --date '2000-01-15 15:00' --user $B
+| |  :+>>>>>>> other
+| |  :+    hg mv crepo.zsh chgrepo.zsh
+| |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+        --date '2000-02-01 14:00' --user $B
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| |  :+        --date '2000-05-10 4:23' --user $A
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added dlines.lst' \
+| |  :+        --date '2000-11-01 13:24' --user $B
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added alines.lst' \
+| |  :+        --date '2000-11-02 5:44' --user $A
+| |  :+>>>>>>> other
+| |  :+    cat alines.lst | grep 'b' > ablines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    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
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    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
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    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
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    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
+| |  :+>>>>>>> other
+| |  :+tar cJf testrepo.tar.xz testrepo
+| |  :diff -r e021c634413b -r d8140c0b7b0b flines.lst
+| |  :--- a/flines.lst
+| |  :+++ /dev/null
+| |  :@@ -1,5 +0,0 @@
+| |  :-    hg commit -m 'Merge from C' \
+| |  :-    hg commit -m 'Merge from B' \
+| |  :-    hg commit -m 'Merge from C:2' \
+| |  :-    hg commit -m 'Merge from C:1' \
+| |  :-    hg commit -m 'Merge from A' \
+| |  :diff -r e021c634413b -r d8140c0b7b0b glines.lst
+| |  :--- a/glines.lst
+| |  :+++ b/glines.lst
+| |  :@@ -1,10 +1,83 @@
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+local B='B <b@example.org>'
+| |  :+local C='C <c@example.gov>'
+| |  :+    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    }' \
+| |  :+>>>>>>> other
+| |  :     hg mv crepo.zsh chgrepo.zsh
+| |  :     hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| |  :     cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |  :     cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| |  :+    hg branch A
+| |  :+>>>>>>> other
+| |  :     cat chgrepo.zsh | grep 'd' > dlines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added dlines.lst' \
+| |  :+    hg branch B
+| |  :+>>>>>>> other
+| |  :     cat chgrepo.zsh | grep 'a' > alines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added alines.lst' \
+| |  :+    hg branch C
+| |  :+>>>>>>> other
+| |  :     cat alines.lst | grep 'b' > ablines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    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
+| |  :+>>>>>>> other
+| |  :     cat chgrepo.zsh | grep 'b' > blines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added blines.lst' \
+| |  :+    hg tag blines \
+| |  :+    hg update -r -2
+| |  :+>>>>>>> other
+| |  :     cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    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”' \
+| |  :+>>>>>>> other
+| |  :     cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added nohglines.lst' \
+| |  :+    cat nohglines.lst | rev > nohglinesrev.lst
+| |  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+| |  :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+| |  :+    hg commit -A -m 'Added ignored10.lst' \
+| |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| |  :+    hg commit -A -m 'Added .hgignore' \
+| |  :+    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
+| |  :+>>>>>>> other
+| |  :diff -r e021c634413b -r d8140c0b7b0b glinescopy.lst
+| |  :--- /dev/null
+| |  :+++ b/glinescopy.lst
+| |  :@@ -0,0 +1,83 @@
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+local B='B <b@example.org>'
+| |  :+local C='C <c@example.gov>'
+| |  :+    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    }' \
+| |  :+>>>>>>> other
+| |  :+    hg mv crepo.zsh chgrepo.zsh
+| |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added «hglines.lst» and «datelines.lst»' \
+| |  :+    hg branch A
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added dlines.lst' \
+| |  :+    hg branch B
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added alines.lst' \
+| |  :+    hg branch C
+| |  :+>>>>>>> other
+| |  :+    cat alines.lst | grep 'b' > ablines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    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
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added blines.lst' \
+| |  :+    hg tag blines \
+| |  :+    hg update -r -2
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    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”' \
+| |  :+>>>>>>> other
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |  :+<<<<<<< local
+| |  :+=======
+| |  :+    hg commit -A -m 'Added nohglines.lst' \
+| |  :+    cat nohglines.lst | rev > nohglinesrev.lst
+| |  :+    hg commit -A -m 'Added nohglinesrev.lst' \
+| |  :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+| |  :+    hg commit -A -m 'Added ignored10.lst' \
+| |  :+    echo $'syntax: glob\nignored*' > .hgignore
+| |  :+    hg commit -A -m 'Added .hgignore' \
+| |  :+    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
+| |  :+>>>>>>> other
+| |  :
+| |  
+o |  revno: 24
+| |  revision-id: e021c634413b240b8c834a85200acc28d645f1f1
+| |  parent: 5afd628b0861f6447ed813895d5ced58a1c42a72
+| |  author: A <a@example.com>
+| |  timestamp: Mon 2002-02-11 04:15:00
+| |  message:
+| |  @ Added elines.lst with eplines
+| |  @ Added flines.lst with frlines
+| |  @ Added glines.lst with grlines
+| |  $  elines.lst | 19 0
+| |  $  flines.lst |  5 0
+| |  $  glines.lst | 10 0
+| |  $3 files changed, 34 insertions, 0 deletions
+| |  :diff -r 5afd628b0861 -r e021c634413b elines.lst
+| |  :--- /dev/null
+| |  :+++ b/elines.lst
+| |  :@@ -0,0 +1,19 @@
+| |  :+    hg init testrepo
+| |  :+    cd testrepo
+| |  :+    cp ../createrepo.zsh .
+| |  :+    hg commit -A -m 'Added «createrepo.zsh»' \
+| |  :+    hg mv createrepo.zsh crepo.zsh
+| |  :+    hg commit -A -m 'Renamed «createrepo.zsh» to «crepo.zsh»' \
+| |  :+    perl -p -i -e 'tr/{}/{}/' 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»' \
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| |  :+    cat alines.lst | grep 'b' > ablines.lst
+| |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |  :+tar cJf testrepo.tar.xz testrepo
+| |  :diff -r 5afd628b0861 -r e021c634413b flines.lst
+| |  :--- /dev/null
+| |  :+++ b/flines.lst
+| |  :@@ -0,0 +1,5 @@
+| |  :+    hg commit -m 'Merge from C' \
+| |  :+    hg commit -m 'Merge from B' \
+| |  :+    hg commit -m 'Merge from C:2' \
+| |  :+    hg commit -m 'Merge from C:1' \
+| |  :+    hg commit -m 'Merge from A' \
+| |  :diff -r 5afd628b0861 -r e021c634413b glines.lst
+| |  :--- /dev/null
+| |  :+++ b/glines.lst
+| |  :@@ -0,0 +1,10 @@
+| |  :+    hg mv crepo.zsh chgrepo.zsh
+| |  :+    hg commit -A -m 'Renamed «crepo.zsh» to «chgrepo.zsh»' \
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > hglines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ unless /^    hg /' > datelines.lst
+| |  :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+| |  :+    cat chgrepo.zsh | grep 'a' > alines.lst
+| |  :+    cat alines.lst | grep 'b' > ablines.lst
+| |  :+    cat chgrepo.zsh | grep 'b' > blines.lst
+| |  :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+| |  :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+| |  :
+| |  
+| o  revno: 23
+|/   revision-id: e1eaeea486e48634588c778fd36a81ac5c8869a6
+|    parent: 5afd628b0861f6447ed813895d5ced58a1c42a72
+|    author: A <a@example.com>
+|    timestamp: Mon 2002-02-11 04:15:00
+|    message:
+|    @ Added elines.lst, flines.lst and glines.lst
+|    $  elines.lst |  88 0
+|    $  flines.lst |  12 0
+|    $  glines.lst |  59 0
+|    $3 files changed, 159 insertions, 0 deletions
+|    :diff -r 5afd628b0861 -r e1eaeea486e4 elines.lst
+|    :--- /dev/null
+|    :+++ b/elines.lst
+|    :@@ -0,0 +1,88 @@
+|    :+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
+|    :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+|    :+    hg commit -A -m 'Added dlines.lst' \
+|    :+        --date '2000-11-01 13:24' --user $B
+|    :+    cat chgrepo.zsh | grep 'a' > alines.lst
+|    :+    hg commit -A -m 'Added alines.lst' \
+|    :+        --date '2000-11-02 5:44' --user $A
+|    :+    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 5afd628b0861 -r e1eaeea486e4 flines.lst
+|    :--- /dev/null
+|    :+++ b/flines.lst
+|    :@@ -0,0 +1,12 @@
+|    :+    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 update default
+|    :+    hg commit -m 'Merge from C' \
+|    :+    hg commit -m 'Merge from B' \
+|    :+    hg commit -m 'Merge from C:2' \
+|    :+    hg update default
+|    :+    hg commit -m 'Merge from C:1' \
+|    :+    hg commit -m 'Merge from A' \
+|    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|    :+    echo 'Def' > addeddef && hg add addeddef
+|    :+tar cJf testrepo.tar.xz testrepo
+|    :diff -r 5afd628b0861 -r e1eaeea486e4 glines.lst
+|    :--- /dev/null
+|    :+++ b/glines.lst
+|    :@@ -0,0 +1,59 @@
+|    :+local B='B <b@example.org>'
+|    :+local C='C <c@example.gov>'
+|    :+    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»' \
+|    :+    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»' \
+|    :+    hg branch A
+|    :+    cat chgrepo.zsh | grep 'd' > dlines.lst
+|    :+    hg commit -A -m 'Added dlines.lst' \
+|    :+    hg branch B
+|    :+    cat chgrepo.zsh | grep 'a' > alines.lst
+|    :+    hg commit -A -m 'Added alines.lst' \
+|    :+    hg branch C
+|    :+    cat alines.lst | grep 'b' > ablines.lst
+|    :+    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
+|    :+    cat chgrepo.zsh | grep 'b' > blines.lst
+|    :+    hg commit -A -m 'Added blines.lst' \
+|    :+    hg tag blines \
+|    :+    hg update -r -2
+|    :+    cat chgrepo.zsh | sort | grep 'c' > clines.lst
+|    :+    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”' \
+|    :+    cat chgrepo.zsh | perl -p -i -e 'undef $_ if /^    hg /' > nohglines.lst
+|    :+    hg commit -A -m 'Added nohglines.lst' \
+|    :+    cat nohglines.lst | rev > nohglinesrev.lst
+|    :+    hg commit -A -m 'Added nohglinesrev.lst' \
+|    :+    seq 1 10 | tr ' ' $'\n' > ignored10.lst
+|    :+    hg commit -A -m 'Added ignored10.lst' \
+|    :+    echo $'syntax: glob\nignored*' > .hgignore
+|    :+    hg commit -A -m 'Added .hgignore' \
+|    :+    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
+|    :
+|    
+o  revno: 22
+|  revision-id: 5afd628b0861f6447ed813895d5ced58a1c42a72
+|  parent: e85aa09aab1621b59b8be37f723410b219c8599c
+|  author: A <a@example.com>
+|  timestamp: Mon 2002-02-11 03:16:00
+|  message:
+|  @ Added tag oldtag for changeset 023aa55bd806
+|  $  .hgtags | 1 0
+|  $1 files changed, 1 insertions, 0 deletions
+|  :diff -r e85aa09aab16 -r 5afd628b0861 .hgtags
+|  :--- a/.hgtags
+|  :+++ b/.hgtags
+|  :@@ -1,1 +1,2 @@
+|  : c06107b7bcbe751d2dd40faf4179ee7d6aac44ac ablines
+|  :+023aa55bd8062179ce36adbdd78363e9b88718c1 oldtag
+|  :
+|  
+o  revno: 21
+|  revision-id: e85aa09aab1621b59b8be37f723410b219c8599c
+|  parent: 67cf252de26b12da6769114cc89b793357f5a46a
+|  author: A <a@example.com>
+|  timestamp: Mon 2002-02-11 03:15:00
+|  message:
+|  @ Added ignored10.lst
+|  $  ignored10.lst | 10 0
+|  $1 files changed, 10 insertions, 0 deletions
+|  :diff -r 67cf252de26b -r e85aa09aab16 ignored10.lst
+|  :--- /dev/null
+|  :+++ b/ignored10.lst
+|  :@@ -0,0 +1,10 @@
+|  :+1
+|  :+2
+|  :+3
+|  :+4
+|  :+5
+|  :+6
+|  :+7
+|  :+8
+|  :+9
+|  :+10
+|  :
+|  
+o  revno: 20
+|  revision-id: 67cf252de26b12da6769114cc89b793357f5a46a
+|  parent: 456e0b05b81af4f332405336f11df4769ec9f250
+|  author: B <b@example.org>
+|  timestamp: Sun 2002-02-10 16:01:00
+|  message:
+|  @ Added nohglinesrev.lst
+|  $  nohglinesrev.lst | 53 0
+|  $1 files changed, 53 insertions, 0 deletions
+|  :diff -r 456e0b05b81a -r 67cf252de26b 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  revno: 19
+|  revision-id: 456e0b05b81af4f332405336f11df4769ec9f250
+|  parent: f44a21859e57e4abc6155da804d08dd5069e798e
+|  author: B <b@example.org>
+|  timestamp: Sun 2002-02-10 15:33:00
+|  message:
+|  @ Added nohglines.lst
+|  $  nohglines.lst | 53 0
+|  $1 files changed, 53 insertions, 0 deletions
+|  :diff -r f44a21859e57 -r 456e0b05b81a 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  revno: 18
+|  revision-id: f44a21859e57e4abc6155da804d08dd5069e798e
+|  parent: e5648a3eea574f3fc03709b4fdd799a38f649edd
+|  author: A <a@example.com>
+|  timestamp: Sun 2002-02-10 05:00:00
+|  message:
+|  @ Copied “hglines.lst” to “hglines2.lst”
+|  $  hglines2.lst | 41 0
+|  $1 files changed, 41 insertions, 0 deletions
+|  :diff -r e5648a3eea57 -r f44a21859e57 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    revno: 17
+|\   revision-id: e5648a3eea574f3fc03709b4fdd799a38f649edd
+| |  parent: 462a1e95be86f96aaf6d7360f6f770826c3eb641
+| |  parent: be92227e3e43f4e7402408afe110098d209d2568
+| |  author: C <c@example.gov>
+| |  timestamp: Tue 2002-01-01 00:00:45
+| |  message:
+| |  @ Merge from A
+| |  $  clines.lst | 49 0
+| |  $1 files changed, 49 insertions, 0 deletions
+| |  :diff -r 462a1e95be86 -r e5648a3eea57 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 |    revno: 16
+|\ \   revision-id: 462a1e95be86f96aaf6d7360f6f770826c3eb641
+| | |  parent: 269399222040415b3928a316f5d28792cc0be4dd
+| | |  parent: c4110a066208167dae46b08f4e0d8d2b37e842f3
+| | |  author: C <c@example.gov>
+| | |  timestamp: Tue 2002-01-01 00:00:30
+| | |  message:
+| | |  @ Merge from C:1
+| | |  $  .hgtags    |  1 0
+| | |  $  blines.lst | 16 0
+| | |  $2 files changed, 17 insertions, 0 deletions
+| | |  :diff -r 269399222040 -r 462a1e95be86 .hgtags
+| | |  :--- /dev/null
+| | |  :+++ b/.hgtags
+| | |  :@@ -0,0 +1,1 @@
+| | |  :+c06107b7bcbe751d2dd40faf4179ee7d6aac44ac ablines
+| | |  :diff -r 269399222040 -r 462a1e95be86 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    revno: 15
+| | |\   revision-id: be92227e3e43f4e7402408afe110098d209d2568
+| | | |  parent: 5e2f73d0c01dfb8ee0d3577e03d016a5f6df58b1
+| | | |  parent: 023aa55bd8062179ce36adbdd78363e9b88718c1
+| | | |  author: C <c@example.gov>
+| | | |  branch nick: A
+| | | |  timestamp: Tue 2002-01-01 00:00:15
+| | | |  message:
+| | | |  @ 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 5e2f73d0c01d -r be92227e3e43 .hgtags
+| | | |  :--- /dev/null
+| | | |  :+++ b/.hgtags
+| | | |  :@@ -0,0 +1,1 @@
+| | | |  :+c06107b7bcbe751d2dd40faf4179ee7d6aac44ac ablines
+| | | |  :diff -r 5e2f73d0c01d -r be92227e3e43 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 5e2f73d0c01d -r be92227e3e43 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 5e2f73d0c01d -r be92227e3e43 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 |    revno: 14
+| | |\ \   revision-id: 5e2f73d0c01dfb8ee0d3577e03d016a5f6df58b1
+| | | | |  parent: d760b0fe4fe45adf585f5030181b8081899e26a9
+| | | | |  parent: 9fe0c28c3e1dd175e8372b742f13cbb7bd6799fe
+| | | | |  author: C <c@example.gov>
+| | | | |  branch nick: A
+| | | | |  timestamp: Tue 2002-01-01 00:00:00
+| | | | |  message:
+| | | | |  @ Merge from B
+| | | | |  $  alines.lst | 64 0
+| | | | |  $1 files changed, 64 insertions, 0 deletions
+| | | | |  :diff -r d760b0fe4fe4 -r 5e2f73d0c01d 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  revno: 13
+| | | | |/   revision-id: 14b19ea42f824c8597f8358149c5ba994299a410
+| | | | |    parent: 023aa55bd8062179ce36adbdd78363e9b88718c1
+| | | | |    author: B <b@example.org>
+| | | | |    branch nick: C
+| | | | |    timestamp: Thu 2001-02-01 14:56:52
+| | | | |    message:
+| | | | |    @ Added tag clines for changeset 023aa55bd806
+| | | | |    $  .hgtags | 1 0
+| | | | |    $1 files changed, 1 insertions, 0 deletions
+| | | | |    :diff -r 023aa55bd806 -r 14b19ea42f82 .hgtags
+| | | | |    :--- a/.hgtags
+| | | | |    :+++ b/.hgtags
+| | | | |    :@@ -1,1 +1,2 @@
+| | | | |    : c06107b7bcbe751d2dd40faf4179ee7d6aac44ac ablines
+| | | | |    :+023aa55bd8062179ce36adbdd78363e9b88718c1 clines
+| | | | |    :
+| | | | |    
+| +-----o  revno: 12
+| | | |    tags: clines, oldtag
+| | | |    revision-id: 023aa55bd8062179ce36adbdd78363e9b88718c1
+| | | |    parent: c4110a066208167dae46b08f4e0d8d2b37e842f3
+| | | |    author: B <b@example.org>
+| | | |    branch nick: C
+| | | |    timestamp: Thu 2001-02-01 14:56:00
+| | | |    message:
+| | | |    @ Added clines.lst
+| | | |    $  clines.lst | 49 0
+| | | |    $1 files changed, 49 insertions, 0 deletions
+| | | |    :diff -r c4110a066208 -r 023aa55bd806 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  revno: 11
+| | | |    revision-id: 0e6e0adf281b423193f9dce097ab1df4f91215f7
+| | | |    parent: c4110a066208167dae46b08f4e0d8d2b37e842f3
+| | | |    author: A <a@example.com>
+| | | |    branch nick: C
+| | | |    timestamp: Thu 2001-02-01 05:19:00
+| | | |    message:
+| | | |    @ Added tag blines for changeset c4110a066208
+| | | |    $  .hgtags | 1 0
+| | | |    $1 files changed, 1 insertions, 0 deletions
+| | | |    :diff -r c4110a066208 -r 0e6e0adf281b .hgtags
+| | | |    :--- a/.hgtags
+| | | |    :+++ b/.hgtags
+| | | |    :@@ -1,1 +1,2 @@
+| | | |    : c06107b7bcbe751d2dd40faf4179ee7d6aac44ac ablines
+| | | |    :+c4110a066208167dae46b08f4e0d8d2b37e842f3 blines
+| | | |    :
+| | | |    
+| o | |  revno: 10
+| | | |  tags: blines
+| | | |  revision-id: c4110a066208167dae46b08f4e0d8d2b37e842f3
+| | | |  parent: 250ba7cd831ee91c3ba5bef1faebc38c5dbca5f8
+| | | |  author: A <a@example.com>
+| | | |  branch nick: C
+| | | |  timestamp: Thu 2001-02-01 05:18:00
+| | | |  message:
+| | | |  @ Added blines.lst
+| | | |  $  blines.lst | 16 0
+| | | |  $1 files changed, 16 insertions, 0 deletions
+| | | |  :diff -r 250ba7cd831e -r c4110a066208 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 | | |    revno: 9
+|\ \ \ \   revision-id: 269399222040415b3928a316f5d28792cc0be4dd
+| | | | |  parent: 7e16e7cbaf9ec5b0e65832bc6f057ba825c38cac
+| | | | |  parent: c06107b7bcbe751d2dd40faf4179ee7d6aac44ac
+| | | | |  author: C <c@example.gov>
+| | | | |  timestamp: Mon 2001-01-01 00:00:00
+| | | | |  message:
+| | | | |  @ Merge from C
+| | | | |  $  ablines.lst |  13 0
+| | | | |  $  alines.lst  |  64 0
+| | | | |  $  dlines.lst  |  52 0
+| | | | |  $3 files changed, 129 insertions, 0 deletions
+| | | | |  :diff -r 7e16e7cbaf9e -r 269399222040 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 7e16e7cbaf9e -r 269399222040 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 7e16e7cbaf9e -r 269399222040 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 | |  revno: 8
+| |/ / /   revision-id: 250ba7cd831ee91c3ba5bef1faebc38c5dbca5f8
+| | | |    parent: c06107b7bcbe751d2dd40faf4179ee7d6aac44ac
+| | | |    author: B <b@example.org>
+| | | |    branch nick: C
+| | | |    timestamp: Thu 2000-11-02 14:14:00
+| | | |    message:
+| | | |    @ Added tag ablines for changeset c06107b7bcbe
+| | | |    $  .hgtags | 1 0
+| | | |    $1 files changed, 1 insertions, 0 deletions
+| | | |    :diff -r c06107b7bcbe -r 250ba7cd831e .hgtags
+| | | |    :--- /dev/null
+| | | |    :+++ b/.hgtags
+| | | |    :@@ -0,0 +1,1 @@
+| | | |    :+c06107b7bcbe751d2dd40faf4179ee7d6aac44ac ablines
+| | | |    :
+| | | |    
+| o---+  revno: 7
+|   | |  tags: ablines
+|  / /   revision-id: c06107b7bcbe751d2dd40faf4179ee7d6aac44ac
+| | |    parent: 9fe0c28c3e1dd175e8372b742f13cbb7bd6799fe
+| | |    author: B <b@example.org>
+| | |    branch nick: C
+| | |    timestamp: Thu 2000-11-02 14:13:00
+| | |    message:
+| | |    @ Added ablines.lst
+| | |    $  ablines.lst | 13 0
+| | |    $1 files changed, 13 insertions, 0 deletions
+| | |    :diff -r 9fe0c28c3e1d -r c06107b7bcbe 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  revno: 6
+| |/   revision-id: 9fe0c28c3e1dd175e8372b742f13cbb7bd6799fe
+| |    parent: d760b0fe4fe45adf585f5030181b8081899e26a9
+| |    author: A <a@example.com>
+| |    branch nick: B
+| |    timestamp: Thu 2000-11-02 05:44:00
+| |    message:
+| |    @ Added alines.lst
+| |    $  alines.lst | 64 0
+| |    $1 files changed, 64 insertions, 0 deletions
+| |    :diff -r d760b0fe4fe4 -r 9fe0c28c3e1d 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  revno: 5
+|/   revision-id: d760b0fe4fe45adf585f5030181b8081899e26a9
+|    parent: 7e16e7cbaf9ec5b0e65832bc6f057ba825c38cac
+|    author: B <b@example.org>
+|    branch nick: A
+|    timestamp: Wed 2000-11-01 13:24:00
+|    message:
+|    @ Added dlines.lst
+|    $  dlines.lst | 52 0
+|    $1 files changed, 52 insertions, 0 deletions
+|    :diff -r 7e16e7cbaf9e -r d760b0fe4fe4 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