Skip to content
Permalink
Browse files

Remove support for shallow clones. The bundle is already shallow.

  • Loading branch information
SimonSapin committed Nov 22, 2019
1 parent 3a8bb53 commit 4dbdd255a1739707d7a8347c515f563811938557
Showing with 7 additions and 9 deletions.
  1. +1 −1 etc/taskcluster/decision_task.py
  2. +6 −8 etc/taskcluster/decisionlib.py
@@ -595,7 +595,7 @@ def update_wpt():
.with_index_and_artifacts_expire_in(log_artifacts_expire_in)
.with_max_run_time_minutes(6 * 60)
# Not using the bundle, pushing the new changes to the git remote requires a full repo.
.with_repo(shallow=False, alternate_object_dir="/var/cache/servo.git/objects")
.with_repo(alternate_object_dir="/var/cache/servo.git/objects")
)
return (
with_homebrew(update_task, [
@@ -487,9 +487,9 @@ def with_path_from_homedir(self, *paths):
self.with_early_script("set PATH=%HOMEDRIVE%%HOMEPATH%\\{};%PATH%".format(p))
return self

def with_repo(self, sparse_checkout=None, shallow=True):
def with_repo(self, sparse_checkout=None):
"""
Make a shallow clone the git repository at the start of the task.
Make a clone the git repository at the start of the task.
This uses `CONFIG.git_url`, `CONFIG.git_ref`, and `CONFIG.git_sha`,
and creates the clone in a `repo` directory in the task’s home directory.
@@ -512,13 +512,12 @@ def with_repo(self, sparse_checkout=None, shallow=True):
type .git\\info\\sparse-checkout
"""
git += """
git fetch --no-tags {depth} {} {}
git fetch --no-tags {} {}
git reset --hard {}
""".format(
assert_truthy(self.git_fetch_url),
assert_truthy(self.git_fetch_ref),
assert_truthy(self.git_checkout_sha),
depth="--depth 30" if shallow else "",
)
return self \
.with_git() \
@@ -629,9 +628,9 @@ def with_python2(self):


class UnixTaskMixin(Task):
def with_repo(self, shallow=True, alternate_object_dir=""):
def with_repo(self, alternate_object_dir=""):
"""
Make a shallow clone the git repository at the start of the task.
Make a clone the git repository at the start of the task.
This uses `CONFIG.git_url`, `CONFIG.git_ref`, and `CONFIG.git_sha`
* generic-worker: creates the clone in a `repo` directory
@@ -649,13 +648,12 @@ def with_repo(self, shallow=True, alternate_object_dir=""):
git init repo
cd repo
echo "{alternate}" > .git/objects/info/alternates
time git fetch --no-tags {depth} {} {}
time git fetch --no-tags {} {}
time git reset --hard {}
""".format(
assert_truthy(self.git_fetch_url),
assert_truthy(self.git_fetch_ref),
assert_truthy(self.git_checkout_sha),
depth="--depth 30" if shallow else "",
alternate=alternate_object_dir,
))

0 comments on commit 4dbdd25

Please sign in to comment.
You can’t perform that action at this time.