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

Re: git-svn and svn:externals, was Re: Hackontest ideas?

From
EWEric Wong <normalperson@yhbt.net>
Date
Aug 3, 2008, 23:36 UTC
Message-ID
<20080803233619.GC5435@hand.yhbt.net>
In-Reply-To
<alpine.DEB.1.00.0808040113150.9611@pacific.mpi-cbg.de.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 17 quoted lines
> Hi,
> 
> On Sun, 3 Aug 2008, Eric Wong wrote:
> 
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> >
> > > The main concern I have is to get the semantics right: AFAICT 
> > > svn:externals has _no notion_ of "what is current".  It just _always_ 
> > > fetches the HEAD.  Even if you check out an ancient revision in the 
> > > "superproject".
> > 
> > Based on my limited understanding, peg revisions are only needed in SVN 
> > because of the cost of traversing history to DTRT.  git-svn should be 
> > able to just use the -r<rev> syntax that has always been supported 
> > without needing peg revisions.
> 
> I was talking about the svn -> git direction.
Likewise.
> And Git does not peg revisions because of the cost of traversing history 
> to DTRT.

I was saying SVN uses peg revisions because of the cost. Also, there may be a misunderstanding as to what peg revisions are (in SVN) and how they relate to git.

Here's an example svn:external definition with a peg revision:
  -r 1234 http://foo/bar.c@5233

"@5233" is the peg revision, and (as I understand it, just a hint) and "-r 1234" is the actual revision we want from SVN (and what git-svn should fetch). Confusing? Yes.

> Git pegs revisions of submodules, because it is the right thing to do.  
> Subversion just got it wrong to begin with.  After all, we are going 
> through a lot to make defined revisions, and we do not want to throw that 
> out by allowing an unversioned submodule.

Yes, most repositories I've seen don't even use "-r 1234" (which has always been supported by SVN). This is the problem git will have to deal with.

> So, importing a svn:external with git-svn has to undo that error somehow 
> (which might be helped by the linearity of subversion, but might be tricky 
> because of possible clock skews between the two subversion repositories).

Yes. This is why I'm leaning towards /not/ using git submodules for this because svn:externals are rarely defined with -r <revno>.

-- 
Eric Wong
Previous: Johannes Schindelin
Message 21 of 21 in “Hackontest ideas?”
  1. Petr BaudisJul 29, 2008
  2. Miklos VajnaJul 29, 2008
  3. Shawn O. PearceJul 29, 2008
  4. Petr BaudisJul 29, 2008
  5. TarmiganJul 29, 2008
  6. Junio C HamanoJul 29, 2008
  7. Petr BaudisJul 29, 2008
  8. Nguyen Thai Ngoc DuyJul 29, 2008
  9. Petr BaudisJul 29, 2008
  10. Nguyen Thai Ngoc DuyJul 29, 2008
  11. Junio C HamanoJul 29, 2008
  12. Jakub NarebskiJul 29, 2008
  13. git-svn and svn:externals, was Re: Hackontest ideas?Johannes Schindelin, Jul 29, 2008
  14. Jakub NarebskiJul 29, 2008
  15. Johannes SchindelinJul 29, 2008
  16. Avery PennarunJul 29, 2008
  17. Luciano RochaJul 29, 2008
  18. Johannes SchindelinJul 29, 2008
  19. Eric WongAug 3, 2008
  20. Johannes SchindelinAug 3, 2008
  21. Eric WongAug 3, 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.