Hi,
this patch fixes the immediate bug. HOWEVER, I think there is still a problem
lurking there, namely if the "h" given to applyHashed is actually something
different than the current pristine root.
This could happen for example when a patch series is applied in multiple steps,
each following step calling applyHashed on a "temporary" pristine state.
In theory, the *first* such applyHashed should trigger the conversion and all
should be well. Unfortunately, this is not guaranteed, since this repository
could be in a mixed format and first applyHashed could avoid the conversion and
a subsequent one could trigger it.
It is not completely clear what to do about this.
I'll have a think or two and will let you know. Presumably, this patch still
improves the situation over the current HEAD, so it may make sense to apply.
I had to move applyHashed from HashedIO to HashedRepo, since inv2pris/pris2inv
are only available there.
Yours,
Petr.
1 patch for repository darcs-unstable@darcs.net:darcs:
Thu Jun 3 23:40:36 CEST 2010 Petr Rockai <me@mornfall.net>
* Resolve issue1857: Use and update pristine root pointer upon conversion.
Attachments
|