On Fri, Sep 2, 2016 at 8:28 PM, Svyatoslav Mishyn <j...@openmailbox.org> wrote: > Maybe `fossil reparent` and then `fossil leaves --recompute` will help.. >
Great! This is indeed working as long as there is acceptable to have additional artifacts -- are those tags? My testing timeline shows this: $ fossil timeline === 2016-09-03 === 17:06:00 [4250222b71] Edit [36f4b3ef8d4a245d|36f4b3ef8d]: Add "parent" with value "71ffe7ef09c0c3d6e05cd6d31b43e2850586323c". (user: karel) 17:05:12 [533d224a5c] *CURRENT* change 15 (user: karel.gar...@centrum.cz tags: trunk) 17:05:11 [5be7e9c3a3] change 14 (user: karel.gar...@centrum.cz tags: trunk) 17:05:09 [9ffa7c82c9] change 13 (user: karel.gar...@centrum.cz tags: trunk) 17:05:08 [1f98a7fe09] change 12 (user: karel.gar...@centrum.cz tags: trunk) 17:05:07 [36f4b3ef8d] change 11 (user: karel.gar...@centrum.cz tags: trunk) 17:04:08 [fb6393d303] Edit [6abd71f3a3f2dba4|6abd71f3a3]: Add "parent" with value "2c3bd124e4733718b448835fe9a8767b0bce9067". (user: karel) 14:30:14 [71ffe7ef09] change 10 (user: karel.gar...@centrum.cz tags: trunk) 14:30:13 [d8a49f0142] change 9 (user: karel.gar...@centrum.cz tags: trunk) 14:30:12 [e17627bb9e] change 8 (user: karel.gar...@centrum.cz tags: trunk) 14:30:11 [5d3ddbd363] change 7 (user: karel.gar...@centrum.cz tags: trunk) 14:30:10 [6abd71f3a3] change 6 (user: karel.gar...@centrum.cz tags: trunk) 14:30:09 [2c3bd124e4] change 5 (user: karel.gar...@centrum.cz tags: trunk) 14:30:08 [a139dda296] change 4 (user: karel.gar...@centrum.cz tags: trunk) 14:30:07 [da50998d5f] change 3 (user: karel.gar...@centrum.cz tags: trunk) 14:30:06 [7f46e6e37d] change 2 (user: karel.gar...@centrum.cz tags: trunk) 14:30:05 [acfb6b6234] change 1 (user: karel.gar...@centrum.cz tags: trunk) +++ no more data (17) +++ The question is if the process may be somehow automated or even part of incremental git import? I'm asking since usually the situation looks as: karel@silence:~/tmp/fossil-test/git-incremental-import/workspace-fossil$ fossil timeline === 2016-09-03 === 18:15:39 [30a3929a48] change 10 (user: karel.gar...@centrum.cz tags: trunk) 18:15:38 [db0ddbb9ba] change 9 (user: karel.gar...@centrum.cz tags: trunk) 18:15:37 [aa40441d2d] change 8 (user: karel.gar...@centrum.cz tags: trunk) 18:15:36 [302c071b45] change 7 (user: karel.gar...@centrum.cz tags: trunk) 18:15:35 [2b36d21f54] change 6 (user: karel.gar...@centrum.cz tags: trunk) 18:15:33 [8a8dfe4da6] *CURRENT* change 5 (user: karel.gar...@centrum.cz tags: trunk) 18:15:32 [7848d4ba85] change 4 (user: karel.gar...@centrum.cz tags: trunk) 18:15:31 [ca027158d7] change 3 (user: karel.gar...@centrum.cz tags: trunk) 18:15:30 [92626573e1] change 2 (user: karel.gar...@centrum.cz tags: trunk) 18:15:29 [bac45c9453] change 1 (user: karel.gar...@centrum.cz tags: trunk) +++ no more data (10) +++ karel@silence:~/tmp/fossil-test/git-incremental-import/workspace-fossil$ fossil leaves (1) 2016-09-03 18:15:39 [30a3929a48] change 10 (user: karel.gar...@centrum.cz tags: trunk) (2) 2016-09-03 18:15:33 [8a8dfe4da6] change 5 (user: karel.gar...@centrum.cz tags: trunk) this is after one import git -> fossil and after additional incremental import git -> fossil. Now I would need to connect 8a8dfe4da6 and 2b36d21f54 together by: karel@silence:~/tmp/fossil-test/git-incremental-import/workspace-fossil$ fossil reparent 2b36d21f54 8a8dfe4da6 karel@silence:~/tmp/fossil-test/git-incremental-import/workspace-fossil$ fossil leaves --recompute and after that I'm able to fossil update and be on the same tree like in git. However such approach is not too comfortable for running something like git to fossil mirror on OpenBSD's src repository in automatic manner since this requires user intervention of finding changes which need to be reconnected. I can probably write some script or simple program which would parse fossil timeline output and do that, but the question is if there is more easier way how to find "root" revision 2b36d21f54 from the incremental import. If it is, then script should be fairly easy... For the issue duplication I've created simple test case which consist of two scripts below. Simply put that into empty dir and run ./test.sh. You can even uncomment 3rd import to see how it looks in timeline when you do that. Thanks! Karel ----->test.sh<-------- #!/bin/sh # cleanup and init git repo set -x rm -rf workspace rm -rf workspace-fossil rm -f workspace.fossil rm -f *.marks git init workspace # first changeset ./chgen.sh workspace 1 5 cd workspace git fast-export --export-marks ../git.marks --all|fossil import --git ../workspace.fossil cd ../ mkdir workspace-fossil cd workspace-fossil fossil open ../workspace.fossil cd .. # second changeset ./chgen.sh workspace 6 10 cd workspace git fast-export --export-marks ../git.marks --import-marks ../git.marks --all|fossil import --git ../workspace.fossil -i --import-marks ../git.marks cd ../workspace-fossil fossil timeline fossil update fossil timeline cd .. # third changeset # ./chgen.sh workspace 11 15 # cd workspace # git fast-export --export-marks ../git.marks --import-marks ../git.marks --all|fossil import --git ../workspace.fossil -i --import-marks ../git.marks # cd ../workspace-fossil # fossil update # cd .. ----->test.sh ends here<----- ----->chgen.sh<---- #!/bin/sh CWD=`pwd` cd $1 for i in `seq $2 $3` do echo "File change $i" > file.txt sleep 1 git add file.txt git commit -m "change $i" done cd $CWD ---->chgen.sh ends here<---- _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users