{"thread":{"id":"8479","subject":"Error trying to use dcommit","startedAt":"2007-06-07T06:12:56Z","lastAt":"2007-06-07T06:12:56Z","messageCount":1,"participants":["Jean-Marc Valin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"44233","messageId":"4667A1E8.7010005@usherbrooke.ca","threadId":"8479","inReplyTo":null,"subject":"Error trying to use dcommit","fromName":"Jean-Marc Valin","fromEmail":"jean-marc.valin@usherbrooke.ca","sentAt":"2007-06-07T06:12:56Z","receivedAt":"2007-06-07T06:12:56Z","isPatch":false,"sender":{"key":"jean-marc.valin@usherbrooke.ca","avatar":null},"body":"Hi,\n\nI've made some changes to an svn project in git and trying to dcommit, I\nget:\n\n% git-svn dcommit\nMerge conflict during commit: Your file or directory 'TODO' is probably\nout-of-date: The version resource does not correspond to the resource\nwithin the transaction.  Either the requested version resource is out of\ndate (needs to be updated), or the requested version resource is newer\nthan the transaction root (restart the commit). at\n/usr/local/bin/git-svn line 405\n\nBasically, I did an git-svn init http://svn.xiph.org/trunk/speex and\nthen modified the TODO file in both svn and git. I did a fetch & rebase\nof the git repository, then made another modification in git and tried\nto dcommit. Some bits of potentially useful info from an IRC discussion:\n\n<mugwump> git-log shows HEAD~2 as the last SVN commit (ie, includes the\ngit-svn-id: in the commit message)\n<mugwump> the commitid is a9b9f3c\n<mugwump> so, I used this to see what git-svn expects the file to be:\n<mugwump> git-cat-file blob a9b9f3c:TODO > TODO.gitsvn\n<mugwump> svn cat http://svn.xiph.org//trunk/speex/TODO > TODO.svn\n<mugwump> however those files are identical\n<mugwump> which is good.  but makes the error confusing\n\nThe rest of below.\n\nCheers,\n\n\tJean-Marc\n\n\n<jmworx> \"Merge conflict during commit: Your file or directory 'TODO' is\nprobably out-of-date: The version resource does not correspond to the\nresource within the transaction.  Either the requested version resource\nis out of date (needs to be updated), or the requested version resource\nis newer than the transaction root (restart the commit). at\n/usr/local/bin/git-svn line 405\"\n<jmworx> I'm getting this trying to do a \"git-svn dcommit\" and I had\ndone a \"git-svn fetch; git-svn rebase\" just before that.\n<mugwump> jmworx: perhaps send that to the list...\n<jmworx> mugwump: What should I say? Don't even know whether it's a bug\nor a feature...\n<mugwump> that out of date message shouldn't appear if you've\nsuccessfully rebased\n<mugwump> you could perhaps diagnose by comparing the contents of the\nfile that you're checking in and the version in the last svn commit in\nyour git history\n<mugwump> was there a merge involved?  it might be the \"choosing the\nwrong base\" problem\n<jmworx> mugwump: basically, I grabbed the content of svn. Then I\nmodified the file locally (git) and remotely (svn).\n<jmworx> Then I did git-svn fetch and git-svn rebase.\n<jmworx> The modifications from the svn were merged (did not conflict).\n<jmworx> Then I made another modification locally (git) and committed it.\n<jmworx> At last, I attempted to dcommit and got this error.\n<mugwump> alright, so you're testing this case - you make a change to\nthe same file someone else does\n<mugwump> so, git-svn will expect that file to have the contents in svn\nthe same as the last svn commit it knows\n<jmworx> shouldn't the rebase have fixed that?\n<mugwump> yes\n<mugwump> so, find the first commit in `git log` that shows a git-svn-id:\n<mugwump> get its commitid, then use: git-cat-file blob commitid:PATH |\nmd5sum\n<mugwump> then use svn cat svnurl/trunk/PATH | md5sum\n<mugwump> just to see what's going on\n<jmworx> what do I substitute PATH for exactly?\n<mugwump> TODO I guess\n<jmworx> my svn repo is http://svn.xiph.org/ and I checked out only\ntrunk/speex\n<mugwump> can you share the git repo somewhere temporary?  or just the\npackfile even\n<jmworx> git-cat-file blob commitid:TODO doesn't work\n<jmworx> I can upload the git repo if you tell me how (or just a tarball?\n<mugwump> well you can just rsync the .git dir to a web server somewhere\n<jmworx> http://people.xiph.org/~jm/speex-git.tar.gz\n<jmworx> It's only 6 MB\n<jmworx> mugwump: Got the tarball?\n<mugwump> sorry jmworx was providing internal git support too :)\n<mugwump> right, so here's what I did:\n<mugwump> git-log shows HEAD~2 as the last SVN commit (ie, includes the\ngit-svn-id: in the commit message)\n<mugwump> the commitid is a9b9f3c\n<jmworx> so...\n<mugwump> so, I used this to see what git-svn expects the file to be:\n<mugwump> git-cat-file blob a9b9f3c:TODO > TODO.gitsvn\n<mugwump> svn cat http://svn.xiph.org//trunk/speex/TODO > TODO.svn\n<mugwump> however those files are identical\n<mugwump> which is good.  but makes the error confusing\n<jmworx> So the rebased worked?\n<mugwump> looks like it\n<mugwump> but I'm not sure why your dcommit isn't working ... but that\ndebugging info will be useful for eric\n<jmworx> where should I post then?\n<mugwump> git@vger.kernel.org\n<jmworx> mugwump: Just to make sure, you're getting the same error while\ndoing a dcommit?\n<mugwump> well no I get authorization failed :)\n<jmworx> Right...\n<jmworx> Just to make sure, the command is \"git-svn dcommit\", right?\n<mugwump> sure\n"}]}