Commit Graph

128 Commits (064186cfb98116540a0cc512da7f8ae993b84f61)

Author SHA1 Message Date
maruel@chromium.org 49fcb0cba7 Print debugging information when svn info didn't return the URL
Right now, it'd simply crash with a KeyError.

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8020004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102496 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
phajdan.jr@chromium.org d558c4b36f GTTF: Make gclient recover gracefully from an interrupted checkout
when --force is used.

BUG=96775
Review URL: http://codereview.chromium.org/7942007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102324 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
cmp@chromium.org eb2756dfc4 Add a --unmanaged flag to gclient config to allow the main solution to be unmanaged by the scm.
The dependencies will continue to be managed. A new flag is present in the .gclient file to control this behavior.

Review URL: http://codereview.chromium.org/7918027

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102002 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
phajdan.jr@chromium.org 8a312c56e9 GTTF: Make gclient try harder when doing svn cleanup.
BUG=96775

Review URL: http://codereview.chromium.org/7922018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101771 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 87e6d33103 Update subprocess2.check_output() to behave like subprocess.check_output().
stderr is not redirected by default. stdout is not allowed.
Both were oversight.
Do not override stdin=None in case the user would response to stderr output for
example.

Increase test coverage.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7860041

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100456 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2a5b6a2aba Now that CheckCallAndFilter() throws subprocess2.CalledProcessError, use e.returncode.
deferring e.args[0] would throw an error.

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7859032

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100402 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org bffad37d6f Remove gclient_utils.CheckCall() from gclient_scm.py
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7847004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100185 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org 2aad1b262d Add --merge option to gclient sync.
BUG=none
TEST=

Review URL: http://codereview.chromium.org/7277035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@93611 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nsylvain@chromium.org f7826d7495 Fix the call to "git checkout" on Windows.
The "^0" is not needed, and it confuses Windows since
the carret is a special character.
Review URL: http://codereview.chromium.org/6976050

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87636 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nsylvain@chromium.org 328c3c73a8 Workaround a git clone bug on Windows.
On Windows "git clone url path/repo" does not create 'path' if it does
not exist. It fails with:

Fatal: could not create work tree dir 'path\repo'.: No such file or directory

this patch manually creates the subdir if it does not exist.
Review URL: http://codereview.chromium.org/7080063

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87522 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nsylvain@google.com b3cec90859 Make sure paths that look like http://git_server/repo.git@SHA get checked out
correctly.  The current behavior was to call git clone with --no-checkout, which
did not create a working copy, and made the checkout unusable by the users.
Review URL: http://codereview.chromium.org/7104007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87491 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
phajdan.jr@chromium.org 6e043f755b Remove unmaintained "gclient export" command,
introduced in http://src.chromium.org/viewvc/chrome?view=rev&revision=20990

It was intended for the tarball generation script,
but there was a better and simpler way.

BUG=80549
Review URL: http://codereview.chromium.org/6883263

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83708 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
floitsch@google.com eaab784bcf Add --transitive flag.
When specifying a revision (with -r) propagates the date of the revision to its children.

Review URL: http://codereview.chromium.org/6873110

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83313 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 31cb48a436 First pass to transition away for gclient_utils.Error and gclient_utils.CheckedCallError.
Make sure every site that catches gclient_utils.Error also catch
subprocess2.CalledProcessError.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6691034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80339 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 90541738bc Wrap raw_input() around a try/except to reduce the number of false-positive in breakpad
R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6706007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80182 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org d6f89d862e Let the unittest avoid the upstream change.
Review URL: http://codereview.chromium.org/6696080

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79452 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org 668667c0b9 Move where the check is to handle things not being checked out yet.
Review URL: http://codereview.chromium.org/6676119

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79301 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org 858d645a31 Add support to check if the url has changed for a git dep and create a new clone.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6732023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79298 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 07ab60e26f Move reverting code from gclient_scm to scm to be able to reuse the code.
There is 2 changes while moving the code:
- Making externals handling an option.
- Not trapping EnvironmentError.

This code will be reused by the commit queue.

TEST=unit tests
BUG=none

Review URL: http://codereview.chromium.org/6250177

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74181 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ce117f6193 Add --ignore-externals to svn update and svn checkout invocations.
svn:externals are slow to update and are unnecessary in a gclient environment.

TEST=none
BUG=55904

Review URL: http://codereview.chromium.org/3421013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71604 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org cb2985fb69 Largely reduce the number of pylint warnings and fix one typo.
Most of them are style issues or variable aliasing.

TEST=Can almost enable pylint warnings
BUG=none

Review URL: http://codereview.chromium.org/4360002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64908 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
morrita@chromium.org 21dca0e781 Skipped syncing svn working copy which has a .hg subdirectory.
BUG=57783
TEST=none
Review URL: http://codereview.chromium.org/3601007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@61459 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 77e4ecaf59 Remove cruft from having to do bookeeping of options.stdout.
This makes the code saner to understand.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/3420014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@60050 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ad80e3b96e Simplify GIT.Capture() code to always redirect stderr by default and always throw an exception on failure.
Make gclient_scm_test silent.

Replace raise Exception() with raise gclient_utils.Error().

BUG=54084
TEST=none

Review URL: http://codereview.chromium.org/3353018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58936 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 54019f3c98 Change scm.SVN.Capture to redirect stderr and throw an exception on call failure.
Added try/except to the places where errors are tolerated.

Renamed scm.SVN.CaptureBaseRevision to CaptureRevision and removed CaptureHeadRevision.

BUG=54084
TEST=none

Review URL: http://codereview.chromium.org/3307016

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58932 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6985efce6e Fix small nits.
pylint is useful to catch errors before they go live so fix little annoyances.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3372001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58817 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 37e89873a4 Add options argument to _Run() to redirect output.
Add automatic 'header' on command execution

BUG=54084
TEST=none

Review URL: http://codereview.chromium.org/3319008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58700 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6cafa13afb Split _Run() in two to make redirection simpler in a later change.
Simplify GitWrapper._Run() and move logging at the right place.

TEST=none
BUG=54084

Review URL: http://codereview.chromium.org/3358015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58694 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 8469bf9309 Replace a few os.path.join() calls to use self.checkout_path instead.
Fix SVN pack.

TEST=smoke tests
BUG=none

Review URL: http://codereview.chromium.org/3309005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58519 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
cbentzel@chromium.org 2aee2298dd gclient: exponential backoff of SCM commands on known failure types.
This starts at 5 seconds (used to be 15) and goes up to ~60 seconds on the tenth round.

BUG=None
TEST=None
Review URL: http://codereview.chromium.org/3326004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58488 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org f5d37bf92e Convert all print statements to use options.stdout.
Needed to fix a few function calls to make it work.

BUG=54084
TEST=unit tests

Review URL: http://codereview.chromium.org/3303004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58287 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 669600d394 Remove scm.SVN.Run() and all stdout argument to more calls.
BUG=54084
TEST=unit tests

Review URL: http://codereview.chromium.org/3338003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58214 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 17d01795a6 Cleanup the code in gclient_utils to standardize on CheckCall nomenclature.
Simplify code by removing fail_status
Rename print_messages to always
Simplify the doc.

Review URL: http://codereview.chromium.org/3104036

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58201 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 2b9aa8e0b3 Refactor SubprocessCallAndFilter() to remove positional arguments.
This way the function is much more similar to subprocess.call(). Further changes
will be done, to be able to convert all the function, to be able to parallelize
output without corrupting it.

Used pylint to verify call graph correctness, causing some other unrelated
changes.

TEST=unit tests
BUG=none

Review URL: http://codereview.chromium.org/3117039

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57369 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 559c3f89b6 Add stdout param to SubprocessCallAndFilter().
It will eventually replace 'print_messages' and be used to annotate printed
lines when using --jobs.

Review URL: http://codereview.chromium.org/3174020

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57092 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3a292688b6 Redo of r56893 with fix to support python 2.5.
Original Description:

Remove code duplication and improve style.

Create a Popen function to reduce code duplication.
Use RemoveDirectory where relevant.
Make drover slightly more posix friendly.

Review URL: http://codereview.chromium.org/3199011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57083 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ad0b13da3d Revert "Remove code duplication and improve style."
This reverts commit 850ee065dd.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56894 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 850ee065dd Remove code duplication and improve style.
Create a Popen function to reduce code duplication.
Use RemoveDirectory where relevant.
Make drover slightly more posix friendly.

Review URL: http://codereview.chromium.org/3126020

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56893 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
kbr@chromium.org 802933db6c Added -x --ignore-eol-style arguments when running svn diff for
gclient pack because of spurious EOL-only changes seen on Linux.

BUG=none
TEST=ran gclient pack in Chromium repository and verified output manually

Review URL: http://codereview.chromium.org/3189010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56710 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3294f52e76 Make --reset more powerful for svn checkouts
That makes --force less necessary.

Review URL: http://codereview.chromium.org/3160026

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56581 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 945405e8b4 Add flushing to gclient revert.
Otherwise, if someone flush svn:ignore in src/third_part by error and that
causes a lot of files to be deleted, buildbot may hang while waiting for output.

BUG=Previous behavior killed the win try slaves.
TEST=smoke tests

Review URL: http://codereview.chromium.org/3171015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56541 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 8e0e926332 Improve -m to be more efficient, only lookup the current rev if it is pinned.
Use svn up --force if -m or -f is used.
Renamed AddAdditionalFlags to _AddAdditionalUpdateFlags to be clearer about its purpose.
Strings cleanup.

With this change, it becomes more manageable to use -m on the continuous build.

Review URL: http://codereview.chromium.org/3185006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56394 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 0380707ce2 Remove 'options' usage from scm.py
This is towards cleaning up the mess with 'options' in gclient_scm.py.

Review URL: http://codereview.chromium.org/3106014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56213 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 86f0f95e37 Ignore unversioned files when switching a repository.
Review URL: http://codereview.chromium.org/3132004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55573 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org e407c9ae28 Add code to automatically svn cleanup during svn update.
BUG=36135
TEST=gclient sync on a svn lock'ed directory will work automatically

Review URL: http://codereview.chromium.org/3028053

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55438 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 4a3bc28256 Revert "gclient: fetch only what's needed"
This reverts commit bca61a9de79d5a86454edecae5b00e581e9e6783.

This commit was broken

BUG=none
TEST=gclient sync actually updates

TBR=maruel

Review URL: http://codereview.chromium.org/3015012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53112 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 42ba8628d8 gclient: fetch only what's needed
To reduce server load, only fetch the ref we need.

This is a redo of: http://codereview.chromium.org/2856038

First upload was the original CL 2856038. Subsequent uploads
are my changes.

TEST=ran presubmit tests

Review URL: http://codereview.chromium.org/2842060

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53072 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
derat@chromium.org f3b6d25226 gclient: Revert r52941's changes to gclient_scm.py.
This looks like it broke syncing from git repos:

  File "/home/derat/local/depot_tools/gclient.py", line 1208, in <module>
    sys.exit(Main(sys.argv[1:]))
  File "/home/derat/local/depot_tools/gclient.py", line 1198, in Main
    return command(parser, argv[1:])
  File "/home/derat/local/depot_tools/gclient.py", line 1035, in CMDsync
    return client.RunOnDeps('update', args)
  File "/home/derat/local/depot_tools/gclient.py", line 621, in RunOnDeps
    scm.RunCommand(command, self._options, args, file_list)
  File "/home/derat/local/depot_tools/gclient_scm.py", line 115, in RunCommand
    return getattr(self, command)(options, args, file_list)
  File "/home/derat/local/depot_tools/gclient_scm.py", line 264, in update
    print_error=False)
  File "/home/derat/local/depot_tools/scm.py", line 84, in Capture
    return gclient_utils.CheckCall(c, in_directory, print_error)
  File "/home/derat/local/depot_tools/gclient_utils.py", line 58, in CheckCall
    raise CheckCallError(command, cwd, process.returncode, std_out, std_err)
gclient_utils.CheckCallError: (['git', 'fetch', 'origin', 'cc1c63d'],
'/usr/local/google/home/derat/chrome/src/third_party/cros', 128, '', "fatal:
Couldn't find remote ref cc1c63d\nfatal: The remote end hung up unexpectedly\n")

BUG=none
TEST=works again after the revert
Review URL: http://codereview.chromium.org/2888023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53056 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 238c918a40 gclient: fetch only what's needed
To reduce server load, only fetch the ref we need.

TEST=ran presubmit tests

Review URL: http://codereview.chromium.org/2856038

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52941 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 54a07a2f8f Make each solution dictionary an object.
The change is partial to keep this change still correct but readable/reviewable.
Followup changes will further move functions into the Dependency class.
If it was done in one change, it would be unreviewable.
Fix GetScmName() for protocol svn+ssh://.

TEST=didn't break the smoke tests.

Review URL: http://codereview.chromium.org/2837001

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