Commits

ZyX_I  committed c7a78eb

@aurum/drivers/subversion: Some rf-getchangesets, rf-updatechangesets and rf-revrange fixes

  • Participants
  • Parent commits dbb1e40
  • Branches svnsupport

Comments (0)

Files changed (1)

File plugin/aurum/drivers/subversion.vim

     let line=0
     while line<llog
         let [cs, line]=s:F.parsecs(log, line)
-        call insert(a:repo.cslist, cs)
         let a:repo.changesets[cs.hex]=cs
+        call insert(cslist, cs)
     endwhile
     return cslist
 endfunction
     if empty(a:repo.cslist)
         let cslist=s:F.getchangesets(a:repo)
         call map(cslist, 'extend(v:val, {"parents": '.
-                    \'(v:key ? [cslist[v:key-1]] : [])})')
+                    \'(v:key ? [cslist[v:key-1].hex] : [])})')
         " TODO children
         let a:repo.cslist+=cslist
     else
     if tiphex<oldtiphex
         call remove(a:repo.cslist, +tiphex, -1)
     elseif tiphex>oldtiphex
-        let cslist=a:repo.functions.revrange(a:repo, oldtiphex, tiphex)
+        let cslist=s:F.getchangesets(a:repo, oldtiphex, tiphex)
         call map(cslist, 'extend(v:val, {"parents": '.
                     \'(v:key ? [cslist[v:key-1]] : [oldtiphex])})')
         " TODO children
 endfunction
 "▶1 svn.revrange :: repo, rev1, rev2 → [cs]
 function s:svn.revrange(repo, rev1, rev2)
-    " call a:repo.functions.updatechangesets(a:repo)
+    call a:repo.functions.updatechangesets(a:repo)
     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
     let cs=s:F.parsecs(s:F.svn(a:repo, 'log', [],
                 \              {'revision': a:rev, 'limit': '1', 'xml': 1},
                 \              0, 'csf', a:rev), 2)[0]
+    let cs.parents=[]
     " XXX This construct is used to preserve information like “allfiles” etc
     let a:repo.changesets[cs.hex]=extend(get(a:repo.changesets, cs.hex, {}), cs)
     return a:repo.changesets[cs.hex]