summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Set core.bare to true on mirror repositoriesv1.6.1Shawn O. Pearce2009-03-031-1/+5
| | | | | | | | When creating a mirror repository we will always be using a bare repository. Setting $GIT_DIR/config to have core.bare = true is reasonable and helps Git to recognize the environment it is in. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Allow repo forall -c on a mirror by using GIT_DIR as pwdShawn O. Pearce2009-03-031-4/+12
| | | | | | | We can permit a forall on a mirror, but only if we put the command into the git repository. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't permit users to run repo status in a mirror clientShawn O. Pearce2009-03-036-9/+22
| | | | | | | | | | | | | | | | If a client was created with "repo init --mirror" then there are no working directories present, and no files checked out. Using a command like "repo status" in this context makes no sense, and actually throws back a Pytyon traceback at the console when the underlying commands fail out. We now tag commands with the MirrorSafeCommand type if they are able to be executed within a mirror directory safely. Using a command in a mirror which lacks this base class results in a useful error letting you know the command isn't supported. Bug: REPO-14 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Get rid of the horrible android import work around hackShawn O. Pearce2009-03-031-25/+0
| | | | | | | | | | | | | | | | | | | Months ago when the Android Open Source Project launched we had some import errors that had to be fixed and worked over. These hacks were here to help users update their clients to newer versions of the imported code. Its very likely all clients have either been deleted, or have been updated and have the fixed imports. So we don't need this hack in repo anymore. If a very ancient client still existed, it would need to be created from scratch anyway, due to the Android cupcake branch merging into master and the manifest changes not being able to be handled correctly by repo. A new client wouldn't have the incorrectly imported code in it, and thus wouldn't need this hack. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix repo status when there are renamed/copied filesShawn O. Pearce2009-03-031-1/+1
| | | | | | | | | I missed a parameter in the format string, but still provided the value in the parameter list, so the format failed to produce an output message. Bug: REPO-15 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Export additional environment variables to repo forall:Jeff Bailey2009-03-021-0/+17
| | | | | | | | | | | | | | | REPO_PATH is the path relative the the root of the client. REPO_REMOTE is the name of the remote system from the manifest. REPO_LREV is the name of the revision from the manifest, but translated to something the local repository knows. REPO_RREV is the name of the revision from the manifest. This allows us to do commands like: repo forall -c 'echo "(cd $REPO_PATH && git checkout `git rev-parse HEAD`)"'
* Add 'repo version' to describe what code we are runningShawn O. Pearce2009-03-022-0/+45
| | | | | | | I meant to have this in here, so clients can more easily report what version of repo they are running. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Report better errors when a project revision is invalidShawn O. Pearce2009-03-023-0/+15
| | | | | | | | | If a manifest specifies an invalid revision property, give the user a better error message detaling the problem, instead of an ugly Python traceback with a strange Git error message. Bug: REPO-2 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix repo prune output to sort by branch nameShawn O. Pearce2009-03-021-1/+1
| | | | | | We didn't always sort the output. Now we do. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix repo prune to work on git 1.6.1-rc3~5 and laterShawn O. Pearce2009-03-021-11/+8
| | | | | | | | | | | | | | | | | | | | | Prior to git 1.6.1-rc3~5 the output of 'git branch -d' matched: Deleted branch (.*)\. where the subgroup grabbed the branch name. In v1.6.1-rc3~5 (aka a126ed0a01e265d7f3b2972a34e85636e12e6d34) Brandon Casey changed the output to include the SHA-1 of the branch name, now matching the pattern: Deleted branch (.*) \([0-9a-f]*\)\. Instead of parsing the output of git branch we now re-obtain the list of branches after the deletion attempt and perform a set difference in memory to determine which branches we were able to successfully delete. Bug: REPO-9 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Mergev1.6Android Code Review2009-02-101-19/+0
|\
| * Remove the now unnecessary MakefileShawn O. Pearce2009-01-261-19/+0
| | | | | | | | | | | | | | | | | | In a pure Python project run directly from source we really don't have a need for a Makefile. Previously it held the rule to update the protobuf client from Gerrit1, but now that we have retired that logic we don't need it anymore. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | MergeAndroid Code Review2009-02-1025-6287/+1
|\|
| * Remove the protobuf based HTTP upload code pathShawn O. Pearce2009-01-2625-6287/+1
| | | | | | | | | | | | | | | | | | Now that Gerrit2 has been released and the only supported upload protocol is direct git push over SSH we no longer need the large and complex protobuf client library, or the upload chunking logic in gerrit_upload.py. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Fix color parsing to not crash when user defined colors are setv1.5.1Shawn O. Pearce2009-02-021-1/+1
|/ | | | | | | | | | | We didn't use the right Python string methods to parse colors. $ git config --global color.status.added yellow managed to cause a stack trace due to undefined methods trim() and lowercase(). Instead use strip() and lower(). Signed-off-by: Shawn O. Pearce <sop@google.com>
* Support Gerrit2's ssh:// based uploadv1.5Shawn O. Pearce2009-01-052-24/+91
| | | | | | | | | | | In Gerrit2 uploads are sent over "git push ssh://...", as this is a more efficient transport and is easier to code from external scripts and/or direct command line usage by an end-user. Gerrit1's HTTP POST based format is assumed if the review server does not have the /ssh_info URL available on it. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Remove astray commav1.4.4Marcelo E. Magallon2008-12-311-1/+1
| | | | | | | | | | | | There's an extra "," at the end of the line, which is causing trouble when the manifest file specifies a revision for a project. Since the default manifest file doesn't specify revisions for the projects, the problem has gone unnoticed. Thanks to Barry Silverman <barry@disus.com> for spotting the issue and providing a patch. Signed-off-by: Marcelo E. Magallon <marcelo.magallon@gmail.com>
* Correct the REPO_URL in the wrapper script to android.git.kernel.orgv1.4.3Shawn O. Pearce2008-12-181-2/+2
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Describe upload --replace in upload's help textv1.4.2Shawn O. Pearce2008-12-121-0/+6
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't accept multiple commits for the same change in upload --replaceShawn O. Pearce2008-12-121-1/+6
| | | | | | | | Gerrit won't permit more than one commit using the same change number during a replacement request, so we should error out if the user has asked for this in their upload edit script. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix upload --replace after it was broken when --review,--cc was addedv1.4.1Shawn O. Pearce2008-11-241-2/+2
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Support <remove-project name="X"> in manifest to remove/replace Xv1.4Shawn O. Pearce2008-11-202-0/+26
| | | | | | | | The manifest files now permit removing a project so the user can either keep it out of their client, or replace it with a different project using an entirely different configuration. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add --review and --cc flags to repo upload, so you canJoe Onorato2008-11-195-20/+88
| | | | assign reviewers when you upload changes.
* Make repo's editor work when the editor is a commandline withv1.3.2Joe Onorato2008-11-141-2/+2
| | | | multiple args.
* Paper bag fix repo 1.3's "repo upload" without --replacev1.3.1Shawn O. Pearce2008-11-121-4/+5
| | | | | | | If we aren't doing a replacement we do not have any replace rules, so we cannot iterate over them. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Teach 'repo upload --replace' how to add replacement patch setsv1.3Shawn O. Pearce2008-11-123-4/+83
| | | | | | | | | | | | | | Users are prompted with the list of known changes we are about to upload, and they can fill out the current change numbers for any changes which already exist in the data store. For each of those changes the change number and commit id is sent as part of the upload request, so Gerrit can insert the new commit as a new patch set of the existing change, rather than make a new change. This facility permits developers to replace a patch so they can address comments made on a prior version of the same change. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Update proto client to support patch set replacmentsShawn O. Pearce2008-11-122-6/+55
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Refactor part of GetUploadableBranches to lookup one specific branchShawn O. Pearce2008-11-121-6/+14
| | | | | | | This way project.GetUploadableBranch(project.CurrentBranch) can tell us how (if at all) to upload the currently checked out branch. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Treat missing attributes as None when parsing the manifestv1.2Shawn O. Pearce2008-11-061-0/+2
| | | | | | Some of our code assumes that a property is None. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add <add-remote to-project="..."> to inject additional remotesShawn O. Pearce2008-11-062-8/+43
| | | | | | | | | | | This way users can add forks they know about to an existing project that was already declared in the primary manifest. This is mostly useful with the Linux kernel project, where multiple forks is quite common for the main upstream tree (e.g. Linus' tree), a platform architecture tree (e.g. ARM) and a device specific tree (e.g. the msm7k tree used by Android). Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add <remote project-name="..."> attribute within projectsShawn O. Pearce2008-11-064-6/+26
| | | | | | | | | | | | By setting a project-name on a remote nested within a project forks of a project like the Linux kernel can be easily handled by fetching all relevant forks into the same client side project under different remote names. Developers can create branches off different remotes using `git checkout --track -b $myname $remote/$branch` and later `repo upload` automatically redirects to the proper fork project in the code review server. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Use remote.*.projectname to indicate the target project for uploadShawn O. Pearce2008-11-062-1/+11
| | | | | | | | This way "forks" of a project, e.g. the linux kernel, can be setup to use different destination projects in the review server by creating different remotes in the client side Git repository. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add some short documentation about the local manifestShawn O. Pearce2008-11-061-0/+29
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add 'repo init --mirror' to download a complete forrestv1.1Shawn O. Pearce2008-11-056-20/+109
| | | | | | | | | | | | | | | The mirror option downloads a complete forrest (as described by the manifest) and creates a replica of the remote repositories rather than a client working directory. This permits other clients to sync off the mirror site. A mirror can be positioned in a "DMZ", where the mirror executes "repo sync" to obtain changes from the external upstream and clients inside the protected zone operate off the mirror only, and therefore do not require direct git:// access to the external upstream repositories. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a basic outline of the repo manifest file formatShawn O. Pearce2008-11-041-0/+126
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Update proto_client to notify the user when auth cookies are accessedShawn O. Pearce2008-11-042-20/+40
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Assume the manifest branch matches the branch name in GitShawn O. Pearce2008-11-041-6/+7
| | | | | | | | | | | Whatever branch name we checked the manifest out from is the name we want to reflect throughout the rest of the projects, e.g. within the special "m/" remote space. This reduces the difference between different branches within the manifest file. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Cleanup stale manifest migration code from manifest.pyShawn O. Pearce2008-11-041-9/+2
| | | | | | | | | | | Prior to open-sourcing repo we had manifests in two different layouts; one where the manifest was a straight-up git clone, and one where the manifest was our bare repository with symlink work tree format (identical to what our projects use). Only the latter form is created or used by repo at this point, so the transition code to handle the straight-up git clone is not necessary. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Introduce 'repo abandon <branchname>' as an alias for 'git branch -D'v1.0.9Shawn O. Pearce2008-11-032-0/+58
| | | | | | | | This destroys a local development branch, removing all history of that branch from ever existing. If the branch is currently checked out we move back to the upstream revision. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Install a default pre-auto-gc hook in all repositoriesShawn O. Pearce2008-11-035-22/+110
| | | | | | | | | | | | | | | | | | | | This hook is evaluated by `git gc --auto` to determine if it is a good idea to execute a GC at this time, or defer it to some later date. When working on a laptop its a good idea to avoid GC if you are on battery power as the extra CPU and disk IO would consume a decent amount of the charge. The hook is the standard sample hook from git.git contrib/hooks, last modified in git.git by 84ed4c5d117d72f02cc918e413b9861a9d2846d7. I added the GPLv2 header to the script to ensure the license notice is clear, as it does not match repo's own APLv2 license. We only update hooks during initial repository creation or on a repo sync. This way we don't incur huge overheads from the hook stat operations during "repo status" or even the normal "repo sync" cases. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Catch symlink creation failures and report a better errorShawn O. Pearce2008-11-031-2/+9
| | | | | | | | | | Some users have noticed that repo doesn't work on VFAT, as we require a POSIX filesystem with POSIX symlink support. Catching the OSError during our symlink creation and raising a GitError with a more descriptive message will help users to troubleshoot and fix their own installation problems. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't print "Already up-to-date" during repo syncv1.0.8Shawn O. Pearce2008-10-301-1/+5
| | | | | | | | If we are already up-to-date we just want to display no output. This means we have to avoid calling "git merge" if there aren't commits to be merged into the working directory. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fast-forward a fully merged topic branch during 'repo sync'Shawn O. Pearce2008-10-301-0/+9
| | | | | | | | | | Instead of trying to rebase the changes on a topic branch that has been fully merged into the upstream branch we track, we should just fast-forward the topic branch to the new upstream revision. This way the branch doesn't try to rewrite commits that are already merged in the upstream. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Remove import_tar, import_zip and the <snapshot> elementsv1.0.7Shawn O. Pearce2008-10-305-1214/+0
| | | | | | | | | | Now that repo relies only on the git data stream (as it is much faster to download through) we don't really need to be parsing the <snapshot> elements within manifest. Its a lot of complex code to convert the tar (or zip) through to a fast import stream, and we just aren't calling it anymore. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Cache the per-user configuration to avoid duplicate instancesShawn O. Pearce2008-10-291-1/+5
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Move the Editor configuration out of Manifest's constructorShawn O. Pearce2008-10-292-3/+2
| | | | | | | | This way we can build more than one Manifest instance in memory and not muck around with the Editor configuration each time we build a new instance. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't flip out if there are no template hooksShawn O. Pearce2008-10-291-1/+5
| | | | | | | | Git may have been installed without its hooks directory, which means we won't have any hooks in a repo created git repository. Since we are just deleting the hooks it doesn't matter. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Stop downloading snapshots as native git:// is fasterShawn O. Pearce2008-10-281-29/+0
| | | | | | | | | Downloading and streaming a tar into Git is slower than just letting the native git:// protocol handle the data transfer, especially when there are multiple revisions available and Git can perform delta compression across revisions. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Stop hiding remote missing object errorsShawn O. Pearce2008-10-281-34/+2
| | | | | | | | | Hiding error messages from the remote peer is not a good idea, as users should be made aware when the remote peer is not a complete Git repository so they can alert the administrators and have the repository corrected. Signed-off-by: Shawn O. Pearce <sop@google.com>
* wrapper 1.6Shawn O. Pearce2008-10-281-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>