- 28 Aug, 2015 1 commit
-
-
Simran Basi authored
Add repo start support for GITC checkouts. If the user is in the GITC FS view, they can now run repo start to check out the sources and create a new working branch. When "repo start" is called on a GITC project, the revision tag is set to an empty string and saved in a new tag: old-revision. This tells the GITC filesystem to display the local copy of the sources when being viewed. The local copy is created by pulling the project sources and the new branch is created based off the original project revision. Updated main.py to setup each command's gitc_manifest when appropriate. Updated repo sync's logic to sync opened projects and updating the GITC manifest file for the rest. Change-Id: I7e4809d1c4fc43c69b26f2f1bebe45aab0cae628
-
- 25 Aug, 2015 2 commits
-
-
David Pursehouse authored
If a hook file has been modified locally, it will not be replaced. Improve the message to make this clearer. Also change it from an error to a warning. Change-Id: I62c635390f24d2868db17717c247861b0381c99f
-
David Pursehouse authored
Use the _error method instead of directly calling `print`. Also add a new _warn convenience method. Change-Id: Ia332c14ef8d9d1fe2df128dbf36b5521802ccdf1
-
- 20 Aug, 2015 6 commits
-
-
Dan Willemsen authored
Change-Id: I434a259f43ca9808e88051ac8ba865c519a24702
-
David Pursehouse authored
Don't emit a message when the netrc file doesn't exist or couldn't be opened. Instead of trying to unpack the result of info.authenticators() and catching the resulting TypeError when it's None, first store it to a local and only unpack it if it has a value. Also remove an unused import. Change-Id: I5c404d91e48c261c1ab850c3e5f040c4f4c235cb
-
David Pursehouse authored
Also add missing newline at the end of the file. Change-Id: I206e6c4b033d223eb0ff5824ecbf6fd98c39c918
-
David Pursehouse authored
Change-Id: Ibbac6e111833c8f5d93cb6cb4a10f8f2c4fd8e11
-
David Pursehouse authored
Change-Id: I569819675a99ff6c01fb57b23fed033c39d14d1f
-
David Pursehouse authored
shutils is not used. Remove it. sys is used, but not imported. Import it. Change-Id: I4ee582f33bbd451601097ef2f20bee23b54764cd
-
- 19 Aug, 2015 6 commits
-
-
Dan Willemsen authored
-
Dan Willemsen authored
-
Dan Willemsen authored
-
Dan Willemsen authored
-
Dan Willemsen authored
Use the same cookies and proxy that git traffic goes through for persistent-http[s] to support authentication for smart-sync. Change-Id: I20f4a281c259053a5a4fdbc48b1bca48e781c692
-
David Pursehouse authored
Passing the force_sync variable into the string formatting results in the message: "Retrying clone after deleting None" or "Retrying clone after deleting True". Pass the name of the git directory instead. Also, move the print inside the if-block so it's only displayed when the retry is actually going to be attempted. Change-Id: I76d9ecc176cecee4ad512d13e9d1f6bd36aacbbb
-
- 18 Aug, 2015 1 commit
-
-
Simran Basi authored
Add repo sync support for GITC checkouts. If the user is in the GITC client directory they can still pull the sources as normal if they pass in the --force-gitc argument. Otherwise the user should call repo sync in the GITC view to update the user's remote view. (This works because .repo in the GITC view will link to .repo in the client config directory.) Part of the support for this change is the refactoring of GITC related code into gitc_utils.py. Change-Id: I2636aaa50b450b6f091309db8dd0e8f4dbdad579
-
- 17 Aug, 2015 1 commit
-
-
Dan Willemsen authored
This argument wasn't being copied, which caused syncs from generated manifests to pull down too much of the git history. Change-Id: I269bab788d4557267c081628b3f8c6aec7744e81
-
- 12 Aug, 2015 2 commits
-
-
Dan Willemsen authored
-
Simran Basi authored
Adds the new gitc-init command to set up a GITC client. Gitc-init sets up the client directory and calls repo init within it. Once the repo is initialized, then generates a GITC manifest file by using git ls-remote on each project and retrieving the HEAD SHA to use as the revision attribute. Gitc-init inherits from and has all the options as repo init. Change-Id: Icd7e47e90eab752a77de7c80ebc98cfe16bf6de3
-
- 05 Aug, 2015 2 commits
-
-
Dan Willemsen authored
-
David Pursehouse authored
-
- 04 Aug, 2015 1 commit
-
-
Simon Ruggier authored
For projects that have been cloned outside of the repo command (or cloned a long time ago), commit abaa7f31 introduced an error message to invite the user to use --force-sync. However, due to the risk of data loss, it's useful to know which project's git directory is being replaced before deciding whether or not to provide --force-sync. This change updates the exception's associated value to include the project's relative path and explain to the user how they can resolve the issue. A previous version of this commit used the project name. However, for projects that have multiple work trees, the name can be ambiguous, while the path clearly identifies which git directory will be replaced. Change-Id: If717e66fda4d19accc0a8e889a91f4cd4ff14dff
-
- 03 Aug, 2015 1 commit
-
-
Dan Willemsen authored
The existing code here makes sure that switching clone-depth from on to off actually causes the history to be fully restored. Unfortunately, it does this by fetching the full history every time the fetch spec changes. Switching between two clone-depth="1" branches will fetch far more than the top commit. Instead, when not using clone-depth, pass --depth=2147483647 to git fetch so that it ensures that we have the entire history. That is slightly less efficient, so limit it to only when there are shallow objects in the project by checking for the existance of the 'shallow' file. Change-Id: Iee0cfc9c6992c208344b1d9123769992412db67b
-
- 31 Jul, 2015 5 commits
-
-
Simon Ruggier authored
Change-Id: If4227d02005fddea82d9e698a373222100d8f710
-
Dan Willemsen authored
-
Conley Owens authored
-
Dan Sandler authored
Previously repo would only print the failing project path if Sync_NetworkHalf returned false/empty, but if it threw an exception the print() was never called. Change-Id: I58c41de43930df5e34b21561c205e062a72e290f
-
Dan Willemsen authored
This fixes these errors: ... File ".repo/repo/project.py", line 2371, in _ReferenceGitDir os.symlink(os.path.relpath(src, os.path.dirname(dst)), dst) OSError: [Errno 17] File exists Which was happening for checkouts that were created before v1.12.8, when project-objects was created. Nothing had yet been forcing these checkouts to use project-objects, until the recent verification changes. In this OSError case, we already created the symlink, so src == dst, and the directory did not exist. This caused us to run os.makedirs the os.symlink on the same file. dst really should be the file in gitdir, not the target of that symlink if it exists. So just use realpath for the dotgit portion of the path. Change-Id: Iff5396a2093de91029c42cf38aa57131fd22981c
-
- 30 Jul, 2015 1 commit
-
-
Graham Christensen authored
Enable operating against groups of repositories. As it stands, it isn't compatible with `-r/--regex`. `repo forall -g groupname -c pwd` will run `pwd` for all projects in groupname. `repo forall -g thisgroup,-butnotthisone -c pwd` will run `pwd` for all projects in `thisgroup` but not `butnotthisone`. `repo list -g groupname -n` will list all the names of repos in `groupname`. Change-Id: Ia75c50ce52541d1c8cea2874b20a4db2e0e54960
-
- 29 Jul, 2015 3 commits
-
-
Kevin Degi authored
In some cases, a user may wish to continue with a sync even though it would require overwriting an existing git directory. This behavior is not safe as a default because it could result in the loss of some user data, but as an optional flag it allows the user more flexibility. To support this, add a --force-sync flag to the sync command that will attempt to overwrite the existing git dir if it is specified and the existing git dir points to the wrong obj dir. Change-Id: Ieddda8ad54e264a1eb4a9d54881dd6ebc8a03833
-
Conley Owens authored
-
David Pursehouse authored
-
- 27 Jul, 2015 2 commits
-
-
Cassidy Burden authored
repo info will crash when using a manifest with no default element despite default being an optional element. Output nothing for "Manifest Branch" if no default element exists (or if no default revision exists). Change-Id: I7ebffa2408863837ba980f0ab6e593134400aea9
-
Kevin Degi authored
If _InitGitDir fails, it leaves any progress it had made on the file system. This can cause subsequent calls to repo sync to behave differently. This is especially evident when _CheckDirReference() fails, since it will not be invoked when sync is retried because both the source and destination directories already exist. To address this, have _InitGitDir() clean up any directories it has created if it catches an exception. Also behave the same way for _InitWorkTree(). Change-Id: Ic16bb3feea649e115b59bd44be294e89e3692aeb
-
- 20 Jul, 2015 1 commit
-
-
David Pursehouse authored
For some users it is not desirable to remove refs that don't exist on the remote server when syncing a mirror repo. This reverts commit b4d43b9f. Change-Id: Ie849b66682138ef88da6cd1a5fbb27e993197dd7
-
- 15 Jul, 2015 3 commits
-
-
Conley Owens authored
-
Conley Owens authored
-
Kevin Degi authored
The fetch logic for the case where depth is set and revision is a SHA1 has several failure modes that are not handled well by the current logic. 1) 'git fetch <SHA1>' requires git version >= 1.8.3 2) 'git fetch <SHA1>' can be prevented by a configuration option on the server. 3) 'git fetch --depth=<N> <refspec>' can fail to contain a SHA1 specified by the manifest. Each of these cases cause infinite recursion when _RemoteFetch() tries to call itself with current_branch_only=False because current_branch_only is set to True when depth != None. To try to prevent the infinite recursion, we set self.clone_depth to None before the first retry of _RemoteFetch(). This will allow the Fetch to eventually succeed in the case where clone-depth is specified in the manifest. A user specified depth from the init command will still recurse infinitely. In addition, never try to fetch a SHA1 directly if the git version being used is not at least 1.8.3. Change-Id: I802fc17878c0929cfd63fff611633c1d3b54ecd3
-
- 13 Jul, 2015 1 commit
-
-
Conley Owens authored
-
- 11 Jul, 2015 1 commit
-
-
David Pursehouse authored
* changes: forall: use smart sync override manifest if it exists sync: Remove smart sync override manifest when not in smart sync mode forall: Don't try to get lrev of projects in mirror workspace sync: Improve error message when writing smart sync manifest fails
-