Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

Re: [PATCH] New files in git weren't being downloaded during CVS update

From: Andy Parkins <hidden>
Date: 2016-06-15 22:42:50

On Sunday 2007 January 21 14:25, Andy Parkins wrote:
This is in response to Simon Schubert's suggestion that T_ADDED is an
inappropriate category for a remotely added file.  Instead this treats
remotely added files the same as remotely changed files.
I'm still concerned that this fix is not right.  Having thought more about it, 
I suspect that this breaks the other "added-file" case, where the file is 
added locally but not remotely.

There are three key cases:
 1. File present locally and remotely.  Modified remotely.  Response "U"
 2. File present locally only.  Response should be "A"
 3. File present remotely only.  Response should be "U"

I think the real problem is that both 2 and 3 are being handled in the same 
place.  Hence, my patch, which has fixed case 3; will have broken case 2.

I need a bit of confirmation from Martin; but I suspect that the correct fix 
is something like this:

    elsif ( (!defined($wrev) || $wrev == 0) && !defined($meta->{revision})
    {
        $log->info("Tell the client the file will be added");

If I'm correct, this would only run the added section when there is no 
matching revision in the repository - this would be case 2.  Then case 3 
would be handled as the else to this if, which handles every other case.

My testing of this works, but I'd like confirmation that I'm right in this 
thinking?  Patch to follow...


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help