GithubHelp home page GithubHelp logo

karlzheng / git-repo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wavecomp/git-repo

0.0 1.0 0.0 1013 KB

Android repo tool enhanced with a new "repo push" command, and repository actions always ordered the same as in the manifest.

License: Apache License 2.0

Python 98.53% Shell 1.47%

git-repo's Introduction

STATUS: This seems to be functionally complete--alpha quality.

Repo is a repository management tool that Google built on top of Git. This fork provides a new repo push command.

As part of the Android development environment, Repo unifies the many Git repositories when necessary, does the uploads to the revision control system, and automates parts of the Android development workflow. Repo does not replace Git, it just makes it easier to work with Git in the context of multiple repositories. The repo command is an executable Python script that you can put anywhere in your path. In working with the Android source files, you will use Repo for across-network operations. For example, with a single repo command you can pull files from multiple repositories into your local working copy.

This fork was enhanced to add:

  1. A repo push command that performs an ordinary push of the topic branch on all repositories. This allows you to push the topic branches to GitHub or GitLab, where you can create a pull request or merge request and get your code reviewed. The existing repo upload command continues to upload to Gerrit as usual.
  2. All operations are executed in the same order as defined in the manifest file. In particular, repo push and repo upload push to the repositories in the same order that the <project> elements appear in the manifest file.

Installing and using repo

Prerequisites

repo requires Python 2.7 or above. For Python 2.6 (untested), you must install the ordereddict package before using repo.

Installation

To install repo, follow the repo installation instructions. Of course substiture this GitHub repository for the Google repository as required.

Usage

The Android Developing page shows you how to use repo. If you want do an ordinary push, use repo push command in place of repo upload. If you wish to upload to Gerrit, use repo upload as instructed.

The manifest file reference explains the contents of the manifest file that you use to describe your repositories.

There is also a handy repo Command Reference. This does not include repo push documentation, but this command will print it:

repo help push

Developer information

The rest of this page is interesting only to developers, not users.

Repository history

repo has a long history that makes it difficult to discover the canonical repository.

This repository is a fork of Google's https://gerrit.googlesource.com/git-repo/. It appears that the same code is also served as https://android.googlesource.com/tools/repo/. These two repository names have given rise to duplicate project names "git-repo" and "tools_repo" ("tools/repo" with '/' replaced with '_').

Due to the shutdown of Google Code, the original Google Code repo project https://code.google.com/p/git-repo/ has been archived for quite a while now, and is out of date.

Resyncing with official google repo

This procedure comes to us from the esrlabs/git-repo project.

For resyncing with the official google repo git, here are the commands for resyncing with the tag v1.12.33 of the official google repo:

# add google git-repo remote with tag
git remote add googlesource https://gerrit.googlesource.com/git-repo/
git checkout v1.12.33 -b google-latest

# checkout basis for resync
git checkout google-git-repo-base -b update
git merge --allow-unrelated-histories -Xtheirs --squash google-latest
git commit -m "Update: google git-repo v1.12.33"
git rebase stable

# solve conflicts; keep portability in mind

git checkout stable
git rebase update

# cleanup
git branch -D update
git branch -D google-latest

Creating a new signed version

Prepare by creating your own GPG keys as described in the Pro Git Book Signing Your Work chapter.

Export an ASCII key:

gpg --armor --export [email protected] > public.txt

Paste this key into file repo after the other keys.

Again in file repo, Increment the second element of KEYRING_VERSION:

KEYRING_VERSION = (1, 4)

In your Git working copy of git-repo, add and commit whatever files you have changed.

Sign the commit:

git tag -s -u KEYID v0.4.16 -m "COMMENT"
git push origin stable:stable
git push origin v0.4.16
  • For KEYID, use the ID of your key. List your keys using the gpg --list-keys command.
  • Replace v0.4.16 With the actual version (note that there are two occurrences of this)
  • Replace COMMENT with something more illuminating

git-repo's People

Contributors

spearce avatar dpursehouse avatar cco3 avatar danw avatar chirayudesai avatar dborowitz avatar rpaquay avatar jmcgeheeiv avatar colincross avatar vapier avatar jrn avatar mark-e-hamilton avatar anatol avatar dsandler avatar davidjamesca avatar boivie-at-sony avatar tornewuff avatar stefanbeller avatar sschuberth avatar alkino avatar juliencampergue avatar bryanrj avatar timschumi avatar thiagofarina avatar mikeandroid avatar l0kod avatar intelmatt avatar marc-hb avatar kyunam-jo avatar jasta avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.