Commits

ZyX_I committed 704a0ea

@aurum/log: Added simple logger
@aurum/drivers/subversion: Fixed rf-revrange() in case when cslist is empty
Added iterfuncs
Fixed rf-commit() that was readding removed files
tests: Added drivers-subversion-subdir tests

Comments (0)

Files changed (6)

plugin/aurum/drivers/subversion.vim

             \  'animp': 'Unable to specify commit author',
             \  'dnimp': 'Unable to specify commit date',
             \ 'cbnimp': 'Subversion driver is not able to close branch',
-            \  'difff': 'Failed to get diff between %s and %s for files %s '.
-            \           'in the repository %s: %s',
+            \  'difff': 'Failed to get diff between revisions %s and %s '.
+            \           'for files %s in the repository %s: %s',
             \    'csf': 'Failed to obtain information about revision %s '.
             \           'in the repository %s: %s',
             \    'cif': 'Failed to commit changes to the repository %s: %s',
             \           'after “====<…>====” separator line',
         \}
 let s:svn={}
+let s:iterfuncs={}
 "▶1 s:hypsites
 let s:hypsites=s:_r.hypsites.svn
 "▶1 svncmd :: repo, cmd, args, kwargs, esc → String
             \'status': {'added': [], 'removed': [], 'modified': []},
         \}
 let s:logstatchars={
+            \'C': 'modified',
+            \'M': 'modified',
+            \'~': 'modified',
+            \'R': 'modified',
             \'A': 'added',
-            \'M': 'modified',
             \'D': 'removed',
+            \'!': 'deleted',
+            \'?': 'unknown',
+            \'I': 'ignored',
         \}
 let s:hasdateexe=executable('date')
 " TODO HEAD, ... in cs.tags
                     let status=s:logstatchars[action]
                     let cs.status[status]+=[file]
                 else
-                    call s:_f.throw('perr', 'action="A/M/D"', action)
+                    call s:_f.throw('perr', 'action="'.
+                                \           join(keys(s:logstatchars, '/')).'"',
+                                \   action)
                 endif
                 if !empty(source)
                     let cs.copies[file]=source
 endfunction
 "▶1 svn.revrange :: repo, rev1, rev2 → [cs]
 function s:svn.revrange(repo, rev1, rev2)
-    call a:repo.functions.updatechangesets(a:repo)
+    if empty(a:repo.cslist)
+        call a:repo.functions.getchangesets(a:repo)
+    else
+        call a:repo.functions.updatechangesets(a:repo)
+    endif
     let hex1=a:repo.functions.getrevhex(a:repo, a:rev1)
     let hex2=a:repo.functions.getrevhex(a:repo, a:rev2)
     let i=len(a:repo.cslist)-1
 function s:svn.gettiphex(repo)
     return a:repo.functions.getrevhex(a:repo, 'HEAD')
 endfunction
+"▶1 iterfuncs.ancestors
+let s:iterfuncs.ancestors={}
+function s:iterfuncs.ancestors.start(repo, opts)
+    let cslist=copy(a:repo.functions.revrange(a:repo, '1', a:opts.revision))
+    return {'cslist': cslist}
+endfunction
+function s:iterfuncs.ancestors.next(d)
+    while !empty(a:d.cslist)
+        let cs=remove(a:d.cslist, -1)
+        if !empty(cs.changes)
+            return cs
+        endif
+    endwhile
+    return 0
+endfunction
+"▶1 iterfuncs.changesets
+let s:iterfuncs.changesets={}
+function s:iterfuncs.changesets.start(repo, opts)
+    return {'cslist': copy(a:repo.functions.getchangesets(a:repo))}
+endfunction
+let s:iterfuncs.changesets.next=s:iterfuncs.ancestors.next
+"▶1 iterfuncs.revrange
+let s:iterfuncs.revrange={}
+function s:iterfuncs.revrange.start(repo, opts)
+    let cslist=copy(a:repo.functions.revrange(a:repo, a:opts.revrange[0],
+                \                                     a:opts.revrange[1]))
+    return {'cslist': cslist}
+endfunction
+let s:iterfuncs.revrange.next=s:iterfuncs.ancestors.next
 "▶1 svn.setcsprop :: repo, cs, propname → propvalue
 function s:svn.setcsprop(repo, cs, prop)
     if a:prop is# 'allfiles'
     if a:0
         if !empty(a:1)
             let args+=['--']+a:1
-            for file in filter(copy(a:1),
-                        \      'filereadable(s:_r.os.path.join(a:repo.path, '.
-                        \                                     'v:val))')
+            let status=a:repo.functions.status(a:repo, 0, 0, a:1)
+            for file in status.unknown
                 call a:repo.functions.add(a:repo, file)
             endfor
+            for file in status.deleted
+                call a:repo.functions.forget(a:repo, file)
+            endfor
         endif
         if a:0>1 && !empty(a:2)
             call s:_f.throw('animp')
                 \              'branch', 'time', 'user', 'description',
                 \              'renames', 'copies', 'files', 'changes',
                 \              'removes'],
-                \'has_merges': 0,
-                \}
+                \'has_merges': 0, 'iterfuncs': deepcopy(s:iterfuncs),}
     "▶2 Get svnprefix
     let str1='URL: '
     let str1lidx=len(str1)-1

plugin/aurum/log.vim

     "▶3 Get grapher
     if get(a:repo, 'has_octopus_merges', 1)
         let literfuncs=s:iterfuncs.git
+    elseif get(a:repo, 'has_merges', 1)
+        let literfuncs=s:iterfuncs.hg
     else
-        let literfuncs=s:iterfuncs.hg
+        let literfuncs=s:iterfuncs.simple
     endif
     "▶3 Initialize variables
     let haslimit=(has_key(a:opts, 'limit') && a:opts.limit)
 endfunction
 "▶1 iterfuncs: loggers
 "▶2 iterfuncs.git
-" TODO Fix skipping changesets if possible
 let s:iterfuncs.git={}
 function s:iterfuncs.git.start(repo, opts, ...)
     let graph=s:F.glog.graph_init(get(a:000, 0, []), a:opts, a:repo)
         return [text.text, 0, 0]
     endif
 endfunction
+"▶2 iterfuncs.simple
+let s:iterfuncs.simple={}
+function s:iterfuncs.simple.start(repo, opts, ...)
+    return {'opts': a:opts, 'repo': a:repo, 'showparents': get(a:000, 0, [])}
+endfunction
+function s:iterfuncs.simple.proccs(d, cs)
+    if has_key(a:d.opts.skipchangesets, a:cs.hex)
+        return [[], 0, 0]
+    endif
+    let text=a:d.opts.templatefunc(a:cs, a:d.opts, a:d.repo)
+    let text.block_r=[[0, 0],
+                \     [len(text.text)-1,
+                \      max(map(copy(text.text), 'len(v:val)'))]]
+    let char='@o'[(index(a:d.showparents, a:cs.hex)==-1)]
+    call map(text.text, '(v:key ? "|" : char)." ".v:val')
+    call s:F.glog.addcols(text.special, 2)
+    let text.special.bullet=[0, 0, char]
+    return [text.text, text.block_r, text.special]
+endfunction
 "▶1 temp
 "▶2 s:templates
 let s:templates={

test/drivers-subversion-subdir.in

+:let g:curtest='svntest-subdir'
+:let g:tipname='HEAD'
+:let g:testedfile='svntest-subdirrepo/file-2'
+:command -nargs=0 WTF call WriteFile(readfile(g:testedfile, 'b'))
+:W{{{1 Annotate
+:Run! AuAnnotate file ./svntest-subdirrepo/file-2 | wincmd w
+:bwipeout!
+:bwipeout!
+:W{{{1 Log: everything
+:Run! AuLog ./svntest-subdirrepo/ stat patch showfiles showrenames showcopies
+:bwipeout!
+:W{{{1 Status: current
+:R call writefile(['Unknown file contents'], 'unknown-file')
+:R call writefile(['New file contents'], 'new-file')
+:AuTrack ./svntest-subdirrepo/new-file
+:R call delete('file-2')
+:AuJunk ./svntest-subdirrepo/pqr
+:AuJunk ignoreglob ./svntest-subdirrepo/ghi
+:Run AuStatus
+:bwipeout!
+:R call writefile(['Zero line'], 'file-2')
+:W{{{1 Status: relative to other (1)
+:Run AuStatus rev 4
+:bwipeout!
+:W{{{1 Status: relative to other (2)
+:Run AuStatus wdrev 4
+:bwipeout!
+:W{{{1 Status: between two revisions
+:R !svn revert -R .
+:Run! AuStatus ./svntest-subdirrepo/ rev HEAD wdrev 4
+:bwipeout!
+:W{{{1 Commit
+:edit ./svntest-subdirrepo/newfile.vim
+iW In file newfile.vim:write
+:Run! AuCommit message Added\ newfile.vim type unknown ./svntest-subdirrepo/newfile.vim
+:WT
+:W{{{1 Commit 2
+oW File newfile.vim, second line:write
+:Run! AuCommit
+Added second line to newfile.vim
+// It was not required really:write
+:WT
+:W{{{1 Update
+:AuUpdate 6 ./svntest-subdirrepo/
+:WTF
+:W{{{1 Update: force
+:write! ./svntest-subdirrepo/file-2
+:AuUpdate! 7 ./svntest-subdirrepo/
+:WTF
+:W{{{1 Update: to tip
+:R AuUpdate
+:WTF
+:W{{{1 Move
+:AuMove ./svntest-subdirrepo/pqr ./svntest-subdirrepo/stu
+:AuCommit message Moved\ pqr\ to\ stu repo ./svntest-subdirrepo/ all
+:WTa showrenames showcopies
+:W{{{1 Move: copy
+:AuMove copy ./svntest-subdirrepo/stu ./svntest-subdirrepo/pqr
+:AuCommit message Copied\ stu\ to\ pqr repo ./svntest-subdirrepo/ all
+:WTa showrenames showcopies
+:W{{{1 Junk: forget, remove
+:call WriteFile(filereadable('./svntest-subdirrepo/pqr').filereadable('./svntest-subdirrepo/stu'))
+:AuJunk forget ./svntest-subdirrepo/pqr
+:AuJunk remove ./svntest-subdirrepo/stu
+:call WriteFile(filereadable('./svntest-subdirrepo/pqr').filereadable('./svntest-subdirrepo/stu'))
+:AuCommit ./svntest-subdirrepo/**
+ggddGld:write
+:WT
+:W{{{1 Grep: working directory
+:Run! AuGrep W repo ./svntest-subdirrepo/ | cwindow
+:cclose
+:W{{{1 Grep: HEAD
+:let repo=aurum#repository()
+:Run! AuGrep W revision HEAD repo ./svntest-subdirrepo/ | cwindow
+:cclose
+:W{{{1 Junk: ignore, ignoreglob
+:write! ./svntest-subdirrepo/file.vim
+:write! ./svntest-subdirrepo/ignoredfile.vim
+:write! ./svntest-subdirrepo/ignoredfile2.vim
+:W{{{2 Status before junk
+:Run! AuStatus ./svntest-subdirrepo/
+:bwipeout!
+:AuJunk ignore ./svntest-subdirrepo/file.vim
+:AuJunk ignoreglob ./svntest-subdirrepo/ignored*
+:W{{{2 Status after junk
+:Run! AuStatus ./svntest-subdirrepo/
+:bwipeout!

test/drivers-subversion-subdir.ok

+{{{1 Annotate
+7 Replace “Line 1” with “Zero li… / zyx
+6 Added file-2                    / zyx
+9 Fix: s/Seventh/Second/          / zyx
+7 Replace “Line 1” with “Zero li… / zyx
+{{{1 Log: everything
+@ Changeset 9:9
+| Commited 29 Янв 2012 10:09 by zyx
+| Files: file-2
+| @ Fix: s/Seventh/Second/
+| $  file-2 | 1 1
+| $1 files changed, 1 insertions, 1 deletions
+| :Index: file-2
+| :===================================================================
+| :--- file-2	(revision 8)
+| :+++ file-2	(revision 9)
+| :@@ -1,4 +1,4 @@
+| : Zero line
+| : First line
+| :-Seventh line
+| :+Second line
+| : Third line
+| 
+o Changeset 7:7
+| Commited 29 Янв 2012 10:09 by zyx
+| Files: file-2
+| @ Replace “Line 1” with “Zero line”
+| $  file-2 | 2 2
+| $1 files changed, 2 insertions, 2 deletions
+| :Index: file-2
+| :===================================================================
+| :--- file-2	(revision 6)
+| :+++ file-2	(revision 7)
+| :@@ -1,4 +1,4 @@
+| :-Line 1
+| :+Zero line
+| : First line
+| : Seventh line
+| :-Second line
+| :+Third line
+| 
+o Changeset 6:6
+| Commited 29 Янв 2012 10:09 by zyx
+| Files: file-2
+| @ Added file-2
+| $  file-2 | 4 0
+| $1 files changed, 4 insertions, 0 deletions
+| :Index: file-2
+| :===================================================================
+| :--- file-2	(revision 0)
+| :+++ file-2	(revision 6)
+| :@@ -0,0 +1,4 @@
+| :+Line 1
+| :+First line
+| :+Seventh line
+| :+Second line
+| 
+o Changeset 4:4
+| Commited 08 Янв 2012 20:45 by zyx
+| Files: pqr
+| @ Added seventh line to file-under-svn-control
+| @ Added def, ghi, mno
+| @ Added subdir/pqr
+| @ Added subdir2, subdir2/stu
+| $  pqr | 1 0
+| $1 files changed, 1 insertions, 0 deletions
+| :Index: pqr
+| :===================================================================
+| :--- pqr	(revision 0)
+| :+++ pqr	(revision 4)
+| :@@ -0,0 +1 @@
+| :+Mno
+| 
+{{{1 Status: current
+A new-file
+! file-2
+M .
+R pqr
+? unknown-file
+{{{1 Status: relative to other (1)
+A file-2
+A new-file
+R pqr
+{{{1 Status: relative to other (2)
+A pqr
+R file-2
+R new-file
+{{{1 Status: between two revisions
+R file-2
+{{{1 Commit
+W In file newfile.vim
+{{{1 Commit 2
+
+# Modified newfile.vim
+{{{1 Update
+Line 1
+First line
+Seventh line
+Second line
+{{{1 Update: force
+Zero line
+First line
+Seventh line
+Third line
+{{{1 Update: to tip
+Zero line
+First line
+Second line
+Third line
+{{{1 Move
+{{{1 Move: copy
+{{{1 Junk: forget, remove
+11
+11
+{{{1 Grep: working directory
+svntest-subdirrepo/newfile.vim|1| W In file newfile.vim
+svntest-subdirrepo/newfile.vim|2| W File newfile.vim, second line
+{{{1 Grep: HEAD
+aurum://file:%ETMPDIR%%-test%-svntest-subdirrepo:14:newfile.vim|1| W In file newfile.vim
+aurum://file:%ETMPDIR%%-test%-svntest-subdirrepo:14:newfile.vim|2| W File newfile.vim, second line
+{{{1 Junk: ignore, ignoreglob
+{{{2 Status before junk
+? ignoredfile.vim
+? pqr
+? ignoredfile2.vim
+? new-file
+? file.vim
+? unknown-file
+{{{2 Status after junk
+M .
+? pqr
+? new-file
+? file.vim
+? unknown-file

test/drivers-subversion.ok

 {{{1 Annotate
 3 Added --force                   / zyx
 {{{1 Log: everything
-@  Changeset 9:9
-|  Commited 29 Янв 2012 10:09 by zyx
-|  Files: subdir/file-2
-|  @ Fix: s/Seventh/Second/
-|  $  subdir/file-2 | 1 1
-|  $1 files changed, 1 insertions, 1 deletions
-|  :Index: subdir/file-2
-|  :===================================================================
-|  :--- subdir/file-2	(revision 8)
-|  :+++ subdir/file-2	(revision 9)
-|  :@@ -1,4 +1,4 @@
-|  : Zero line
-|  : First line
-|  :-Seventh line
-|  :+Second line
-|  : Third line
-|  
-o  Changeset 8:8
-|  Commited 29 Янв 2012 10:09 by zyx
-|  Files: file-under-svn-control
-|  @ Added 9’th line to file-under-svn-control
-|  $  file-under-svn-control | 1 0
-|  $1 files changed, 1 insertions, 0 deletions
-|  :Index: file-under-svn-control
-|  :===================================================================
-|  :--- file-under-svn-control	(revision 7)
-|  :+++ file-under-svn-control	(revision 8)
-|  :@@ -5,3 +5,4 @@
-|  : Fifth line
-|  : Sixth line
-|  : Seventh line
-|  :+9’th line
-|  
-o  Changeset 7:7
-|  Commited 29 Янв 2012 10:09 by zyx
-|  Files: subdir/file-2
-|  @ Replace “Line 1” with “Zero line”
-|  $  subdir/file-2 | 2 2
-|  $1 files changed, 2 insertions, 2 deletions
-|  :Index: subdir/file-2
-|  :===================================================================
-|  :--- subdir/file-2	(revision 6)
-|  :+++ subdir/file-2	(revision 7)
-|  :@@ -1,4 +1,4 @@
-|  :-Line 1
-|  :+Zero line
-|  : First line
-|  : Seventh line
-|  :-Second line
-|  :+Third line
-|  
-o  Changeset 6:6
-|  Commited 29 Янв 2012 10:09 by zyx
-|  Files: subdir/file-2
-|  @ Added file-2
-|  $  subdir/file-2 | 4 0
-|  $1 files changed, 4 insertions, 0 deletions
-|  :Index: subdir/file-2
-|  :===================================================================
-|  :--- subdir/file-2	(revision 0)
-|  :+++ subdir/file-2	(revision 6)
-|  :@@ -0,0 +1,4 @@
-|  :+Line 1
-|  :+First line
-|  :+Seventh line
-|  :+Second line
-|  
-o  Changeset 5:5
-|  Commited 08 Янв 2012 20:45 by zyx
-|  Files: file-under-svn-control
-|  @ Replaced “Fourth” with “4’th”
-|  $  file-under-svn-control | 1 1
-|  $1 files changed, 1 insertions, 1 deletions
-|  :Index: file-under-svn-control
-|  :===================================================================
-|  :--- file-under-svn-control	(revision 4)
-|  :+++ file-under-svn-control	(revision 5)
-|  :@@ -1,7 +1,7 @@
-|  : First line
-|  : Second line
-|  : Third line
-|  :-Fourth line
-|  :+4’th line
-|  : Fifth line
-|  : Sixth line
-|  : Seventh line
-|  
-o  Changeset 4:4
-|  Commited 08 Янв 2012 20:45 by zyx
-|  Files: subdir2/stu, ghi, mno, subdir/pqr, subdir2, def, file-under-svn-control
-|  @ Added seventh line to file-under-svn-control
-|  @ Added def, ghi, mno
-|  @ Added subdir/pqr
-|  @ Added subdir2, subdir2/stu
-|  $  def                    | 1 0
-|  $  file-under-svn-control | 1 0
-|  $  ghi                    | 1 0
-|  $  mno                    | 1 0
-|  $  subdir/pqr             | 1 0
-|  $  subdir2/stu            | 1 0
-|  $6 files changed, 6 insertions, 0 deletions
-|  :Index: ghi
-|  :===================================================================
-|  :--- ghi	(revision 0)
-|  :+++ ghi	(revision 4)
-|  :@@ -0,0 +1 @@
-|  :+Def
-|  :Index: subdir/pqr
-|  :===================================================================
-|  :--- subdir/pqr	(revision 0)
-|  :+++ subdir/pqr	(revision 4)
-|  :@@ -0,0 +1 @@
-|  :+Mno
-|  :Index: mno
-|  :===================================================================
-|  :--- mno	(revision 0)
-|  :+++ mno	(revision 4)
-|  :@@ -0,0 +1 @@
-|  :+Ghi
-|  :Index: subdir2/stu
-|  :===================================================================
-|  :--- subdir2/stu	(revision 0)
-|  :+++ subdir2/stu	(revision 4)
-|  :@@ -0,0 +1 @@
-|  :+Pqr
-|  :Index: file-under-svn-control
-|  :===================================================================
-|  :--- file-under-svn-control	(revision 3)
-|  :+++ file-under-svn-control	(revision 4)
-|  :@@ -4,3 +4,4 @@
-|  : Fourth line
-|  : Fifth line
-|  : Sixth line
-|  :+Seventh line
-|  :Index: def
-|  :===================================================================
-|  :--- def	(revision 0)
-|  :+++ def	(revision 4)
-|  :@@ -0,0 +1 @@
-|  :+Abc
-|  
-o  Changeset 3:3
-|  Commited 08 Янв 2012 20:45 by zyx
-|  Files: --force
-|  @ Added --force
-|  $  --force | 1 0
-|  $1 files changed, 1 insertions, 0 deletions
-|  :Index: --force
-|  :===================================================================
-|  :--- --force	(revision 0)
-|  :+++ --force	(revision 3)
-|  :@@ -0,0 +1 @@
-|  :+File that looks like a “svn add” key
-|  
-o  Changeset 2:2
-|  Commited 08 Янв 2012 20:45 by zyx
-|  Files: subdir
-|  @ Commit where only a directory added
-|  $0 files changed, 0 insertions, 0 deletions
-|  :
-|  
-o  Changeset 1:1
-   Commited 08 Янв 2012 20:45 by zyx
-   Files: file-under-svn-control
-   @ Added file-under-svn-control
-   
+@ Changeset 9:9
+| Commited 29 Янв 2012 10:09 by zyx
+| Files: subdir/file-2
+| @ Fix: s/Seventh/Second/
+| $  subdir/file-2 | 1 1
+| $1 files changed, 1 insertions, 1 deletions
+| :Index: subdir/file-2
+| :===================================================================
+| :--- subdir/file-2	(revision 8)
+| :+++ subdir/file-2	(revision 9)
+| :@@ -1,4 +1,4 @@
+| : Zero line
+| : First line
+| :-Seventh line
+| :+Second line
+| : Third line
+| 
+o Changeset 8:8
+| Commited 29 Янв 2012 10:09 by zyx
+| Files: file-under-svn-control
+| @ Added 9’th line to file-under-svn-control
+| $  file-under-svn-control | 1 0
+| $1 files changed, 1 insertions, 0 deletions
+| :Index: file-under-svn-control
+| :===================================================================
+| :--- file-under-svn-control	(revision 7)
+| :+++ file-under-svn-control	(revision 8)
+| :@@ -5,3 +5,4 @@
+| : Fifth line
+| : Sixth line
+| : Seventh line
+| :+9’th line
+| 
+o Changeset 7:7
+| Commited 29 Янв 2012 10:09 by zyx
+| Files: subdir/file-2
+| @ Replace “Line 1” with “Zero line”
+| $  subdir/file-2 | 2 2
+| $1 files changed, 2 insertions, 2 deletions
+| :Index: subdir/file-2
+| :===================================================================
+| :--- subdir/file-2	(revision 6)
+| :+++ subdir/file-2	(revision 7)
+| :@@ -1,4 +1,4 @@
+| :-Line 1
+| :+Zero line
+| : First line
+| : Seventh line
+| :-Second line
+| :+Third line
+| 
+o Changeset 6:6
+| Commited 29 Янв 2012 10:09 by zyx
+| Files: subdir/file-2
+| @ Added file-2
+| $  subdir/file-2 | 4 0
+| $1 files changed, 4 insertions, 0 deletions
+| :Index: subdir/file-2
+| :===================================================================
+| :--- subdir/file-2	(revision 0)
+| :+++ subdir/file-2	(revision 6)
+| :@@ -0,0 +1,4 @@
+| :+Line 1
+| :+First line
+| :+Seventh line
+| :+Second line
+| 
+o Changeset 5:5
+| Commited 08 Янв 2012 20:45 by zyx
+| Files: file-under-svn-control
+| @ Replaced “Fourth” with “4’th”
+| $  file-under-svn-control | 1 1
+| $1 files changed, 1 insertions, 1 deletions
+| :Index: file-under-svn-control
+| :===================================================================
+| :--- file-under-svn-control	(revision 4)
+| :+++ file-under-svn-control	(revision 5)
+| :@@ -1,7 +1,7 @@
+| : First line
+| : Second line
+| : Third line
+| :-Fourth line
+| :+4’th line
+| : Fifth line
+| : Sixth line
+| : Seventh line
+| 
+o Changeset 4:4
+| Commited 08 Янв 2012 20:45 by zyx
+| Files: subdir2/stu, ghi, mno, subdir/pqr, subdir2, def, file-under-svn-control
+| @ Added seventh line to file-under-svn-control
+| @ Added def, ghi, mno
+| @ Added subdir/pqr
+| @ Added subdir2, subdir2/stu
+| $  def                    | 1 0
+| $  file-under-svn-control | 1 0
+| $  ghi                    | 1 0
+| $  mno                    | 1 0
+| $  subdir/pqr             | 1 0
+| $  subdir2/stu            | 1 0
+| $6 files changed, 6 insertions, 0 deletions
+| :Index: ghi
+| :===================================================================
+| :--- ghi	(revision 0)
+| :+++ ghi	(revision 4)
+| :@@ -0,0 +1 @@
+| :+Def
+| :Index: subdir/pqr
+| :===================================================================
+| :--- subdir/pqr	(revision 0)
+| :+++ subdir/pqr	(revision 4)
+| :@@ -0,0 +1 @@
+| :+Mno
+| :Index: mno
+| :===================================================================
+| :--- mno	(revision 0)
+| :+++ mno	(revision 4)
+| :@@ -0,0 +1 @@
+| :+Ghi
+| :Index: subdir2/stu
+| :===================================================================
+| :--- subdir2/stu	(revision 0)
+| :+++ subdir2/stu	(revision 4)
+| :@@ -0,0 +1 @@
+| :+Pqr
+| :Index: file-under-svn-control
+| :===================================================================
+| :--- file-under-svn-control	(revision 3)
+| :+++ file-under-svn-control	(revision 4)
+| :@@ -4,3 +4,4 @@
+| : Fourth line
+| : Fifth line
+| : Sixth line
+| :+Seventh line
+| :Index: def
+| :===================================================================
+| :--- def	(revision 0)
+| :+++ def	(revision 4)
+| :@@ -0,0 +1 @@
+| :+Abc
+| 
+o Changeset 3:3
+| Commited 08 Янв 2012 20:45 by zyx
+| Files: --force
+| @ Added --force
+| $  --force | 1 0
+| $1 files changed, 1 insertions, 0 deletions
+| :Index: --force
+| :===================================================================
+| :--- --force	(revision 0)
+| :+++ --force	(revision 3)
+| :@@ -0,0 +1 @@
+| :+File that looks like a “svn add” key
+| 
+o Changeset 2:2
+| Commited 08 Янв 2012 20:45 by zyx
+| Files: subdir
+| @ Commit where only a directory added
+| $0 files changed, 0 insertions, 0 deletions
+| :
+| 
+o Changeset 1:1
+| Commited 08 Янв 2012 20:45 by zyx
+| Files: file-under-svn-control
+| @ Added file-under-svn-control
+| 
 {{{1 Status: current
 A new-file
 ! file-under-svn-control
 R def
 {{{1 Commit
 W In file newfile.vim
-o  Changeset 10
-|  @ Added newfile.vim
+o Changeset 10
+| @ Added newfile.vim
 {{{1 Commit 2
 
 # Modified newfile.vim
-o  Changeset 11
-|  @ Added second line to newfile.vim
-|  @ // It was not required really
+o Changeset 11
+| @ Added second line to newfile.vim
+| @ // It was not required really
 {{{1 Update
 First line
 Second line
 Seventh line
 9’th line
 {{{1 Move
-o  Changeset 12
-|  Renamed --force to -f
-|  @ Moved --force to -f
+o Changeset 12
+| Renamed --force to -f
+| @ Moved --force to -f
 {{{1 Move: copy
-o  Changeset 13
-|  Copied -f to --force
-|  @ Copied -f to --force
+o Changeset 13
+| Copied -f to --force
+| @ Copied -f to --force
 {{{1 Junk: forget, remove
 11
 10
-o  Changeset 14
-|  @ Removed --force
+o Changeset 14
+| @ Removed --force
 {{{1 Grep: working directory
 svntestrepo/newfile.vim|1| W In file newfile.vim
 svntestrepo/newfile.vim|2| W File newfile.vim, second line

test/gentests-setuptestrepos.zsh

 
 tar xJf svntestreposerver.tar.xz
 svn checkout file://$PWD/svntestreposerver svntestrepo
+svn checkout file://$PWD/svntestreposerver/subdir svntest-subdirrepo
 
 for test in cmd-annotate-buffers cmd+maps-commit cmd-record cmd-status \
             maps-status cmd-vimdiff cmd-diff cmd-update opts-remembermsg \