summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Use os.environ.copy() instead of dict()Shawn O. Pearce2010-12-071-1/+1
| | | | | | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Make path references OS independentAnthony Newnam2010-11-294-6/+12
| | | | | | | | Change-Id: I5573995adfd52fd54bddc62d1d1ea78fb1328130
* | Merge branch 'stable'Shawn O. Pearce2010-03-064-30/+83
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Automatically install Gerrit Code Review's commit-msg hookv1.6.9Shawn O. Pearce2010-03-062-4/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | Most users of repo are also using Gerrit Code Review, and will want the commit-msg hook to be automatically installed into their local projects so that Change-Ids are assigned when commits are created, not when they are first uploaded. (cherry picked from commit a949fa5d202f0a1f812d7630f3e5bf0f02ca4e98 but squashed with latest hook script from version 2.1.2) Change-Id: Ie68b2d60ac85d8c2285d2e1e6a4536eb76695547 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * Fail sync when encountering "N commits behind."Daniel Sandler2010-03-041-4/+3
| | | | | | | | | | | | | | | | | | | | This is almost always something the user needs to address before continuing work, so promoting it to a failure (rather than simply an informational message) seems the right way to go. As a side-effect, repo will now exit with a non-zero status code in this situation, so pipelines of the form `repo sync && make` will fail if there are branches that are stalled due to uploaded but unmerged patches.
| * Check that we are not overwriting a local repository when syncing.v1.6.8.11Nico Sallembien2010-01-201-1/+4
| | | | | | | | | | | | | | | | If a local git repository exists within the same folder as a new project that is added, when the user syncs the repo, the sync will overwrite the local files under the project's .git repository with its own symlinks. Make sure that we do not overwrite 'normal' files in repo and throw an error when that happens.
| * Honor url.insteadOf when setting up SSH control master connectionv1.6.8.10Ulrik Sjolin2010-01-041-1/+23
| | | | | | | | | | | | | | | | | | | | Repo can now properly handle url.insteadOf sections in the user's ~/.gitconfig file. This means that a user can now enjoy the master-ssh functionality even if he/she uses insteadOf's in ~/.gitconfig to rewrite git:// URLs to ssh:// style URLs. Change-Id: Ic0f04a9c57206a7b89eb0f10bf188c4c483debe3 Signed-off-by: Shawn O. Pearce <sop@google.com>
| * sync: Fix split call on malformed email addressesv1.6.8.9Shawn O. Pearce2009-12-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | If an email address in a commit object contains a space, like a few malformed ones on the Linux kernel, we still want to split only on the first space. Unfortunately my brain was too damaged by Perl and originally wrote the split asking for 2 results; in Python split's argument is how many splits to perform. Here we want only 1 split, to break apart the commit identity from the email address on the same line. Signed-off-by: Shawn O. Pearce <sop@google.com>
| * 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>
* | commit-msg: Don't create message with only Change-IdShawn O. Pearce2009-08-251-6/+19
| | | | | | | | | | | | | | | | If a user aborts a commit, the commit-msg hook is still called, but with an empty file. We need to leave the empty file alone. Change-Id: I13766135dac267823cb08ab76f67d2000ba2d1ce Signed-off-by: Shawn O. Pearce <sop@google.com>
* | commit-msg: Update the commit message hookShawn O. Pearce2009-08-221-2/+24
| | | | | | | | | | | | | | | | | | This version fixes a bug where Change-Id lines become the subject line, if the subject used a pattern like the subject of this message does. Change-Id: I7f7e0363091d03eb05dead2992fc19763214de65 Signed-off-by: Shawn O. Pearce <sop@google.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-222-6/+14
| | | | | | | | | | | | | | | | | | | | 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>
* | Automatically install Gerrit Code Review's commit-msg hookShawn O. Pearce2009-08-222-4/+62
| | | | | | | | | | | | | | | | | | | | Most users of repo are also using Gerrit Code Review, and will want the commit-msg hook to be automatically installed into their local projects so that Change-Ids are assigned when commits are created, not when they are first uploaded. Change-Id: Ide42e93b068832f099d68a79c2863d22145d05ad Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Merge change 11206Shawn O. Pearce2009-08-171-5/+12
|\ \ | | | | | | | | | | | | * change 11206: Do not invoke ssh with -p argument when no port has been specified.
| * | Do not invoke ssh with -p argument when no port has been specified.Josh Guilfoyle2009-08-161-5/+12
| |/ | | | | | | | | This change allows local SSH configuration to choose the port number to use when not explicitly set in the manifest.
* | Add "repo branch" as an alias for "repo branches"Mike Lockwood2009-07-141-0/+2
| | | | | | | | | | | | For those of us that are used to typing "git branch". Signed-off-by: Mike Lockwood <lockwood@android.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-035-1/+619
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Allow meta projects to be created not under .repo/Shawn O. Pearce2009-07-031-2/+4
| | | | | | | | | | | | | | | | Some types of manifests might prefer to put their meta project work tree under topdir, rather than inside of the .repo/ directory. We can support that by allowing relpath to be optionally passed in. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | sync: Support upgrading manifest formatsShawn O. Pearce2009-07-033-1/+22
| | | | | | | | | | | | | | | | 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-034-15/+40
| | | | | | | | | | | | | | | | 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 (wrapper): Note that -m is now deprecatedShawn O. Pearce2009-07-031-1/+2
| | | | | | | | | | | | If the manifest format isn't XML, this option isn't available. 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>
* | Allow the manifest to be accessed it if is in work treeShawn O. Pearce2009-07-031-6/+9
| | | | | | | | | | | | | | | | If the manifest's work tree is actually inside of the rest of the client work tree then its only fair that we include it as a project that the user can access. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Abstract manifest branch creation from init to the manifest objectShawn O. Pearce2009-07-033-4/+12
| | | | | | | | | | | | | | 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>
* | Allow callers to request a specific type of manifestShawn O. Pearce2009-07-032-6/+12
| | | | | | | | | | | | | | | | If the caller knows exactly what the manifest type must be we can now ask the loader to directly construct that type, rather than guessing it from the working directory. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Make refs/remotes/m management the manifest object's responsibilityShawn O. Pearce2009-07-034-7/+14
| | | | | | | | | | | | | | | | | | I plan to have the new submodule manifest format use a different layout for the m refs than the XML manifest format has used in the past. Thus we need to move the behavior management into the manifest object, and out of the project, so we can change it. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Cleanup import formatting in manifest_xml.pyShawn O. Pearce2009-07-031-2/+7
| | | | | | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Only remove a stale pickle file if it existsShawn O. Pearce2009-07-031-2/+4
| | | | | | | | 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-032-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-037-39/+99
| | | | | | | | | | | | This will help as we add support for another manifest type. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Teach Project how to relink a .git/ in the work treeShawn O. Pearce2009-07-031-21/+28
| | | | | | | | | | | | | | | | The _LinkWorkTree method can now be used to relink the work tree, such as if the real repository was moved to a different location on disk. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Allow callers to reset the git config cacheShawn O. Pearce2009-07-031-0/+8
|/ | | | | | | | | | | | If commands modify the git config too rapidly we might not notice the .git/config file has been modified, as they could run in the same filesystem timestamp window and thus not cause a change on the config's mtime. This can cause repo to miss re-reading the config file after running a command. Allowing the cache to be flushed forces us to re-read the config. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix error parsing a non-existant configuration filev1.6.8.7Shawn O. Pearce2009-07-022-2/+13
| | | | | | | | If a file (e.g. ~/.gitconfig) does not exist, we get None here rather than a string. NoneType lacks rstrip() so we cannot strip it. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Document how to contribute to the repo projectShawn O. Pearce2009-07-021-0/+80
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Support GIT_EDITOR='vim -c "set textwidth=80"'Shawn O. Pearce2009-07-021-7/+20
| | | | | | | | | If there are shell special characters in the editor string, we must use /bin/sh to parse and execute it, rather than trying to rely on a simple split(' '). This avoids vim starting up with two empty buffers, due to a misparsed command line. 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>
* git_config: handle configuration entries with no valuesDavid Aguilar2009-06-293-8/+59
| | | | | | | | | A git-config entry with no value was preventing repo from initializing. This modifies _ReadGit() to handle config entries with empty values. Signed-off-by: David Aguilar <davvid@gmail.com> Reported-by: Josh Guilfoyle <jasta00@gmail.com>
* .gitignore: add an entry for repopicklesDavid Aguilar2009-06-281-0/+1
| | | | Signed-off-by: David Aguilar <davvid@gmail.com>
* Support detached HEAD in manifest repositoryv1.6.8.5Shawn O. Pearce2009-06-251-1/+1
| | | | | | | | If the manifest repository is on a detached HEAD and we are parsing an XML formatted manifest we should simply set the branch property to None, rather than crash with an AttributeError. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Document any crashes from the user's text editorv1.6.8.4Shawn O. Pearce2009-06-242-2/+14
| | | | | | | | Rather than failing with no information, display the child exit status and the command line we tried to use to edit a text file. There may be some useful information to help understand the crash. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix invalid use of try-catchShawn O. Pearce2009-06-161-1/+1
| | | | | | Its try-except in Python. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't crash if the ssh client is already deadShawn O. Pearce2009-06-161-2/+5
| | | | | | | | | If the SSH client terminated abnormally in the background (e.g. the server shutdown while we were doing a sync) then the pid won't exist. Instead of crashing, ignore it, the result we wanted (a non-orphaned ssh process) is already acheived. Signed-off-by: Shawn O. Pearce <sop@google.com>