2010-11-21 9 views
6

내가 자식 - svn을 다음 프로젝트를 사용하기 위해 노력하고있어 후, dcommit되지 않습니다.자식 - svn의도 깨끗하고 체크 아웃

git checkout -b이 아닌 git svn branch으로 분기 한 다음 git-svn을 사용하여 문제가 발생하기 시작한 다음 해당 로컬 분기를 다시 master로 병합하고 dcommit을 시도합니다. 이상하게도, 깨끗한 체크 아웃을 한 후에도, 나는 dcommit을 시도 할 때 여전히 오류가 있습니다.

[email protected]:~/workspace/gsoc2010/scxml-js$ git svn dcommit 
Committing to https://[email protected]/repos/asf/commons/sandbox/gsoc/2010/scxml-js/trunk ... 
     M  build-common.xml 
     M  src/xslt/backends/js/StateTableStatechartGenerator.xsl 
     M  src/xslt/backends/js/SwitchyardStatechartGenerator.xsl 
     M  src/xslt/ir-compiler/appendTransitionInformation.xsl 
     M  src/xslt/ir-compiler/copyEnumeratedEventTransitions.xsl 
     M  src/xslt/ir-compiler/flattenTransitions.xsl 
     M  src/xslt/ir-compiler/nameTransitions.xsl 
     M  src/xslt/ir-compiler/numberStatesAndTransitions.xsl 
     M  src/xslt/ir-compiler/splitTransitionTargets.xsl 
     M  src/xslt/util/language-frontend-module-generators/sh-from-topo-sort-list-generator.xsl 
     M  src/xslt/util/topo-sort.xsl 
Committed r1037491 
W: 502073c202cb1fbe089f0e8b7100304f0aa74729 and refs/remotes/trunk differ, using rebase: 
:100644 100644 7930fd690be01a5716490704b5556e2b5cab5ba6 51047f2c8cf1daaa94ae44433a9aa2acc222ae43 M  build-common.xml 
:040000 040000 59251941b33bda1376881b33bb2263ea87b1b947 2f5e2586e26bc7d05def065cfcf05327982b81d7 M  src 
Current branch master is up to date. 
# of revisions changed 
before: 
39c6f7e2d7b82cc782b8770d1ddb0ecb4f86e780 
c5f360feb3a6bdaab2fb2f48d05e8691824e3231 

after: 
502073c202cb1fbe089f0e8b7100304f0aa74729 
39c6f7e2d7b82cc782b8770d1ddb0ecb4f86e780 
c5f360feb3a6bdaab2fb2f48d05e8691824e3231 
If you are attempting to commit merges, try running: 
     git rebase --interactive --preserve-merges refs/remotes/trunk 
Before dcommitting 
[email protected]:~/workspace/gsoc2010/scxml-js$ git svn rebase 
     M  build-common.xml 
     M  src/xslt/ir-compiler/nameTransitions.xsl 
     M  src/xslt/ir-compiler/copyEnumeratedEventTransitions.xsl 
     M  src/xslt/ir-compiler/appendTransitionInformation.xsl 
     M  src/xslt/ir-compiler/flattenTransitions.xsl 
     M  src/xslt/ir-compiler/numberStatesAndTransitions.xsl 
     M  src/xslt/ir-compiler/splitTransitionTargets.xsl 
     M  src/xslt/backends/js/SwitchyardStatechartGenerator.xsl 
     M  src/xslt/backends/js/StateTableStatechartGenerator.xsl 
     M  src/xslt/util/language-frontend-module-generators/sh-from-topo-sort-list-generator.xsl 
     M  src/xslt/util/topo-sort.xsl 
r1037491 = e8d820cfdca882a57fbfa003b9673313be6c9621 (refs/remotes/trunk) 
First, rewinding head to replay your work on top of it... 
Applying: Changed some paths around so python fronend works. 
Applying: Removed test_with_xsltproc.sh. This file no longer needed, as we now generate a bash backend module. 
[email protected]:~/workspace/gsoc2010/scxml-js$ git svn dcommit 
Committing to https://[email protected]/repos/asf/commons/sandbox/gsoc/2010/scxml-js/trunk ... 
     M  src/python/scxml/cgf/backends/js 
     M  src/python/scxml/cgf/xslt 
Committed r1037493 
W: 8563b885bfca77ccb33a87f56f78e6323af022a9 and refs/remotes/trunk differ, using rebase: 
:040000 040000 c33b3d66ecc6735af3241d7f9cee383d2736f614 59251941b33bda1376881b33bb2263ea87b1b947 M  src 
Current branch master is up to date. 
# of revisions changed 
before: 
574e2e495fa12cf3d81004638a06e3315d0abba5 

after: 
8563b885bfca77ccb33a87f56f78e6323af022a9 
574e2e495fa12cf3d81004638a06e3315d0abba5 
If you are attempting to commit merges, try running: 
     git rebase --interactive --preserve-merges refs/remotes/trunk 
Before dcommitting 

나는 기본적으로 모든위한 git svn rebase 다음에 git svn dcommit 마지막 dcommit 이후 커밋 수행해야합니다

다음의 다소 긴 트레이스는 자식 - svn의 내 현재 워크 플로우의 대표입니다. 이것은 대개 정상적으로 작동하지만 때때로 실패하고 더 많은 수동 작업이 필요합니다.

깨끗한 계산을 사용해도 문제가 해결되지 않는 등 dcommit에이 문제가 발생할 수있는 원인은 무엇입니까?

+1

제가 생각할 수있는 유일한 것은 원격 SVN 서버가 어떻게 든 커밋을하고 있다는 것입니다. 그래서 결과 SVN 커밋은 방금 강요 한 Git 커밋과 100 % 일치하지 않습니다. 커밋을 유지하기 위해 dcommitting하는 동일한 브랜치에 새로운 브랜치를 만들고 (SVN에 푸시 된 커밋과 해당 커밋에 해당하는 Git 커밋 사이에 diff를 시도해 볼 수있다. – cdhowie

답변

5

난 그냥이 우연히 마지막에 무슨 일이 일어나고 있는지 파악 : 당신은 HTTP 및 write-through proxying 통해 SVN 저장소에 액세스 할 때 권장 post-commit 후크 백그라운드에서 svnsync를 실행합니다. HTTP를 통한 커밋은 SVN 서버가 완료 되 자마자 읽는 HTTP 프록시가 새 버전으로 업데이트되기 전에 완료됩니다. git-svn은 커밋을 수행 한 후 곧바로 패치를 실행하고 새 버전이없는 부실 HTTP 프록시를 봅니다. 그것은 새로운 개정판을 가지고 있다고 가정하고 리모콘의 팁을 커밋하려고 시도한 것과 비교해 충돌을 봅니다.

SVN 프록시 구성을 제어하면 svnsync을 동기식으로 설정할 수 있습니다 (구성 변경으로 누군가 나를 놀라게 할 때까지 오랫동안 저에게 효과적이었습니다). 그렇지 않으면 나는 git-svn가 재시도 메커니즘이 필요하다고 생각이 여전히 오늘 밤 좋은 아이디어처럼 보인다

diff --git a/git-svn.perl b/git-svn.perl 
index 09c4ca5..af9aea1 100755 
--- a/git-svn.perl 
+++ b/git-svn.perl 
@@ -57,6 +57,7 @@ use File::Spec; 
use File::Find; 
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/; 
use IPC::Open3; 
+use Time::HiRes qw/usleep/; 
use Git; 

BEGIN { 
@@ -574,7 +575,17 @@ sub cmd_dcommit { 
           $gs->{inject_parents_dcommit}->{$cmt_rev} = 
                   $parents->{$d}; 
         } 
-      $_fetch_all ? $gs->fetch_all : $gs->fetch; 
+      my $retry; 
+      fetch: for ($retry = 0; $retry < 30; ++$retry) { 
+       $_fetch_all ? $gs->fetch_all : $gs->fetch; 
+       last fetch if ($gs->rev_map_max >= $cmt_rev); 
+       # Asynchronous commit push not complete 
+       usleep(20000 * ($retry + 1)); 
+      } 
+      if ($retry > 0 && $gs->rev_map_max < $cmt_rev) { 
+       fatal "New revision $cmt_rev did not appear", 
+         "in repository after $retry retries."; 
+      } 
         $last_rev = $cmt_rev; 
         next if $_no_rebase; 

$ 

경우 나 패치를 제출할 수 있습니다.

업데이트 : 내 자신의 커밋 중 하나에

Author: syncuser <[email protected]> 

: 내가 함께 결국이 사용하는 동안. 따라서 스크립트가 부분 동기화를 보는 경쟁 조건이 여전히있을 수 있습니다. 이것은 성가 시지만 치명적이지 않습니다.

+0

답장을 보내 주셔서 감사합니다. 나는이 해결책이 효과가있을 것이라고 생각하지만 문제를 해결할 다른 방법을 찾았다. 저는 현재 유럽에 있으며 svn.apache.org는 svn.us.apache.org의 미러 인 svn.eu.apache.org에 투명하게 매핑됩니다. 아마 당신이 언급 한 문제 때문에 거울을 저지르는 것이 잘 돌아 가지 않는다고 생각합니다. 그러나 svn.us.apache.org에서 명시 적으로 복제하면 dcommit이 제대로 작동하는 것 같습니다. – jbeard4

+0

필자가 내 패치 (위)를 사용하여 5 FPGA 비트 파일로 레브를 작성했다는 것과 심지어 30 번의 재시도 후 프록시가 새 버전 (약 10 초 총 대기)을 보지 못했다는 것을 알기 시작했다. 블레. –