I work with git svn and I have an issue while dcommiting.
I am trying to dcommit my work but I have this message (translated from french) :
ERROR from SVN:
File exists (couche RA): file 'path/to/file.java' already exists
W: 284d23ef86d9fbc510f4ab1423c34aa001d42063 and remotes-repo differ, using rebase:
:040000 040000 3ab05762f438259258d15ac17fddcb9acc35ea30 eb62818521976199c132720aac338a4bae66c84a M src
Current branch local-repo is up to date.
ERROR: Not all changes have been committed into SVN, however the committed
ones (if any) seem to be successfully integrated into the working tree.
Please see the above messages for details.
So I make a dcommit --dry-run to see what is supposed to be dcommited :
$ git svn dcommit --rmdir --dry-run
Committing to https://svn/xxx ...
diff-tree 5e967cb8b9044381ed8cfb063c0420daf397a52a~1 5e967cb8b9044381ed8cfb063c0420daf397a52a
diff-tree deed0113f3813e914633cc3bf8ee6350ade3959e~1 deed0113f3813e914633cc3bf8ee6350ade3959e
diff-tree c5edfbc97b5a3755d61c8d5115b34b7417c13bcd~1 c5edfbc97b5a3755d61c8d5115b34b7417c13bcd
diff-tree 274bf4d495147b345aecc4723c93e82a9f77f902~1 274bf4d495147b345aecc4723c93e82a9f77f902
diff-tree 0e4824e0a5cc744d18b889f60b3c4db774365201~1 0e4824e0a5cc744d18b889f60b3c4db774365201
diff-tree 73b7956738218772b4660100f905525b073bebb5~1 73b7956738218772b4660100f905525b073bebb5
diff-tree 14dfcef8f3e4fc55a03f22ff0464462b415944ac~1 14dfcef8f3e4fc55a03f22ff0464462b415944ac
diff-tree 588f74cf615bcc6ce30b7a37966c8bbde5311006~1 588f74cf615bcc6ce30b7a37966c8bbde5311006
diff-tree f40434c968f7709656b5ec7c52f05a517a38a9d0~1 f40434c968f7709656b5ec7c52f05a517a38a9d0
diff-tree 399a44448102ebefa00c1b0e8f8d55864e2292ad~1 399a44448102ebefa00c1b0e8f8d55864e2292ad
diff-tree ac6373180e028cbb0ec752e5477965bcd44a885e~1 ac6373180e028cbb0ec752e5477965bcd44a885e
diff-tree c62976cb0bd03c6acde27b3d594aff555609d9f0~1 c62976cb0bd03c6acde27b3d594aff555609d9f0
diff-tree 2455fcb5f835095d60edf25e5d8fa6c9380428b6~1 2455fcb5f835095d60edf25e5d8fa6c9380428b6
diff-tree 990b9a4f07331ce77a93365fd09b38c55ee17acd~1 990b9a4f07331ce77a93365fd09b38c55ee17acd
diff-tree 284d23ef86d9fbc510f4ab1423c34aa001d42063~1 284d23ef86d9fbc510f4ab1423c34aa001d42063
When I gitk my history, I can see that the dcommit dos NOT respect the history. The first commit should not be dcommited (I think). Actually, I think the dcommit should start at deed0113, because deed0113's parent is the last common node with my remotes-repo branch (it is even my remotes-repo). And I noticed also that 5e967cb8 is remotes-repo's parent. Graphically it gives :
5e967cb8b --> remotes-repo --> deed0113 --> c5edfbc9 --> and so on --> 284d23ef
I can not understand why my dcommit includes the first commit.
I had the luck to have still in my console the result of the last successfull dcommit. And I had this message that I had eluded because I cound not understant it :(
$ git svn dcommit --rmdir
Committing to https://svn/xxx ...
M path1/to/file1.java
M path2/to/file2.java
M path3/to/file3.java
Committed r7735
W: f8f8d3da4a9401f847668c392cd3f0632e63573b and remotes-repo differ, using rebase:
:040000 040000 eb62818521976199c132720aac338a4bae66c84a 2d61d69e43a0234a5db5607eb43fe845f9047b88 M src
Current branch local-repo is up to date.
# of revisions changed
before:
after:
f8f8d3da4a9401f847668c392cd3f0632e63573b
If you are attempting to commit merges, try running:
git rebase --interactive --preserve-merges remotes-repo
Before dcommitting
I suppose this has to do with my issue. Any Idea ?
Thanks for your help and big kisses.
PS : excuse my english
I found the problem : the issue came that my .config file refered to my svn repo via a DNS alias, and that this alias can represent either the SVN father repo or a mirror of this SVN father repo, depending on where you are on the network. Seems that git took once the father repo, once the mirror (maybe because my git workspace has been moved). And since the mirror was not up to date, the situation led to this history inconsistency. Once I fixed all my urls with complete names on my git config file, the issue disapeared.
Hope my explanation is clear enough.