comparison 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
comparison
equal deleted inserted replaced
26592:502b56a9e897 26593:c60dfcc0abf2
331 331
332 332
333 testing debugcvsps 333 testing debugcvsps
334 334
335 $ cd src 335 $ cd src
336 $ hg debugcvsps --fuzz=2 336 $ hg debugcvsps --fuzz=2 -x >/dev/null
337 collecting CVS rlog 337
338 11 log entries 338 commit a new revision changing a and removing b/c
339 cvslog hook: 11 entries 339
340 creating changesets 340 $ cvscall -q update -A
341 10 changeset entries 341 U a
342 cvschangesets hook: 10 changesets 342 U b/c
343 $ sleep 1
344 $ echo h >> a
345 $ cvscall -Q remove -f b/c
346 $ cvscall -q commit -mci | grep '<--'
347 $TESTTMP/cvsrepo/src/a,v <-- a
348 $TESTTMP/cvsrepo/src/b/c,v <-- *c (glob)
349
350 update and verify the cvsps cache
351
352 $ hg debugcvsps --fuzz=2 -u
353 collecting CVS rlog
354 13 log entries
355 cvslog hook: 13 entries
356 creating changesets
357 11 changeset entries
358 cvschangesets hook: 11 changesets
343 --------------------- 359 ---------------------
344 PatchSet 1 360 PatchSet 1
345 Date: * (glob) 361 Date: * (glob)
346 Author: * (glob) 362 Author: * (glob)
347 Branch: HEAD 363 Branch: HEAD
464 fuzzy 480 fuzzy
465 481
466 Members: 482 Members:
467 b/c:1.1.2.1->1.1.2.2 483 b/c:1.1.2.1->1.1.2.2
468 484
469 485 ---------------------
470 $ cd .. 486 PatchSet 11
487 Date: * (glob)
488 Author: * (glob)
489 Branch: HEAD
490 Tag: (none)
491 Log:
492 ci
493
494 Members:
495 a:1.2->1.3
496 b/c:1.3->1.4(DEAD)
497
498
499 $ cd ..