Re: [fossil-users] Git Tag comments
> --rename-master renames master > --rename-trunk renames trunk > We should strive to keep the command line UI sane. In my opinion, preserving the long-standing default import target branch as "trunk" is reasonable, whether we change the semantics of "--rename-trunk" option or not. The notion of default import target branch dates back to ~2010, back then it was fixed as "trunk". The "main-branch" Fossil setting was introduced ~2011 to allow the Fossil trunk branch to be named otherwise, keeping "trunk" as the default. Yet the "master"=>"trunk" import mapping stayed fixed till ~2016, when the --rename-trunk import option was introduced to relax the mapping Git:"master"=>, which indeed does have an effect of renaming trunk. Througout, this was backwards compatible and "trunk" has been remaining the default import target branch. Git:"master"=>Fossil:"trunk" name mapping is not arbitrary, as we all understand, so the "magic" indeed has a convenience for users who aim to move git repo over to Fossil. Maybe printing a message would make the "magic" mapping fact more explicit. As for the Git<=>Fossil branch mapping in general, it maybe more explicitly described via something like "--branch-map master=trunk" option, or something to that effect. I'm not sure how thouroughly the Fossil import from Git fast-export format has been tested, or which specific use-cases it covers. I guess, one specific area that needs a closer look is branching and tagging, as these are quite differing between Git and Fossil. especially in the git fast-import context. > The git-fast-import format does not support "lightweight" tags, only > anointed ones. Git fast-export exports the lightweight tags via "reset" command such as (Note: there's not date command): reset refs/tags/ from :mark ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
On 13/02/2017 11:12, Jan Nijtmans wrote: > 2017-02-13 12:09 GMT+01:00 Roy Marples: >> Is the value displayed in the timeline? > Yes >> I'm also unsure about overloading the meaning of tag value . the ui >> indicates it can be set via the command line so could someone be using >> it for something else to store in fossil? > > For some tags, like "color" or "branch" the tag value has > meaning in Fossil. But for "sym-" tags, the value currently > is not used for anything (other than displaying it in the timeline). > > Does that answer your question? Yes it does, thanks. I still think using a Comment card is a cleaner design though. Roy ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
2017-02-13 12:09 GMT+01:00 Roy Marples: > Is the value displayed in the timeline? Yes > I'm also unsure about overloading the meaning of tag value . the ui > indicates it can be set via the command line so could someone be using > it for something else to store in fossil? For some tags, like "color" or "branch" the tag value has meaning in Fossil. But for "sym-" tags, the value currently is not used for anything (other than displaying it in the timeline). Does that answer your question? Regards, Jan Nijtmans ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
On 13/02/2017 10:42, Jan Nijtmans wrote: > 2017-02-13 4:50 GMT+01:00 Roy Marples: >> 3 has now been implemented in the roy-export branch. >> Turned out to be quite easy. A database rebuild is required though as an >> extra field has been added to the tagxref table. > > Thanks, Roy! I looked at your implementation: cards have to > be in alphabetical order, so a "C" tag after a "T" tag will simply > not work. Fixed! Thanks for pointing that out. > But ... tag are allowed to have a "value", which is > currently not used in fossil. This would be more logical. > Advantage: no schema change is necessary. Is the value displayed in the timeline? I'm also unsure about overloading the meaning of tag value . the ui indicates it can be set via the command line so could someone be using it for something else to store in fossil? Roy ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
On 13/02/2017 09:49, Roy Marples wrote: >>> * tag comments are imported and exported [2] >> >> ?? How does one enter a tag comment from the Fossil command line or >> this is an import/export only feature? fossil tag add --comment "A tag test comment" tagtest current now works. Roy ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
2017-02-13 4:50 GMT+01:00 Roy Marples: > 3 has now been implemented in the roy-export branch. > Turned out to be quite easy. A database rebuild is required though as an > extra field has been added to the tagxref table. Thanks, Roy! I looked at your implementation: cards have to be in alphabetical order, so a "C" tag after a "T" tag will simply not work. But ... tag are allowed to have a "value", which is currently not used in fossil. This would be more logical. Advantage: no schema change is necessary. My attempt implementing this can be found in the "jn-export" branch. Not actually tested with GIT yet. Great work, Thanks! Jan Nijtmans ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
On 13/02/2017 06:47, Artur Shepilko wrote: >> * no more silent renaming of master vs trunk [1] > > "fossil import --rename-trunk" already allows a choice for a Fossil > branch name to receive Git's "master" branch. > A bug was missed in src/import.c:~567 if( fossil_strcmp(z, > "master")==0 ) z = "trunk"; > > In src/import.c this option is stored in gimport.zTrunkName, so for > the purposes it should be used there instead of the ggit.zMasterName > introduced. > It can be something to this effect: > if( fossil_strcmp(z, "master")==0 ){ > gg.zBranch = fossil_strdup(gimport.zTrunkName); > }else{ > gg.zBranch = fossil_strdup(z); > } > > Makes sense? No, not really. --rename-master renames master --rename-trunk renames trunk We should strive to keep the command line UI sane. In both fossil and git, it's possible to have both master and trunk branches. >> * tag comments are imported and exported [2] > > ?? How does one enter a tag comment from the Fossil command line or > this is an import/export only feature? Currently this is only import/export changes. I might be able to modify the command line to accept a comment for a tag. > Fossil tags are kinda dated > "lightweight" Git tags, yet unlike Git multiple commits can have the > same tag. Does this suggest also same tags but also with different > comments? The git-fast-import format does not support "lightweight" tags, only anointed ones. However, the way I've implemented it in Fossil should allow multiple tags to have different comments. I have not yet addressed the issue of git itself not accepting matching tags for different commits. Roy ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
> * no more silent renaming of master vs trunk [1] "fossil import --rename-trunk" already allows a choice for a Fossil branch name to receive Git's "master" branch. A bug was missed in src/import.c:~567 if( fossil_strcmp(z, "master")==0 ) z = "trunk"; In src/import.c this option is stored in gimport.zTrunkName, so for the purposes it should be used there instead of the ggit.zMasterName introduced. It can be something to this effect: if( fossil_strcmp(z, "master")==0 ){ gg.zBranch = fossil_strdup(gimport.zTrunkName); }else{ gg.zBranch = fossil_strdup(z); } Makes sense? > * tag comments are imported and exported [2] ?? How does one enter a tag comment from the Fossil command line or this is an import/export only feature? Fossil tags are kinda dated "lightweight" Git tags, yet unlike Git multiple commits can have the same tag. Does this suggest also same tags but also with different comments? ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
On 13/02/17 01:23, Roy Marples wrote: > On 13/02/17 01:01, Roy Marples wrote: >> 1) add an option to (or to not) export tags. The git default is not to, >> I'm tempted to make this the fossil default as well. See *. > > This is wrong. Git has no such option. > >> 2) maintain a file of tags so we only export tags generated at the >> fossil side, and even then only once. See *. >> >> 3) adjust fossil to store a comment for the tag. Guidance on how to do >> this is welcome :) >> >> * Apparently git can sign tags with GPG. I've not tried it. This alters >> the signature of the tag. I have no idea how fossil reacts here, but >> will probably be OK as it can handle many tags whereas git just has the one. > > I'm currently leaning towards 3, even though it's the more complicated > because it doesn't lose data. 3 has now been implemented in the roy-export branch. Turned out to be quite easy. A database rebuild is required though as an extra field has been added to the tagxref table. This means that my git <-> fossil bridge is now fully working - for my normal work flow at least. Summary of changes from trunk: * tag committer is exported * import user matching works via contact info * exported branch and tag names are no longer mangled * no more silent renaming of master vs trunk [1] * tag importing actually works for git * tag comments are imported and exported [2] Testing now welcome. Roy [1] There is still the issue of the silent trunk in fossil. I don't know if what I've done here is correct. Artifacts look like a bug, but explicit renaming of master -> trunk works around it. [2] You can also see the comments in the timeline, which is nice. But there currently isn't a UI in fossil itself to enter a tag comment. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Git Tag comments
On 13/02/17 01:01, Roy Marples wrote: > 1) add an option to (or to not) export tags. The git default is not to, > I'm tempted to make this the fossil default as well. See *. This is wrong. Git has no such option. > 2) maintain a file of tags so we only export tags generated at the > fossil side, and even then only once. See *. > > 3) adjust fossil to store a comment for the tag. Guidance on how to do > this is welcome :) > > * Apparently git can sign tags with GPG. I've not tried it. This alters > the signature of the tag. I have no idea how fossil reacts here, but > will probably be OK as it can handle many tags whereas git just has the one. I'm currently leaning towards 3, even though it's the more complicated because it doesn't lose data. Comments on how to achieve this are welcome. Roy ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users