{"thread":{"id":"16404","subject":"git-svn confused by \"empty\" (svn prop change) commit","startedAt":"2008-11-20T03:11:32Z","lastAt":"2008-11-21T06:32:01Z","messageCount":3,"participants":["paulfred","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96201","messageId":"m28wrfhz17.fsf@gmail.com","threadId":"16404","inReplyTo":null,"subject":"git-svn confused by \"empty\" (svn prop change) commit","fromName":"paulfred","fromEmail":"paul.fredrickson@gmail.com","sentAt":"2008-11-20T03:11:32Z","receivedAt":"2008-11-20T03:11:32Z","isPatch":false,"sender":{"key":"paul.fredrickson@gmail.com","avatar":"https://gravatar.com/avatar/77589a1addc2a9a2a4a67b1ea546e8362df646a32e7ffca015aad570030a6684?d=mp&s=160"},"body":"\nI've been using git and git-svn to commit to a central SVN repository for\nthe last several months.  It's been working great so far, well enough that\nI really, *really* don't want to go back.\n\nBut yesterday, someone committed a number of changes to svn:properties,\nand there were no tree changes.  git-svn now fails to dcommit anything,\ninstead giving me the following output:\n\n  $ git svn dcommit\n  Committing to https://project.com/svn/trunk ...\n  No changes\n  68af7eb26504e324cd6e3a2d50cd0562852a2dca~1 == 68af7eb26504e324cd6e3a2d50cd0562852a2dca\n  W: 68af7eb26504e324cd6e3a2d50cd0562852a2dca and refs/remotes/trunk differ, using rebase:\n  :040000 040000 7d76021c10cebf4a0b5c8fdf614bec8e66734a28 197442c7bd8c29cdd11f52ffb18fbd882d1c7f50 M\teu\n  Current branch master is up to date.\n  # of revisions changed  \n  before:\n   683a4ed53d8859f184733eaeebc6fcb904aa1e3b\n  10e85dc1c3b03b77dcabb53b26893b2d30bd56c5\n  07c1f476b6a5feae410e315cae57d878e898896d\n  27aad097ace7ec5db128032f29d775791463ddc7\n    [...several commits omitted...]\n  751e53e536c98bf9ee1bd8b876c56f06f6b6b059 \n  \n  after:\n   68af7eb26504e324cd6e3a2d50cd0562852a2dca\n  683a4ed53d8859f184733eaeebc6fcb904aa1e3b\n  10e85dc1c3b03b77dcabb53b26893b2d30bd56c5\n  07c1f476b6a5feae410e315cae57d878e898896d\n  27aad097ace7ec5db128032f29d775791463ddc7\n    [...all the same commits again omitted...]\n  751e53e536c98bf9ee1bd8b876c56f06f6b6b059 \n   If you are attempting to commit  merges, try running:\n  \t git rebase --interactive --preserve-merges  refs/remotes/trunk \n  Before dcommitting\n\n\nIt's strange that it wanted to rebase, since I had already rebased on top of\nremotes/trunk, and I have exactly one commit I'm trying to dcommit. After\nrebasing, it appears to bail because 68af7e is in one list and not the other.\nWell, 68af7e happens to be the commit with no tree changes, only svn property\nchanges.  And yet \"git branch --contains 68af7e\" output includes master.  (hmm,\nbut not remotes/trunk.  Shouldn't it? master^ == remotes/trunk)\n\nAnyway, git svn rebase continues to pull in new changes from everyone else,\nbut won't dcommit mine.\n\nBased on a suggestion from irc, I tried --no-rebase, and got:\n\n  Attempting to commit more than one change while --no-rebase is enabled.\n  If these changes depend on each other, re-running without --no-rebase may be required. at /usr/local/libexec/git-core/git-svn line 447.\n  No changes\n  68af7eb26504e324cd6e3a2d50cd0562852a2dca~1 == 68af7eb26504e324cd6e3a2d50cd0562852a2dca\n  Unable to extract revision information  from commit 683a4ed53d8859f184733eaeebc6fcb904aa1e3b~1\n\nBut I don't know what to do with that error message.  Is it looking for the git-svn-id's?\n\nOther (perhaps important) details: I created the repository several months\nago,and only recently put \"[svn] noMetadata = true\" in my config file because\nI'm the only person on the team using git, and nobody else wanted to see the\ngit-svn-id messages.\n\nThis is git version 1.6.0.4.761.g47577 on OS X 10.5.\n\nI suppose I could nuke everything and clone another shallow copy of the code\nfrom some point after the bad commit, but I'd be happy with any kind of\nwork around that gets me dcommitting again.\n\nThanks!\n\n--Paul\n"},{"id":"96304","messageId":"m23ahlj26u.fsf@gmail.com","threadId":"16404","inReplyTo":"m28wrfhz17.fsf@gmail.com","subject":"Re: git-svn confused by \"empty\" (svn prop change) commit","fromName":"paulfred","fromEmail":"paul.fredrickson@gmail.com","sentAt":"2008-11-21T01:30:17Z","receivedAt":"2008-11-21T01:30:17Z","isPatch":false,"sender":{"key":"paul.fredrickson@gmail.com","avatar":"https://gravatar.com/avatar/77589a1addc2a9a2a4a67b1ea546e8362df646a32e7ffca015aad570030a6684?d=mp&s=160"},"body":"paulfred <paul.fredrickson@gmail.com> writes:\n>\n> Other (perhaps important) details: I created the repository several months\n> ago,and only recently put \"[svn] noMetadata = true\" in my config file because\n> I'm the only person on the team using git, and nobody else wanted to see the\n> git-svn-id messages.\n>\n\nOkay, I see that I missed in the documentation where it says setting noMetadata\n\"must be done *before* any history is imported and these settings should never\nbe changed once they are set.  User error.\n\n>\n> I suppose I could nuke everything and clone another shallow copy of the code\n> from some point after the bad commit, but I'd be happy with any kind of\n> work around that gets me dcommitting again.\n>\n\nSo, that is what I tried to do today, only it doesn't appear to work either!\nHere's what I tried in more detail:\n\n$ git svn init -T http://project.com/svn/trunk project --no-metadata\n\nThen I edited my config to look like this:\n\n[svn-remote \"svn\"]\n            noMetadata = 1\n            url = http://project.com/svn\n            fetch = trunk/dev:refs/remotes/trunk\n\nonly changing the fetch line (I don't want to track web pages, etc. which\nare also under trunk).  Followed by:\n\n$ git svn fetch --revision 1156\n$ git svn fetch\n  (now it actually pulls everything since 1156 and checks out master)\n  [hack, hack, hack]\n$ git svn rebase\nUnable to determine upstream SVN information from working tree history\n\nat which point I realize I am probably screwed.  But I try it anyway,\nsince svn tells me no one else has checked anything in yet:\n\n$ git svn dcommit\nUnable to determine upstream SVN information from HEAD history.\nPerhaps the repository is empty. at /usr/local/libexec/git-core/git-svn line 435.\n\nSo apparently my problem is NOT the empty commit at all, but trying to use\nnoMetadata.  I am surprised that it fails on a fresh download though. Is there\nsomething I might have done while hacking that would cause git-svn to lose\ntrack of trunk again?  Is my only option to convince everyone to ignore\nthe \"noise\" in my comments?\n\nThanks,\n\n--Paul\n\n \n"},{"id":"96308","messageId":"bd6139dc0811202232l592ea240s89088f78014b6906@mail.gmail.com","threadId":"16404","inReplyTo":"m23ahlj26u.fsf@gmail.com","subject":"Re: git-svn confused by \"empty\" (svn prop change) commit","fromName":"Sverre Rabbelier","fromEmail":"alturin@gmail.com","sentAt":"2008-11-21T06:32:01Z","receivedAt":"2008-11-21T06:32:01Z","isPatch":false,"sender":{"key":"alturin@gmail.com","avatar":null},"body":"On Fri, Nov 21, 2008 at 02:30, paulfred <paul.fredrickson@gmail.com> wrote:\n> $ git svn dcommit\n> Unable to determine upstream SVN information from HEAD history.\n> Perhaps the repository is empty. at /usr/local/libexec/git-core/git-svn line 435.\n>\n> So apparently my problem is NOT the empty commit at all, but trying to use\n> noMetadata.  I am surprised that it fails on a fresh download though. Is there\n> something I might have done while hacking that would cause git-svn to lose\n> track of trunk again?  Is my only option to convince everyone to ignore\n> the \"noise\" in my comments?\n\nUhm, as I understand it, git svn needs that metadata to dcommit,\nunless the .git/svn/git-svn/.rev_db is intact. The --no-metadata\nswitch should be used only when you're doing a one-time import of a\nsvn repo. During my usage of git svn, it removed the git-svn-id tags\nfrom the commit message when you 'git svn dcommit', so I don't\nunderstand why you need to use --no-metadata in the frist place.\n\n-- \nCheers,\n\nSverre Rabbelier\n"}]}