summaryrefslogtreecommitdiffstats
path: root/subcmds
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable'Shawn O. Pearce2011-01-092-6/+6
|\ | | | | | | | | | | * stable: Encode the environment variables passed to git Exit with statuscode 0 for repo help init
| * Encode the environment variables passed to gitShawn O. Pearce2011-01-092-6/+6
| | | | | | | | | | | | | | | | Windows allows the environment to have unicode values. This will cause Python to fail to execute the command. Change-Id: I37d922c3d7ced0d5b4883f0220346ac42defc5e9 Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Merge branch 'stable'Shawn O. Pearce2010-12-077-132/+417
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable: (33 commits) Added feature to print a <notice> from manifest at the end of a sync. sync: Use --force-broken to continue other projects upload: Remove --replace option sync --quiet: be more quiet sync: Enable use of git clone --reference Only delete corrupt pickle config files if they exist Don't allow git fetch to start ControlMaster Check for existing SSH ControlMaster Fix for handling values of EDITOR which contain a space. upload: Fix --replace flag rebase: Pass through more options upload: Allow review.HOST.username to override email upload -t: Automatically include local branch name Warn users before uploading if there are local changes sync: Try fetching a tag as a last resort before giving up rebase: Automatically rebase branch on upstrea upload: Automatically --cc folks in review.URL.autocopy Fix format string bugs in grep Do not invoke ssh with -p argument when no port has been specified. Allow files to be copied into new folders ... Conflicts: git_config.py manifest_xml.py subcmds/init.py subcmds/sync.py subcmds/upload.py Change-Id: I4756a6908277e91505c35287a122a775b68f4df5
| * Added feature to print a <notice> from manifest at the end of a sync.v1.7.1Doug Anderson2010-11-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature is used to convey information on a when a branch has ceased development or if it is an experimental branch with a few gotchas, etc. You add it to your manifest XML by doing something like this: <manifest> <notice> NOTE TO DEVELOPERS: If you checkin code, you have to pinky-swear that it contains no bugs. Anyone who breaks their promise will have tomatoes thrown at them in the team meeting. Be sure to bring an extra set of clothes. </notice> <remote ... /> ... </manifest> Carriage returns and indentation are relevant for the text in this tag. This feature was requested by Anush Elangovan on the ChromiumOS team.
| * sync: Use --force-broken to continue other projectsv1.7Andrei Warkentin2010-10-291-3/+15
| | | | | | | | | | | | | | | | | | | | This adds a new flag -f/--force-broken that will allow the rest of the sync process to continue instead of bailing when a particular project fails to sync. Change-Id: I23680f2ee7927410f7ed930b1d469424c9aa246e Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Signed-off-by: Shawn O. Pearce <sop@google.com>
| * upload: Remove --replace optionFicus Kirkpatrick2010-10-291-77/+1
| | | | | | | | | | | | | | It hasn't been necessary for a long time, and its functionality can be accomplished with 'git push'. Change-Id: Ic00d3adbe4cee7be3955117489c69d6e90106559
| * sync --quiet: be more quietShawn O. Pearce2010-10-291-8/+16
| | | | | | | | | | Change-Id: I5e8363c7b32e4546d1236cfc5a32e01c3e5ea8e6 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * sync: Enable use of git clone --referenceShawn O. Pearce2010-10-291-1/+13
| | | | | | | | | | | | | | | | | | Use git clone to initialize a new repository, and when possible allow callers to use --reference to reuse an existing checkout as the initial object storage area for the new checkout. Change-Id: Ie27f760247f311ce484c6d3e85a90d94da2febfc Signed-off-by: Shawn O. Pearce <sop@google.com>
| * upload: Fix --replace flagv1.6.10.2Shawn O. Pearce2010-07-161-2/+2
| | | | | | | | | | | | | | | | --replace started to fail due to a Python error, I forgot to pass through the opt structure to the replace function. Change-Id: Ifcd7a0c715c3fd9070a4c58208612a626382de35 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * rebase: Pass through more optionsv1.6.10.1Shawn O. Pearce2010-07-151-7/+39
| | | | | | | | | | | | | | | | Passing through --whitespace=fix to rebase can be useful to clean up a branch prior to uploading it for review. Change-Id: Id85f1912e5e11ff9602e3b342c2fd7441abe67d7 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * upload: Allow review.HOST.username to override emailv1.6.10Shawn O. Pearce2010-07-151-0/+5
| | | | | | | | | | | | | | | | | | | | Some users might need to use a different login name than the local part of their email address for their Gerrit Code Review user account. Allow it to be overridden with the review.HOST.username configuration variable. Change-Id: I714469142ac7feadf09fee9c26680c0e09076b75 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * upload -t: Automatically include local branch nameShawn O. Pearce2010-07-151-9/+12
| | | | | | | | | | | | | | | | | | | | | | If the -t flag is given to upload, the local branch name is automatically sent to Gerrit Code Review as the topic branch name for the change(s). This requires the server to be Gerrit Code Review v2.1.3-53-gd50c94e or later, which isn't widely deployed right now, so the default is opt-out. Change-Id: I034fcacb405b7cb909147152db427fe69dd7bcbf Signed-off-by: Shawn O. Pearce <sop@google.com>
| * Warn users before uploading if there are local changesAnthony Newnam2010-07-151-0/+15
| | | | | | | | | | Change-Id: I231d7b6a3211e9f5ec71a542a0109b0c195d5e40 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * rebase: Automatically rebase branch on upstreaDaniel Sandler2010-07-151-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | Usage: repo rebase [[-i] <project>...] Rebases the current topic branch of the specified (or all) projects against the appropriate upstream. Note: Interactive rebase is currently only supported when exactly one project is specified on the command line. Change-Id: I7376e35f27a6585149def82938c1ca99f36db2c4 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * upload: Automatically --cc folks in review.URL.autocopyBen Komalo2010-07-151-1/+27
| | | | | | | | | | | | | | | | | | | | The upload command will read review.URL.autocopy from the project's configuration and append the list of e-mails specified to the --cc argument of the upload command if a non-empty --re argument was provided. Change-Id: I2424517d17dd3444b20f0e6a003be6e70b8904f6 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * Fix format string bugs in grepv1.6.9.8Sebastian Schmidt2010-06-171-4/+4
| | | | | | | | | | | | | | | | This fixes some format string bugs in grep which cause repo to with "TypeError: not enough arguments for format string" when grepping and the output contains a valid Python format string. Change-Id: Ice8968ea106148d409490e4f71a2833b0cc80816
| * sync: support --jobs to fetch projects simultaneouslyRoy Lee2010-05-271-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does two things for being compatibile with those Python which are built without threading support: 1. As the Python document and Shawn suggested, import dummy_threading when the threading is not available. 2. Reserve the single threaded code and make it default. In cases the --jobs does not work properly with dummy_threading, we still have a safe fallback. Change-Id: I40909ef8e9b5c22f315c0a1da9be38eed8b0a2dc
| * Aliasing sync -s to 'smartsync'v1.6.9.7Nico Sallembien2010-05-172-4/+38
| | | | | | | | | | | | | | This alias will let people use this command without having to remember the option. Change-Id: I3256d9e8e884c5be9e77f70e9cfb73e0f0c544c6
| * upload: Move confirmation threshold from 3 to 5 commitsv1.6.9.5Dan Morrill2010-05-051-1/+1
| | | | | | | | Change-Id: I7275d195cf04f02694206b9f838540b0228ff5e1
| * upload: Confirm unusually large number of uploaded commitDan Morrill2010-05-041-0/+29
| | | | | | | | | | | | | | | | | | Add a sentinel check to require a second explicit confirmation if the user is attempting to upload (or upload --replace) an unusually large number of commits. This may help the user to catch an accidentally incorrect rebase they had done previously. Change-Id: I12c4d102f90a631d6ad193486a70ffd520ef6ae0
| * branches: Enable output of multiple projectsPär Åsfält2010-05-041-5/+7
| | | | | | | | | | | | | | Fixes a bug introduced by 498a0e8a79ab76eeb6adc40f12b04d59820716f9 ("Make 'repo branches -a' the default behavior"). Change-Id: Ib739f82f4647890c46d7c9fb2f2e63a16a0481de
| * Override manifest file only after it is fully written to disk.v1.6.9.4Nico Sallembien2010-04-261-1/+1
| | | | | | | | | | | | We called "Override()" before closing the file passed in argument. Change-Id: I15adb99deb14297ef72fcb1b0945eb246f172fb0
| * Strip refs/heads in the branch sent to the manifest server.Nico Sallembien2010-04-261-0/+3
| | | | | | | | | | | | | | The manifest server doesn't want to have refs/heads passed to it, so we need to strip that when the branch contains it. Change-Id: I044f8a9629220e886fd5e02e3c1ac4b4bb6020ba
| * sync: Safely skip already deleted projectsv1.6.9.3Anthony2010-04-141-25/+29
| | | | | | | | | | | | | | Do not error if a project is missing on the filesystem, is deleted from manifest.xml, but still exists in project.list. Change-Id: I1d13e435473c83091e27e4df571504ef493282dd
| * Add a 'smart sync' option to repo syncv1.6.9.2Nico Sallembien2010-04-131-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | This option allows the user to specify a manifest server to use when syncing. This manifest server will provide a manifest pegging each project to a known green build. This allows developers to work on a known good tree that is known to build and pass tests, preventing failed builds to hamper productivity. The manifest used is not "sticky" so as to allow subsequent 'repo sync' calls to sync to the tip of the tree. Change-Id: Id0a24ece20f5a88034ad364b416a1dd2e394226d
| * Allow 'y' as a valid response when confirming identityv1.6.9.1Nico Sallembien2010-04-011-2/+3
| | | | | | | | | | I prefer having to type only one character rather than all three, and it seems like other confirmation prompts use the same style.
* | Merge branch 'stable'Shawn O. Pearce2010-03-061-2/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable: Automatically install Gerrit Code Review's commit-msg hook Fail sync when encountering "N commits behind." Check that we are not overwriting a local repository when syncing. Honor url.insteadOf when setting up SSH control master connection sync: Fix split call on malformed email addresses Fixing project renaming bug. Conflicts: hooks/commit-msg project.py subcmds/sync.py Change-Id: I5eaf8fef8cbe4a95d124368112293a9ca64325bf
| * Fixing project renaming bug.v1.6.8.8Nico Sallembien2009-12-101-9/+9
| | | | | | | | | | | | | | | | This bug happens when a project gets added to the manifest, and then is renamed. Users who happened to have run "repo sync" after the project was added but before the rename happened will try to read the data from the old project, as the manifest was only updated after all projects were updated successfully.
* | Fix to display the usage message of the command download when the userThiago Farina2009-09-091-0/+3
| | | | | | | | | | | | don't provide any arguments to 'repo download'. Signed-off-by: Thiago Farina <thiago.farina@gmail.com>
* | forall: Silently skip missing projectsShawn O. Pearce2009-08-221-0/+6
| | | | | | | | | | | | | | | | | | If a project is missing locally, it might be OK to skip over it and continue running the same command in other projects. Bug: REPO-43 Change-Id: I64f97eb315f379ab2c51fc53d24ed340b3d09250 Signed-off-by: Shawn O. Pearce <sop@google.com>
* | upload: Catch and cleanly report connectivity errorsShawn O. Pearce2009-08-221-3/+7
| | | | | | | | | | | | | | | | | | | | Instead of giving a Python backtrace when there is a connectivity problem during repo upload, report that we cannot access the host, and why, with a halfway decent error message. Bug: REPO-45 Change-Id: I9a45b387e86e48073a2d99bd6d594c1a7d6d99d4 Signed-off-by: Shawn O. Pearce <sop@google.com>
* | upload: Document --replace is deprecatedShawn O. Pearce2009-08-221-6/+6
| | | | | | | | | | Change-Id: I52715bcfec9c038d0e02505aa7e4054ebc0434aa Signed-off-by: Shawn O. Pearce <sop@google.com>
* | manifest: Support --upgrade to submodule format, from XMLShawn O. Pearce2009-07-031-2/+35
| | | | | | | | | | | | | | | | | | By running `repo manifest --uprade` an administrator can update the current manifest format from the XML format to submodule format, but we need all projects to be checked out in a work tree for this to function correctly. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Introduce manifest format using git submodulesShawn O. Pearce2009-07-032-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a manifest top level directory contains '.gitmodules' we now assume this is a git module format manifest and switch to using that code, rather than the legacy XML based manifest. At the same time, we move the bare repository for a project from $TOP/.repo/projects/$REPO_PATH.git to be $REPO_NAME.git instead. This makes it easier for us to later support a repo init from an existing work tree, as we can more accurately predict the path of the project's repository in the workspace. It also means that the $TOP/.repo/projects/ directory is layed out like a mirror would be. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | sync: Support upgrading manifest formatsShawn O. Pearce2009-07-032-1/+18
| | | | | | | | | | | | | | | | If the manifest format changes during init or sync we need to do a full reparse of the manifest, and possibly allow the new object to reconfigure the local workspace to match its expectations. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | init: add -o, --origin to name manifest remoteShawn O. Pearce2009-07-031-10/+26
| | | | | | | | | | | | | | | | The -o option permits the user to control the name of the manifest's remote, which normally is hardcoded to be 'origin', but can differ because we derive it at runtime from the configuration file. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | init: Ensure repo.mirror is noticed once setShawn O. Pearce2009-07-031-0/+1
| | | | | | | | | | | | | | | | If we don't clear the cache, there can be a timestamp race between the pickle file and the raw text file, and we may not pick up the edit when we create a new config object around the same path name. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Abstract manifest branch creation from init to the manifest objectShawn O. Pearce2009-07-031-4/+3
| | | | | | | | | | | | | | This permits the XML style manifest to use 'default', while other types can use their own creation strategy for the current branch. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | sync: Run `git gc --auto` after fetchShawn O. Pearce2009-07-032-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Users may wind up with a lot of loose object content in projects they don't frequently make changes in, but that are modified by others. Since we bypass many git code paths that would have otherwise called out to `git gc --auto`, its possible for these projects to have their loose object database grow out of control. To help prevent that, we now invoke it ourselves during the network half of sync. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | init: Allow -m only on XML formatted manifestShawn O. Pearce2009-07-031-8/+8
| | | | | | | | | | | | | | | | If the manifest is the newer SubmoduleManifest style, then the -m option makes no sense, as you cannot select a specific file within the current branch. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | manifest: Only support -o option on XML formatted manifestShawn O. Pearce2009-07-031-11/+14
| | | | | | | | | | | | | | | | If the manifest isn't a single file format manifest, the -o option makes no sense, as you cannot export multiple files to a single stream for display or redirection. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | manifest: Only display XML help on XML manifestShawn O. Pearce2009-07-031-8/+13
| | | | | | | | | | | | | | Some of the help text is only related to the XML formatted manifest, so only display that text if that is the current format. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | help: Don't show empty Summary or Description sectionsShawn O. Pearce2009-07-031-0/+2
| | | | | | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Create an abstract Manifest base classShawn O. Pearce2009-07-032-1/+2
|/ | | | | | This will help as we add support for another manifest type. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Try to prevent 'repo sync' as a user namev1.6.8.6Shawn O. Pearce2009-07-021-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | When someone copies and pastes a setup line from a web page, they might actually copy 'repo sync' onto the clipboard and wind up pasting it into the "Your Name" prompt. This means they will initialize their client with the user name of "repo sync", creating some rather funny looking commits later on. For example: To setup your source tree: mkdir ~/code cd ~/code repo init -u git://.... repo sync If this entire block was just blindly copy and pasted into the terminal, the shell won't read "repo sync" but "repo init" will. By showing the user their full identity string, and asking them to confirm it before we continue, we can give the hapless user a chance to recover from this mistake, without unfairly harming those who were actually named 'repo' by their parents. Signed-off-by: Shawn O. Pearce <sop@google.com>
* branches: Describe output format in `repo help branches`v1.6.8.3Shawn O. Pearce2009-06-121-0/+27
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* grep: Only use --color on git 1.6.3 and laterShawn O. Pearce2009-06-121-2/+2
| | | | | | | | | | The --color flag wasn't introduced until git 1.6.3. Prior to that version, `git grep --color` just produces a fatal error, as it is an unsupported option. Since this is just pretty output and is not critical to execution, we can simply omit the option if the version of git we are running on doesn't support it. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Refactor git version detection for reuseShawn O. Pearce2009-06-121-15/+2
| | | | | | | | This way we can use it to detect feature support in the underlying git, such as new options or commands that have been added in more recent versions. Signed-off-by: Shawn O. Pearce <sop@google.com>
* sync: Keep the project.list file sortedShawn O. Pearce2009-06-041-0/+1
| | | | | | Its easier to locate an entry visually if the file is sorted. Signed-off-by: Shawn O. Pearce <sop@google.com>
* sync: Tolerate blank lines in project.listv1.6.8.1Shawn O. Pearce2009-06-041-1/+5
| | | | | | | | If a line is blank in project.list, its not a relevant project path, so skip over it. Existing project.list files may have blank lines if sync was run with no projects at all, and the file was created empty. Signed-off-by: Shawn O. Pearce <sop@google.com>