Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Poulpe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
octobus
Poulpe
Commits
9e222ca4
Commit
9e222ca4
authored
5 years ago
by
Raphaël Gomès
Browse files
Options
Downloads
Patches
Plain Diff
Add script to help generate a tarball of unknown files for a given repository
parent
cb06a253
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
repo-scripts/create-tarball-of-unknowns.sh
+52
-0
52 additions, 0 deletions
repo-scripts/create-tarball-of-unknowns.sh
with
52 additions
and
0 deletions
repo-scripts/create-tarball-of-unknowns.sh
0 → 100755
+
52
−
0
View file @
9e222ca4
#!/bin/bash
set
-euo
pipefail
if
[
$#
-lt
2
]
;
then
echo
'usage: create-tarball-of-unknowns REPOSITORY_NAME MAX [REPOS_DIR]'
echo
''
echo
'examples:'
echo
' create-tarball-of-unknowns mercurial-2018-08-01-b2561d4a 600'
echo
' create-tarball-of-unknowns mercurial-2018-08-01-b2561d4a 30%'
echo
' create-tarball-of-unknowns mercurial-2018-08-01-b2561d4a 100% /data/scmperf-repos'
exit
64
fi
initial_wd
=
"
$(
pwd
)
"
root
=
"
$(
realpath
$(
dirname
$0
)
|
tr
-d
'\n'
)
"
echo
"
${
root
}
"
repo
=
"
$1
"
shift
max
=
"
$1
"
shift
repos_dir
=
"
${
1
:-
repos
}
"
venv_path
=
/tmp/build-reference-
${
repo
}
-
$RANDOM
-venv
rm
-rf
$venv_path
output_list_path
=
"
${
venv_path
}
/
${
repo
}
"
function
finish
{
cd
"
${
initial_wd
}
"
rm
-rf
"
$venv_path
"
}
trap
finish EXIT
echo
"Creating temporary virtualenv"
virtualenv
-q
"
$venv_path
"
PYTHONWARNINGS
=
"ignore:DEPRECATION"
${
venv_path
}
/bin/pip
--disable-pip-version-check
--quiet
install
--requirement
"
${
root
}
"
/../requirements.txt
export
HGRCPATH
=
set
+u
source
${
venv_path
}
/bin/activate
set
-u
echo
"Creating tarball for
${
repo
}
"
cd
"
${
repos_dir
}
/
${
repo
}
-reference/"
"
${
root
}
"
/generate_unknown_files
--max
=
"
${
max
}
"
-o
=
"
${
output_list_path
}
"
tar
cf
"
${
repos_dir
}
/
${
repo
}
-unknown.tar"
-T
"
${
output_list_path
}
"
--remove-files
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment