On May 21, 2011, at 2:16 AM, Geert Janssens wrote: > I recently switched to using a git repo as described in the wiki. This has > worked fine until yesterday. > > I'm currently trying to run a git svn dcommit to push some of my local > commits > to svn. This results in an error however: > > $ git svn dcommit > > Committing to svn+ssh://[email protected]/repo/gnucash/trunk ... > > > M src/gnome-utils/assistant-utils.c > > > Transaction is out of date: File '/gnucash/trunk/src/gnome-utils/assistant- > utils.c' is out of date at /usr/libexec/git-core/git-svn line 576 > > > My tree is as follows: > > ... - A' - A - T - B > > A: revision just before trunk > A': the revision even just before that > T: current trunk revision, both local and remote trunks > B: branch I'm trying to push to svn > > I did run a git-update on trunk before trying to push. Trunk is up to date > and > branch B is properly rebased on trunk, at least as far as I can see in gitk. > > What confuses me is this: the error is about src/gnome-utils/assistant-utils.c > This file is last changed in revision A, and already pushed to svn. There are > no further changes to this file in either trunk or branch B. For some reason > git doesn't seem to agree on and tries to push the change anyway. > > I suspect this is due to how revision A got committed: > A' and A were two revisions I created on two separate branches. When they > were > ready, I first switched to the branch with A' and ran git svn dcommit. Next I > switched to trunk and ran git-update. This didn't change the remotes, because > the master repo at github hadn't synched yet. So at this point, local trunk > and the remote trunks were not pointing at the same commit. From there I > immediatly switched to the branch with A, rebased it to trunk and dcommitted > it as well. This worked fine on the svn side, but I wonder if this confused > things on the git side. > > Basically, that leaves me with two questions: > 1. how to recover from this situation ? > 2. how can I/we prevent this from happening is the future ?
Take a look at `git log --full-history A'..B src/gnome-utils/assistant-utils.c` (filling in the actual commit short hashes for A' and B, of course). It should show what git thinks are the differences. Regards, John Ralls _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
