git svn樱桃选择忽略警告 [英] git svn cherry pick ignored warning
问题描述
当我运行 git svn fetch
时,它有时会打印以下警告:
W:svn cherry-pick ignored(/ path / in / svn:< svn revision number list>)missing 55 commit(s)(eg 9129b28e5397c41f0a527818edd344bf264359af)
这个警告是关于什么的?
樱桃选择合并Subversion,Subversion记录合并在元数据中涉及的文件和文件夹的提交。
当您执行 git svn fetch
,Git看到合并元数据,并试图将其解释为Git远程分支之间的合并。所有这些信息意味着Git试图做到这一点,但失败了,所以它会将它记录为常规提交而不是合并。
这不是你需要的担心,除非你看到Git拿起Subversion提交的错误。
更详细地说:
假设你有一个Subversion版本库,它有两个分支 A
和 B
,并有一个匹配的Git svn仓库:
AB
* r6
| * r5
* | r4
| * r3
| /
* r2
* r1
如果你要将分支 B
重新集成到分支 A
中,你可以在分支<$ c $中使用命令c> A 工作副本,如 svn merge -r 3:HEAD ^ / branches / B
或者只是 svn merge - 重新整合^ / branches / B
。 Subversion会在 svn:mergeinfo
标签中记录这个合并发生的元数据,并且你的下一个 git svn fetch
会看到这个元数据,看到分支 B
已被重新集成到分支 A
中,并将相应的提交记录在其历史记录中如果你只是想在分支中从分支
(比如r3添加了你需要的一个特性),但你不想重新整合整个分支,你应该使用一个Subversion命令,比如 B
提交一个单独的提交,一个 svn merge -c 3 ^ / branches / B
。同样,Subversion会记录合并元数据,Git会看到这一点并尝试解决它是否可以像前面的示例中那样记录分支合并。在这种情况下,它不能:branch A
不包含任何分支 B
的r5。这是触发此警告的原因。
When I run git svn fetch
it sometimes prints following warning:
W:svn cherry-pick ignored (/path/in/svn:<svn revision number list>) missing 55 commit(s) (eg 9129b28e5397c41f0a527818edd344bf264359af)
What this warning is about?
When someone does a "cherry-pick merge" with Subversion, Subversion records the commit that was merged in the metadata for the files and folders involved.
When you do a git svn fetch
, Git sees that merge metadata, and tries to interpret it as a merge between the Git remote branches. All this message means is that Git tried to do that, but failed, so it'll record it as a regular commit rather than a merge.
It's not something you need to worry about unless you're seeing bugs in how Git picks up Subversion commits.
In more detail:
Say you have a Subversion repository with two branches A
and B
, with a matching Git svn repository:
A B
* r6
| * r5
* | r4
| * r3
|/
* r2
* r1
If you were to reintegrate branch B
back into branch A
, you'd use a command in a branch A
working copy like svn merge -r 3:HEAD ^/branches/B
or just svn merge --reintegrate ^/branches/B
. Subversion would record metadata in svn:mergeinfo
tags recording that this merge had taken place, and your next git svn fetch
will see this metadata, see that branch B
has been reintegrated into branch A
, and record the corresponding commit in its history as a merge too.
If you just wanted a single commit from branch B
in branch A
(say r3 added a feature you need), but you don't want to reintegrate the entire branch yet, you'd instead use a Subversion command like svn merge -c 3 ^/branches/B
. Again, Subversion would record merge metadata, and Git would see this and try to work out if it could record a branch merge as in the previous example. In this case it can't: branch A
doesn't contain anything like branch B
's r5. That's what triggers this warning.
这篇关于git svn樱桃选择忽略警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!