공헌의 변화

5012 단어 Fuchsia
Gerrit 관리를 통해 Fuchsia가 제출한 주소:https://fuchsia-review.googlesource.com.모든 항목이 지점을 받아들이는 것은 아니다.각 항목의 CONTRIBUTING에서md 파일에서 자세한 정보를 얻습니다.
변경 내용 커밋
Fuchsia에 패치를 제출하기 위해서 Gerrit에 대한 인증을 위한 쿠키를 만들어야 할 수도 있습니다.쿠키를 생성하려면 Gerrit에 로그인하고https://fuchsia.googlesource.com맨 위에 있는 암호 생성 링크그리고 생성된 텍스트를 복사해서 터미널에서 실행합니다.
인증을 통과하면 다음 절차에 따라 자홍색 재구매에 패치를 제출합니다.
#create a new branch
git checkout -b branch_name

#write some awesome stuff, commit to branch_name
#edit some_file ...
git add some_file

#if specified in the repo, follow the commit message format
git commit ...

#upload the patch to Gerrit
#jiri help upload` lists flags for various features, e.g. adding reviewers
jiri upload # Adds default topic - ${USER}-branch_name
#or
jiri upload -topic="custom_topic"
#or
git push origin HEAD:refs/for/master

#at any time, if you'd like to make changes to your patch, use --amend
git commit --amend

#once the change is landed, clean up the branch
git branch -d branch_name

자세한 내용은 Gerrit 설명서를 참조하십시오.https://gerrit-documentation.storage.googleapis.com/Documentation/2.12.3/intro-user.html#upload-change
커밋 정보 레이블
Zircon, Garnet, Peridot 또는 Topaz에 변경 사항을 제출하면 변경 사항에 영향을 받는 모듈, 라이브러리, 어플리케이션 등을 표시하는 [태그]를 제출 항목에 포함합니다.이곳의 풍격은 좀 비공식적이다.이러한 예시 변경 사항을 보고 어떻게 사용하는지 이해하십시오.
  • https://fuchsia-review.googlesource.com/c/zircon/+/112976
  • https://fuchsia-review.googlesource.com/c/garnet/+/110795
  • https://fuchsia-review.googlesource.com/c/peridot/+/113955
  • https://fuchsia-review.googlesource.com/c/topaz/+/114013

  • errit는 need 탭을 사용하여 변경 사항을 표시합니다. 이 탭이 부족하면 Commit-Message-has-tags를 사용합니다.
    예:
    # Ready to submit
    [parent][component] Update component in Topaz.
    Test: Added test X
    
    # Needs Label: Commit-Message-has-tags
    Update component in Topaz.
    Test: Added test X
    

    테스트
    개발자는 그들의 코드에 대해 고품질의 자동화 테스트를 진행하는 것을 책임진다.심사위원은 충분한 테스트가 포함되지 않은 변경 사항을 반추하는 것을 책임진다.
    만약 변경이 뚜렷하지 않은 수동 테스트를 통해 검증을 해야 한다면, 이러한 테스트 절차는 변경 설명에서'Test:'로 시작하는 줄에서 설명해야 한다.명령이 더 상세하면 링크된 버그에 추가할 수 있습니다.
    어떤 상황에서 우리는 특정한 행위 변경을 테스트할 수 없다. 왜냐하면 우리는 특정한 인프라 시설이 부족하기 때문이다.이러한 상황에서 우리는 추적기에 인프라 시설 구축에 관한 문제가 있어야 한다. 테스트 라벨은 수동 테스트 변경을 설명하는 것 외에 버그 번호도 언급해야 한다.
    Test: Manually tested that [...]. Automated testing needs US-XXXX
    

    비헤이비어를 변경하지 않으려면 CL 설명을 이렇게 표시해야 합니다.
    [비구글 직원] 구글 CLA 체결.
    변경 사항을 추가하려면 구글 CLA에 서명해야 합니다.
    (구글 직원만 해당) 발표 행동
    메시지를 제출하면 Fuchsia의 문제 추적기에서 문제 id를 인용할 수 있습니다.이러한 참조는 Gerrit UI의 링크가 됩니다.또한 제출할 때 문제를 자동으로 닫는 등의 문제 작업을 지정할 수도 있습니다.
    BUG-123 #done
    done는 가장 흔히 볼 수 있는 문제 조작이다. 비록 모든 작업 흐름 조작은 이런 방식으로 나타낼 수 있지만.
    Gerrit 분기에서 관련 제출이 보이면 refs/changes/에서 제출이 무시되는 경우를 제외하고는 문제가 발생합니다.일반적으로, 이것은 제출이 마스터에 통합될 때 작업이 발생한다는 것을 의미하지만, 변경 사항을 개인 지점에 업로드하면 작업이 발생할 수 있음을 주의하십시오.
    **참고: **현재 Fuchsia의 문제 추적기는 외부 공헌자에게 개방되지 않습니다.
    크로스-리포 변화
    같은 테마를 사용하면 Gerrit은 두 개 이상의 독립된 Repos의 변경 사항을 자동으로 추적합니다.
    jiri로 업로드
    모든 repos에 같은 이름의 분기를 만들고 변경 사항을 업로드합니다.
    # make and commit the first change
    cd examples/fortune
    git checkout -b add_feature_foo
    * edit foo_related_files ... *
    git add foo_related_files ...
    git commit ...
    
    # make and commit the second change in another repository
    cd fuchsia/build
    git checkout -b add_feature_foo
    * edit more_foo_related_files ... *
    git add more_foo_related_files ...
    git commit ...
    
    # Upload all changes with the same branch name across repos
    jiri upload -multipart # Adds default topic - ${USER}-branch_name
    # or
    jiri upload -multipart -topic="custom_topic"
    
    # after the changes are reviewed, approved and submitted, clean up the local branch
    cd examples/fortune
    git branch -d add_feature_foo
    
    cd fuchsia/build
    git branch -d add_feature_foo
    

    Gerrit 명령 사용
    # make and commit the first change, upload it with topic 'add_feature_foo'
    cd examples/fortune
    git checkout -b add_feature_foo
    * edit foo_related_files ... *
    git add foo_related_files ...
    git commit ...
    git push origin HEAD:refs/for/master%topic=add_feature_foo
    
    # make and commit the second change in another repository
    cd fuchsia/build
    git checkout -b add_feature_foo
    * edit more_foo_related_files ... *
    git add more_foo_related_files ...
    git commit ...
    git push origin HEAD:refs/for/master%topic=add_feature_foo
    
    # after the changes are reviewed, approved and submitted, clean up the local branch
    cd examples/fortune
    git branch -d add_feature_foo
    
    cd fuchsia/build
    git branch -d add_feature_foo
    

    여러 부분의 변경 사항은 Gerrit에서 테마를 추적하고 함께 테스트를 진행하며 Gerrit에서 전체 테마를 제출할 수 있습니다.테마는 웹 UI를 통해 편집할 수 있습니다.
    저장소 간 변경 내용
    저장소를 뛰어넘는 변경 사항을 참고하십시오.
    결합 충돌 해결
    # rebase from origin/master, revealing the merge conflict
    git rebase origin/master
    
    # resolve the conflicts and complete the rebase
    * edit files_with_conflicts ... *
    git add files_with_resolved_conflicts ...
    git rebase --continue
    jiri upload
    
    # continue as usual
    git commit --amend
    jiri upload
    

    좋은 웹페이지 즐겨찾기