git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git -> fossil bridging?

From
Johan Herland <johan@herland.net>
Date
Nov 18, 2013, 07:17 UTC
Message-ID
<CALKQrgd9u3Oqrs8wbGqhq17=yFofFKpnFLtwfb-5A8JfVkrW7A@mail.gmail.com>
In-Reply-To
<20131117182650.1ba89a8b@bigbox.christie.dr>
On Mon, Nov 18, 2013 at 1:26 AM, Tim Chase <git@tim.thechases.com> wrote:
Show 18 quoted lines
> On 2013-11-17 14:43, Kyle J. McKay wrote:
>> Sounds like you want to write a 'git-remote-fossil' helper so you
>> can do something like:
>>
>>    git clone fossil::http://sqlite.org/src
>
> Pretty much.  Or at least something akin to git-svn where one would do
>
>   git fossil clone http://some.fossil.url/path/to/repo.fossil
>   # hack hack
>   git commit
>   # possibly some git-branch, git-merge, git-rebase, git-cherry-pick
>   # lather, rinse, repeat
>   git fossil push # or git fossil dcommit
>
> I've not played with the git+hg or git+bzr bridges to see if they'd
> have a more useful interface that would better map to fossil.  If so,
> imagine that's what I typed above ;-)

If you're looking at implementing this, please look at "git help remote-helpers" (or https://www.kernel.org/pub/software/scm/git/docs/git-remote-helpers.html ) which describes an infrastructure (in addition to fast-import/export) we have for interacting with foreign version control systems. A remote helper for fossil repos would allow you to consider the fossil repo as a git remote, and the usual git clone/fetch/pull/push commands for interacting with remote repos would Just Work against a fossil repo.

I understand how you might want to model this on "git svn", since that is obviously the most popular interface between git and an other VCS, but I believe git-svn is not the best example for how to write these gateways nowadays. git-svn was written long before git remote-helpers existed, but I hope/believe that if it was written again today, it would use remote-helpers instead of implementing its own commands.

git-remote-bzr and git-remote-hg in contrib/remote-helpers/ is the code that implements the git+bzr and git+hg bridges you mention above. Those would be useful reference points when implementing a git-remote-fossil helper. git-remote-mediawiki in contrib/mw-to-git/ might also be a useful example.

...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Tim ChaseNext: tofutim
Message 3 of 4 in “Git -> fossil bridging?”
  1. Tim ChaseNov 17, 2013
  2. Tim ChaseNov 18, 2013
  3. Johan HerlandNov 18, 2013
  4. tofutimOct 30, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.