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

Re: [PATCH] Teach git-svn how to catch up with its tracking branches

From
Karl Hasselström <kha@treskal.com>
Date
May 8, 2008, 08:13 UTC
Message-ID
<20080508081331.GC302@diana.vm.bytemark.co.uk>
In-Reply-To
<604A38BB-E6A4-4303-BD7C-BF2968B6828D@midwinter.com>
On 2008-05-08 00:58:48 -0700, Steven Grimm wrote:
Show 12 quoted lines
> On May 8, 2008, at 12:43 AM, Karl Hasselström wrote:
>
> > Or even _only_ pull from the git repo. That repo would have to
> > have some kind of hook to make sure that it's always up-to-date,
> > then -- just a cron job won't do -- but I'm sure that can be done.
>
> If you control both the svn repo and the git repo, you can get close
> to that with an svn commit trigger, but even then there'll be a race
> condition when you want to dcommit. You either have to be able to
> pull from the svn repo when you want to dcommit, or you have to live
> with the possibility of a dcommit failing because you don't actually
> have the most recent rev locally.

I don't see why this has to be the case. Surely, if the local git repo can dcommit without races by importing new revisions from svn, the local git repo could dcommit without races by importing new revisions from svn via an intermediate git repo. This would require the intermediate repo to import new revisions when it gets a pull request, but surely that should be doable with a pre-pull hook?

Show 6 quoted lines
> This ties a bit into the patch I sent a few months back to allow
> update hooks to change refs. I kind of ran out of spare time to
> iterate more on that back then, but the ultimate goal there was that
> you could interact only with the bridge repo, never directly with
> svn, and the bridge repo would dcommit for you when you pushed to
> it.

I guess that approach is what I'd really like to see, since that's the only one that can guarantee that every git clone of the svn repository is identical.

Furthermore, in this setup the clients wouldn't need to run git-svn at all. Only the bridge would need it.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Steven GrimmNext: Steven Grimm
Message 10 of 16 in “Teach git-svn how to catch up with its tracking branches”
  1. Teach git-svn how to catch up with its tracking branchesSteven Grimm, May 8, 2008
  2. Junio C HamanoMay 8, 2008
  3. Steven GrimmMay 8, 2008
  4. Chris ShoemakerMay 8, 2008
  5. Steven GrimmMay 8, 2008
  6. Chris ShoemakerMay 8, 2008
  7. Karl HasselströmMay 8, 2008
  8. Karl HasselströmMay 8, 2008
  9. Steven GrimmMay 8, 2008
  10. Karl HasselströmMay 8, 2008
  11. Teach git-svn how to catch up with its tracking branchesSteven Grimm, May 8, 2008
  12. Eric WongMay 11, 2008
  13. Asheesh LaroiaMay 8, 2008
  14. Steven GrimmMay 8, 2008
  15. Chris ShoemakerMay 8, 2008
  16. Chris ShoemakerMay 8, 2008

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.