Commit Graph

65 Commits (a66f608291175500ad87039e8c6c135ec6cd2552)

Author SHA1 Message Date
sbc@chromium.org 30e5b23701 roll_dep.py: switch to argparse
This makes for cleaner code and better --help.

Also, handle case when deps directory does not exist.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295475 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org e5d984b90a Fix crash in roll_dep.py when key == None
Also, unify error handling to use exceptions.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295465 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
scottmg@chromium.org c20f470011 Make roll_dep.py work on Windows
Didn't have any shell=True for git.bat/cmd.

Was able to upload https://codereview.chromium.org/1151373003 after
this CL (though the printed description didn't make it to Rietveld,
not sure if it normally does that.)

R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295397 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org a7a229fe6d Also handle IOError in roll_dep.py.
TBR=smut@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295391 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org 96550949d5 Rename roll-dep to roll-dep-svn and add roll-dep for git.
It is inspired by src/tools/roll_swarming_client.py but generalized.

R=dpranke@chromium.org, stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295386 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 98201125ea Improve --help and usage message for roll_deps.py
Also, don't use assert for user error handling plus
some other general python cleanup.

NOPRESUBMIT=true (presubmit is broken)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294950 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 013731e832 Handle KeyboardInterrupt consistently in python scripts
Handle KeyboardInterrupt gracefully rather the printing a
backtrace. Most users of these tools don't expect a
backtrace when then hit Ctrl-C.

Also, fix a few other inconsistencies found in the python
startup code of these different scripts:
- always call main function 'main' (rather than 'Main')
- always return 0 from main function
- if main takes args never include argv[0]

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294250 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
machenbach@chromium.org e0c897317b Allow to skip revision check in roll-dep.
Without this change, roll-dep requires dependencies to be
checked out and up to date in order to roll a newer revision.

This change allows to use roll-dep with less checking and
makes the script user responsible to verify the correctness
of the deps path and git hash.

This eases writing a deps roller that updates multiple deps
including a variety of os deps, which might not be checked
out on the host of the deps roller.

BUG=438705, 437462
R=jochen@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293444 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
szager@chromium.org 4293787cae Fix handling of ast.Str object.
TBR=iannucci@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292733 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
szager@chromium.org 0025380934 Add optional <DEPS file> argument to roll-dep.
BUG=chromium:425117
R=agable@chromium.org,kjellander@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292563 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thestig@chromium.org bf13f08b04 Fix roll_dep.py to print the right latest SVN revision number on error.
TEST="roll_dep.py breakpad/src 10000" should print ~1387, not 4.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292129 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 2674ae08be roll-dep: If applicable, include svn revision range in commit message
This is analogous to the change made in
https://codereview.chromium.org/559243002/.  I want to change ARB to use the
commit message generated by roll-dep.

BUG=408700

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291975 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 8eec89c2f8 Modify roll_dep's commit message
This conforms to the convention of using a single-line short description
followed by an empty line followed by a long description. Shortened the
revisions to more easily fit on one line.

BUG=408700

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291743 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 9e43b8b7ea Add comment with svn revision number.
R=iannucci@chromium.org,hinoka@chromium.org,mark@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@287057 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 03fd85bd0c Convenience tool for rolling git-style deps with an svn revision.
Usage: roll-dep third_party/WebKit 12345

That will update DEPS with the new revision, and leave the DEPS file
dirty.  It's the up to the user to 'git add; git commit;
git cl upload'.

This script won't handle arbitrary python syntax, but it will handle
variable references like Var("webkit_revision") correctly.

R=mmoss@chromium.org, iannucci@chromium.org
BUG=341098

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

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