summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Correct call to `sys.exit()`David Pursehouse2012-10-041-1/+1
| | | | | | It should be `sys.exit()` not `os.exit()`. Change-Id: Iaeeef456ddf2d17f5df2b712e50e3630bed856c3
* Remove `ImportError` classDavid Pursehouse2012-10-041-9/+0
| | | | | | | | | The definition of `ImportError` redefines the Python built-in class of the same name. It is not used anywhere, so remove it. Change-Id: I557ce28c93a3306fff72873dc6f477330fc33128
* Merge "manifest: record the original revision when in -r mode."Conley Owens2012-10-033-17/+55
|\
| * manifest: record the original revision when in -r mode.Brian Harring2012-09-283-17/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when doing a sync against a revision locked manifest, sync has no option but to fall back to sync'ing the entire refs space; it doesn't know which ref to ask for that contains the sha1 it wants. This sucks if we're in -c mode; thus when we generate a revision locked manifest, record the originating branch- and try syncing that branch first. If the sha1 is found within that branch, this saves us having to pull down the rest of the repo- a potentially heavy saving. If that branch doesn't have the desired sha1, we fallback to sync'ing everything. Change-Id: I99a5e44fa1d792dfcada76956a2363187df94cf1
* | Fix incorrect default_groups when parsing projects from XML manifestDavid Holmer2012-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Details: * Switch first default group to 'all' instead of 'default' Change Benefits: * More consistent with default_groups in the counterpart Save() function * Fixes bug where command 'repo manifest' added an extra 'default' group to every output project element groups attribute. This bug was particularly confusing for projects which had 'groups="notdefault"' as they were output as 'groups="notdefault,default"' by 'repo manifest' Change-Id: I5611c027a982d3394899466248b971910bec8c6b
* | sync: Support manual authentication to the manifest serverDavid Pursehouse2012-09-211-19/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new command line options, -u/--manifest-server-username and -p/--manifest-server-password, which can be used to specify a username and password to authenticate to the manifest server when using the -s/--smart-sync or -t/--smart-tag option. If -u and -p are not specified when using the -s or -t option, use authentication credentials from the .netrc file (if there are any). Authentication credentials from -u/-p or .netrc are not used if the manifest server specified in the manifest file already includes credentials. Change-Id: I6cf9540d28f6cef64c5694e8928cfe367a71d28d
* | Clean up importsDavid Pursehouse2012-09-185-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | manifest_xml: import `HEAD` and `R_HEADS` from correct module version: import `HEAD` from correct module `HEAD` and `R_HEADS` should be imported from the git_refs module, where they are originally defined, rather than from the project module. repo: remove unused import of readline cherry_pick: import standard modules on separate lines smartsync: import subcmd modules explicitly from subcmd Use: `import re import sys` and `from subcmds.sync import Sync` Instead of: `import sys, re` and `from sync import Sync` Change-Id: Ie10dd6832710939634c4f5c86b9ba5a9cd6fc92e
* | sync: Support authentication to manifest server with .netrcDavid Pursehouse2012-09-111-1/+29
|/ | | | | | | | | | | | | | | | | | | | When using the --smart-sync or --smart-tag option, and the specified manifest server is hosted on a server that requires authentication, repo sync fails with the error: HTTP 401 Unauthorized. Add support for getting the credentials from the .netrc file. If a .netrc file exists in the user's home directory, and it contains credentials for the hostname of the manifest server specified in the manifest, use the credentials to authenticate with the manifest server using the URL syntax extension for Basic Authentication: http://user:password@host:port/path Credentials from the .netrc file are only used if the manifest server URL specified in the manifest does not already include credentials. Change-Id: I06e6586e8849d0cd12fa9746789e8d45d5b1f848
* Fix ManifestParseError when first child node is commentv1.10.4Jooncheol Park2012-09-071-3/+5
| | | | | | | | | | | | If the first line of manifest.xml is a XML comment, root.childNodes[0] is not a 'manifest' element node. The python minidom module will makes a 'Comment' node as root.childNodes[0]. Since the original code only checks whether the first child node is 'manifest', it couldn't do any command including 'sync' due to the 'ManifestParseError' exception. This patch could allow the comments between '<?xml ...?>' and '<manifest>' in the manifest.xml file. Change-Id: I0b81dea4f806965eca90f704c8aa7df49c579402
* sync: Correct imports of `R_HEADS` and `HEAD`David Pursehouse2012-09-071-3/+1
| | | | | | | | | | | | | | `R_HEADS` is imported twice, from both the git_refs and project modules. It is actually defined in git_refs, and in project it is imported from there, so the import of `R_HEADS` from project in the sync module is redundant. Remove it. `HEAD` is imported from project, but like `R_HEADS` it is actually defined in git_refs. Import it from git_refs instead. Change-Id: I8e2b0217d0d9f9f4ee5ef5b8cd0b026174ac52f4
* sync: catch exceptions when connecting to the manifest serverDavid Pursehouse2012-09-061-3/+7
| | | | | | | | | | | | | | | | | When connecting to the manifest server, exceptions can occur but are not caught, resulting in the repo sync exiting with a python traceback. Add handling of the following exceptions: - IOError, which can be raised for example if the manifest server URL is malformed. - xmlrpclib.ProtocolError, which can be raised if the connection to the manifest server fails with HTTP error. - xmlrpclib.Fault, which can be raised if the RPC call fails for some other reason. Change-Id: I3a4830aef0941debadd515aac776a3932e28a943
* Fix errors when clone.bundle missing on serverMatt Gumbel2012-09-061-3/+13
| | | | | | | | | | | | | Catch curl failures to download clone.bundle; don't let git try to parse the 404 page as a bundle file (was causing much user confusion). This should eliminate false error messages from init and sync such as: error: '.repo/manifests.git/clone.bundle' does not look like a v2 bundle file fatal: Could not read bundle '.repo/manifests.git/clone.bundle'. error: RPC failed; result=22, HTTP code = 400 Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com> Change-Id: I7994f7c0baecfb45bb5a5850c48bd2a0ffabe773
* Allow projects to be specified as notdefaultConley Owens2012-09-055-16/+18
| | | | | | | | | | | | Instead of every group being in the group "default", every project is now in the group "all". A group that should not be downloaded by default may be added to the group "notdefault". This allows all group names to be positive (instead of removing groups directly in the manifest with -default) and offers a clear way of selecting every project (--groups all). Change-Id: I99cd70309adb1f8460db3bbc6eff46bdcd22256f
* Make "repo sync -j<count>" stop properly on Ctrl-C.David 'Digit' Turner2012-09-052-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The threaded 'repo sync' implementation would very often freeze the process when interrupted by the user with Ctrl-C. The only solution being to kill -9 the process explicitly from another terminal. The reason for this is best explained here: http://snakesthatbite.blogspot.fr/2010/09/cpython-threading-interrupting.html This patch makes all helper sync threads 'daemon', which allows the process to terminate immediately on Ctrl-C. Note that this will forcefully kill all threads in case of interruption; this is generally a bad thing, but: 1/ This is equivalent to calling kill -9 in another terminal, which is the _only_ thing that can currently stop the process. 2/ There doesn't seem to be a way to tell the worker threads to gently stop when they are in a blocking operation anyway (even in the non-threaded case). + Do the same for "repo status -j<count>". Change-Id: Ieaf45b0eacee36f35427f8edafd87415c2aa7be4
* manifest-format.txt: Add documentation for GetManifest RPC methodDavid Pursehouse2012-09-051-4/+10
| | | | | | | Add documentation of the GetManifest RPC method in the manifest-server section. Change-Id: I5cda5929bc8a0ca9d3f2b9da63216427041d2823
* `repo manifest`: default to stdout if no "-o"Conley Owens2012-09-041-0/+1
| | | | Change-Id: I1b0ff9ed5df6386f0c2a851c6c48d063199fe663
* init: Improved help text for the --mirror optionDavid Pursehouse2012-08-231-1/+2
| | | | Change-Id: Ia6032865f9296b29524c2c25b72bd8e175b30489
* Remove unused importsDavid Pursehouse2012-08-239-12/+3
| | | | | | There are several imports that are not used. Remove them. Change-Id: I2ac3be66827bd68d3faedcef7d6bbf30ea01d3f2
* manifest-format.txt: Fix a couple of minor spelling mistakesDavid Pursehouse2012-08-221-2/+2
| | | | Change-Id: Ic2d266c8cf08827a71846db9d3711feb02885f01
* Patches should be submitted to master, not maintDavid Pursehouse2012-08-211-2/+2
| | | | | | Update SUBMITTING_PATCHES accordingly. Change-Id: I6fd57a84c67d3762f1f23276d95cac2aeecd5e8f
* Merge branch 'master' into maintConley Owens2012-08-140-0/+0
|\ | | | | | | | | | | | | master's original purpose was to forge ahead on using git submodules, but this route has been abandoned. Change-Id: I164a9efc7821bcd1b941ad76649764722046081b
| * Merge branch 'stable'Shawn O. Pearce2011-01-101-1/+4
| |\ | | | | | | | | | | | | * stable: Fix mirror clients with no worktree
| * \ Merge branch 'stable'Shawn O. Pearce2011-01-101-1/+1
| |\ \ | | | | | | | | | | | | | | | | * stable: Bump repo version to 1,10
| * \ \ Merge branch 'maint'Shawn O. Pearce2011-01-090-0/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: help: Don't show empty Summary or Description sections sync: Run `git gc --auto` after fetch Add "repo branch" as an alias for "repo branches" upload: Catch and cleanly report connectivity errors forall: Silently skip missing projects Fix to display the usage message of the command download when the user don't provide any arguments to 'repo download'. Use os.environ.copy() instead of dict() Make path references OS independent
| * \ \ \ Merge branch 'stable'Shawn O. Pearce2011-01-094-14/+18
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable: Encode the environment variables passed to git Exit with statuscode 0 for repo help init
| * \ \ \ \ Merge branch 'stable'Shawn O. Pearce2010-12-222-61/+90
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable: Fixed race condition in 'repo sync -jN' that would open multiple masters.
| * \ \ \ \ \ Merge branch 'stable'Shawn O. Pearce2010-12-0719-179/+806
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | | 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
| * | | | | | | | 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>