Commit Graph

14 Commits (chrome/3987)

Author SHA1 Message Date
Edward Lesmes 7149d23621 Revert "depot_tools: Run Python scripts using vpython (Part 2)"
This reverts commit 3c814957ee.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> depot_tools: Run Python scripts using vpython (Part 2)
> 
> Tbr: iannucci@chromium.org
> Bug: 984182
> Change-Id: I2e8469f8ee0acd6a54109697d5a6b76faf24fa42
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748590
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=iannucci@chromium.org,ehmaldonado@chromium.org

Change-Id: Ic683543a04b45f733b48d6c43453fc8dff511d09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 984182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1749852
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur 3c814957ee depot_tools: Run Python scripts using vpython (Part 2)
Tbr: iannucci@chromium.org
Bug: 984182
Change-Id: I2e8469f8ee0acd6a54109697d5a6b76faf24fa42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748590
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Raul Tambre 80ee78e7fa Convert print statements to Python 3 style
Ran "2to3 -w -n -f print ./" and manually added imports.
Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually.
Also manually added imports to files, which used print as a function, but were missing the import.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 942522
Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
6 years ago
Henrique Ferreiro aea45d21ee os.realpath => os.path.realpath in gclient-new-workdir.py
Bug: 721585
Change-Id: Ic6d47201e93cd89a1b58871ef0e3a1b5b708eb47
Reviewed-on: https://chromium-review.googlesource.com/924151
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
7 years ago
Henrique Ferreiro fd4ad24165 Canonicalize paths before linking in gclient-new-workdir.py
This fixes the case where a new workdir is created from a repository
which was previously created with gclient-new-workdir.py and that
repository is later deleted, rendering the symbolic links created by
gclient-new-workdir.py invalid.

It also fixes support_cow() returning 'True' in that case because 'cp
--reflink' does not fail when copying a symlink.


Bug: 721585
Change-Id: I84f4d80b8698af0da346be559d46a328ec0d0e9b
Reviewed-on: https://chromium-review.googlesource.com/842402
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
7 years ago
Wei-Yin Chen (陳威尹) 2fa1203a22 Fix regression of gclient-new-workdir.py
gclient-new-workdir.py should work on systems not supporting reflink now.

Bug: 728903, 721585
Change-Id: I1385c4281bbf61d4ccae64c3595a39972fbe9d9e
Reviewed-on: https://chromium-review.googlesource.com/522232
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Wei-Yin Chen (陳威尹) 56664461ae Support btrfs snapshot in gclient-new-workdir.py
If the repo is a btrfs subvolume, take a snapshot instead of using
"cp --reflink". Taking a snapshot is much faster, and uses less
disk space for metadata.

Bug: 721585
Change-Id: I97753dc30d46ff56d84d65f8d815c19d09cf104b
Reviewed-on: https://chromium-review.googlesource.com/513586
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
8 years ago
Wei-Yin Chen (陳威尹) 56e4ad939b Add messages in gclient-new-workdir.py
When the repo is copied in copy-on-write mode, print informative
messages afterwards to help users.

Also, skip "git clean" step in copy-on-write mode.

Bug: 721585, 723856
Change-Id: I3235398c960d59a4cf44cfe7dffc79ed008a5190
Reviewed-on: https://chromium-review.googlesource.com/512262
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
8 years ago
Wei-Yin Chen (陳威尹) 704be87816 Add reflink support for gclient-new-workdir.py
On filesystems supporting copy-on-write, like Btrfs and ZFS, use
"cp --reflink" to achieve faster speed and lower disk space usage.

Option --reflink and --no-reflink can override the automatic detection.

When reflink is supported, toolchains, support libraries, and artifacts
would also be preserved. This means you can do incremental builds right
after creating a new workdir.

For Linux Chromium checkout, one additional workdir only takes 0.8~1 GB
disk space in Btrfs, including data and metadata, depending on how many
artifacts are there inside the out*/ directories.

Change-Id: I8b913efba9e5afaeea2adc1c10a561f63cb50282
Bug: 721585
Reviewed-on: https://chromium-review.googlesource.com/499567
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Wei-Yin Chen (陳威尹) 052034967a Modernize gclient-new-workdir.py by using argparse
This makes it easier to add options to this script.

There should be no functional changes except for slightly different
text output.

Change-Id: I4d68a8c4aa0c159eae9435fe962e53f6f09d2d47
Reviewed-on: https://chromium-review.googlesource.com/499527
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
agrieve@chromium.org bb54dd4a68 Fix gclient-new-workdir.py
Was broken by the refactor done in
http://crrev.com/900a33fb4df00cf36c87f4c5c11b4390b23e2a03

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297633 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sammc@chromium.org 900a33fb4d Add a git-drover.
This uses the same trick as git-new-workdir to reuse an existing git
checkout without interfering with it. However, this makes it only usable
on platforms where os.symlink exists.

BUG=404755

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296920 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
pgervais@chromium.org f13c2056e9 Clearer help in gclient-new-workdir.py
This modification make gclient-new-workdir.py display explicit error messages instead of cryptic Python backtraces.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@235408 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
adam.treat@samsung.com 62d817cde6 Add a new gclient-new-workdir script which clones an existing gclient working directory much like git-new-workdir, but takes into account all sub projects as well.
BUG=none

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

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