Fossil

View Ticket
Login

View Ticket

Ticket Hash: acf7b14d93ad999b6b356ce725cdb4e39891b212
Title: Bad import of tags as branches (propagating tags ?)
Status: Closed Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Overcome_By_Events
Last Modified: 2024-01-29 06:45:00
Version Found In: 3873aa7ecb
Description:
I recently converted the Tcl core CVS to GIT using cvs2git, and then used
git fast-export --all | fossil import tcl.fossil

to convert this further to a fossil repository. When inspecting the git and fossil repositories I noticed the following difference:

The tag 'core-8-5-9' was listed as such in git. fossil however was listing this in the web interface not as 'tag', but under 'branches'. Looking at the timeline of this supposed branch it also seem (to me) that the tag was set as 'propagating to descendants'. Maybe that is why it got misclassified as branch ?

The git repo is 168M uncompressed, and 129 MB as bzip2 tarball. I can put it up somewhere if you wish to have for experiments.


drh added on 2010-11-17 19:01:23:
As far as I have been able to figure out, this behavior is a limitation of the Git fast-export file format. The "commit" record in the output of Git fast-export only tells me the tag of the commit, not its branch. I cannot see anyway in the fast-export file to determine the branch. Hence, all I can do is make the tag into a branch and go with that.

If you have suggestions on how to fix this, I'd love to hear them.


aku added on 2010-11-17 19:42:03:
Checking the fast-export dump ... Meh. This has lots of commits with that annotation ...

Still, there is refs/tags/core-8-5-9 vs refs/heads/core-8-5-branch

so there has to be some difference inside of git between the branch and tag symbols.

Even so, you are right, with the annotation on the commit command you know the tag, but not the branch it is on. On the other hand, do have to know ? There is the regular parent link (from) to the previous commit. That should be good enough to link the history together, and then we should be able use the heads/tags difference to decide on the branch/tag difference in fossil, no ?

The one problem I see is that apparently after a commit was tagged (like with refs/tags/core-8-5-9) its children are tagged the same until another tag overrides this, or the whole line gets merged into a different branch.

In essence the import code would have to ignore a refs/tags/X annotation of a commit if the parent commit was also tagged with refs/tags/X, i.e. an anti-propagation of tags.

I hope I am making sense. I have a feeling any work on that should experimented with in a branch first, i.e. not developed in trunk. Makes it easier to abandon if its not working out.

User Comments:
added on 2024-01-29 06:45:00:
Closing as part of periodic cleanup.