Commit Graph

11 Commits (179059f63e9eea031c81df56e88fab11f808948e)

Author SHA1 Message Date
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