Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
scmperf
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
Container Registry
Model registry
Operate
Environments
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
Admin message
This instance will be upgraded to Heptapod 17.9.2 on 2025-04-24 between 17:00 and 18:00 UTC+2
Show more breadcrumbs
mercurial
scmperf
Commits
798cf85a
Commit
798cf85a
authored
6 years ago
by
Boris Feld
Browse files
Options
Downloads
Patches
Plain Diff
Update make-partial to create partial tar
parent
11f66b38
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
repo-scripts/make-partial-repos
+4
-1
4 additions, 1 deletion
repo-scripts/make-partial-repos
tests/test-make-partials.t
+8
-0
8 additions, 0 deletions
tests/test-make-partials.t
with
12 additions
and
1 deletion
repo-scripts/make-partial-repos
+
4
−
1
View file @
798cf85a
...
...
@@ -29,7 +29,8 @@
if
setconfig
is
not
None
:
revset
=
setconfig
.
get
(
'
remove
'
)
repo_suffix
=
pset
partialdir
=
join
(
'
.
'
,
"
{}-partial-{}
"
.
format
(
repo_name
,
repo_suffix
))
partial_name
=
"
{}-partial-{}
"
.
format
(
repo_name
,
repo_suffix
)
partialdir
=
join
(
'
.
'
,
partial_name
)
if
not
isdir
(
partialdir
):
print
(
"
Cloning %s (%s%s) into %s (for exchange benchmarks)
"
...
...
@@ -61,6 +62,8 @@
[
"
hg
"
,
"
--cwd
"
,
partialdir
,
"
debugupdatecache
"
]
)
subprocess
.
check_call
([
"
tar
"
,
"
cf
"
,
"
%s.tar
"
%
partial_name
,
partialdir
])
USAGE
=
"
usage: make-partials-repo CONFIG REFERENCE.yaml+
"
if
len
(
sys
.
argv
)
<
3
:
...
...
This diff is collapsed.
Click to expand it.
tests/test-make-partials.t
+
8
−
0
View file @
798cf85a
...
...
@@ -55,4 +55,5 @@
Cloning repo4test_A (../local-references/repo4test_A-reference stripped of None) into ./repo4test_A-partial-same (for exchange benchmarks)
$ ls -1
repo4test_A-partial-missing-last-10
repo4test_A-partial-missing-last-10.tar
repo4test_A-partial-same
...
...
@@ -58,4 +59,5 @@
repo4test_A-partial-same
repo4test_A-partial-same.tar
$ hg -R ../local-references/repo4test_A-reference tip -T
'{
rev
}:{
node
}
\
n
'
52:99cae3713489c109d3f91f755bd6d6ea0363d0d5
$ hg -R repo4test_A-partial-missing-last-10 tip -T
'{
rev
}:{
node
}
\
n
'
...
...
@@ -80,4 +82,5 @@
Cloning repo4test_B (../local-references/repo4test_B-reference stripped of None) into ./repo4test_B-partial-same (for exchange benchmarks)
$ ls -1
repo4test_A-partial-missing-last-10
repo4test_A-partial-missing-last-10.tar
repo4test_A-partial-same
...
...
@@ -83,2 +86,3 @@
repo4test_A-partial-same
repo4test_A-partial-same.tar
repo4test_B-partial-missing-last-10
...
...
@@ -84,2 +88,3 @@
repo4test_B-partial-missing-last-10
repo4test_B-partial-missing-last-10.tar
repo4test_B-partial-same
...
...
@@ -85,4 +90,5 @@
repo4test_B-partial-same
repo4test_B-partial-same.tar
$ cd ..
Test buiding partial repositories some disabled
...
...
@@ -104,4 +110,5 @@
Cloning repo4test_B (../local-references/repo4test_B-reference stripped of None) into ./repo4test_B-partial-same (for exchange benchmarks)
$ ls -1
repo4test_B-partial-missing-last-10
repo4test_B-partial-missing-last-10.tar
repo4test_B-partial-same
...
...
@@ -107,4 +114,5 @@
repo4test_B-partial-same
repo4test_B-partial-same.tar
$ sed -i
'
s/enabled: Non/enabled: Yes/
'
../local-references/repo4test_A.benchrepo
$ grep enabled ../local-references/repo4test_A.benchrepo
enabled: No
...
...
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