2013-05-21 9 views
0

,체리 픽 하나에서 나는 체리 픽 병합을 달성하기 위해 관련 기능을 pysvn.client 병합 사용 방법

병합 특정 변경 (또는 개정 범위)를 병합 달성하기 위해 pysvn.Client.merge_peg2를 사용하는 방법 다른 지점,

svn merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH] 

지금 내가 사용 pysvn.Client.merge_peg2(http://pysvn.tigris.org/docs/pysvn_prog_ref.html#pysvn_client_merge_peg2) 해요, 경고 및 오류 만이 작동 할 수 없습니다.

내가 그렇게 merge_peg2 및 해당 매개 변수

merge_peg2(sources, 
    ranges_to_merge, 
    peg_revision, 
    tareget_wcpath, 
    depth=depth, 
    notice_ancestry=False, 
    force=False, 
    dry_run=False, 
    record_only=True, 
    merge_options=[]) 

sources   # the source repo url which merge from? 
ranges_to_merge #"a list of tuples with the start and end revisions to be merged"?how can I generate this revision range? 
peg_revision #pysvn.Revision(pysvn.opt_revision_kind.unspecified) is ok? 
tareget_wcpath #I fill this with the dest local repo 

제안, 예 또는 다른 솔루션에 대해 혼동하고있어?

답변

1

이 내가 체리 픽 병합을 수행 할 것입니다. 선택한 버전을 정렬하고이 버전을 반복합니다.

def merge_to_wc(r): 
    WC_PATH = '.' 
    FROM_URL = 'https:/svn.somewhere.org/my_project/branches/1.0' 

    pysvn.merge_peg(
    FROM_URL, 
    pysvn.Revision(pysvn.opt_revision_kind.number, r-1), 
    pysvn.Revision(pysvn.opt_revision_kind.number, r), 
    pysvn.Revision(pysvn.opt_revision_kind.head), 
    WC_PATH) 

이 방법, 시행 착오에 의해 발견 치아의 인터넷, 추측, 그리고 더 갊이 있으리라를 검색.