-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsvn-to-monorepo-filter-monorepo
More file actions
executable file
·59 lines (51 loc) · 1.96 KB
/
Copy pathsvn-to-monorepo-filter-monorepo
File metadata and controls
executable file
·59 lines (51 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
#
# A helper script for svn-to-monorepo; runs "git filter-repo" to rearrange the monorepo.
# You will probably not run this by hand, unless you're experimenting.
#
force=
if [[ $1 == --force ]]; then
force=--force
shift
fi
git_dir=${1?Need git dir}
shift
if [[ $1 == --force ]]; then # ugh
force=--force
shift
fi
git -C "${git_dir}" filter-repo --invert-paths \
--path-glob '**/*.tar.xz' \
--path-glob '**/*.tar.gz' \
--path-glob '**/*.tar.bz2' \
--path-glob '**/*.src.rpm' \
--path-glob '**/_*' \
--path-glob 'tags/' \
$force
args=()
args+=(--path-rename branches/23-contrib:23-contrib)
args+=(--path-rename branches/23-empty:23-empty)
args+=(--path-rename branches/23-internal:23-internal)
args+=(--path-rename branches/23-main:23-main)
args+=(--path-rename branches/23-upcoming:23-upcoming)
args+=(--path-rename branches/24-contrib:24-contrib)
args+=(--path-rename branches/24-empty:24-empty)
args+=(--path-rename branches/24-internal:24-internal)
args+=(--path-rename branches/24-main:24-main)
args+=(--path-rename branches/24-upcoming:24-upcoming)
args+=(--path-rename branches/25-contrib:25-contrib)
args+=(--path-rename branches/25-empty:25-empty)
args+=(--path-rename branches/25-internal:25-internal)
args+=(--path-rename branches/25-main:25-main)
args+=(--path-rename branches/25-upcoming:25-upcoming)
args+=(--path-rename branches/3.6-upcoming:3.6-upcoming)
args+=(--path-rename branches/devops:devops)
args+=(--path-rename branches/dist-el7-build:dist-el7-build)
args+=(--path-rename branches/dist-el8-build:dist-el8-build)
args+=(--path-rename branches/dist-el9-build:dist-el9-build)
args+=(--path-rename branches/dist-el10-build:dist-el10-build)
args+=(--path-rename branches/osg-3.6:osg-3.6)
args+=(--path-rename branches/osg-3.6-contrib:osg-3.6-contrib)
args+=(--path-rename branches/osg-internal:osg-internal)
git -C "${git_dir}" filter-repo "${args[@]}" $force && git -C "${git_dir}" clean -df
# vim:et:sw=4:sts=4:ts=8