{"thread":{"id":"43079","subject":"Re: git-svn bug?","startedAt":"2006-11-15T21:05:37Z","lastAt":"2006-11-19T16:52:21Z","messageCount":10,"participants":["Troy Telford","Eric Wong","Shawn Pearce","Seth Falcon","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"296995","messageId":"op.ti2svo0ozidtg1@rygel.lnxi.com","threadId":"43079","inReplyTo":null,"subject":"git-svn bug?","fromName":"Troy Telford","fromEmail":"ttelford.groups@gmail.com","sentAt":"2006-11-15T21:05:37Z","receivedAt":"2006-11-15T21:05:37Z","isPatch":false,"sender":{"key":"ttelford.groups@gmail.com","avatar":"https://gravatar.com/avatar/7fb1a08052bfe7645125d4c1bcd6d8f58b780239c783f9064f341831d9456049?d=mp&s=160"},"body":"I've got a repository I've converted over to git from svn.  (using  \ngit-svn.  since there's only been one branch, I figured I could skip  \ngit-svnimport).\n\nFor quite a while, all I did was fetch/rebase from the svn repository to  \nmy git repository; all of my own work was committed to the git repository;  \nnone of the changes were commited to the svn repository.\n\nThen came the time to commit changes from my git repository to the svn  \nrepository.\n\nBeing somewhat cautious, I created an empty 'dummy' svn repository and  \nfamiliarize myself with using git-svn to commit from git -> svn.\n\nI ran:\ngit-svn fetch\ngit-svn rebase remotes/git-svn (already updated)\ngit-svn dcommit (to push my changes to the svn repository)\n\nEverything seemed to work fine with the dummy repository.\n\nEncouraged, I did the same with the 'real' repository, and received the  \nfollowing error:\n(Using git 1.4.3.5, svn 1.4.0 on a Gentoo box)\nfatal: Not a valid object name 92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\n32768 at /usr/lib64/perl5/5.8.8/Memoize.pm line 269\n\n(using git 1.4.4, svn 1.3.0 on a SLES 9 SP3 box)\nfatal: Not a valid object name 92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\n32768 at /usr/lib/perl5/5.8.3/Memoize.pm line 269\n\n(using git 1.4.4, svn 1.3.1 on a SLES 10 box)\nfatal: Not a valid object name 92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\n32768 at /usr/lib/perl5/5.8.8/Memoize.pm line 269\n\nI had NFS mounted the git repository, so the SLES 9 was local the other  \ntwo were NFS.  In any event, the error seems to be essentially identical  \non every platform I've tried.\n\nAdditionally, I had created three branches for the purpose of pushing my  \nchanges to svn:\nmaster (used for my own development)\nsvn (created using git checkout -b svn remotes/git-svn -- basically only  \nwhat is in svn)\nmerge (git checkout -b merge svn; git rebase master)\n\n`git diff-tree merge master | wc -l` returns 0 (which I assume means no  \nchanges)\n`git diff-tree svn merge | wc -l` returns 44 (again, I assume this means  \n44 changes)\n\nI couldn't find an object named  \n\"92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\" in .git/\n\nAside from my cluelessness, is there anything else wrong?\n-- \n"},{"id":"296097","messageId":"7vejs4jshp.fsf@assigned-by-dhcp.cox.net","threadId":"43079","inReplyTo":"op.ti2svo0ozidtg1@rygel.lnxi.com","subject":"Re: git-svn bug?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-15T21:43:30Z","receivedAt":"2006-11-15T21:43:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Troy Telford\" <ttelford.groups@gmail.com> writes:\n\n> (using git 1.4.4, svn 1.3.1 on a SLES 10 box)\n> fatal: Not a valid object name 92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\n> 32768 at /usr/lib/perl5/5.8.8/Memoize.pm line 269\n>...\n> I couldn't find an object named\n> \"92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\" in .git/\n\nTroy, do you have object 92e2e0c5?  Is it a root commit (i.e. a\ncommit that does not have a parent)? \n\nThe only place that mentions ~1 in git-svn seems to be inside\ndcommit but it seems that it unconditionally appends ~1 to the\nrev.  I do not know how the code guarantees it does not go down\nto the root commit.\n\nEric, any clues?\n"},{"id":"297669","messageId":"m2psbocpbo.fsf@ziti.local","threadId":"43079","inReplyTo":"op.ti2svo0ozidtg1@rygel.lnxi.com","subject":"Re: git-svn bug?","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-11-15T22:33:47Z","receivedAt":"2006-11-15T22:33:47Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"\"Troy Telford\" <ttelford.groups@gmail.com> writes:\n\n> I've got a repository I've converted over to git from svn.  (using\n> git-svn.  since there's only been one branch, I figured I could skip\n> git-svnimport).\n>\n> For quite a while, all I did was fetch/rebase from the svn repository\n> to  my git repository; all of my own work was committed to the git\n> repository;  none of the changes were commited to the svn repository.\n>\n> Then came the time to commit changes from my git repository to the svn\n> repository.\n>\n> Being somewhat cautious, I created an empty 'dummy' svn repository and\n> familiarize myself with using git-svn to commit from git -> svn.\n>\n> I ran:\n> git-svn fetch\n> git-svn rebase remotes/git-svn (already updated)\n> git-svn dcommit (to push my changes to the svn repository)\n\nI always send commits as:\n\ngit-svn dcommit remotes/git-svn..master\n\nPossibly replacing master with whatever git branch I'm working on.\nOne nice thing about this approach is that you can sort of preview the\ncommit as:\n\n  git diff remotes/git-svn..master\n\n[but that just shows overall diffs and git-svn dcommit will apply each\ncommit in master separately to svn]\n\n"},{"id":"294047","messageId":"20061115223709.GG24861@spearce.org","threadId":"43079","inReplyTo":"m2psbocpbo.fsf@ziti.local","subject":"Re: git-svn bug?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-15T22:37:10Z","receivedAt":"2006-11-15T22:37:10Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Seth Falcon <sethfalcon@gmail.com> wrote:\n> I always send commits as:\n> \n> git-svn dcommit remotes/git-svn..master\n> \n> Possibly replacing master with whatever git branch I'm working on.\n\nOr just:\n\n   git-svn dcommit remotes/git-svn..\n\nto send the current branch.\n\n> One nice thing about this approach is that you can sort of preview the\n> commit as:\n> \n>   git diff remotes/git-svn..master\n\nOr see the log and patch of each commit on the current branch:\n\n   git log -p remotes/git-svn..\n\n-- \n"},{"id":"298194","messageId":"op.ti2xykijzidtg1@rygel.lnxi.com","threadId":"43079","inReplyTo":"7vejs4jshp.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-svn bug?","fromName":"Troy Telford","fromEmail":"ttelford.groups@gmail.com","sentAt":"2006-11-15T22:55:21Z","receivedAt":"2006-11-15T22:55:21Z","isPatch":false,"sender":{"key":"ttelford.groups@gmail.com","avatar":"https://gravatar.com/avatar/7fb1a08052bfe7645125d4c1bcd6d8f58b780239c783f9064f341831d9456049?d=mp&s=160"},"body":"On Wed, 15 Nov 2006 14:43:30 -0700, Junio C Hamano <junkio@cox.net> wrote:\n\n> \"Troy Telford\" <ttelford.groups@gmail.com> writes:\n>\n>> (using git 1.4.4, svn 1.3.1 on a SLES 10 box)\n>> fatal: Not a valid object name  \n>> 92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\n>> 32768 at /usr/lib/perl5/5.8.8/Memoize.pm line 269\n>> ...\n>> I couldn't find an object named\n>> \"92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\" in .git/\n>\n> Troy, do you have object 92e2e0c5?  Is it a root commit (i.e. a\n> commit that does not have a parent)?\n\nI'll have to admit I'm stabbing in the dark on how to get the correct  \nanswer this, but here goes:\n\n* `git cat-file -t 92e2e0...` returns 'commit'\n* 'git cat-file -p 92e2e0...` returns: (minus the header/footer asterisks)\n*********************************************\ntree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nauthor unknown <unknown> 961088898 +0000\ncommitter unknown <unknown> 961088898 +0000\n\nNew repository initialized by cvs2svn.\n*********************************************\n-- \n"},{"id":"293819","messageId":"op.ti2yl5i8zidtg1@rygel.lnxi.com","threadId":"43079","inReplyTo":"m2psbocpbo.fsf@ziti.local","subject":"Re: git-svn bug?","fromName":"Troy Telford","fromEmail":"ttelford.groups@gmail.com","sentAt":"2006-11-15T23:09:31Z","receivedAt":"2006-11-15T23:09:31Z","isPatch":false,"sender":{"key":"ttelford.groups@gmail.com","avatar":"https://gravatar.com/avatar/7fb1a08052bfe7645125d4c1bcd6d8f58b780239c783f9064f341831d9456049?d=mp&s=160"},"body":"> I always send commits as:\n>\n> git-svn dcommit remotes/git-svn..master\n>\n> Possibly replacing master with whatever git branch I'm working on.\n\nI get essentially the same error:\nfatal: Not a valid object name 92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\n\n> One nice thing about this approach is that you can sort of preview the\n> commit as:\n>\n>   git diff remotes/git-svn..master\n>\n> [but that just shows overall diffs and git-svn dcommit will apply each\n> commit in master separately to svn]\n\nSince I actually checked out a branch, I assume that\n\n     git diff remotes/git-svn..svn\n\nshould be empty, right?\n\nAnd if that's the case `git diff svn..master` should be identical to `git  \ndiff remotes/git-svn..svn`?\n\nIf I write the diff to a file, it is about 294k in size.  Also worth  \nmentioning is that I'm also tracking binary files in the git repository as  \nwell.  It's for an RPM tree, so I have the (binary) package source  \ntarballs (in a few cases >100 MB tarball) and their corresponding (text)  \npatches and .spec files.\n-- \n"},{"id":"294392","messageId":"m2wt5v9zm0.fsf@ziti.local","threadId":"43079","inReplyTo":"20061115223709.GG24861@spearce.org","subject":"Re: git-svn bug?","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-11-16T15:32:07Z","receivedAt":"2006-11-16T15:32:07Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Shawn Pearce <spearce@spearce.org> writes:\n> Seth Falcon <sethfalcon@gmail.com> wrote:\n>> I always send commits as:\n>> \n>> git-svn dcommit remotes/git-svn..master\n>> \n>> Possibly replacing master with whatever git branch I'm working on.\n>\n> Or just:\n>\n>    git-svn dcommit remotes/git-svn..\n>\n> to send the current branch.\n\nYes, but be warned.  As I just discovered, dcommit always commits up\nto the HEAD of the current branch.  So I just did:\n\ngit-svn dcommit remotes/git-svn..HEAD~3\n\nAnd the ~3 was ignored.  :-(\nNot a bug, as the doc says that dcommit operates on HEAD, but it would\nbe convenient to have this work -- especially since reviewing with\ndiff (or better log -p) seems natural.\n\n"},{"id":"298410","messageId":"20061117085509.GA29644@localdomain","threadId":"43079","inReplyTo":"op.ti2xykijzidtg1@rygel.lnxi.com","subject":"Re: git-svn bug?","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-17T08:55:10Z","receivedAt":"2006-11-17T08:55:10Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Sorry for the late replies, I've been caught up with other things.\n\nTroy Telford <ttelford.groups@gmail.com> wrote:\n> On Wed, 15 Nov 2006 14:43:30 -0700, Junio C Hamano <junkio@cox.net> wrote:\n> \n> >\"Troy Telford\" <ttelford.groups@gmail.com> writes:\n> >\n> >>(using git 1.4.4, svn 1.3.1 on a SLES 10 box)\n> >>fatal: Not a valid object name  \n> >>92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\n> >>32768 at /usr/lib/perl5/5.8.8/Memoize.pm line 269\n> >>...\n> >>I couldn't find an object named\n> >>\"92e2e0c50bbbacb0a3426b2c0f8b3e043eb4830a~1\" in .git/\n> >\n> >Troy, do you have object 92e2e0c5?  Is it a root commit (i.e. a\n> >commit that does not have a parent)?\n\ndcommit expects to be run on a git-svn fetch-ed HEAD that is linear\nsuperset of remotes/git-svn.  That is: remotes/git-svn..HEAD should\n(ideally) contain no merges, and no root commits.  git-svn currently\ndoes no checking for root commits, but it should.\n\n> I'll have to admit I'm stabbing in the dark on how to get the correct  \n> answer this, but here goes:\n> \n> * `git cat-file -t 92e2e0...` returns 'commit'\n> * 'git cat-file -p 92e2e0...` returns: (minus the header/footer asterisks)\n> *********************************************\n> tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n> author unknown <unknown> 961088898 +0000\n> committer unknown <unknown> 961088898 +0000\n> \n> New repository initialized by cvs2svn.\n> *********************************************\n\nThis commit is missing the git-svn-id: line at the bottom.  If you\nsimply left it out (private svn repository info), can you check that the\nURL in this line is actually for the SVN repository you want to commit\nto?\n\nIt seems like your usage of dcommit would actually cause the issue\nyou're experiencing to be triggered on the dummy repository, and not the\nreal one.  My other guess would be that you somehow merged commits from\nyour dummy svn repo into your master branch.\n\n-- \n"},{"id":"295568","messageId":"op.ti6irtilzidtg1@rygel.lnxi.com","threadId":"43079","inReplyTo":"20061117085509.GA29644@localdomain","subject":"Re: git-svn bug?","fromName":"Troy Telford","fromEmail":"ttelford.groups@gmail.com","sentAt":"2006-11-17T21:17:41Z","receivedAt":"2006-11-17T21:17:41Z","isPatch":false,"sender":{"key":"ttelford.groups@gmail.com","avatar":"https://gravatar.com/avatar/7fb1a08052bfe7645125d4c1bcd6d8f58b780239c783f9064f341831d9456049?d=mp&s=160"},"body":"On Fri, 17 Nov 2006 01:55:10 -0700, Eric Wong <normalperson@yhbt.net>  \nwrote:\n\n> dcommit expects to be run on a git-svn fetch-ed HEAD that is linear\n> superset of remotes/git-svn.  That is: remotes/git-svn..HEAD should\n> (ideally) contain no merges, and no root commits.  git-svn currently\n> does no checking for root commits, but it should.\n>\n> This commit is missing the git-svn-id: line at the bottom.  If you\n> simply left it out (private svn repository info), can you check that the\n> URL in this line is actually for the SVN repository you want to commit\n> to?\n\nI didn't remove anything, but I did double-check and the URL is correct.   \nBut the following may shed light on why there is no git-svn-id anywhere:   \nIIRC, this is how my current repository came to be (from the very  \nbeginning):\n1.)  Way back when, before I even started on the project, it started life  \nas a CVS repository\n2.)  Was converted from CVS -> SVN in early '05 (pre-git)\n3.)  I converted from SVN->git in Nov/Dec '05 (using git-svnimport.  I'm  \nnot sure git-svn was available at the time.)\n4.)  The svn repository is still around, and I need to interoperate with  \nthe svn repository on occasion.  I read about the new (at the time)  \n'git-svn', and decided to give it a try.\n5.)  I start with my pre-existing git repository, running:\n\n   git svn init <url>\n   git svn fetch\n   git checkout -b master svn\n   git rebase remotes/git-svn\n\n> It seems like your usage of dcommit would actually cause the issue\n> you're experiencing to be triggered on the dummy repository, and not the\n> real one.  My other guess would be that you somehow merged commits from\n> your dummy svn repo into your master branch.\n\nI need to work on being more clear; sorry about that.  Here's what I did  \nwith my 'dummy' repository\n1. create a new (empty) svn repository\n2. imported it into a new git repository using git-svn\n3. added a few files that were just sitting in $HOME, then modified them,  \nremoved some, added others, etc.  (using both git-svn and subversion)\n4. verified everything was working as I expected it to.  (and if not,  \nfigure out why I was wrong).\n\nMy 'dummy' repo was imported using git-svn.\nMy 'real' repo was imported using git-svnimport.\n\nHaving not read any of the code, I'm just taking a wild guess; but is it  \nreasonable to say that since the repository was originally imported to git  \nusing git-svnimport (rather than git-svn), git-svn doesn't have some of  \nthe data it needs to push to the remote svn repo?\n\nWould it be reasonable to use git-svn to import the SVN repository into a  \nnew git repo, and then rebase from the old git-svnimport'ed repo into the  \nnew git-svn imported one?  (did that even make sense?!?)\n-- \n"},{"id":"293938","messageId":"20061119165221.GA6478@soma","threadId":"43079","inReplyTo":"op.ti6irtilzidtg1@rygel.lnxi.com","subject":"Re: git-svn bug?","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-11-19T16:52:21Z","receivedAt":"2006-11-19T16:52:21Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Troy Telford <ttelford.groups@gmail.com> wrote:\n> My 'dummy' repo was imported using git-svn.\n> My 'real' repo was imported using git-svnimport.\n> \n> Having not read any of the code, I'm just taking a wild guess; but is it  \n> reasonable to say that since the repository was originally imported to git  \n> using git-svnimport (rather than git-svn), git-svn doesn't have some of  \n> the data it needs to push to the remote svn repo?\n\nExactly, git-svn needs the git-svn-id: lines at the end of each commit\nfor 'commit' and 'dcommit' to work.  So using a repo created by\ngit-svnimport will not work.\n\n'commit-diff' will work, however it's intended as a low-level command\n('commit' should be that, too).\n\n> Would it be reasonable to use git-svn to import the SVN repository into a  \n> new git repo, and then rebase from the old git-svnimport'ed repo into the  \n> new git-svn imported one?  (did that even make sense?!?)\n\nYes, something along those lines would work.\n\n-- \n"}]}