Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#463 closed defect (fixed)

svndigest-copy-cache tries to copy cache in test wc

Reported by: Peter Johansson Owned by: Peter Johansson
Priority: major Milestone: svndigest 0.10
Component: core Version: trunk
Keywords: Cc:

Description

I ran

./bin/svndigest-copy-cache -v -r . -t ../svndigest-0.8.x

where ../svndigest-0.8.x is a pristine checkout. It has, e.g., no test/testSubDir which explains why I get this error message:

error: ../svndigest-0.8.x/./test/testSubDir/cache_partial_test/toy_project: No such directory

What behavior is desired?

Change History (6)

comment:1 Changed 10 years ago by Jari Häkkinen

I suppose that copying has occurred already when he error happens. Does this means that the state of the pristine WC is undefined? What happens if svndigest-copy-cache is run again?

If svndigest-copy-cache cannot repair a failed/uncomplete copying then svndigest-copy-cache should check that the source and target structures are the same to avoid partial copying.

Another thing, testSubDir is not a part of the revision controlled files why should svndigest-copy-cache at all copy that directory?

comment:2 in reply to:  1 Changed 10 years ago by Peter Johansson

Replying to jari:

I suppose that copying has occurred already when he error happens.

That is a difficult question. Some files might been copied. Looking at the code the script works by finding all cache files using find and then loop over all those files. When the error occurs the loop is interrupted and the script exits.

Does this means that the state of the pristine WC is undefined?

You could say that it is undefined. If you runs svndigest on it, svndigest will find some cache files and some cache files will be missing for which svndigest must retrieve the stats from the server.

What happens if svndigest-copy-cache is run again?

Same thing will happen. The script will copy some files and then exits.

If svndigest-copy-cache cannot repair a failed/uncomplete copying then svndigest-copy-cache should check that the source and target structures are the same to avoid partial copying.

Yes, we could do the loop twice. First we check that the target tree structure is OK and in the second we perform the copying as now. However, I don't see how that helps. What is annoying is not that some files have been copying; what is annoying is that not all files have been copying. Going from a partial copying, say 73%, to 0% is not really an improvement from my point of view.

Another thing, testSubDir is not a part of the revision controlled files why should svndigest-copy-cache at all copy that directory?

Yes, I would prefer if svndigest-copy-cache only traversed svn controlled directories. To accomplish that, it is probably easier to rewrite it in C++ because it gets a bit tricky to implement in m4sh. We can reuse a lot of the code in libsvndigest, so shouldn't be too hard...

comment:3 Changed 10 years ago by Peter Johansson

Milestone: svndigest 0.x+svndigest 0.10

So the conclusion is that we re-write svndigest-copy-cache so it only traverses svn controlled directories. The bug is annoying so I move put this for 0.10

comment:4 Changed 10 years ago by Peter Johansson

Owner: changed from Jari Häkkinen to Peter Johansson
Status: newassigned

comment:5 Changed 10 years ago by Peter Johansson

Resolution: fixed
Status: assignedclosed

(In [1293]) rewrite svndigest-copy-cache in C++. closes #463

comment:6 Changed 10 years ago by Peter Johansson

(In [1294]) missing files. refs #463

Note: See TracTickets for help on using tickets.