summaryrefslogtreecommitdiffstats
path: root/subcmds/init.py
Commit message (Collapse)AuthorAgeFilesLines
* Change project.revision to revisionExpr and revisionIdShawn O. Pearce2009-05-291-3/+3
| | | | | | | | | The revisionExpr field now holds an expression from the manifest, such as "refs/heads/master", while revisionId holds the current commit-ish SHA-1 of the revisionExpr. Currently that is only filled in if the manifest points directly to a SHA-1. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Refactor how projects parse remotes so it can be replacedShawn O. Pearce2009-05-291-1/+0
| | | | | | | | | We now feed Project a RemoteSpec, instead of the Remote directly from the XmlManifest. This way the RemoteSpec already has the full project URL, rather than just the base, permitting other types of manifests to produce the URL in their own style. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Improve the help text for 'repo init'Shawn O. Pearce2009-04-181-3/+14
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Clarify options that control the repo executable versionShawn O. Pearce2009-04-181-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Change repo sync to be more friendly when updating the treev1.6.6Shawn O. Pearce2009-04-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | We now try to sync all projects that can be done safely first, before we start rebasing user commits over the upstream. This has the nice effect of making the local tree as close to the upstream as possible before the user has to start resolving merge conflicts, as that extra information in other projects may aid in the conflict resolution. Informational output is buffered and delayed until calculation for all projects has been done, so that the user gets one concise list of notice messages, rather than it interrupting the progress meter. Fast-forward output is now prefixed with the project header, so the user can see which project that update is taking place in, and make some relation of the diffstat back to the project name. Rebase output is now prefixed with the project header, so that if the rebase fails, the user can see which project we were operating on and can try to address the failure themselves. Since rebase sits on a detached HEAD, we now look for an in-progress rebase during sync, so we can alert the user that the given project is in a state we cannot handle. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Make 'repo start' restartable upon failuresShawn O. Pearce2009-04-101-1/+3
| | | | | | | | | | | | | | | | | | | | If `repo start foo` fails due to uncommitted and unmergeable changes in a single project, we have switched half of the projects over to the new target branches, but didn't on the one that failed to move. This change improves the situation by doing three things differently: - We keep going when we encounter an error, so other projects that can successfully switch still switch. - We ignore projects whose current branch is already on the requested name; they are logically already setup. - We checkout the branch if it already exists, rather than trying to recreate the branch. Bug: REPO-22 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix repo re-init in a mirror to not promptShawn O. Pearce2009-03-191-2/+2
| | | | | | | | | On a mirror client we don't prompt for user.name,user.email as the data is only necessary if you will make new commits. On a re-init we were testing the command line option, not the existing IsMirror property from the manifest configuration file. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Allow repo init to restart if URL was initially invalidv1.6.3Shawn O. Pearce2009-03-171-1/+1
| | | | | | | This allows the user to run "repo init -u" again after an initial attempt failed due to an invalid URL. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Give a more friendly error in 'repo init' if manifest url is invalidShawn O. Pearce2009-03-171-1/+5
| | | | | | | | Instead of a stack trace ending in origin/master not existing we now tell the user the manifest url is invalid if 'git fetch' has failed out early. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Support "repo init -b foo && repo sync" to switch baselinesShawn O. Pearce2009-03-091-1/+2
| | | | | | | | We now correctly support re-initializing an existing client to point to a different branch of the same manifest repository, effectively allowing the client to switch the baseline it is operating on. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't permit "repo init --mirror" in an existing clientShawn O. Pearce2009-03-091-2/+7
| | | | | | | | | | Simply setting repo.mirror true doesn't make a client into a mirror. The on-disk layout is completely wrong for a mirror repository, and until we fix our layout for a non-mirror client to more closely resemble the upstream we can't do anything to easily turn on or turn off the mirror status flag. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't permit users to run repo status in a mirror clientShawn O. Pearce2009-03-031-2/+2
| | | | | | | | | | | | | | | | If a client was created with "repo init --mirror" then there are no working directories present, and no files checked out. Using a command like "repo status" in this context makes no sense, and actually throws back a Pytyon traceback at the console when the underlying commands fail out. We now tag commands with the MirrorSafeCommand type if they are able to be executed within a mirror directory safely. Using a command in a mirror which lacks this base class results in a useful error letting you know the command isn't supported. Bug: REPO-14 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add 'repo init --mirror' to download a complete forrestv1.1Shawn O. Pearce2008-11-051-2/+14
| | | | | | | | | | | | | | | The mirror option downloads a complete forrest (as described by the manifest) and creates a replica of the remote repositories rather than a client working directory. This permits other clients to sync off the mirror site. A mirror can be positioned in a "DMZ", where the mirror executes "repo sync" to obtain changes from the external upstream and clients inside the protected zone operate off the mirror only, and therefore do not require direct git:// access to the external upstream repositories. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Initial Contributionv1.0The Android Open Source Project2008-10-211-0/+193