Commit Graph

72 Commits (36179f554889bdadf476421a7fc3d40147e6e4c5)

Author SHA1 Message Date
iannucci@chromium.org dabb78bfd5 Make git-rebase-update a bit more robust
* When aborting a failed rebase, don't cascade errors if the abort itself
    fails.
  * When starting a rebase-update cycle, cd to the root of the repo. This avoids
    an issue when you run rebase-update from inside of a branch which adds a
    new folder.

R=agable@chromium.org
BUG=499031

Review URL: https://codereview.chromium.org/1180673003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295637 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tandrii@chromium.org 6c14310ef8 Make git auto-svn fail if git svn fetch fails.
R=agable@chromium.org
BUG=437397

Review URL: https://codereview.chromium.org/1150353003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295630 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org 58888e1171 Fix git branch parsing.
In git version 2.4 the git branch command prints "* (HEAD detached at"
or "* (HEAD detached from" instead of "* (detached from". Adjust the parsing to make our tests
still work with git 2.4.

BUG=487172

Review URL: https://codereview.chromium.org/1162763003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295578 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 71437c0ba5 git-squash-branch: handle empty squashes
Error out of the current tree is dirty (previously the dirty
content would be incorporated silently into the newly
squashed branch!).

Review URL: https://codereview.chromium.org/1064933004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294744 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 797060631a Add checks to GitSanityChecks (upstream branch or current branch can be None)
I've run in the exceptions a few times when doing
'git cl presubmit' or 'git cl lint' from a detached
HEAD state (not uncommon when using 'git rebase-update')

Review URL: https://codereview.chromium.org/792933003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293643 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dnj@chromium.org 45cddd6569 Added transient 502 errors to 'git_retry' list.
BUG=chromium:430343
TEST=None

Review URL: https://codereview.chromium.org/701843004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292868 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 384039b174 Improve error handling in git-rebase-update
Don't discard stderr from failed rebase operations
I had an issue where stdout of the failed rebase was
empty but stderr contained:
First, rewinding head to replay your work on top of it...
Dirty index: cannot apply patches (dirty: internal_gyp
third_party/html_office).

Also, in my case the second rebase was actually succeeding
for some reason, which is clearly no expected, so assert
in this case.

BUG=410339

Review URL: https://codereview.chromium.org/645763002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292444 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org d629fb4084 Introduct git-auto-svn
This tool can automatically set up the necessary git-svn metadata for our
repos that live in SVN but are mirrored to Chrome.

R=iannucci@chromium.org, tandrii@chromium.org
BUG=418973

Review URL: https://codereview.chromium.org/611253003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292241 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
calamity@chromium.org 745ffa64a0 Skip tracking status in map-branches when -v flag is not supplied.
This CL prevents map-branches from loading the tracking status when
the -v flag is not supplied. This prevents the vanilla map-branches
from taking a potentially long time to retrieve the tracking status.

BUG=410137

Review URL: https://codereview.chromium.org/536793002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291846 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
calamity@chromium.org 9d2c880e98 Give git map-branches extra information behind -v and -vv flags.
This CL adds information to the git map-branches command. Invoking 
it map-branches with -v, will show tracking status of branches and
invoking with -vv will additionally show the Rietveld URL and the
branch hash.

BUG=None

Review URL: https://codereview.chromium.org/509843002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291776 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 6e95d401c5 Fix transient error regexes.
R=agable@chromium.org, dnj@chromium.org, vadimsh@chromium.org
BUG=409167

Review URL: https://codereview.chromium.org/521583008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291744 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
techtonik@gmail.com a5a945a18d Discover git.bat even if git_cl.py is executed using relative path
This allows git_cl.py to be used without adding depot_tools to PATH

BUG=
R=iannucci@chromium.org

Review URL: https://codereview.chromium.org/471413003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@289992 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
dnj@chromium.org de219ec51d Added 'git-retry' bootstrap
Added the 'git-retry' bootstrap command. This can be used to wrap other 'git'
commands around a fault-tolerant retry wrapper.

BUG=295109
TEST=localtest
R=iannucci@chromium.org, petermayo@chromium.org

Review URL: https://codereview.chromium.org/401673003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@285939 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 10fbe879aa Make marked merge base invalid when the upstream changes.
This should let the base marker transparently work with plain-old-git tools
which was the idea in the first place. Specifically `git branch -u` without a
corresponding rebase.

R=agable@chromium.org
BUG=373977

Review URL: https://codereview.chromium.org/288323002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@271112 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 3f23cdf56d Abort git tools if git repo has too many local branches.
This is a stopgap to prevent people with >20 local branches from running tools
like 'git rebase-update'. This usually indicates that the user isn't in the
habit of cleaning up old branches, which makes these tools unlikely to be useful
in the current state of their repo anyway.

R=agable@chromium.org
BUG=

Review URL: https://codereview.chromium.org/238213006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@263978 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 21980029dc Add a tutorial / walkthrough for pure-git workflow.
TBR=agable@chromium.org, szager@chromium.org
BUG=261743

Review URL: https://codereview.chromium.org/225433003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@263164 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org edeaa81534 Make mark-merge-base cap the marked merge base at the real merge-base.
R=agable@chromium.org
BUG=

Review URL: https://codereview.chromium.org/212213004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259697 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 56a624ac56 Fix the print of the rebase error message, and make the output prettier too.
For some reason .output doesn't throw an AttributeError, but returns None ,
instead. .stdout is the correct attribute.

R=agable@chromium.org
BUG=

Review URL: https://codereview.chromium.org/212493003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259695 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org c050a5b2be Add a family of git-commands to assist with the management of multiple CLs/branches.
git-rebase-update - ensure all branches are up to date
git-new-branch - create branches
git-rename-branch - rename a branch while preserving parentage relationships
git-reparent-branch - change the parent of a branch, including rebasing it correctly onto that new parent.
git-squash-branch - collapse a branch into a single commit
git-upstream-diff - show the diff between the current branch and it's upstream branch
git-mark-merge-base - explicitly set what you want the above tools to consider the merge-base for the current branch.

R=agable@chromium.org, hinoka@chromium.org, stip@chromium.org, szager@chromium.org
BUG=261738

Review URL: https://codereview.chromium.org/184253003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259520 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 97345ebf1a Add git thaw/freeze to depot_tools.
R=agable@chromium.org, hinoka@chromium.org, stip@chromium.org, szager@chromium.org
BUG=261738

Review URL: https://codereview.chromium.org/181043018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256778 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 8bc9b5c101 Add git-map and git-map-branches to depot_tools.
git-map: Show your local repo's history in a pseudo-graphical format from the command line.

git-map-branches: Show the topology of all of your branches, and their upstream relationships.

git-nav-upstream: Navigate (checkout) to the upstream branch of the current branch.

git-nav-downstream: Navigate (checkout) to a downstream branch of the current branch. If there's more than one downstream branch, then present a menu to select which one you want.

R=agable@chromium.org, hinoka@chromium.org, stip@chromium.org, szager@chromium.org
BUG=

Review URL: https://codereview.chromium.org/184113002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256384 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org aa74cf65d0 Add git-number script to calculate generation numbers for commits.
Compatible with any git topology (multiple roots, weird branching/merging, etc.)
I can't get it to be any faster (in python). Suggestions welcome :).

On z600/linux, this takes 5.1s to calculate the initial count for 2e3de954ef0a
(HEAD on src.git at the time of writing). Subsequent lookups take ~0.06s. For
reference, this machine takes 3s to just list the revisions in sorted order
without any additional processing (using rev-list).

All calculations are stored in a git-notes-style ref with the exception that the
leaf 'tree' object which would normally be stored in a git-notes world is
replaced with a packed binary file which consists of records [hash int]. Each
run of this script will create only 1 commit object on this internal ref which
will have as its parents:
  * The previous git number commit
  * All of the target commits we calculated numbers for.
This ref is then excluded on subsequent invocations of rev-list, which means that
git-number will only ever process commit objects which it hasn't already
calculated a value for. It also prevents you from attempting to number this
special ref :).

This implementation only has a 1-byte fanout which seems to be the best
performance for the repos we're dealing with (i.e. on the order of 500k commit
objects).  Bumping this up to a 2-byte fanout became extremely slow (I suspect
the internal caching structures I'm using are not efficient in this mode and
could be improved). Using no fanout is slower than the 1 byte fanout for lookups
by about 30%.

R=agable@chromium.org, stip@chromium.org, szager@chromium.org
BUG=280154,309692,skia:1639

Review URL: https://codereview.chromium.org/26109002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@236035 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago