summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Disable warnings related to imports in pylint configDavid Pursehouse2013-05-031-1/+1
| | | | | | | | | | | | | | There are several modules that have imports to support various versions of Python. Pylint reports the following errors when run in a version of Python that does not have the module or the method/class in the module. F0401: Unable to import 'module' E0611: No name 'name' in module 'module' Disable these warnings to reduce the noise on the output. Change-Id: I97e7e2698bccb1e501a45a0869f97f90d54adfb7
* Add regex support for subcommand forallZhiguang Li2013-04-293-13/+24
| | | | | | | | Filter the project list based on regex or wildcard matching of strings, then we can handle subset of all projects. Change-Id: Ib6c23aec79e7d981f7b6a5eb0ae93c44effec467 Signed-off-by: Zhiguang Li <muzili@gmail.com>
* Merge "Set correct name in PyDev and Eclipse project config"David Pursehouse2013-04-202-2/+2
|\
| * Set correct name in PyDev and Eclipse project configDavid Pursehouse2013-04-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The name of the project is shown as "repo" in the project list in the Eclipse workspace. This change renames it to "git-repo" to match the name of the git repository. The existing project in Eclipse must be removed (it is not necessary to delete project contents on disk) and re-imported for the change to take effect. Change-Id: I2ac022d22f46e5361dfe49c0dbcad482aaefe628
* | Merge "Some fixes for supporting python3"Conley Owens2013-04-1914-90/+130
|\ \
| * | Some fixes for supporting python3Chirayu Desai2013-04-1814-90/+130
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix imports. * Use python3 syntax. * Wrap map() calls with list(). * Use list() only wherever needed. (Thanks Conley!) * Fix dictionary iteration methods (s/iteritems/items/). * Make use of sorted() in appropriate places * Use iterators directly in the loop. * Don't use .keys() wherever it isn't needed. * Use sys.maxsize instead of sys.maxint TODO: * Make repo work fully with python3. :) Some of this was done by the '2to3' tool [1], by applying the needed fixes in a way that doesn't break compatibility with python2. Links: [1]: http://docs.python.org/2/library/2to3.html Change-Id: Ibdf3bf9a530d716db905733cb9bfef83a48820f7 Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* / repo: add rudimentary version checkingChirayu Desai2013-04-171-0/+14
|/ | | | | Change-Id: I957775c7ce0821971cc2320597e1a7a31950bcf3 Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* sync: be more verboseChirayu Desai2013-04-151-0/+5
| | | | | | | * Print project name if the "quiet" option is not used. Change-Id: I99863bb50f66e4dcbaf2d170bdd05971f2a4e19a Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* Allow mirror to be created in directories specified by 'path' attributeScott Fan2013-04-112-0/+11
| | | | | | | | | | | | | In some cases, especially when local manifest files exist, users may want to force the mirrored repositories to be created in folders according to their 'path' attribute in the manifest, rather than according to the name of the repositories. To enable this functionality for specified mirror, add a new attribute 'force-path' for that project in the manifest, set its value to 'true'. Change-Id: I61df8c987a23d84309b113e7d886ec90c838a6cc Signed-off-by: Scott Fan <fancp2007@gmail.com>
* Allow clone depth to be specified per projectDavid Pursehouse2013-04-103-2/+23
| | | | | | | | | | | If the clone-depth attribute is set on a project, its value will be used to set the depth when fetching the git. The value, if given, must be a positive integer. The value in the clone-depth attribute overrides any value given to repo init via the --depth command line option. Change-Id: I273015b3724213600b63e40cca4cafaa9f782ddf
* list: add name-only and path-only optionsChirayu Desai2013-04-061-1/+18
| | | | | | | | `repo list -n` prints only the name of the projects. `repo list -p` prints only the path of the projects. Change-Id: If7d78eb2651f0b1b2fe555dc286bd2bdcad0d56d Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* Special handling for manifest group "default"David Holmer2013-04-034-6/+13
| | | | | | | | | | | | | | | | | | | | | Change Details: * Make "default" a special manifest group that matches any project that does not have the special project group "notdefault" * Use "default" instead of "all,-notdefault" when user does not specify manifest group * Expand -g option help to include example usage of manifest groups Change Benefits: * Allow a more intuitive and expressive manifest groups specification: * "default" instead of "all,-notdefault" * "default,foo" instead of "all,-notdefault,foo" * "default,-foo" instead of "all,-notdefault,-foo" * "foo,-default" which has no equivalent * Default manifest groups behavior can be restored by the command 'repo init -g default'. This is significantly more intuitive than the current equivalent command 'repo init -g all,-notdefault'. Change-Id: I6d0673791d64a650110a917c248bcebb23b279d3
* Fix `repo manifest` support of remote aliases.Brian Harring2013-04-031-2/+0
| | | | | | | | | Long story short, w/out this modification the manifest dump points at the alias, rather than the actual remote for the project. This breaks sync'ing for scenarios where the alias doesn't have the same repos available as the remote, plus just plain is wrong. Change-Id: I7150e449341ed8655d398956a095261978d95870
* Reload the correct manifest during sync.Tim Kilbourn2013-03-081-2/+9
| | | | | | | Fix for issue #134 https://code.google.com/p/git-repo/issues/detail?id=134 Change-Id: I94c2dea5dd63917e3f9c90cbd628921d7d61b12a
* Add `repoc` to the .gitignore fileChirayu Desai2013-03-081-0/+1
| | | | | | | | | This is currently the only generated file not present in the .gitignore Apparently it comes from the usage of the "imp" module in main.py Change-Id: I685dc252d0c822818434a8e5f493f77b63a66f03 Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* Merge "Add manifest groups to the output of `info`"David Pursehouse2013-03-081-1/+7
|\
| * Add manifest groups to the output of `info`Conley Owens2013-03-071-1/+7
| | | | | | | | | | | | | | | | List the user's manifest groups when running `repo info`. These groups are passed to `repo init` using the -g/--groups flag. Change-Id: Ie8a4ed74a35b8b90df3b1ee198fe725b1cd68ae7
* | Merge "Fix: Missing spaces in printed messages"David Pursehouse2013-03-065-7/+7
|\ \
| * | Fix: Missing spaces in printed messagesDavid Pursehouse2013-03-055-7/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several messages are printed with the `print` method and the message is split across two lines, i.e.: print('This is a message split' 'across two source code lines') Which causes the message to be printed as: This is a message splitacross two source code lines Add a space at the end of the first line before the line break: print('This is a message split ' 'across two source code lines' Also correct a minor spelling mistake. Change-Id: Ib98d93fcfb98d78f48025fcc428b6661380cff79
* | Merge "Fix: local manifest deprecation warning appears more than once"David Pursehouse2013-03-061-3/+6
|\ \ | |/ |/|
| * Fix: local manifest deprecation warning appears more than onceDavid Pursehouse2013-02-171-3/+6
| | | | | | | | | | | | | | | | | | When running repo sync, the local_manifest.xml deprecation warning is shown twice. Add a flag to ensure that it is only displayed once. Change-Id: Icfa2b0b6249c037c29771f9860252e6eda3ae651
* | upload: support --re and --cc options over HTTPv1.12.2Shawn Pearce2013-02-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP can't use the older style of passing options as part of the git receive-pack command line. Use the new style as defined by https://gerrit-review.googlesource.com/42652 when connecting over HTTP. If the Gerrit server is too old to understand the % option syntax used here one of two outcomes is possible: - If no topic name was sent the server will fail with an error message. This happens because the user tried to do an upload to "refs/for/master%r=alice", and the branch does not exist. The user can delete the options and retry the upload. - If a topic was set the options will be read as part of the topic string and shown on the change page in the topic field. Either outcome is slightly better than the current behavior of just dropping the data on the floor and forgetting whatever the user tried to supply. Change-Id: Ib2df62679e5bf3ee93d6b18c12ab6474f96d9106
* | Add --no-tags option to prevent fetching of tagsMitchel Humpherys2013-02-272-7/+19
| | | | | | | | | | | | | | Add an option to pass `--no-tags' to `git fetch'. Change-Id: I4158cc369773e08e55a167091c38ca304a197587 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | Fix crash in repo info when `%` is used in commit messagesOlof Johansson2013-02-261-1/+1
| | | | | | | | | | | | | | Fix for issue #131 http://code.google.com/p/git-repo/issues/detail?id=131 Change-Id: I078533ab5f3a83154c4ad6aa97a5525fc5139d20
* | Add nofmt_printer to color.pyOlof Johansson2013-02-261-0/+18
|/ | | | | | | | | | | | | The current printer always expands on the arguments which is a problem for strings containing %. Instead of forcing manual string expansion before printing allow for a no format printer option which simply accepts and prints the string. Part of fix for issue #131: http://code.google.com/p/git-repo/issues/detail?id=131 Change-Id: I08ef94b9c4ddab58ac12d2bd32ebd2c413e4f83b
* Exit with fatal error if local manifest file cannot be parsedDavid Pursehouse2013-02-171-5/+2
| | | | | | | | | | | | | If the .repo/local_manifests folder includes a local manifest file that cannot be parsed, the current behaviour is to catch the parse exception, print a warning, and continue to process remaining files. This can cause any errors to go unnoticed. Remove the exception handling, so that the exception is instead caught in main._Main, and repo exits with a fatal error. Change-Id: I75a70b7b850d2eb3e4ac99d435a4568ff598b7f4
* Show full path of `local_manifests` folder in deprecation warningDavid Pursehouse2013-02-171-2/+2
| | | | | | | | | | | | When a local_manifest.xml file is present, a deprecation warning is printed telling the user to put local manifest files in the `local_manifests` directory. Include the full path to the `local_manifests` directory in the warning, to reduce confusion about where the directory should be located. Also enclose the directory name in backticks. Change-Id: I85710cfbd6e77fb2fa6b7b0ce66d77693ccd649f
* Merge "Protect line endings in shell scripts"David Pursehouse2013-02-141-0/+4
|\
| * Protect line endings in shell scriptsMats Bengtsson2013-02-111-0/+4
| | | | | | | | | | | | | | Add a .gitattributes file to prevent /bin/sh scripts from getting clobbered by git config core.autocrlf=true setting. Change-Id: I3dfc992a9c275fceae64c9719168d81e60d911bd
* | Update the commit-msg hook to the version from Gerrit 2.5.2David Pursehouse2013-02-131-1/+3
| | | | | | | | Change-Id: I00760fe55a0e1b61375a378c05f263e7bc857ca0
* | Add missing sys module when referencing stderrConley Owens2013-02-121-2/+2
| | | | | | | | | | | | | | `repo cherry-pick` was broken because we were referencing stderr instead of sys.stderr. This should fix it. Change-Id: I67f25c3a0790d029edc65732c319df7c684546c8
* | Merge "Don't exit with error on HTTP 403 when downloading clone bundle"v1.12.1David Pursehouse2013-02-041-1/+1
|\ \
| * | Don't exit with error on HTTP 403 when downloading clone bundleDavid Pursehouse2013-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If the server returns HTTP 403 (forbidden) when attempting to download clone bundle files, ignore it and continue, rather than exiting with a fatal error. Change-Id: Icf78cba0332b51b0e7b622f7c7924369b551b6f6
* | | Fix: GitError when using repo info -dOlof Johansson2013-01-291-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a workspace is initialised with: repo init -u git://path/to/manifest -b manifest-branch and the default.xml specifies the default revision as `other-branch`, running `repo info -d` results in a GitError: fatal: bad revision 'refs/remotes/m/other-branch..' The repo info command uses the default revision to build the symlink to the remote revision which is passed to the `git rev-list` command. This is incorrect; the manifest's branch name should be used. Change-Id: Ibae5b91869848276785facfaef433e38d49fd726
* | Add missing manifest format documentationDavid Pursehouse2013-01-291-0/+20
| | | | | | | | | | | | | | Documentation of the "sync-j", "sync-c", "sync-s" and "upstream" attributes is missing/incomplete. Add it. Change-Id: I74977f819f603c520ef3818f85c3b51399cd2b94
* | 'repo status --orphans' shows non-repo filesWill Richey2013-01-291-0/+72
| | | | | | | | | | | | | | | | 'repo status --orphans' searches for non-repo objects (not within a project), which is particularly helpful before removing a working tree. Change-Id: I2239c12e6bc0447b0ad71129551cb50fa671961c
* | Fix: missing space in information message after repo initDavid Pursehouse2013-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | In the information message displayed after running repo init, there is a missing space: If this is not the directory in which you want to initializerepo Add a space. Change-Id: I20467673ba7481cfe782ba58ff6ed2f7ce9824a5
* | Better error message when using --mirror in existing workspaceDavid Pursehouse2013-01-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If repo init is run with the --mirror option, repo checks if there is already a workspace initialized in the current location, and if so, exits with an error message: --mirror not supported on existing client This error can cause confusion; the users do not understand what is wrong and what they need to do to fix it. Change the error message to make it a bit clearer. Change-Id: Ifd06ef64fd264bd1117e4184c49afe0345b75d8c
* | Fix: missing spaces in info command outputDavid Pursehouse2013-01-291-3/+3
| | | | | | | | | | | | Text should be joined with " " rather than "" in the output. Change-Id: I6c5dddc15743e98c3b43702cb5d3ec32f81c3221
* | Merge "should use os.path.lexist instead of os.path.exist"Shawn Pearce2013-01-281-3/+3
|\ \
| * | should use os.path.lexist instead of os.path.existSebastian Frias2012-11-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic of the program requires a check on the existence of the link itself See repo issue #125 : https://code.google.com/p/git-repo/issues/detail?id=125 Change-Id: Ia7300d22d6d656259f47c539febf1597f0c35538
* | | Merge "Check for a cookie file when fetching clone.bundle."Conley Owens2013-01-171-0/+3
|\ \ \
| * | | Check for a cookie file when fetching clone.bundle.Torne (Richard Coles)2013-01-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user's git config specifies a cookie file for HTTP, use it when fetching clone.bundle, as it may contain the required login credentials to get access (e.g. when used with Compute Engine service accounts). Change-Id: I12ee9e38694822ef1de4ed62138c3876c43f431b
* | | | If parsing the manifests fails, reset the XmlManifest objectJoe Onorato2013-01-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | so that if it's called again, we see the correct errors. Change-Id: I909488feeac04aecfc92a9b5d6fb17827ef2f213
* | | | Merge "Pass full path of the XML in local_manifests to the parser"Conley Owens2013-01-171-1/+2
|\ \ \ \
| * | | | Pass full path of the XML in local_manifests to the parserTobias Droste2013-01-071-1/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following python error message if the current working directory is not .repo/local_manifests: IOError: [Errno 2] No such file or directory: 'local_manifest.xml' Signed-off-by: Tobias Droste <tdroste87@gmail.com> CC: David Pursehouse <david.pursehouse@sonymobile.com> Change-Id: I4668dc04219b6233c7ff6ca3b4138bec9ee3529f
* | | | Merge "Make -notdefault a default manifest group"Conley Owens2013-01-141-3/+2
|\ \ \ \ | |/ / / |/| | |
| * | | Make -notdefault a default manifest groupMatt Gumbel2012-12-211-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to render manifest with SHAs, projects in group notdefault caused the following crash: Traceback (most recent call last): File ".repo/repo/main.py", line 385, in <module> _Main(sys.argv[1:]) File ".repo/repo/main.py", line 365, in _Main result = repo._Run(argv) or 0 File ".repo/repo/main.py", line 137, in _Run result = cmd.Execute(copts, cargs) File ".repo/repo/subcmds/manifest.py", line 129, in Execute self._Output(opt, manifest) File ".repo/repo/subcmds/manifest.py", line 79, in _Output peg_rev = opt.peg_rev) File ".repo/repo/manifest_xml.py", line 199, in Save p.work_git.rev_parse(HEAD + '^0')) File ".repo/repo/project.py", line 2035, in runner capture_stderr = True) File ".repo/repo/git_command.py", line 215, in __init__ raise GitError('%s: %s' % (command[1], e)) error.GitError: rev-parse: [Errno 2] No such file or directory: 'prebuilts/eclipse-build-deps' This patch resolves the issue by making sure that -notdefault is always used as a default manifest group so that notdefault projects are not rendered out by the manifest subcmd. Change-Id: I4a8bd18ea7600309f39ceff1b1ab6e1ff3adf21d Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>
* | | | Support resolving relative fetch URLs on persistent-https://v1.12.0Shawn Pearce2013-01-021-1/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Some versions of Python will only attempt to resolve a relative URL if they understand the URL scheme. Convert persistent-http:// and persistent-https:// schemes to the more typical http:// and https:// versions for the resolve call. Change-Id: I99072d5a69be8cfaa429a3ab177ba644d928ffba
* | | Allow sync to run even when the manifest is broken.Torne (Richard Coles)2012-12-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the current manifest is broken then "repo sync" fails because it can't retrieve the default value for --jobs. Use 1 in this case, in order that you can "repo sync" to get a fixed manifest (assuming someone fixed it upstream). Change-Id: I4262abb59311f1e851ca2a663438a7e9f796b9f6