Permalink
Commits on Sep 27, 2016
  1. Support broken symlinks when cleaning obsolete paths

    When there's a symlink to a directory, os.walk still lists the symlink
    in dirs, even if it isn't configured to follow symlinks. This will fail
    the listdirs check if the symlink is broken (either before or during the
    cleanup). So instead, check for directory symlinks and remove them using
    os.remove.
    
    Bug: Issue 231
    Change-Id: I0ec45a26be566613a4a39bf694a3d9c6328481c2
    danw committed with dpursehouse Sep 26, 2016
Commits on Sep 22, 2016
  1. Revert "Repo: fall back to http, if ssh connection fails for http repos"

    This reverts commit 488bf09.
    
    Issue 230
    
    Change-Id: I3a5725301f576e1a2ac499cb6daa631895115640
    danw committed Sep 22, 2016
Commits on Sep 21, 2016
  1. Merge "On project cleanup, don't remove nested projects"

    dpursehouse committed with Gerrit Code Review Sep 21, 2016
  2. On project cleanup, don't remove nested projects

    When there are nested projects in a manifest, like on AOSP right now:
    
    <project path="build" name="platform/build" />
    <project path="build/blueprint" name="platform/build/blueprint" />
    <project path="build/kati" name="platform/build/kati" />
    <project path="build/soong" name="platform/build/soong" />
    
    And the top "build" project is removed (or renamed to remove the
    nesting), repo just wipes away everything under build/ and re-creates
    the projects that are still there. But it only checks to see if the
    build/ project is dirty, so if there are dirty files in a nested
    project, they'll just be blown away, and a fresh worktree checked out.
    
    Instead, behave similarly to how `git clean -dxf` behaves and preserve
    any subdirectories that have git repositories in them. This isn't as
    strict as git -- it does not check to see if the '.git' entry is a
    readable gitdir, just whether an entry named '.git' exists.
    
    If it encounters any errors removing files, we'll print them all out to
    stderr and tell the user that we were unable to clean up the obsolete
    project, that they should clean it up manually, then sync again.
    
    Change-Id: I2f6a7dd205a8e0b7590ca5369e9b0ba21d5a6f77
    danw committed Sep 1, 2016
Commits on Sep 20, 2016
  1. implement optional 'pushurl' in the manifest file

    Allow the 'remote' element in the manifest file to define an optional
    'pushurl' attribute which is passed into the .git/config file.
    
    Change-Id: If342d299d371374aedc4440645798888869c9714
    Signed-off-by: Steve Rae <steve.rae@raedomain.com>
    Steve Rae committed Aug 10, 2016
  2. Merge "Repo: improve error detection for new ssh connections"

    dpursehouse committed with Gerrit Code Review Sep 20, 2016
  3. Merge "Replace pylint with pyflakes/flake8"

    dpursehouse committed with Gerrit Code Review Sep 20, 2016
Commits on Sep 14, 2016
  1. Merge "When syncing a project with a shared object store, disable aut…

    …omatic pruning."
    dpursehouse committed with Gerrit Code Review Sep 14, 2016
  2. Merge "repo: add comment for updating maintainer keys"

    dpursehouse committed with Gerrit Code Review Sep 14, 2016
  3. Replace pylint with pyflakes/flake8

    pylint reports a lot of warnings, but many of them are false positive,
    and it's difficult to configure it. It also seems that for some reason
    the included config file is not working well with the latest version.
    
    Update the documentation to recommend using pyflakes and flake8 instead
    of pylint. Remove the pylint config and add a basic flake8 config with
    minimum settings:
    
    - Maximum line length 80 columns
    - Ignore warnings about indentation (repo uses 2 rather than expected 4)
    - Ignore warnings about import placement
    
    In this commit no code cleanup is done, and it's expected that most of
    the files will throw up quite a few warnings, at least for flake8. These
    can be cleaned up in follow-up commits.
    
    The existing pylint suppression comments are left as-is. These will be
    helpful when cleaning up pyflakes warnings later.
    
    Change-Id: I2f7cb4340266ed07cc973ca6483b8f09d66a765b
    dpursehouse committed Sep 2, 2016
  4. Merge "Fix submodule checkout error when using sync-s option"

    dpursehouse committed with Gerrit Code Review Sep 14, 2016
  5. repo: add comment for updating maintainer keys

    Change-Id: Ic1e7557f9597234033561ab9fb3104b87e30015e
    vapier committed Sep 13, 2016
  6. Merge "upload: short circuit when nothing is pending"

    dpursehouse committed with Gerrit Code Review Sep 14, 2016
  7. When syncing a project with a shared object store, disable automatic …

    …pruning.
    
    The shared object stores confuse git and make it throw away objects which are
    still in use. We'll avoid that problem by disabling automatic pruning on those
    projects, but there's nothing preventing a user from changing the config back
    or pruning a repository manually.
    
    BUG=chromium:375945
    TEST=Ran repo sync on fresh ChromeOS checkout, starting with a branch of repo
    with this change. Verified that the kernel projects and no others were
    identified as having shared object stores, and that repo successfully disabled
    automatic pruning in their configs. Re-enabled pruning and ran repo sync just
    on one of the kernel directories. Verified that pruning was re-disabled as a
    result.
    
    Change-Id: I728ed5b06f0087aeb5a23ba8f5410a7cd10af5b0
    Gabe Black committed with vapier Oct 10, 2014
  8. Consider local project to be default for 'repo start'

    The requirement to explicitly specify the local project when starting
    a new repo branch is somewhat counter intuitive.
    
    This patch uses the current directory's git tree as the default
    project.
    
    Tested by running
    
      'repo start <name>'
    
    observed that the result is the same as if running
    
      'repo start <name> .'
    
    Change-Id: If106caa801b4cd5ba70dbe8354a227d59f100aa3
    Vadim Bendebury committed with vapier Sep 5, 2014
  9. upload: short circuit when nothing is pending

    When nothing is pending, most of this code is already short-circuited.
    Hoist the single check up to make this more obvious/slightly faster.
    
    Change-Id: Iec3a7e08eacd23a7c5f964900d5776bf5252c804
    vapier committed Apr 4, 2016
Commits on Sep 2, 2016
  1. Update mailmap

    Order the entries alphabetically and add a couple more.
    
    Change-Id: I8d98e8a5a1dd6868b566a42428030d2040b8af7a
    dpursehouse committed Sep 2, 2016
Commits on Aug 30, 2016
  1. Repo: fall back to http, if ssh connection fails for http repos

    if a gerrit server has ssh and https access enabled, but user access
    (for some users) is limited to https, 'repo upload' command will fail
    for them.
    
    Gerrit returns a ssh configuration (gerrit/ssh_info), that does not work
    for users limited to https.
    
    With this patch repo will test, if the returned ssh configuration from
    gerrit/ssh_info is working. if not, it will fall back to https for upload.
    
    Change-Id: If98f472e994f350bf71f35610cd649b163f1ab33
    Timo Lotterbach committed Jul 15, 2016
  2. Repo: improve error detection for new ssh connections

    this check can only detect errors that happen within 1 sec after launching
    ssh. But this is typically enough to catch configuration issues like
    'connection refused' or 'authentication failed'.
    
    Change-Id: I00b6f62d4c2889b1faa6c820e49a198554c92795
    Timo Lotterbach committed Jul 15, 2016
Commits on Aug 23, 2016
  1. gitc: Lower concurrent ls-projects requests

    Too many requests at the same time is causing 502 errors.
    
    Change-Id: Ic8fbb2fbb7fb6014733fa5be018d2dc02472f704
    danw committed Aug 23, 2016
Commits on Aug 19, 2016
  1. RepoHook: do not list options twice during hash based approval

    Instead of
    
      Do you want to allow this script to run (yes/yes-never-ask-again/NO)? (yes/always/NO)?
    
    ask
    
      Do you want to allow this script to run (yes/always/NO)?
    
    Change-Id: I5f5a2d0e88086a8d85e54fb8623a62d74a20956a
    Signed-off-by: Jonathan Nieder <jrn@google.com>
    jrn committed Aug 16, 2016
Commits on Aug 17, 2016
  1. Increment the wrapper version

    There have been a number of changes in the repo wrapper since the last
    increment that was done in fee390e:
    
    - 9711a98 init: Add --no-clone-bundle option
    - 631d0ec Support non-ASCII GNUPGHOME environment variable
    - 4088eb4 repo: Cleaned up pylint/pep8 violations
    - 5553628 repo: Add check of REPO_URL env variable
    - 745b4ad Fix gitc-init behavior
    - d3ddcdb Ignore clone.bundle on HTTP 501, i.e. Not Implemented
    
    Change-Id: I3f763ef0ec2df2d726dff429021b48ad474148f1
    dpursehouse committed Aug 17, 2016
  2. Merge "init: Add --no-clone-bundle option"

    dpursehouse committed with Gerrit Code Review Aug 17, 2016
  3. Merge "project: Set config option to skip lfs smudge filter"

    dpursehouse committed with Gerrit Code Review Aug 17, 2016
Commits on Aug 16, 2016
  1. Merge "RepoHook: allow users to approve hooks via manifests"

    jrn committed with Gerrit Code Review Aug 16, 2016
  2. RepoHook: allow users to approve hooks via manifests

    The constant prompting when registered hooks change can be tedious and
    has a large multiplication factor when the project is large (e.g. the
    AOSP).  It gets worse as people want to write more checks, hooks, docs,
    and tests (or fix bugs), but every CL that goes in will trigger a new
    prompt to approve.
    
    Let's tweak our trust model when it comes to hooks.  Since people start
    off by calling `repo init` with a URL to a manifest, and that manifest
    defines all the hooks, anchor trust in that.  This requires that we get
    the manifest over a trusted link (e.g. https or ssh) so that it can't
    be MITM-ed.  If the user chooses to use an untrusted link (e.g. git or
    http), then we'll fallback to the existing hash based approval.
    
    Bug: Issue 226
    Change-Id: I77be9e4397383f264fcdaefb582e345ea4069a13
    vapier committed Aug 16, 2016
  3. project: Set config option to skip lfs smudge filter

    During sync, repo runs `git read-tree --reset -u -v HEAD` which causes
    git-lfs's smudge filter to run. However this fails because git-lfs does
    not work with bare repositories.
    
    Add lfs.filter configuration to the project config as suggested in the
    comments on the upstream git-lfs client issue [1]. This prevents the
    smudge filter from running, and the sync completes successfully.
    
    For any projects that have LFS objects, `git lfs pull` must be executed.
    
    [1] git-lfs/git-lfs#1422
    
    Bug: Issue 224
    Change-Id: I091ff37998131e2e6bbc59aa37ee352fe12d7fcd
    dpursehouse committed Aug 16, 2016
  4. improve docs

    Change-Id: Ide4008f09c2f17f8fb3d85dfffe94544abfdd6a6
    vapier committed Aug 16, 2016
Commits on Aug 15, 2016
  1. init: Add --no-clone-bundle option

    Bug: Issue 218
    Change-Id: I42ba1f5fb9168875da0df6bdf4fe44c8d6498d54
    cherylhu committed with dpursehouse Dec 11, 2015
  2. init: Respect --quiet option when synching manifest repository

    Change-Id: Ib58b7dd971670e0888e6428333050700e776b0de
    dpursehouse committed Aug 14, 2016
  3. Merge "Support non-ASCII GNUPGHOME environment variable"

    dpursehouse committed with Gerrit Code Review Aug 15, 2016
Commits on Aug 14, 2016
Commits on Jul 16, 2016
  1. Support non-ASCII GNUPGHOME environment variable

    Here we don't need to encode this gpg_dir string when using
    Python 2.7 on Linux.
    
    Change-Id: I56724e9511d3b1aea61535e654a45c212130630d
    davispuh committed Jul 16, 2016