summaryrefslogtreecommitdiffstats
path: root/project.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix switching manifest branches using repo init -bFlorian Vallee2012-06-131-0/+16
| | | | | | | | | | | | | | | | See repo issue #46 : https://code.google.com/p/git-repo/issues/detail?id=46 When using repo init -b on an already existing repository, the next sync will try to rebase changes coming from the old manifest branch onto the new, leading in the best case scenario to conflicts and in the worst case scenario to an incorrect "mixed up" manifest. This patch fixes this by deleting the "default" branch in the local manifest repository when the -d init switch is used, thus forcing repo to perform a fresh checkout of the new manifest branch Change-Id: I379e4875ec5357d8614d1197b6afbe58f9606751
* Allow projects with groups=Nonev1.9.1Colin Cross2012-05-241-0/+2
| | | | | | | | Mirror manifest and repo projects are outside the manifest and have no groups. Allow project groups to be None for these projects. Change-Id: I3e1c4add894fe1c43aa4e77a1fc1558aa10dd191
* Fix initial sync broken by sync-c optionv1.9.0Shawn O. Pearce2012-05-241-1/+9
| | | | Change-Id: I308753da8944e6ce5c46e3bfee1bcd41d5b7e292
* repo download: add --ff-only optionPierre Tardy2012-05-241-1/+3
| | | | | | | | | | | | | | | | Allows to ff-only a gerrit patch This patch is necessary to automatically ensure that the patch will be correctly submitted on ff-only gerrit projects You can now use: repo download (--ff-only|-f) project changeid/patchnumber This is useful to automate verification of fast forward status of a patch in the context of build automation, and commit gating (e.g. buildbot) Change-Id: I403a667557a105411a633e62c8eec23d93724b43 Signed-off-by: Erwan Mahe <erwan.mahe@intel.com> Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
* repo download: add --revert optionErwan Mahe2012-05-241-0/+9
| | | | | | | | | | | | | | | | | BZ: 4779 Allows to revert a gerrit patch This patch is necessary for the on-demand creation of engineering builds using buildbot You can now use: repo download [--revert|-r project changeid/patchnumber This is useful to automate reverting of a patch in the context of build automation, and regression bisection Change-Id: I3985e80e4b2a230f83526191ea1379765a54bdcf Signed-off-by: Erwan Mahe <erwan.mahe@intel.com> Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
* repo download: add --cherry-pick optionPierre Tardy2012-05-241-0/+8
| | | | | | | | | | | | | | | | | | default option uses git checkout, and thus overwrite the previous checkouts. this is a problem for automated builds of several changesets in the same project for daily builds of pending submission You can now use: repo download [--cherry-pick|-c] project changeid/patchnumber This will parse the manifest, cd to the corresponding project download the changes to FETCH_HEAD and cherry-pick the result. This is useful to automate cherry-picking of a patch in the context of build automation, and commit gating (e.g. buildbot) Change-Id: Ib638afd87677f1be197afb7b0f73c70fb98909fe Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
* Add sync-c option to manifestAnatol Pomazau2012-04-231-1/+4
| | | | | | | | | | | | | | | | | There are use-cases when fetching all branch is impractical and we really need to fetch only one branch/tag. e.g. there is a large project with binaries and every update of a binary file is put to a separate branch. The whole project history might be too large to allow users fetch it. Add 'sync-c' option to 'project' and 'default' tags to make it possible to configure 'sync-c' behavior at per-project and per-manifest level. Note that currently there is no possibility to revert boolean flag from command line. If 'sync-c' is set in manifest then you cannot make full fetch by providing a repo tool argument. Change-Id: Ie36fe5737304930493740370239403986590f593
* Refine groups functionalityConley Owens2012-04-231-34/+14
| | | | | | | | | | | | | | | Every project is in group "default". "-default" does not remove it from this project. All group names specified in the manifest are positive names as opposed to a mix of negative and positive. Specified groups are resolved in order. If init is supplied with --groups="group1,-group2", the following describes the project selection when syncing: * all projects in "group1" will be added, and * all projects in "group2" will be removed. Change-Id: I1df3dcdb64bbd4cd80d675f9b2d3becbf721f661
* Add project annotation handling to repoJames W. Mills2012-04-231-0/+9
| | | | | | | | | | | | | | Allow the optional addition of "annotation" nodes nested under projects. Each annotation node must have "name" and "value" attributes. These name/value pairs will be exported into the environment during any forall command, prefixed with "REPO__" In addition, an optional "keep" attribute with case insensitive "true" or "false" values can be included to determine whether the annotation will be exported with 'repo manifest' Change-Id: Icd7540afaae02c958f769ce3d25661aa721a9de8 Signed-off-by: James W. Mills <jameswmills@gmail.com>
* Check if SHA1 presents in repositoryAnatol Pomazau2012-04-231-2/+4
| | | | | | | | | | Previously repo had incorrect code that did not really check if sha1 presents in a project. It worked for tags though. Check if a revision (either tag or sha1) is present by using 'git rev_parse' functionality. Change-Id: I1787f3348573948573948753987394839487572b
* Add manifest groupsv1.8.2Colin Cross2012-04-131-2/+44
| | | | | | | | | | | | | | | | | Allows specifying a list of groups with a -g argument to repo init. The groups act on a group= attribute specified on projects in the manifest. All projects are implicitly labelled with "default" unless they are explicitly labelled "-default". Prefixing a group with "-" removes matching projects from the list of projects to sync. If any non-inverted manifest groups are specified, the default label is ignored. Change-Id: I3a0dd7a93a8a1756205de1d03eee8c00906af0e5 Reviewed-on: https://gerrit-review.googlesource.com/34570 Reviewed-by: Shawn Pearce <sop@google.com> Tested-by: Shawn Pearce <sop@google.com>
* Option for 'repo diff' to generate output suitable for 'patch' cmdpelya2012-04-131-1/+4
| | | | | | | | | | | | | | The -u option causes 'repo diff' to generate diff output with file paths relative to the repository root, so the output can be applied to the Unix 'patch' command. The name '-u' was selected for convenience, because both 'diff' and 'git diff' accept the option with the same name to generate an 'unified diff' output suitable for 'patch' command. Change-Id: I79c8356db4ed20ecaccc258b3ba139db76666fe0 Reviewed-on: https://gerrit-review.googlesource.com/34380 Reviewed-by: Shawn Pearce <sop@google.com> Tested-by: Shawn Pearce <sop@google.com>
* Ignore /clone.bundle on HTTP 401, 403 and 404v1.8.1Shawn O. Pearce2012-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | 401: Unauthorized, authentication may be required. This is usually handled internally by the HTTP client in Python. If it reaches our code in repo, the Python HTTP client didn't find a password in ~/.netrc that it could use. 403: Authentication was supplied, but is incorrect. It might be that the CDN doesn't want to offer this clone.bundle file to the client, but the Git fetch operation would still be successful. This might arise if branch level read controls were used in Gerrit Code Review and the /clone.bundle file contained branches not visible to the client. 404: The server has no /clone.bundle file available. In all of these cases, sliently ignore the /clone.bundle file HTTP error and let the Git operation take over. Change-Id: I1787f3cac86b017351952bbb793fe5874d83c72b
* Do not change branch.foo.merge in case of manifest syncAnatol Pomazau2012-03-201-1/+3
| | | | | | | | | | | In case of manifest/smart sync repo changes ".merge" config option from branch to SHA. Doing 'repo upload' fails as repo tries to upload to a remote branch that looks like SHA (e.g. refs/for/23423423423423423423423) Do not update the .merge in case if revision is SHA. Change-Id: I9139708fa17f21eec5a7e23c3255333626bf529e
* sync: --no-clone-bundle disables the clone bundle supportv1.8.0Shawn O. Pearce2012-03-141-2/+8
| | | | Change-Id: Ia9ed7da8451b273c1be620c3dd0dcad777b29096
* Permit - in URL schemes for special URLsShawn O. Pearce2012-03-141-0/+2
| | | | | | | | | Clients might be using their own special git-remote-* helper that has a hypen in its name. Permit - in the scheme part of the URL when trying to decide if it is an SSH URL and assume it is *not* SSH if the URL matches "foo-bar://" style. Change-Id: I7ba2d810a614f6e605a441d5972902c4a14e73fd
* repo status to print project name on clean gitsAli Utku Selen2012-03-121-1/+1
| | | | | | | | | | repo status just prints "# on branch oprofile" if you have branched in clean status. This doesn't really tell which branch is meant. Instead we can use the same syntax with modified gits which will give us detailed information. Change-Id: I55fe5154d278e10a814281dd2ba501ec6e956730
* Add 'rebase="false"' attribute to the <project/> XML.Mike Pontillo2012-03-121-2/+5
| | | | | | | | | | | | | | | This new attribute can prevent 'repo sync' from automatically rebasing. I hit a situation in where one of the git repositories I was tracking was actually an external repository that I wanted to pull commits into and merge myself. (NOT rebase, since that would lose the merge history.) In this case, I'm not using 'repo upload', I'm manually managing the merges to and from this repository. Everything was going great until I typed 'repo sync' and it rebased my manually-merged tree. Hence the option to skip it. Change-Id: I965e0dd1acb87f4a56752ebedc7e2de1c502dbf8
* Avoid missing content-length header in project.pyConley Owens2012-03-121-1/+1
| | | | | | | | Occassionally, the content-length may be missing when using urlib in python 2.6 and 2.7. This change assumes the value of the header is 0 if it doesn't exist Change-Id: Iaf1c8a796bc667823d4d7c30f9b617644b271d00
* upload: Support uploading to Gerrit over https://v1.7.8.2Shawn O. Pearce2012-01-111-16/+15
| | | | | | | | If SSH is not available, Gerrit returns NOT_AVAILABLE to the /ssh_info query made by repo upload. In this case fallback to the /p/$PROJECT URL that Gerrit also exports and use that for uploads. Change-Id: I1e3e39ab709ecc0a692614a41a42446426f39c08
* Fix typoAnatol Pomazau2011-11-291-1/+1
| | | | Change-Id: Idd68ad0a34fcf4bd4e18b0248f50187a539d610a
* Add a sync flag that fetches only current branchAnatol Pomazau2011-11-031-18/+37
| | | | | | | | | | | There is also shortcuts in case if the "current branch" is a persistent revision such as tag or sha1. We check if the persistent revision is present locally and if it does - do no fetch anything from the server. This greately reduces sync time and size of the on-disk repo Change-Id: I23c6d95185474ed6e1a03c836a47f489953b99be
* Fix Python 2.4 supportShawn O. Pearce2011-10-111-1/+6
| | | | | Change-Id: I89521ae52fa564f0d849cc51e71fee65b3c47bab Signed-off-by: Shawn O. Pearce <sop@google.com>
* Work around Python 2.7 urllib2 bugShawn O. Pearce2011-10-111-33/+44
| | | | | | | | | | | | | | | If the remote is using authenticated HTTP, but does not have $GIT_URL/clone.bundle files in each repository, an initial sync would fail around 8 projects in due to the library not resetting the number of failures after getting a 404. Work around this by updating the retry counter ourselves. The urllib2 library is also not thread-safe. Make it somewhat safer by wrapping the critical section with a lock. Change-Id: I886e2750ef4793cbe2150c3b5396eb9f10974f7f Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix AttributeError: 'HTTPError' object has no attribute 'reason'v1.7.7.2Shawn O. Pearce2011-10-111-1/+1
| | | | | | | | | | Not every version of urllib2 supplies a reason object on the HTTPError exception that it throws from urlopen(). Work around this by using str(e) instead and hope the string formatting includes sufficient information. Change-Id: I0f4586dba0aa7152691b2371627c951f91fdfc8d Signed-off-by: Shawn O. Pearce <sop@google.com>
* Work around Python 2.7 failure to initialize base classShawn O. Pearce2011-10-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | urllib2 returns a malformed HTTPError object in certain situations. For example, urllib2 has a couple of places where it creates an HTTPError object with no fp: if self.retried > 5: # retry sending the username:password 5 times before failing. raise HTTPError(req.get_full_url(), 401, "basic auth failed", headers, None) When it does that, HTTPError's ctor doesn't call through to addinfourl's ctor: # The addinfourl classes depend on fp being a valid file # object. In some cases, the HTTPError may not have a valid # file object. If this happens, the simplest workaround is to # not initialize the base classes. if fp is not None: self.__super_init(fp, hdrs, url, code) Which means the 'headers' slot in addinfourl is not initialized and info() fails. It is completely insane that urllib2 decides not to initialize its own base class sometimes. Change-Id: I32a0d738f71bdd7d38d86078b71d9001e26f1ec3 Signed-off-by: Shawn O. Pearce <sop@google.com>
* sync: Fetch after applying bundle and retry after errorsv1.7.7.1Shawn O. Pearce2011-10-031-62/+74
| | | | | | | | | | | | | | | | | | | After a $GIT_URL/clone.bundle has been applied to the new local repository, perform an incremental fetch using `git fetch` to ensure the local repository is up-to-date. This allows the hosting server to offer stale /clone.bundle files to bootstrap a new client. If a single git fetch fails, it may succeed again after a short delay. Transient failures are typical in environments where the remote Git server happens to have limits on how many requests it can serve at once (the anonymous git daemon, or an HTTP server). Wait a randomized delay between 30 and 45 seconds and retry the failed project once. This delay gives the site time to recover from a transient traffic spike, and the randomization makes it less likely that a spike occurs again from all of the same clients. Change-Id: I97fb0fcb33630fb78ac1a21d1a4a3e2268ab60c0 Signed-off-by: Shawn O. Pearce <sop@google.com>
* sync: Support downloading bundle to initialize repositoryv1.7.7Shawn O. Pearce2011-09-281-11/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | An HTTP (or HTTPS) based remote server may now offer a 'clone.bundle' file in each repository's Git directory. Over an http:// or https:// remote repo will first ask for '$URL/clone.bundle', and if present download this to bootstrap the local client, rather than relying on the native Git transport to initialize the new repository. Bundles may be hosted elsewhere. The client automatically follows a HTTP 302 redirect to acquire the bundle file. This allows servers to direct clients to cached copies residing on content delivery networks, where the bundle may be closer to the end-user. Bundle downloads are resumeable from where they last left off, allowing clients to initialize large repositories even when the connection gets interrupted. If a bundle does not exist for a repository (a HTTP 404 response code is returned for '$URL/clone.bundle'), the native Git transport is used instead. If the client is performing a shallow sync, the bundle transport is not used, as there is no way to embed shallow data into the bundle. Change-Id: I05dad17792fd6fd20635a0f71589566e557cc743 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add commit-msg hook also for manifest projectVictor Boivie2011-07-201-1/+4
| | | | | | | | | | | | | | | The manifest project has - by design - not a review URL associated with it. It is actually not even a 'project' in repo's sense. This will prevent the commit-msg hook from being added, which is not necessarily wanted as the project is managed in gerrit. This commit will enable the commit-msg hook, which in turn will add the Change-Id-line to every new commit in it. This simplifies replacing patch sets (by git push ... refs/for/...). Change-Id: I42d0f6fd79e6282d9d47074a3819e68d968999a7 Signed-off-by: Victor Boivie <victor.boivie@sonyericsson.com>
* Add a --depth option to repo init.v1.7.5Doug Anderson2011-06-091-0/+7
| | | | Change-Id: Id30fb4a85f4f8a1847420b0b51a86060041eb5bf
* Add branch support to repo uploadMandeep Singh Baines2011-05-261-1/+3
| | | | | | | | | | | | | | | | This commit adds a --br=<branch> option to repo upload. repo currently examines every non-published branch. This is problematic for my workflow. I have many branches in my kernel tree. Many of these branches are based off of upstream remotes (I have many remotes) and will never be uploaded (they'll get sent upstream as a patch). Having repo scan these branches adds to my upload processing time and clutters the branch selection buffer. I've also seen repo get confused when one of my branches is 1000s of commits different from m/master. Change-Id: I68fa18951ea59ba373277b57ffcaf8cddd7e7a40
* Fixed repo checkout error message when git reports errors.Doug Anderson2011-04-071-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current version of repo checkout, we often get the error: error: no project has branch xyzzy ...even when the actual error was something else. This fixes it to only report the 'no project has branch' when that is actually true. This fix is very similar to one made for 'repo abandon': https://review.source.android.com/#change,22207 The repo checkout error is filed as: <http://crosbug.com/6514> TEST=manual A sample creating a case where 'git checkout' will fail: $ repo start branch1 . $ repo start branch2 . $ touch bogusfile $ git add bogusfile $ git commit -m "create bogus file" [branch2 f8b6b08] create bogus file 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 bogusfile $ echo "More" >> bogusfile $ repo checkout branch1 . error: chromite/: cannot checkout branch1 A sample case showing that we still fail if no project has a branch: $ repo checkout xyzzy . error: no project has branch xyzzy Change-Id: I48a8e258fa7a9c1f2800dafc683787204bbfcc63
* Fixed repo abandon to give better messages.Doug Anderson2011-04-071-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main fix is to give an error message if nothing was actually abandoned. See <http://crosbug.com/6041>. The secondary fix is to list projects where the abandon happened. This could be done in a separate CL or dropped altogether if requested. TEST=manual $ repo abandon dougabc; echo $? Abandon dougabc: 100% (127/127), done. Abandoned in 2 project(s): chromite src/platform/init 0 $ repo abandon dougabc; echo $? Abandon dougabc: 100% (127/127), done. error: no project has branch dougabc 1 $ repo abandon dougabc; echo $? Abandon dougabc: 100% (127/127), done. error: chromite/: cannot abandon dougabc 1 Change-Id: I79520cc3279291acadc1a24ca34a761e9de04ed4
* Add option to check status of projects in parallel.Terence Haddock2011-04-071-4/+12
| | | | Change-Id: I6ac653f88573def8bb3d96031d3570ff966251ad
* Creating rr-cachev1.7.4.1Victor Boivie2011-03-171-0/+5
| | | | | | | | | | | If git-rerere is enabled, it uses the rr-cache directory that repo currently creates a symlink from, but doesn't create the destination directory (inside the project's directory). Git will then complain during merges and rebases. This commit creates the rr-cache directory inside the project. Change-Id: If8b57a04f022fc6ed6a7007d05aa2e876e6611ee
* Support repo-level pre-upload hook and prep for future hooks.v1.7.4Doug Anderson2011-03-111-1/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All repo-level hooks are expected to live in a single project at the top level of that project. The name of the hooks project is provided in the manifest.xml. The manifest also lists which hooks are enabled to make it obvious if a file somehow failed to sync down (or got deleted). Before running any hook, we will prompt the user to make sure that it is OK. A user can deny running the hook, allow once, or allow "forever" (until hooks change). This tries to keep with the git spirit of not automatically running anything on the user's computer that got synced down. Note that individual repo commands can add always options to avoid these prompts as they see fit (see below for the 'upload' options). When hooks are run, they are loaded into the current interpreter (the one running repo) and their main() function is run. This mechanism is used (instead of using subprocess) to make it easier to expand to a richer hook interface in the future. During loading, the interpreter's sys.path is updated to contain the directory containing the hooks so that hooks can be split into multiple files. The upload command has two options that control hook behavior: - no-verify=False, verify=False (DEFAULT): If stdout is a tty, can prompt about running upload hooks if needed. If user denies running hooks, the upload is cancelled. If stdout is not a tty and we would need to prompt about upload hooks, upload is cancelled. - no-verify=False, verify=True: Always run upload hooks with no prompt. - no-verify=True, verify=False: Never run upload hooks, but upload anyway (AKA bypass hooks). - no-verify=True, verify=True: Invalid Sample bit of manifest.xml code for enabling hooks (assumes you have a project named 'hooks' where hooks are stored): <repo-hooks in-project="hooks" enabled-list="pre-upload" /> Sample main() function in pre-upload.py in hooks directory: def main(project_list, **kwargs): print ('These projects will be uploaded: %s' % ', '.join(project_list)) print ('I am being a good boy and ignoring anything in kwargs\n' 'that I don\'t understand.') print 'I fail 50% of the time. How flaky.' if random.random() <= .5: raise Exception('Pre-upload hook failed. Have a nice day.') Change-Id: I5cefa2cd5865c72589263cf8e2f152a43c122f70
* Post-nonexistent-revision crash sidesteppedSkyler Kaufman2011-03-081-2/+2
| | | | | | | | | Fix for the bug that leaves a fractional .git directory after attempting to perform an initial sync to a nonexistent revision. Moved the initialization of the working directory to after the revision ID has already been checked. Now, no project/.git directory gets created at all if the revision ID is bad. Change-Id: I0c9b2a59573410f1d11de7661591bf02e4ce326b
* Renamed 'repo_hooks' function to '_ProjectHooks'.Doug Anderson2011-02-011-7/+18
| | | | | | | | | | | | | | This renaming was done for two reasons: 1. The hooks are actually project-level hooks, not repo-level hooks. Since we are talking about adding repo-level hooks, It keeps things less confusing if we name the existing hooks to be "ProjectHooks" 2. The function is a private function in project.py and so should have capitalization to match. I also added a docstring describing this function. Change-Id: I1d30f5de08e8f9f99f78146e68c76f906782d97e
* Fixed bug identifying 'commit-msg' files.Doug Anderson2011-02-011-1/+1
| | | | | | | | | | | There was a minor typo that would cause repo to (I believe) mistakenly identify any file that contained a substring of the word 'commit-msg' as a commit message hook. For example, the file 'mit' or the file 'msg' would be treated as a commit message hook. I believe that it was intended that repo only recognize files named exactly 'commit-msg'. Change-Id: I93edbddf3da3cf0935641e6efb19b0a8ee6e2308
* Fix mirror clients with no worktreev1.7.3.1Shawn O. Pearce2011-01-101-1/+4
| | | | | | | | Commit "Make path references OS independent" (df14a70c45) broke mirror clients by trying to invoke replace() on None when there is no worktree. Change-Id: Ie0a187058358f7dcdf83119e45cc65409c980f11
* Make path references OS independentAnthony Newnam2011-01-091-2/+2
| | | | | | | | | Change-Id: I5573995adfd52fd54bddc62d1d1ea78fb1328130 (cherry picked from commit b0f9a02394779c1c9422a9649412c9ac5fb0f12f) Conflicts: command.py
* upload: Remove --replace optionFicus Kirkpatrick2010-10-291-6/+0
| | | | | | | It hasn't been necessary for a long time, and its functionality can be accomplished with 'git push'. Change-Id: Ic00d3adbe4cee7be3955117489c69d6e90106559
* sync --quiet: be more quietShawn O. Pearce2010-10-291-6/+11
| | | | | Change-Id: I5e8363c7b32e4546d1236cfc5a32e01c3e5ea8e6 Signed-off-by: Shawn O. Pearce <sop@google.com>
* sync: Enable use of git clone --referenceShawn O. Pearce2010-10-291-7/+94
| | | | | | | | | Use git clone to initialize a new repository, and when possible allow callers to use --reference to reuse an existing checkout as the initial object storage area for the new checkout. Change-Id: Ie27f760247f311ce484c6d3e85a90d94da2febfc Signed-off-by: Shawn O. Pearce <sop@google.com>
* upload -t: Automatically include local branch nameShawn O. Pearce2010-07-151-4/+13
| | | | | | | | | | | If the -t flag is given to upload, the local branch name is automatically sent to Gerrit Code Review as the topic branch name for the change(s). This requires the server to be Gerrit Code Review v2.1.3-53-gd50c94e or later, which isn't widely deployed right now, so the default is opt-out. Change-Id: I034fcacb405b7cb909147152db427fe69dd7bcbf Signed-off-by: Shawn O. Pearce <sop@google.com>
* Warn users before uploading if there are local changesAnthony Newnam2010-07-151-0/+21
| | | | | Change-Id: I231d7b6a3211e9f5ec71a542a0109b0c195d5e40 Signed-off-by: Shawn O. Pearce <sop@google.com>
* sync: Try fetching a tag as a last resort before giving upJulius Gustavsson2010-07-151-3/+18
| | | | | | | | | | | | | | If a tagged commit is not reachable by the fetch refspec configured for the git (usually refs/heads/*) it will not be downloaded by 'git fetch'. The tag can however be downloaded with 'git fetch --tags' or 'git fetch tag <tag>'. This patch fixes the situation when a tag is not found after a 'git fetch'. Repo will issue 'git fetch tag <tag>' before giving up completely. Change-Id: I87796a5e1d51fcf398f346a274b7a069df37599a Signed-off-by: Shawn O. Pearce <sop@google.com>
* Allow files to be copied into new foldersMatthew Buckett2010-05-271-0/+4
| | | | Change-Id: I7f169e32be5a4328bb87ce7c2ff4b6529e925126
* Automatically install Gerrit Code Review's commit-msg hookv1.6.9Shawn O. Pearce2010-03-061-4/+18
| | | | | | | | | | | | | 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. (cherry picked from commit a949fa5d202f0a1f812d7630f3e5bf0f02ca4e98 but squashed with latest hook script from version 2.1.2) Change-Id: Ie68b2d60ac85d8c2285d2e1e6a4536eb76695547 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fail sync when encountering "N commits behind."Daniel Sandler2010-03-041-4/+3
| | | | | | | | | | This is almost always something the user needs to address before continuing work, so promoting it to a failure (rather than simply an informational message) seems the right way to go. As a side-effect, repo will now exit with a non-zero status code in this situation, so pipelines of the form `repo sync && make` will fail if there are branches that are stalled due to uploaded but unmerged patches.