On 10/02/17 17:52, Roy Marples wrote: > On 09/02/2017 21:42, Roy Marples wrote: >> When importing a git fast import file, the master branch is silently >> changed to trunk, to match the fossil default. >> However, when exported back out the reverse conversion does not apply. >> >> This is not good, because fossil is effectively re-writing history. >> But what is worse is that the export does not match the import .... I'm >> striving to get out pretty much exactly what I put in. > > The silent branch renaming is problematic, but solvable. > Both fossil and git work fine without a master or trunk branch. > It is just a question of changing the defaults. I propose the following: > > Without any options, both import and export preserve the original naming > scheme. However, we use the provided options to handle preference. > > fossil import --rename-master trunk > fossil export --rename-trunk master > > This would allow a bi-directional bridge where the default trunk name is > respected at both ends. It would also allow the crazy situation where > you have both trunk AND master branches.
This has now been done in the roy-export branch. Testing welcome. One issue with my changes is that when a git repo imports to a new fossil database, there is no trunk branch or tag (visible from the ui at least) but when we try to create a trunk branch fossil complains it already exists. Another issue (but this exists before my changes) is the rename trunk feature, probably related to the above issue: $ ./fossil import --git --rename-trunk master x.fossil x Rebuilding repository meta-data... 100.0% complete... SQLITE_ERROR: no such table: vfile ./fossil: no such table: vfile SELECT 1 FROM vfile WHERE pathname='manifest' $ So my question is, has the --rename-trunk feature ever worked and can fossil work without the trunk branch at all to allow a new one to be created? Roy _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users