Commits on Sep 7, 2012
  1. Fix ManifestParseError when first child node is comment

    jooncheol committed with gerrit code review Aug 26, 2012
    If the first line of manifest.xml is a XML comment, root.childNodes[0]
    is not a 'manifest' element node. The python minidom module will makes
    a 'Comment' node as root.childNodes[0]. Since the original code only
    checks whether the first child node is 'manifest', it couldn't do any
    command including 'sync' due to the 'ManifestParseError' exception. This
    patch could allow the comments between '<?xml ...?>' and '<manifest>' in
    the manifest.xml file.
    Change-Id: I0b81dea4f806965eca90f704c8aa7df49c579402
  2. sync: Correct imports of `R_HEADS` and `HEAD`

    dpursehouse committed with GLundh Sep 7, 2012
    `R_HEADS` is imported twice, from both the git_refs and project
    It is actually defined in git_refs, and in project it is imported
    from there, so the import of `R_HEADS` from project in the sync
    module is redundant.  Remove it.
    `HEAD` is imported from project, but like `R_HEADS` it is actually
    defined in git_refs.  Import it from git_refs instead.
    Change-Id: I8e2b0217d0d9f9f4ee5ef5b8cd0b026174ac52f4
Commits on Sep 6, 2012
  1. sync: catch exceptions when connecting to the manifest server

    dpursehouse committed with gerrit code review Aug 23, 2012
    When connecting to the manifest server, exceptions can occur but
    are not caught, resulting in the repo sync exiting with a python
    Add handling of the following exceptions:
    - IOError, which can be raised for example if the manifest server
    URL is malformed.
    - xmlrpclib.ProtocolError, which can be raised if the connection
    to the manifest server fails with HTTP error.
    - xmlrpclib.Fault, which can be raised if the RPC call fails for
    some other reason.
    Change-Id: I3a4830aef0941debadd515aac776a3932e28a943
  2. Fix errors when clone.bundle missing on server

    mattismyname committed with gerrit code review Aug 30, 2012
    Catch curl failures to download clone.bundle; don't let git try to parse
    the 404 page as a bundle file (was causing much user confusion).
    This should eliminate false error messages from init and sync such as:
      error: '.repo/manifests.git/clone.bundle' does not look like a v2 bundle file
      fatal: Could not read bundle '.repo/manifests.git/clone.bundle'.
      error: RPC failed; result=22, HTTP code = 400
    Signed-off-by: Matt Gumbel <>
    Change-Id: I7994f7c0baecfb45bb5a5850c48bd2a0ffabe773
Commits on Sep 5, 2012
  1. Allow projects to be specified as notdefault

    Conley Owens committed with gerrit code review Aug 13, 2012
    Instead of every group being in the group "default", every project
    is now in the group "all".   A group that should not be downloaded
    by default may be added to the group "notdefault".
    This allows all group names to be positive (instead of removing groups
    directly in the manifest with -default) and offers a clear way of
    selecting every project (--groups all).
    Change-Id: I99cd70309adb1f8460db3bbc6eff46bdcd22256f
  2. Make "repo sync -j<count>" stop properly on Ctrl-C.

    digit-android committed with gerrit code review Sep 5, 2012
    The threaded 'repo sync' implementation would very often freeze the
    process when interrupted by the user with Ctrl-C. The only solution
    being to kill -9 the process explicitly from another terminal.
    The reason for this is best explained here:
    This patch makes all helper sync threads 'daemon', which allows the
    process to terminate immediately on Ctrl-C.
    Note that this will forcefully kill all threads in case of interruption; this
    is generally a bad thing, but:
      1/ This is equivalent to calling kill -9 in another terminal, which
         is the _only_ thing that can currently stop the process.
      2/ There doesn't seem to be a way to tell the worker threads to
         gently stop when they are in a blocking operation anyway (even
         in the non-threaded case).
    + Do the same for "repo status -j<count>".
    Change-Id: Ieaf45b0eacee36f35427f8edafd87415c2aa7be4
  3. manifest-format.txt: Add documentation for GetManifest RPC method

    dpursehouse committed with gerrit code review Aug 21, 2012
    Add documentation of the GetManifest RPC method in the
    manifest-server section.
    Change-Id: I5cda5929bc8a0ca9d3f2b9da63216427041d2823
Commits on Sep 4, 2012
  1. `repo manifest`: default to stdout if no "-o"

    Conley Owens committed with gerrit code review Aug 7, 2012
    Change-Id: I1b0ff9ed5df6386f0c2a851c6c48d063199fe663
Commits on Aug 23, 2012
  1. init: Improved help text for the --mirror option

    dpursehouse committed with GLundh Aug 15, 2012
    Change-Id: Ia6032865f9296b29524c2c25b72bd8e175b30489
  2. Remove unused imports

    dpursehouse committed with GLundh Aug 22, 2012
    There are several imports that are not used.  Remove them.
    Change-Id: I2ac3be66827bd68d3faedcef7d6bbf30ea01d3f2
Commits on Aug 22, 2012
  1. manifest-format.txt: Fix a couple of minor spelling mistakes

    dpursehouse committed with gerrit code review Aug 21, 2012
    Change-Id: Ic2d266c8cf08827a71846db9d3711feb02885f01
Commits on Aug 21, 2012
  1. Patches should be submitted to master, not maint

    dpursehouse committed with GLundh Aug 21, 2012
    Update SUBMITTING_PATCHES accordingly.
    Change-Id: I6fd57a84c67d3762f1f23276d95cac2aeecd5e8f
Commits on Aug 14, 2012
  1. Merge branch 'master' into maint

    Conley Owens committed Aug 14, 2012
    master's original purpose was to forge ahead on using git submodules,
    but this route has been abandoned.
    Change-Id: I164a9efc7821bcd1b941ad76649764722046081b
Commits on Aug 7, 2012
  1. Omit all default groups when generating a manifest

    finik committed with gerrit code review Aug 6, 2012
    One of the recent changes introduced implicit path:xxx and name:xxx groups
    to every project, however they are not being stripped when generating
    a manifest using "repo manifest" command resulting in clutter
    Change-Id: Iec8610ba794b2fe4a6cdf0f59ca561595b66f9b5
Commits on Aug 6, 2012
  1. Replace the relpath function with os.path.relpath

    l0kod committed Aug 5, 2012
    Change-Id: Ib313340344968211cecfc0a718f6072e41da1a91
Commits on Aug 2, 2012
  1. Use curl command line tool for clone.bundle

    spearce committed Aug 2, 2012
    urllib2 is not thread safe and may be causing sync to lock up or
    not work correctly on various platforms. Instead use the command
    line curl program.
    Change-Id: I36eaf18bb4df089d26ea99d533cb015e7c616eb0
  2. sync: Honor --no-clone-bundle with -j1

    spearce committed Aug 2, 2012
    Change-Id: I7c12902e386121a374d525be673092360c67c53d
  3. Fix mirror mode

    spearce committed Aug 2, 2012
    Change-Id: Ica0e8392562a7ae5aad7e45441c1540e5e2b0238
  4. Fix unsupported operand type(s) for +: 'int' and 'str'

    spearce committed Aug 2, 2012
    Change-Id: I88455107d63daaa60c3b33c010aa8c730a590c70
  5. Fix percent done on resumed /clone.bundle

    spearce committed Aug 2, 2012
    The Content-Length when resuming is the number of bytes that
    remain in the file. To compute the total size as expected by
    the progress meter, we must add the bytes already stored.
    While we are in this method fix uses of % operator to ensure
    a tuple is always supplied.
    Change-Id: Ic899231b5bc0ab43b3ddb1d29845f6390e820115
Commits on Aug 1, 2012
  1. Fix bug in version_tuple to handle strings with -rc#

    chadj-at-google committed with spearce Jun 28, 2012
    Example of version string that caused a problem: git version 1.7.11-rc3
    Change-Id: I8a68b6b37f7b2ded23a1f8ae0d12131050a8807b
  2. Add remote alias support in manifest

    yestin committed with spearce Jul 2, 2012
    The `alias` is an optional attribute in element `remote`. It can be
    used to override attibute `name` to be set as the remote name in each
    project's .git/config. Its value can be duplicated while attribute
    `name` has to be unique across the manifest file. This helps each
    project to be able to have same remote name which actually points
    to different remote url.
    It eases some automation scripts to be able to checkout/push to same
    remote name but actually different remote url, like:
    repo forall -c "git checkout -b work same_remote/work"
    repo forall -c "git push same_remote work:work"
    for example:
    The manifest with 'alias' will look like:
    <?xml version='1.0' encoding='UTF-8'?>
      <remote alias="same_alias" fetch="git://" name="ext1"
      <remote alias="same_alias" fetch="git://" name="ext2"
      <remote alias="same_alias" fetch="ssh://" name="int"
      <default remote="int" revision="int-branch" sync-j="2"/>
      <project name="path/to/project1" path="project1" remote="ext1"/>
      <project name="path/to/project2" path="project2" remote="ext2"/>
      <project name="path/to/project3" path="project3"/>
    In each project, use command "git remote -v"
    same_alias  git:// (fetch)
    same_alias  git:// (push)
    same_alias  git:// (fetch)
    same_alias  git:// (push)
    same_alias  ssh:// (fetch)
    same_alias  ssh:// (push)
    Change-Id: I2c48263097ff107f0c978f3e83966ae71d06cb90
  3. Add "repo overview" command.

    jhansche committed with spearce Jul 9, 2012
    The overview command shows an overview of each branch in all (or the
    specified) projects.  The overview lists any local commits that have
    not yet been merged into the project.
    The report output is inspired by the report displayed following a
    "repo prune" event, with the addition of listing the one-line log
    messages for each commit that is not yet merged.
    The report can also be filtered to show only active branches; by
    default all branches that have commits beyond the upstream HEAD will
    be listed.
    Change-Id: Ibe67793991ad1aa38de3bc9747de4ba64e5591aa
  4. Inject the project name into each projects groups.

    Brian Harring committed with spearce Jun 15, 2012
    For CrOS, we have scenarios were people checkout a smaller version
    of our manifest via groups, and enable individual repositories as
    needed for their work.  Previously this was via local_manifest
    manipulation, which breaks via manifest-groups would require a
    remove-project tag.
    Via injecting the projects name into the projects groups, this
    allows us to instead manipulate the configured groups allowing
    the user to turn on/off projects as necessary.
    Change-Id: I07b7918e16cc9dc28eb47e19a46a04dc4fd0be74
Commits on Jul 28, 2012
  1. upload: add --draft option.

    Brian Harring committed with Brian Harring Jul 28, 2012
    Change-Id: I6967ff2f8163cd4116027b3f15ddb36875942af4
Commits on Jul 20, 2012
  1. Don't delete the branch config when switching branches.

    tornewuff committed Jul 20, 2012
    The fix for issue #46 in 5d01650 appears to break syncing in some
    situations: the branch is deleted after the point where it's been
    configured, which deletes part of its configuration and causes the
    config to change each time you call `repo init`, alternating between a
    configuration that works and one that doesn't.
    Instead of deleting the branch with git branch -D, use git update-ref -d
    which just deletes the ref (to avoid the rebase) without touching the
    configuration for the branch that was set up during the first repo init.
    This appears to ensure the config is left in a valid state all the time
    no matter what combination of repo init commands you run, without
    reintroducing the rebasing issue.
    Change-Id: Iaadaa6e56a46840bbc593fa5b35cb5b34cd3ce69
Commits on Jun 14, 2012
  1. Fix for failures with repo upload for projects that have a SHA1 for a…

    chadj-at-google committed Jun 14, 2012
    … revision; instead use the default manifest revision
    Change-Id: Ie5ef5a45ed6b0ca1a52a550df3cd7bd72e745f5f
Commits on Jun 13, 2012
  1. Single quote http.proxy in GIT_CONFIG_PARAMETERS

    spearce committed Jun 13, 2012
    Git requires the values in this environment variable to be
    single quoted. repo must wrap the expression into '' before
    adding it to the environment.
    Change-Id: I20a1fb8772f9aa6e9fd5a0516c981c2ca020ef05
  2. Detach branch even when already on the latest revision using sync -d

    ey3ball committed with spearce Jun 7, 2012
    This patch fixes repo behaviour when running sync -d with unmodified
    topic branches.
    Prior to this patch sync -d would see the latest revision is already
    checked out, thus staying on the branch. Since "-d" means detach we
    should follow git's behaviour and actually detach from the branch in
    that case.
    Basic test case - after a fresh repo init + sync -
            * repo start --all testdetach
            * repo sync -d
            * repo status
    -> status shows active topic branch "testdetach",
       should show :
    nothing to commit (working directory clean)
    Change-Id: Ic1351e6b5721b76557a51ab09f9dd42c38a4b415
  3. Support automatically stashing local modifications during repo-rebase.

    jhansche committed with spearce Mar 5, 2012
    Currently repo-rebase requires that all modifications be committed
    locally before it will allow the rebase. In high-velocity environments,
    you may want to just pull in newer code without explicitly creating
    local commits, which is typically achieved using git-stash.
    If called with the --auto-stash command line argument, and it is
    determined that the current index is dirty, the local modifications
    are stashed, and the rebase continues.  If a stash was performed, that
    stash is popped once the rebase completes.
    Note that there is still a possibility that the git-stash pop will
    result in a merge conflict.
    Change-Id: Ibe3da96f0b4486cb7ce8d040639187e26501f6af
  4. Fix switching manifest branches using repo init -b

    ey3ball committed with spearce Jun 7, 2012
    See repo issue #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
Commits on Jun 8, 2012
  1. Restore include support.

    Brian Harring committed Jun 8, 2012
    Calculation of where the include file lives was broken by 23acdd3
    since it resulted in looking for the first include in .repo, rather
    than .repo/manifests.
    While people can work around it via setting their includes to
    manifests/<include-target>, that breaks down since each layer of
    includes would then have to be relative.
    As such, restore the behaviour back to 2644874; manifests includes
    are calculated relative to the manifest root (ie, .repo/manifests);
    local manifests includes are calculated relative to .repo/ .
    Change-Id: I74c19ba614c41d2f08cd3e9fd094f3c510e3bfd1
Commits on Jun 5, 2012
  1. Use GIT_CONFIG_PARAMETERS instead of -c for http.proxy

    spearce committed Jun 5, 2012
    Ancient versions of Git don't understand the -c command line flag
    that we tried to use to pass http_proxy down into Git on Darwin.
    Use the environment variable instead, to more gracefully degrade
    with these old versions.
    Change-Id: Iffffa32088c1fd803895b990b3377ecfec6a1b14
  2. repo: Add option review.URL.uploadtopic support

    arussello committed with spearce Jun 1, 2012
    This patch adds the option to include topic branches by adding the
    following to a .gitconfig file:
        uploadtopic = true
    This option is only read in when the -t option is not already
    specified at the command line.
    Change-Id: I0e0eea49438bb4e4a21c2ac5bd498b68b5a9a845
  3. Use as the default URL

    spearce committed Jun 5, 2012
    This is basically the same repository, but may be slightly more
    up-to-date than the one on
    Change-Id: I5c99539f53231958eefb6993f00997c9adf0a3c9