Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346316
D5815.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D5815.diff
View Options
diff --git a/swh/loader/mercurial/tests/data/build.py b/swh/loader/mercurial/tests/data/build.py
--- a/swh/loader/mercurial/tests/data/build.py
+++ b/swh/loader/mercurial/tests/data/build.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (C) 2020 The Software Heritage developers
+# Copyright (C) 2020-2021 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
@@ -27,7 +27,7 @@
set -euo pipefail
# Allow direct call to call the script: `./myscript.sh repository-name`
- if [ ! -z "$1" ]; then
+ if [ -n "$1" ]; then
HG_REPO="$1"
fi
@@ -35,8 +35,8 @@
hg init "$HG_REPO"
cd "$HG_REPO"
cat > .hg/hgrc << EOL
- [ui]
- username = Full Name<full.name@domain.tld>
+ [ui]
+ username = Full Name<full.name@domain.tld>
EOL
# Populate the repository
@@ -77,11 +77,11 @@
the corresponding json file by running `./build.py json repository.tgz`
"""
+from datetime import datetime
import json
+from pathlib import Path
import shutil
import subprocess
-from datetime import datetime
-from pathlib import Path
import click
@@ -117,8 +117,9 @@
backup(repository_path)
click.echo(f"Running build script: {str(script_path)!r}")
- subprocess.call(
- ["bash", "-euo", "pipefail", script_path], env={"HG_REPO": str(repository_path)}
+ subprocess.run(
+ ["bash", "-eo", "pipefail", script_path, repository_path.stem],
+ env={"HG_REPO": str(repository_path), "HGPLAIN": "", "HGRCPATH": ""},
)
return repository_path
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:53 PM (2 w, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216497
Attached To
D5815: Fix data build script
Event Timeline
Log In to Comment