GIT-SVN:dcommit包含的提交太旧

穆杜格

我使用git svn进行工作,但在提交时遇到问题。

我正在尝试放弃我的工作,但我收到以下消息(翻译为法文):

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.

因此,我进行了dcommit --dry-run来查看应该放弃的内容:

$ 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

当我gitk我的历史记录时,我可以看到dcommit不尊重历史记录。我不应该放弃第一次提交。实际上,我认为dcommit应该从deed0113开始,因为deed0113的父节点是我的remotes-repo分支的最后一个公共节点(甚至是我的remotes-repo)。我还注意到5e967cb8是remotes-repo的父母。以图形方式给出:

5e967cb8b --> remotes-repo --> deed0113 --> c5edfbc9 --> and so on --> 284d23ef

我不明白为什么我的dcommit包含第一次提交。

幸运的是,上次成功提交的结果仍然保留在控制台中。而且我收到了我一直未曾听到的这则消息,因为我没弄明白它:(

$ 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

我想这与我的问题有关。任何的想法 ?

感谢您的帮助和大吻。

PS:请问我的英语

穆杜格

我发现了问题:问题来了,我的.config文件通过DNS别名引用了我的svn存储库,并且该别名可以表示SVN父存储库或该SVN父存储库的镜像,具体取决于您所在的位置网络。似乎git曾经使用过父亲的仓库,也曾经使用过镜像(可能是因为我的git工作区已移动)。而且由于镜子不是最新的,这种情况导致了这种历史上的矛盾。一旦我在git config文件中用全名修复了所有网址后,该问题就消失了。

希望我的解释很清楚。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章