ZyX_I avatar ZyX_I committed 1dd11a7

Fix parents and children subversion changeset properties when using updatechangesets

Comments (0)

Files changed (2)

autoload/aurum/drivers/subversion.vim

     elseif tiprev>oldtiprev
         let cslist=s:F.getchangesets(a:repo, ''.(oldtiprev+1), ''.tiprev)
         if !empty(cslist)
-            let a:repo.mutable.cslist[-1].children=
-                        \''.(a:repo.mutable.cslist[-1].rev+1)
-            call map(cslist[:-2], 'extend(v:val, {"children": '.
-                        \                                '["".(v:val.rev-1)]})')
+            let a:repo.mutable.cslist[-1].children=[cslist[0].hex]
+            let cslist[0].parents=[a:repo.mutable.cslist[-1].hex]
             let a:repo.mutable.cslist+=cslist
         endif
     endif

test/drivers-subversion.ok

 | $  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)
 | :+++ def	(revision 4)
 | :@@ -0,0 +1 @@
 | :+Abc
-| :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
 o Changeset 3:3
 | Commited 08 Jan 2012 20:45 by zyx
 R def
 ? unknown-file
 {{{1 Status: relative to other (1)
-A subdir2/stu
 A ghi
 A mno
+A subdir2/stu
+A subdir/file-2
 A subdir/pqr
-A subdir/file-2
 A .
 A new-file
 M file-under-svn-control
 R new-file
 {{{1 Status: between two revisions
 M file-under-svn-control
+R def
 R ghi
 R --force
+R subdir/pqr
 R subdir/file-2
-R subdir/pqr
 R mno
 R subdir2/stu
-R def
 {{{1 Commit
 o Changeset 10
 | @ Added newfile.vim
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.