diff tests/test-convert-cvs.t @ 26593:c60dfcc0abf2

cvsps: fix computation of parent revisions when log caching is on cvsps computes the parent revisions of log entries by walking the cvs log sorted by (rcs, revision) and by iteratively maintaining a 'versions' dictionary which maps a (rcs, branch) pair onto the last revision seen for that pair. When log caching is on and a log cache exists, cvsps fails to set the parent revisions of new log entries because it does not iterate over the log cache in the parents computation. A complication is that a file rcs can change (move to/from the attic), with respect to its value in the log cache, if the file is removed/added back. This patch adds an iteration over the log cache to update the rcs of cached log entries, if changed, and to properly populate the 'versions' dictionary.
author Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
date Wed, 07 Oct 2015 11:33:52 +0300
parents 1abfe639a70c
children 75e29fcc5a71
line wrap: on
line diff
--- a/tests/test-convert-cvs.t	Tue Oct 06 16:26:20 2015 -0500
+++ b/tests/test-convert-cvs.t	Wed Oct 07 11:33:52 2015 +0300
@@ -333,13 +333,29 @@
 testing debugcvsps
 
   $ cd src
-  $ hg debugcvsps --fuzz=2
+  $ hg debugcvsps --fuzz=2 -x >/dev/null
+
+commit a new revision changing a and removing b/c
+
+  $ cvscall -q update -A
+  U a
+  U b/c
+  $ sleep 1
+  $ echo h >> a
+  $ cvscall -Q remove -f b/c
+  $ cvscall -q commit -mci | grep '<--'
+  $TESTTMP/cvsrepo/src/a,v  <--  a
+  $TESTTMP/cvsrepo/src/b/c,v  <--  *c (glob)
+
+update and verify the cvsps cache
+
+  $ hg debugcvsps --fuzz=2 -u
   collecting CVS rlog
-  11 log entries
-  cvslog hook: 11 entries
+  13 log entries
+  cvslog hook: 13 entries
   creating changesets
-  10 changeset entries
-  cvschangesets hook: 10 changesets
+  11 changeset entries
+  cvschangesets hook: 11 changesets
   ---------------------
   PatchSet 1 
   Date: * (glob)
@@ -466,5 +482,18 @@
   Members: 
   	b/c:1.1.2.1->1.1.2.2 
   
+  ---------------------
+  PatchSet 11 
+  Date: * (glob)
+  Author: * (glob)
+  Branch: HEAD
+  Tag: (none) 
+  Log:
+  ci
+  
+  Members: 
+  	a:1.2->1.3 
+  	b/c:1.3->1.4(DEAD) 
+  
 
   $ cd ..