summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Workaround shutil.rmtree limitation on WindowsRenaud Paquay2017-05-295-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, shutil.rmtree raises an exception when deleting readonly files on Windows. Replace all shutil.rmtree with platform_utils.rmtree, which adds an error handler to make files read-write when they can't be deleted. Change-Id: I9cfea9a7b3703fb16a82cf69331540c2c179ed53
| * | | Add support for creating symbolic links on WindowsRenaud Paquay2017-05-294-4/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all calls to os.symlink with platform_utils.symlink. The Windows implementation calls into the CreateSymbolicLinkW Win32 API, as os.symlink is not supported. Separate the Win32 API definitions into a separate module platform_utils_win32 for clarity. Change-Id: I0714c598664c2df93383734e609d948692c17ec5
| * | | Make "git command" and "forall" work on WindowsRenaud Paquay2017-05-293-41/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python on Windows does not support non blocking file operations. To workaround this issue, we instead use Threads and a Queue to simulate non-blocking calls. This is happens only when running with the native Windows version of Python, meaning Linux and Cygwin are not affected by this change. Change-Id: I4ce23827b096c5138f67a85c721f58a12279bb6f
* | | | When starting a branch, do not use a tag or change value for branch.mergeZac Livingston2017-08-253-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When starting a branch, branch.merge is set to project revision unless the revision is a SHA1. In that case, branch.merge is set to dest_branch if defined or manifest default revision otherwise. This special handling allows repo upload to work when the project revision is a SHA1. Extend the special handling to also happen when the project revision is a tag value or a change value so that repo upload will work in those case as well. Change-Id: Iff81ece40e770cd02535e80dcb023564d42dcf47
* | | | Print a message when fetching is skipped for an immutable refZac Livingston2017-08-251-4/+6
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | The output indicates that fetching happens even when it is skipped. To avoid confusion, print a message when fetching is skipped for an immutable ref so that the user knows when and why a fetch is skipped. Change-Id: Id6e4812cebc5e57d379feb76a9d034af0b93043b
* | | Revert "Migrate git-repo to create private changes rather than drafts"Jonathan Nieder2017-08-082-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d88f53e2b9634b9645f80b2d8e653beac24711fe. I merged it too hastily without paying enough attention to compatibility with released Gerrit versions. Change-Id: I4028d4737df1255f11e217da183a19a010597d5b
* | | Migrate git-repo to create private changes rather than draftsChangcheng Xiao2017-08-072-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | Considering that some users might expect changes created with '-d' option are not public. Private changes may be a better choice here than work-in-progress changes. Change-Id: I46a8fb9ae38beb41cf96d6abe82bea6db2439669
* | | Add options for git-repo to support private and wip changesChangcheng Xiao2017-08-072-1/+23
| | | | | | | | | | | | | | | | | | | | | This change adds options for git-repo tool to support private changes and work-in-progress changes. Change-Id: I343491f5949f06f1580d53f9cc0dee2dca09130f
* | | Merge "download: try to choose . as default project if none"David Pursehouse2017-08-021-2/+3
|\ \ \
| * | | download: try to choose . as default project if noneNicolas Cornu2017-07-121-2/+3
| | | | | | | | | | | | | | | | Change-Id: I28b5e3be5f3c9a4c077af87d6a3e0cc3b96a1b9d
* | | | Merge "Always print percentage when syncing quietly"David Pursehouse2017-08-022-3/+6
|\ \ \ \
| * | | | Always print percentage when syncing quietlyTim Schumacher2017-07-152-3/+6
| |/ / / | | | | | | | | | | | | Change-Id: I574396e63520781067ed1e991c41caf7640e5731
* / / / Fix "list comprehension redefines 'x'" warnings from pyflakesDavid Pursehouse2017-07-103-6/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | $ git ls-files | grep py$ | xargs pyflakes subcmds/stage.py:101: list comprehension redefines 'p' from line 63 subcmds/sync.py:784: list comprehension redefines 'p' from line 664 subcmds/upload.py:467: list comprehension redefines 'avail' from line 454 Change-Id: Ia65d1a72ed185ab3357e1a91ed4450c719e75a7c
* | | init: add missing submodule argMartin Kelly2017-07-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The submodule argument to Sync_LocalHalf was missing in MetaBranchSwitch, causing submodules not to get synced when the -b/--manifest-branch argument to init is used. Change-Id: Ie86d271abac2020725770be36ead83be3326e64b Signed-off-by: Martin Kelly <mkelly@xevo.com>
* | | Tell the user if it will upload a draftNicolas Cornu2017-07-101-1/+2
| | | | | | | | | | | | Change-Id: Ie004ec9d61603f3f618c47597947b82c59f2839c
* | | Merge "Add a newline after "Fetching projects" progress output"David Pursehouse2017-06-282-4/+7
|\ \ \
| * | | Add a newline after "Fetching projects" progress outputTim Schumacher2017-06-132-4/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Output before change: Fetching project platform/packages/providers/UserDictionaryProvider Fetching projects: 66% (773/1171) Fetching project platform/external/regex-re2 Fetching project device/generic/mini-emulator-x86_64 Output after change: Fetching project platform/packages/providers/UserDictionaryProvider Fetching projects: 66% (773/1171) Fetching project platform/external/regex-re2 Fetching project device/generic/mini-emulator-x86_64 Change-Id: I4da84da58316c69294e4da2792f83885dc942701
* / / sync: Continue job if some fetchs failed but force-broken is setNicolas Cornu2017-06-161-1/+1
|/ / | | | | | | | | | | | | With --force-broken it continue to fetch other projects but nothing is added in directory because it abort some lines later. Change-Id: I32c4a4619b3028893dc4f98e8d4e5bc5c09adb27
* | Ensure repo waits for child process to terminateRenaud Paquay2017-05-291-1/+5
| | | | | | | | | | | | | | | | | | | | See http://stackoverflow.com/questions/7004687/os-exec-on-windows: execv on Windows does not behave as on Linux, i.e. a new process is spawned and the parent process terminates right away, which makes the shell prompt come back too soon. Change-Id: I1f8d23208765988629f081e9b949c67cf71c08ae
* | Merge "init: allow relative path on --reference argument"David Pursehouse2017-05-291-1/+1
|\ \
| * | init: allow relative path on --reference argumentYOUNG HO CHA2017-05-281-1/+1
| | | | | | | | | | | | | | | Change-Id: I41d6be6bc035fdddb5a27c072994439986d58d58 Signed-off-by: YOUNG HO CHA <ganadist@gmail.com>
* | | sync: Add support to dump a JSON event log of all sync events.David Riley2017-05-296-13/+236
| | | | | | | | | | | | Change-Id: Id4852968ac1b2bf0093007cf2e5ca951ddab8b3b
* | | Fix misplaced file separator string.replace callRenaud Paquay2017-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Project names are stored as path using the '/' file separator, and stored in a dictionary as keys. Change-Id: Ide40dfe840958ac0d46caae5f77f1a49d71c9d90
* | | Use OS file separatorRenaud Paquay2017-05-281-1/+1
| | | | | | | | | | | | Change-Id: I46b15bc1c1b4f2300a6fd98fe16c755da4910e7a
* | | Merge "pre-auto-gc: Add support for Windows"David Pursehouse2017-05-281-3/+13
|\ \ \ | |/ / |/| |
| * | pre-auto-gc: Add support for WindowsSebastian Schuberth2017-05-031-3/+13
| | | | | | | | | | | | | | | | | | | | | Previously, this would always have exited with 1 on Windows, causing "git gc --auto" to abort. Fix this by adding support for Windows. Change-Id: Ie519b366a11b6b18b2d465e892e738de3f4bbc99
* | | Set result if sys.exit() is called by subcommand.David Riley2017-05-271-0/+4
| | | | | | | | | | | | | | | | | | Allows the finally branch to make sure of the return code. Change-Id: I7a796da5b60269cbd71aad953f1b9bb762b8eef8
* | | Adding include element into the top-level elementJiri tyr2017-05-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation of the XML file format contains DTD which contains definition of all allowed elements and attributes. The "include" element is defined but it's not referenced from the top-level "manifest" element. This patch is adding the "include" element into the list of elements of the top-level "manifest" element. Change-Id: I33beb8ef2846bbf42ffd42e6ae6888828566d604
* | | Merge "Add option REPO_IGNORE_SSH_INFO to ignore ssh_info"David Pursehouse2017-05-271-0/+3
|\ \ \
| * | | Add option REPO_IGNORE_SSH_INFO to ignore ssh_infoTimo Lotterbach2017-05-261-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required for setups, where Gerrit access using ssh is only available for some networks. For network without ssh access, repo will get ssh_info from Gerrit and use ssh for communications - which will fail. To support this setup we need to have an option to ignore the ssh_info provided by Gerrit and use http(s). Using git insteadOf as alternative results in the inability to add reviewers using "repo upload --re=...", since the syntax of adding reviewers differs for ssh and https. repo is assuming an ssh connection and uses "git push --receive-pack=...", which will fail since git silently uses https for push operation. repo must be aware that https is used so it uses "git push remote ...:refs/for/...%r=..." for upload. Change-Id: Idd83baef0fb26ffcc9ac65e204b68d323ce177a1
* | | Merge "init: add --submodules to sync manifest submodules"David Pursehouse2017-05-275-12/+59
|\ \ \
| * | | init: add --submodules to sync manifest submodulesMartin Kelly2017-05-235-12/+59
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | repo sync can sync submodules via the --fetch-submodules option. However, if the manifest repo has submodules, those will not be synced. Having submodules in the manifest repo -- while not commonly done -- can be useful for inheriting a manifest from another project using <include> and layering changes on top of it. In this way, you can avoid having to deal with merge conflicts between your own manifests and the other project's manifests (for example, if you're managing an Android fork). Add a --submodule option to init that automatically syncs the submodules in the manifest repo whenever the manifest repo changes. Change-Id: I45d34f04517774c1462d7f233f482d1d81a332a8 Signed-off-by: Martin Kelly <mkelly@xevo.com>
* | | gitc_delete: Remove unused importsDavid Pursehouse2017-05-261-2/+0
| | | | | | | | | | | | Change-Id: I672189ba99e18dca3956e2396c921d1ef0ca2ddd
* | | abandon: fix usage of undefined variableDavid Pursehouse2017-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by pyflakes: subcmds/abandon.py:84: undefined name 'p' The name of the variable should be 'proj'. Change-Id: Ic09eb92e8db6b510e99efce010bd0bb094d7cbfe
* | | Update .mailmapDavid Pursehouse2017-05-261-0/+1
| | | | | | | | | | | | Change-Id: Icabc7fb2161b661c2df9290a1ca6f75b9b1b8e1b
* | | project.py: fix performance issue with --reference when the mirrored ↵heping2017-04-121-4/+6
|/ / | | | | | | | | | | repository has many refs Change-Id: Id0183903597f872eee80ca32a8050125b187a3d4
* | sync.py: report the remote URL on fatal git remote errorsMarc Herbert2017-04-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | repo can be configured to download from any number of remote git repos. However when one fails repo doesn't report which one. Example: Fatal: remote error: Daily ls-remote rate limit exceeded for IP xx.xx.xx.xx TEST=repo init -q -u https://chromium.googlesource.com/chromiumos/manifest.git # Apply patch in ./.repo/repo/ # Simulate a git remote error: sed -i -e 's#chromiumos/docs#chromiumos/XXdocs#' .repo/manifests/full.xml repo sync --quiet --force-sync docs # error message now shows the remote URL Optional test tip: reduce the time.sleep(random(...)) in ./.repo/repo/project.py Change-Id: I4509383b6a43a8e66064778e8ed612d8a735c8b6
* | manifest-format: fix EMPTY keyword usageMike Frysinger2016-12-281-10/+10
| | | | | | | | | | | | | | | | The keyword EMPTY doesn't use parens. BUG=git-repo:140 Change-Id: I7cd28a09c401520a72e5c244a77d9d70385f1b61
* | Merge "init: Add no-tags and current branch options"Jonathan Nieder2016-12-092-2/+16
|\ \
| * | init: Add no-tags and current branch optionsNaseer Ahmed2016-12-012-2/+16
| | | | | | | | | | | | | | | | | | This avoids fetching tags and branches for huge manifests Change-Id: I19c9724d75364440b881b297d42b906f541f73ff
* | | Merge "Fix removing broken symlink in reference dir"David Pursehouse2016-12-061-7/+8
|\ \ \ | |/ / |/| |
| * | Fix removing broken symlink in reference dirCheuk Leung2016-06-291-7/+8
| | | | | | | | | | | | | | | | | | | | | Re-ordered to first create the symlink before checking the source file and remove the destination if the source does not exists. Change-Id: Iae923ba2ef0ba5a8dc1b8e42d8cc3f3708f773af
* | | Merge "Add a check and more output to protect against invalid REPO_URLs"David Pursehouse2016-10-291-1/+8
|\ \ \
| * | | Add a check and more output to protect against invalid REPO_URLsSebastian Schuberth2016-10-281-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you don't know that the url to git-repo itself can be overridden via REPO_URL, it's hard to debug cases where REPO_URL is accidentally set to another repository, e.g. inside a Jenkins CI job. What makes is even harder is that the ".repo/repo" directory gets silently removed in such cases as verifications fails, which makes it impossible to look at the cloned files to understand the problem. To better protect against such an issue, warn if the cloned git-repo repository does not contain a top-level "repo" file, and state that the ".repo/repo" directory will be removed in case of a clone failure. Change-Id: I697b4999205a5967910c0237772ccaada01e74d4
* | | | Merge "Fix checkout error when depth passed to repo init and revision is a sha1"Dan Willemsen2016-10-281-21/+21
|\ \ \ \
| * | | | Fix checkout error when depth passed to repo init and revision is a sha1Aymen Bouaziz2016-10-281-21/+21
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if direct fetch of a sha1 is not supported by git server and depth option is used, we fallback on syncing the upstream branch by ignoring depth option. This fallback doesn't work in next 2 cases: (1) upstream attribute is not specified in manifest (2) depth option is passed to repo init command (not with clone-depth attribute in manifest) This commit do the following: - fixes (1) by updating condition used to apply fallback first we retry with depth set to None, then by syncing all branches - fixes (2) by passing depth as argument of _RemoteFetch() method thus, its value is not set again to depth value passed to repo init command when applying fallback Change-Id: Ifd6fffafc49ba229df624b0d7b64c83d47619d17
* | | | Merge "implement optional '--all' in the abandon command"David Pursehouse2016-10-281-21/+49
|\ \ \ \
| * | | | implement optional '--all' in the abandon commandKyunam.jo2016-10-171-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when you want to delete all local branches, you should be find all branches' name, and type them behind 'repo abandon' command. Usage: repo abandon --all [<project>...] Change-Id: I4d391f37fb9d89b8095488c585468eafc1a35f31
* | | | | Merge "_CheckDirReference: log actual error before suggesting --force-sync"Dan Willemsen2016-10-281-0/+1
|\ \ \ \ \
| * | | | | _CheckDirReference: log actual error before suggesting --force-syncMarc Herbert2016-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent backward incompatible change created confusion and loss of productivity and highlighted the very limited amount of information provided when repo sync fails; merely recommending to --force-sync and blow-up git repos without any hint as to why. The addition of this basic _error(...) call would have provided a clue and will in the future. BUG=Issue 232 TEST=simulate a breakage similar to the ones reported at https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-dev/2-0oCy_CX5s cd .repo/projects/src/third_party/libapps.git/ file info; rm info; ln -s wronglink info cd - repo sync src/third_party/libapps/ # error message now shows the failure Change-Id: Idd2f177a096f1ad686caa8c67cb361d594ccaa57