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

Re: git-svn 1.5.3 does not understand grafts?

From
JTJoakim Tjernlund <joakim.tjernlund@transmode.se>
Date
Sep 7, 2007, 20:23 UTC
Message-ID
<1189196635.14841.24.camel@gentoo-jocke.transmode.se>
In-Reply-To
<1189183934.14841.18.camel@gentoo-jocke.transmode.se>
On Fri, 2007-09-07 at 18:52 +0200, Joakim Tjernlund wrote:
Show 41 quoted lines
> On Fri, 2007-09-07 at 18:41 +0200, Joakim Tjernlund wrote:
> > svnadmin create /usr/local/src/TM/svn-tst/7720-svn/
> > svn mkdir  file:///usr/local/src/TM/svn-tst/7720-svn/trunk -m "Add trunk dir"
> > svn mkdir  file:///usr/local/src/TM/svn-tst/7720-svn/trunk/swp -m "Add swp dir"
> > 
> > In my git repo I do
> > git-svn init  file:///usr/local/src/TM/svn-tst/7720-svn/trunk/swp 
> > git-svn fetch
> > git branch svn remotes/git-svn
> > #make remotes/git-svn parent to the initial commit in my git tree
> > graftid=`git-show-ref -s svn`
> > echo da783cce390ce013b19f1d308ea6813269c6a6b5 $graftid > .git/info/grafts
> > #da783... is the initial commit in my git tree.
> > git-svn dcommit
> > 
> > fails with:
> > Committing to file:///usr/local/src/TM/svn-tst/7720-svn/trunk/swp ...
> > Commit da783cce390ce013b19f1d308ea6813269c6a6b5
> > has no parent commit, and therefore nothing to diff against.
> > You should be working from a repository originally created by git-svn
> > 
> > 
> >  Jocke
> 
> Using filter-branch helps, but git-svn isn't too happy:
> 
> git-svn init  file:///usr/local/src/TM/svn-tst/7720-svn/trunk/swp 
> git-svn fetch
> git branch svn remotes/git-svn
> #make remotes/git-svn parent to the initial commit in my git tree
> graftid=`git-show-ref -s svn`
> echo da783cce390ce013b19f1d308ea6813269c6a6b5 $graftid > .git/info/grafts
> #da783... is the initial commit in my git tree.
> git filter-branch $graftid..HEAD
> git-svn dcommit
> 
> Now I get alot of complaints, but it commits to svn.
> It takes forever though:
> r3 = 55a489bd4f66dd1f641a4676359d7b8911dc7d83 (git-svn)
> W: HEAD and refs/remotes/git-svn differ, using rebase:
> :100644 100644 f85ae11af7715a224015582724cb2bab87ec914a
[SNIP]

Just wanted to add that 1.5.2.2 works with grafts and that I suspect sub read_commit_parents in git-svn, but as I don't do perl I am stuck.

     Jocke
Oh, Eric W. CC:ed as well this time
Previous: Joakim TjernlundNext: Eric Wong
Message 3 of 8 in “git-svn 1.5.3 does not understand grafts?”
  1. Joakim TjernlundSep 7, 2007
  2. Joakim TjernlundSep 7, 2007
  3. Joakim TjernlundSep 7, 2007
  4. Eric WongSep 8, 2007
  5. Joakim TjernlundSep 8, 2007
  6. Joakim TjernlundSep 8, 2007
  7. Junio C HamanoSep 8, 2007
  8. git-svn: understand grafts when doing dcommitEric Wong, Sep 8, 2007

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.