NavicoOS / ac2git

Tool to convert an AccuRev repository to Git.
29 stars 15 forks source link

Allow missing mkstream transactions #101

Closed orao closed 7 years ago

orao commented 7 years ago

When the first transaction in a stream is not a mkstream transaction the script now takes the first transaction that it can find for the given stream. This was not tested sufficiently, but does resolve a the issue 100 which was reported on Github. Evidently, transaction 1 can have multiple streams in existence at the same time, and is not a mkstream transaction.

Resolves issue #100

fatfreddie commented 7 years ago

@orao please merge

orao commented 7 years ago

Does the fact that the stream exists prior to the first time it diverges from its base stream mean that we miss all the changes that it would have inherited in that timeframe?

I thought about this too and I concluded that until the streams diverge they should be pointing to the same series of commits or commit history. Hence, since both branches are sort of following each other (always pointing at the same commit), they will only diverge once promotes are made to the child stream. And this should be the respected result. If we don't have prior history, we can't make any smarter choices for the transactions which are assumed to have occurred before transaction 1.

The merging algorithm relies on the current state and maybe the promote just before the one being processed to make its decisions meaning that the history should end up looking correct, even if our starting point is wrong, once enough promotes are processed.

fatfreddie commented 7 years ago

Okay, that sounds reasonable. Thanks for your help again. I'm happy now :-)