Thus said Jan Nijtmans on Sat, 02 Nov 2013 12:11:51 +0100:

> Agreed. A single retry is enough for me too.

As it turns  out, I can get  it to prompt more than  once easily enough,
but 2 is the limit here because we drop out of the http exchange loop if
we've seen  2 login  failure messages.  It does  seem that  the original
intent was to handle  2 login failures, so I'll go  ahead and commit the
change.

> Ideally, the  password should  be saved  only when  the authentication
> succeeds,  success of  the complete  sync  is not  necessary. But  I'm
> satisfied with the current behavior of saving it always.

Good point. I had a look and it  seems that there doesn't appear to be a
``login successful'' message that is sent back from the server. It looks
like  we look  for a  ``login failed''  message which  means we  have to
assume that the authentication succeeded  if we *don't* see that message
during the first cycle in the exchange.

> I just made  a little modification preventing the prompt  if the saved
> password is already equal to the  to-be-saved password. I will do some
> more testing the coming days,  but I think the "pending-review" branch
> (another name would be better....) works fine as I expect.

I'm testing your change  and it works nicely so far.  I also renamed the
branch since there is clearly more work happening here.

I have also found another case where it doesn't work (perhaps introduced
by my changes):

$ fossil sync
Sync with http://tester@localhost:8081/
Round-trips: 1   Artifacts sent: 0  received: 0
Error: login failed
password for tester: 
Round-trips: 2   Artifacts sent: 0  received: 0
Error: login failed
password for tester: 
Round-trips: 3   Artifacts sent: 0  received: 0
Sync finished with 1442 bytes sent, 914 bytes received

I'm now investigating  why it didn't prompt me to  save the password (it
has  nothing to  do with  your change),  but you'll  notice that  it did
prompt me twice.

Andy
-- 
TAI64 timestamp: 4000000052752362


_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to