{"thread":{"id":"27059","subject":"git svn dcommit errors all no-yet-commited changes are left squashed/uncommited?","startedAt":"2011-04-11T14:32:55Z","lastAt":"2011-04-11T14:32:55Z","messageCount":1,"participants":["Piotr Krukowiecki"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"165623","messageId":"BANLkTim9KwBSjmZO0G7BHM=q7Jdy9=K=4w@mail.gmail.com","threadId":"27059","inReplyTo":null,"subject":"git svn dcommit errors all no-yet-commited changes are left squashed/uncommited?","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2011-04-11T14:32:55Z","receivedAt":"2011-04-11T14:32:55Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"Hi,\n\nI've done some changes to \"local\" trunk, dcomitted them to svn server,\nthen cherry-picked those changes to \"local\" branch and tried to\ndcommit them to svn.\nSeveral changes where successfully dcommited, but then I got an error.\n\nTwo problems:\n1. after the error I'm left with changes not sent to svn server as\nunstaged changes\n2. git-svn errors if someone commits something to svn during my commit\neven if there is no conflict\n\nEven if the second problem is intentional (which I'm not sure is a\ngood idea), the first problem means it's not possible to continue\nafter the error (which is not really an error but should be a warning,\neven if it stops the dcommit).\n\n\nFull story:\n\nThe log looked like this:\n\n[... this is the end of older commit, which succeeded ...]\nW: -empty_dir: cptests/branches/a_branch/src/file\nr23939 = 400e84221ca15be3976ba4dcd6d7a2eb1464b00e (refs/remotes/a_branch)\nNo changes between current HEAD and refs/remotes/a_branch\nResetting to the latest refs/remotes/a_branch\nUnstaged changes after reset:\nM\tsrc/file\n[... next commit preparation and commit ...]\n\tR\tsrc/file\nCommitted r23941\n\tM\tetc/file.xml\nr23940 = 420c7b2c8f155563a4f4c8e5421857846bf3ebe5 (refs/remotes/a_branch)\n\tD\tsrc/file\n[...]\nr23941 = 010c5b3883c473dd236de1a146fad1e90bd323fd (refs/remotes/a_branch)\nW: bfb909cb21e26930364331660460ccd7be355a2e and refs/remotes/a_branch\ndiffer, using rebase:\n:040000 040000 5df0982b1cf277dd7d915d32a9ff145554fb9c94\na662095f06bd349c1a458d52697561ba9d005bac M\tetc\nCannot rebase: You have unstaged changes.\nPlease commit or stash them.\nrebase refs/remotes/a_branch: command returned error: 1\n\nNow I was left with all the remaining changes \"squashed\" - git status\nshowed a list of unstaged changes. So all changes not yet commited\nwere in fact lost as commits and left in the working tree as one bit\nnot-yet-added change.\n\nI believe the reason for this was that while I was dcommiting my\nchanges someone changed the \"etc/file.xml\"\n\nSo my previous dcommit was r23939 (src/*). Then someone else checked\ninto svn r23940 (etc/file.xml). Then (or earlier) git svn dcommited\nr23941 (src/*). After that dcommit stopped with error.\n\n\nIn this case I have just reset --hard and cherry-picked changes that\nwere not commited, and it worked this time, but I wonder what should I\ndo next time.\nWhat if those are not cherry-picked changes, but normal changes? Will\nI have to use reflog to get back in time?\n\nAlso, I think in this case svn might continue with dcommit. It already\ncommited one revision after the other-person commit. The other commit\nchanged a completely different directory.\n\nEven if this is left as error, it should be possible to continue\ndcommit in an easy way. Not-commited changes should not be deleted and\nleft as unstaged changes.\n\nAlso, the \"you have unstaged changes\" error is not very helpful. I\nthought it meant it commited a change partially, or maybe some other\nweird thing happened.\n\n\nThanks,\n\n-- \nPiotr Krukowiecki\n"}]}