Skip to content
Snippets Groups Projects
Commit 74ab07f9 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

repos: stop the hack around the reference name

The new name have been around for 1 years, let us stop hacking the old name
back.

This will requires people to reclone, however will come in a larger wagon that
will requires people to reclone anyway.
parent a5e03453
No related branches found
No related tags found
No related merge requests found
......@@ -289,7 +289,8 @@
)
self.repo_name = repo_name
self.repo_path = os.path.join(REPOS_DIR, self.repo_name)
reference_basename = "{}-reference".format(self.repo_name)
self.repo_path = os.path.join(REPOS_DIR, reference_basename)
# Use a clean environ to run command
self.environ = {'HGRCPATH': ''}
......
......@@ -26,6 +26,4 @@
mkdir -p repos/partial-references
make MAKE_VERBOSE=1 -f repos.make
./repo-scripts/rename-reference-directories repos
python create_skip_file.py
#!/usr/bin/env python
import sys
import os
SUFFIX = "-reference"
def main(repo_dir):
for file in sorted(os.listdir(repo_dir)):
file_path = os.path.join(repo_dir, file)
if not os.path.isdir(file_path):
continue
if not file_path.endswith(SUFFIX):
continue
new_dir_path = file_path[: -len(SUFFIX)]
print("Renaming %s into %s" % (file_path, new_dir_path))
os.rename(file_path, new_dir_path)
if __name__ == "__main__":
main(sys.argv[1])
......@@ -146,9 +146,6 @@
(cd repos/partial-references/; tar xf "$TESTTMP/references"/smoke-test-B-4324509a-partial-last-ten.tar --warning=no-timestamp )
(cd repos/partial-references/; tar xf "$TESTTMP/references"/smoke-test-B-4324509a-partial-last-thousand.tar --warning=no-timestamp )
(cd repos/partial-references/; tar xf "$TESTTMP/references"/smoke-test-B-4324509a-partial-same.tar --warning=no-timestamp )
+ ./repo-scripts/rename-reference-directories repos
Renaming repos/smoke-test-A-11eb1fef-reference into repos/smoke-test-A-11eb1fef
Renaming repos/smoke-test-B-4324509a-reference into repos/smoke-test-B-4324509a
+ python create_skip_file.py
- Fetching recent changes
- Creating environments
......@@ -189,5 +186,5 @@
$ ls repos/
partial-references
skip.json
smoke-test-A-11eb1fef
smoke-test-A-11eb1fef-reference
smoke-test-A-11eb1fef.benchrepo
......@@ -193,5 +190,5 @@
smoke-test-A-11eb1fef.benchrepo
smoke-test-B-4324509a
smoke-test-B-4324509a-reference
smoke-test-B-4324509a.benchrepo
$ ls repos/partial-references/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment