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

[PATCH 0/5] Foreign VCS as remote config

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Mar 25, 2009, 03:04 UTC
Message-ID
<alpine.LNX.1.00.0903242239030.19665@iabervon.org>

This series, like my previous series, makes it possible to set up a git config like:

[remote "origin"]
        vcs = p4
        port = localhost:1666
        ignoreCodeline = //depot/projects/oof-1.0
        codeline = //depot/projects/foo-1.0
        fetch = refs/p4/depot/projects/*:refs/remotes/origin/*

And then "git fetch origin" will actually incrementally import a p4 project.

The main difference from the previous series, aside from a nicer version of the p4 importer that can use the free-as-in-beer C++ API, is the fact that the only diff for a builtin command is to builtin-clone, which just needs to make a copy of a const struct before passing it to a function that can now change it.

Parts 1 and 2 are potentially useful for other other protocols transporting git data, and could be applied now. Part 3 creates the option and makes it not work at all. Part 4 is the same old API, and transport.c code to use it. Part 5 is my p4 example.

There's still the oddity that foreign systems that don't use a URL will lead to struct remotes that don't look valid to some git code that expects the URL field to be filled.

Daniel Barkalow (5):
  Allow late reporting of fetched hashes
  Document details of transport function APIs
  Add option for using a foreign VCS
  Draft of API for git-vcs-*, transport.c code to use it.
  p4 example of git-vcs API for fetch direction
 Documentation/config.txt     |    4 +
 Documentation/git-vcs-p4.txt |   33 ++
 Documentation/git-vcs.txt    |   93 ++++
 Makefile                     |   25 +
 builtin-clone.c              |    6 +-
 p4-notes                     |   33 ++
 remote.c                     |    2 +
 remote.h                     |    2 +
 transport.c                  |  129 ++++-
 transport.h                  |   42 ++-
 vcs-p4/p4client-api.cc       |  169 ++++++
 vcs-p4/p4client.c            |  137 +++++
 vcs-p4/p4client.h            |   38 ++
 vcs-p4/vcs-p4.c              | 1229 ++++++++++++++++++++++++++++++++++++++++++
 vcs-p4/vcs-p4.h              |  128 +++++
 15 files changed, 2057 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/git-vcs-p4.txt
 create mode 100644 Documentation/git-vcs.txt
 create mode 100644 p4-notes
 create mode 100644 vcs-p4/p4client-api.cc
 create mode 100644 vcs-p4/p4client.c
 create mode 100644 vcs-p4/p4client.h
 create mode 100644 vcs-p4/vcs-p4.c
 create mode 100644 vcs-p4/vcs-p4.h
Message 1 of 1 in “Foreign VCS as remote config”
  1. 0/5 Foreign VCS as remote configDaniel Barkalow, Mar 25, 2009

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.