Hello, Short version: I have a git repository built a mirror of a main repository, a few changes happened to the git repository, and I would like to find a way to bring these changes back to the fossil repository so that the git repository can again be a simple mirror.
The long version is that all my personal projects are stored in fossil repositories, because I like many aspect of the SCM. I also keep mirrors on github, to help improve visibility in the rare case someone might want to use my code. The mirrors are simply made with `fossil export --git | git fast-import` Now sometimes people send pull requests on github, and sometimes I find them good, so for various reasons (mostly attribution) I accept them. So I end up with a git repository that no longer a mirror of my fossil repository, and I am looking for a way to get back to that state. Currently the fossil repository gets frozen, and out-of-date, switch to the git repository. This is very unsatisfying, especially when the git repository is still officially a mere mirror, and the fossil repository the official reference. Has someone already solved that problem, or am I in uncharted territory? Ideally, I would like a way to tinker with the fossil repository so that `fossil export --git | git fast-import` works on subsequent commits. Less ideally, I'm open to also tinker with the git repository, but I would really really hate to rewrite history (e.g. by changing commit identifying hashes). If need be, I would be even open to something like `fossil export --git | special-script.sh | git fast-import`. Incidentally, that is somewhat akin to the "roundtrip problem" of losslessly converting a (partial) git repository into a fossil repository, so that the conversion back returns to the original git repository. From what I can tell, the roundtrip problem is unsolvable at least because git stores time zones but not fossil, so there is no way to have `fossil export --git` output a time-zoned commit, and therefore a git commit with the correct sha-1 (unless we can find a pre-image attack on sha-1). I think a way to work around the roundtrip problem would be to use marks, but I have never been able to figure out how to use them in a normal setting without losing some ancestry links. If someone can explain it to me, maybe my problem can be solved with a specially crafted commit that correctly passes `fossil export --git | git fast-import` but with handcrafted ancestry to the foreign commits. The other lead I have is to craft fossil commits as equivalent as possible to the foreign commits, and then make a `special-script.sh` to fix the remaining in the exported stream. That would mean keeping the script around for ever, and accumulating changes as I import new foreign commits. I still don't really know whether it is even possible to reach the correct sha-1 that way, and I don't like having a "scar" of the pull request that will be around forever, but if that's the only solution, so be it. So what do you think my leads? Am I missing another, easier way of solving the problem? Or am I missing another difficulty that makes it outright unsolvable? Thanks in advance for your help, Natasha
signature.asc
Description: PGP signature
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users