Skip to content
Fossil Changes To Fossil-NG
Login

Changes To Fossil-NG

Changes to "Fossil-NG" between 2019-05-09 11:46:14 and 2019-05-09 11:56:02

︙
51
52
53
54
55
56
57

58


59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

78


79
80

81
82
83

84
85
86
87
88
89
90
51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97







+
-
+
+



















+

+
+


+



+








Nevertheless, Fossil must have some level of accommodation with this reality.

Fossil 2.x currently has several features in this line, primarily the longstanding [`fossil import --git`][fig] command and the much newer [`fossil git export`][fge] command. (The latter replaces the old `fossil export --git` command, deprecated in Fossil 2.9.)

There are still some missing pieces, however. We'd like to be able to:

  +  **Round-Trip with Git:** A [GitHub export of a Fossil repository][fgg] is effectively a read-only clone: if someone sends you a PR against your GitHub export, and you accept it on GitHub, that work won't then propagate back up into the Fossil project. To maintain a sane version history, all checkins to the project must go through Fossil, not through Git.
  +  **Round-Trip with Git:** A [Git export of a Fossil repository][fge] is basically a read-only clone. All checkins to the project must go through Fossil, not through Git. In the same way that `fossil export --git` was replaced with the more powerful `fossil git export` command, we'd like a `fossil git import` command that would sync changes to a Git repo back into a Fossil repo, allowing full round-tripping between the two, within the limitations of the various formats.

    In the same way that `fossil export --git` was replaced with the more powerful `fossil git export` command, we'd like a `fossil git import` command that would sync changes to a Git repo back into a Fossil repo, allowing full round-tripping between the two, within the limitations of the various formats.

    (We word it that way to exclude things outside the Git file format; we aren't going to try to make GitHub issues sync as Fossil tickets and vice versa, for example.)

  +  **Fossil as Git Front-End:** It would be nice to be able to use the superior `fossil` command line and web UI experiences with preexisting Git repos without doing a `fossil import --git` conversion. We'd like all of the following to work:

          $ fossil clone https://github.com/me/my-repo.git
          $ cd my-repo
          $ fossil ui &
          ...hack on files in Git repo...
          $ fossil ci       # wrapper for "git commit -a && git push"

    We expand on this topic [below](#formats).

  +  **Git as Fossil Back-End:** If we do both of the above, then we're just a few steps away from using the Git repository format as a Fossil storage option from the start. That is, instead of starting work with Git and then converting to Fossil, you could say something like:

          $ fossil init --git repo

     ...to create a Git packfile-formatted repository directory. You'd lose Fossil features like the ticket tracker, the wiki, the web forum, etc., of course.

  +  **Git as Fossil Front-End:** Although the `git` command is [famously][xkcd] much more difficult to use than `fossil`, there are practical advantages to allowing this, such as integration with existing automated tooling. For instance, it would help Fossil's adoption if you could use a text editor's Git integration features to work with a Fossil repository, rather than require that it be reimplemented as a Fossil-specific integration. Another common case is [CI/CD systems][cicd], which all know how to pull Git repos but rarely have built-in capabilities to deal with Fossil repos.


[cicd]: https://en.wikipedia.org/wiki/CI/CD
[dvcs]: https://en.wikipedia.org/wiki/Distributed_version_control
[fge]:  /help?cmd=git
[fgg]:  /doc/trunk/www/mirrortogithub.md
[fig]:  /help?cmd=import
[fvg]:  /doc/trunk/www/fossil-v-git.wiki
[lwnh]: https://lwn.net/Articles/433843/
[xkcd]: https://xkcd.com/1597/


### <a id="container"></a>VCS as File Container

One way to think about a VCS is as a
enhanced file container.  You can use file container formats like tar and zip to create
a single snapshot of a project.  A VCS is the same except that
︙