Comments
Patch
@@ -207,6 +207,7 @@
# state machine begins here
tags = {} # dictionary of revisions on current file with their tags
branchmap = {} # mapping between branch names and revision numbers
+ rcsmap = {}
state = 0
store = False # set when a new record can be appended
@@ -439,6 +440,8 @@
log.append(e)
+ rcsmap[e.rcs.replace('/Attic/', '/')] = e.rcs
+
if len(log) % 100 == 0:
ui.status(util.ellipsis('%d %s' % (len(log), e.file), 80)+'\n')
@@ -446,6 +449,13 @@
# find parent revisions of individual files
versions = {}
+ for e in sorted(oldlog, key=lambda x: (x.rcs, x.revision)):
+ rcs = e.rcs.replace('/Attic/', '/')
+ if rcs in rcsmap:
+ e.rcs = rcsmap[rcs]
+ branch = e.revision[:-1]
+ versions[(e.rcs, branch)] = e.revision
+
for e in log:
branch = e.revision[:-1]
p = versions.get((e.rcs, branch), None)
@@ -333,13 +333,28 @@
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
+ $ 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 +481,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 ..