CVSps fixed; git-cvsimport works, too
[for original thread see
http://www.gelato.unsw.edu.au/archives/git/0511/11812.html]
Hi Chris,
I was looking at your patch and test script to decide whether to include it in my cvsps patch collection, but it seems there are still problems:
* when run with "-x" it gives the expected result, even with "-A"
* when run without "-x" and without "-A", the patchset introducing file "b" and branch "stable" does not appear, without even a warning
* when run with "-A" cvsps notices the inconsistency:
invalid initial_branch for file a, probably from old cache, run with -x.
I have included the current version of your patch in branch "to-check" in http://ydirson.free.fr/soft/git/cvsps.git/. I did not tak time to look at it closely yet - do you plan to work on this issue ?
Best regards,
Signature · 4 lines
Yann Dirson <[email protected]> | Debian-related: <[email protected]> | Support Debian GNU/Linux: | Freedom, Power, Stability, Gratis http://ydirson.free.fr/ | Check <http://www.debian.org/>
Quoted 10 lines · Yann Dirson
[for original thread see
http://www.gelato.unsw.edu.au/archives/git/0511/11812.html]Hi Chris,
I was looking at your patch and test script to decide whether to include it in my cvsps patch collection, but it seems there are still problems:
* when run with "-x" it gives the expected result, even with "-A"
This is expected.
Quoted 3 lines
* when run without "-x" and without "-A", the patchset introducing file "b" and branch "stable" does not appear, without even a warning
With out "-A" I don't think the patch is operative.
Quoted 4 lines
* when run with "-A" cvsps notices the inconsistency:
invalid
initial_branchfor file a, probably from old cache, run with -x.
good advice.
Quoted 5 lines
I have included the current version of your patch in branch "to-check" in http://ydirson.free.fr/soft/git/cvsps.git/. I did not tak time to look at it closely yet - do you plan to work on this issue ?
I wondered if you'd find that. Evidentally, you're being thorough. :)
The intent of my patch is only to affect the branch ancestry calculation. IIRC, the patch version is incompatible with cached results from unpatched versions. Hence I would only expect it to work with '-x -A' (unless there was no pre-existing cache file).
I've had one independent report of success from someone who found and used my patch.
I haven't had to use cvsps recently, so I don't know how much time I'll have for cvsps hacking, but I'm interested in getting feedback on my current patch.
There's probably some nicer way to handle the cache incompatibility, but my current approach has been to tell people to delete their old cache file or run wih -x. Suggestions are welcome.
-chris
Quoted 13 lines · Chris Shoemaker
Quoted 4 lines
* when run with "-A" cvsps notices the inconsistency:
invalid
initial_branchfor file a, probably from old cache, run with -x.good advice.
Quoted 5 lines
I have included the current version of your patch in branch "to-check" in http://ydirson.free.fr/soft/git/cvsps.git/. I did not tak time to look at it closely yet - do you plan to work on this issue ?
Quoted 6 lines
I wondered if you'd find that. Evidentally, you're being thorough. :)
The intent of my patch is only to affect the branch ancestry calculation. IIRC, the patch version is incompatible with cached results from unpatched versions. Hence I would only expect it to work with '-x -A' (unless there was no pre-existing cache file).
All those tests were done with your patch applied, so the cache was generated and re-read using the pached version.
Quoted 3 lines
There's probably some nicer way to handle the cache incompatibility, but my current approach has been to tell people to delete their old cache file or run wih -x. Suggestions are welcome.
If the cache format is changed, this would be a good candidate for the "v2" cache format. I already have 2 (incomplete) patches that well need to bump the cache format version - see branches multitag (allow several tags per patchset) and semicolon (allow semicolons in filenames).
Best regards,
Signature · 4 lines
Yann Dirson <[email protected]> | Debian-related: <[email protected]> | Support Debian GNU/Linux: | Freedom, Power, Stability, Gratis http://ydirson.free.fr/ | Check <http://www.debian.org/>
Quoted 16 lines · Yann Dirson
Quoted 15 lines · Chris Shoemaker
Quoted 4 lines
* when run with "-A" cvsps notices the inconsistency:
invalid
initial_branchfor file a, probably from old cache, run with -x.good advice.
Quoted 5 lines
I have included the current version of your patch in branch "to-check" in http://ydirson.free.fr/soft/git/cvsps.git/. I did not tak time to look at it closely yet - do you plan to work on this issue ?
I wondered if you'd find that. Evidentally, you're being thorough. :)
Quoted 7 lines
Quoted 4 lines
The intent of my patch is only to affect the branch ancestry calculation. IIRC, the patch version is incompatible with cached results from unpatched versions. Hence I would only expect it to work with '-x -A' (unless there was no pre-existing cache file).
All those tests were done with your patch applied, so the cache was generated and re-read using the pached version.
Are you saying there was no pre-existing cache file when the patched version was first run? Did you delete it? If so, then there's a bug somewhere.
Quoted 10 lines
Quoted 4 lines
There's probably some nicer way to handle the cache incompatibility, but my current approach has been to tell people to delete their old cache file or run wih -x. Suggestions are welcome.
If the cache format is changed, this would be a good candidate for the "v2" cache format. I already have 2 (incomplete) patches that well need to bump the cache format version - see branches multitag (allow several tags per patchset) and semicolon (allow semicolons in filenames).
IIRC, it's not syntactically incompatible - it's just that the patched version can tell that it doesn't trust the initial branch determinations that are stored in the cache file by an unpatched version.
The complaint is basically, Hey, there's an initial branch determination already made for this file, but it's not the one I would have made, so it must have been restored from a cache file that I didn't make.
-chris
Quoted 7 lines
Best regards,
Signature · 4 lines
Yann Dirson <[email protected]> | Debian-related: <[email protected]> | Support Debian GNU/Linux: | Freedom, Power, Stability, Gratis http://ydirson.free.fr/ | Check <http://www.debian.org/>
Quoted 2 lines · Chris Shoemaker
Are you saying there was no pre-existing cache file when the patched version was first run?
It was the sample script you provided to demonstrate the problem which showed the new issue: it does a "cvsps -x" first, then runs git-cvsimport, which runs "cvsps -u". That one does fails. I'm pretty sure the cache does not exist beforehand, since your script creates the repo in a temporary directory.
BTW, I'll see about adding a testsuite to cvsps, based on the framework used by git. All these scriptlets used to exhibit the various problems have to be kept somewhere.
Quoted 1 line
Did you delete it? If so, then there's a bug somewhere.
I do think there is a bug somewhere :)
Quoted 4 lines
The complaint is basically, Hey, there's an initial branch determination already made for this file, but it's not the one I would have made, so it must have been restored from a cache file that I didn't make.
OK, thanks for the clarification.
Best regards,
Signature · 4 lines
Yann Dirson <[email protected]> | Debian-related: <[email protected]> | Support Debian GNU/Linux: | Freedom, Power, Stability, Gratis http://ydirson.free.fr/ | Check <http://www.debian.org/>