#158: restarting the darcs source backend skips failed changesets
------------------------+---------------------------------------------------
  Reporter:  wfranzini  |       Owner:  lele      
      Type:  defect     |      Status:  reopened  
  Priority:  major      |   Milestone:  VersionOne
 Component:  darcs      |     Version:  0.9       
Resolution:             |    Keywords:            
------------------------+---------------------------------------------------

Comment(by lele):

 For the history, what I think it has happened is the following:

 Prologue:

  * the patch N-1 has been ''applied'' on the source
  * after application, the source backend (''darcs'' in this case)
 completed the ChangeSet with the actual list of entries
  * the changeset got committed on the target
  * the statefile was notified about that, and stored the changeset
 (''modified'', at that point) in the journal
  * patch N came in: the source backend correctly applied that too and
 loaded the entries
  * at this point, the ''target'' backend '''fails''', the process is
 aborted, and the statefile is closed: the StateFileJournal at this point
 still contains (the ''modified'') patch N

 Epilogue:

  * at next run, the StateFile is consulted to know the next pending
 changeset
  * it notices the presence of the journal, and proceeds with the
 ''finalization''
    * the last applied changeset is loaded from the journal
    * each pending changeset is compared to the last applied one, skipping
 them until either one changeset matches or the EOF condition is met
    * the queue is rewritten to the file
  * if there are still pending changeset, Tailor proceeds processing them;
 otherwise it asks upstream for new changesets, and the process restarts

 The bug I introduced considered also the entries of the changeset in the
 comparison: for this reason, the last point above '''always''' reached
 EOF, triggering the fetch of new changesets from upstream. Since patch N
 was already applied on the ''source'', it isn't queued anymore...

 I hope this put some light on the problem.

-- 
Ticket URL: <http://progetti.arstecnica.it/tailor/ticket/158#comment:6>
Tailor <http://progetti.arstecnica.it/tailor>
An inter-VCs changeset exchanger
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to