-
Notifications
You must be signed in to change notification settings - Fork 6
/
llvm-svn2git-monorepo.rules
178 lines (146 loc) · 5.04 KB
/
llvm-svn2git-monorepo.rules
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
include llvm-svn2git-common.rules
create repository monorepo
end repository
### Ignore changes to stacker after the revision we drop it.
match /stacker/
min revision 40407
end match
### In llvm/branches/ggreif/, there's a README and branches. Can't
### have both; ignore the README.
match /llvm/branches/ggreif/README
end match
### Ignore llvm-gcc-4.2 tags that were put under llvm/tags/Apple by accident, repeatedly.
match /llvm/tags/Apple/.*llvmgcc42.*
end match
### Handle cfe->clang special cases:
# Skip the revisions that deleted cfe/cfe/ and moved it to cfe/
# Note, we also skip 39735, which moved ModuleInfo.txt, because we've
# already imported it to the right location from the get-go.
match /
min revision 39733
max revision 39736
end match
# cfe was in cfe/cfe, at first
match /cfe/cfe/trunk/
repository monorepo
branch refs/pristine/master
prefix clang/
end match
# There were no tags and branches back then, but there were empty directories; ignore them.
match /cfe/cfe/
end match
# Also special cases for the current location of clang: we want to call it clang, not cfe.
match /cfe/trunk/
repository monorepo
branch refs/pristine/master
prefix clang/
end match
match /cfe/(${BRANCH_PATTERNS}|${TAG_PATTERNS})/
repository monorepo
branch refs/pristine/\1
prefix clang/
# A '~' in one branch name (Apple/clang-6~1) makes git unhappy.
substitute branch s!^refs/pristine/tags/Apple/clang-6~1!refs/pristine/tags/Apple/clang-6.1!
substitute branch s!^refs/pristine/tags/RELEASE_35/rc1$!refs/pristine/tags/RELEASE_350/rc1!
substitute branch s!^refs/pristine/tags/RELEASE_28$!refs/pristine/tags/RELEASE_28/final!
substitute branch s!^refs/pristine/branches/apple$!refs/pristine/branches/apple-base!
substitute branch s!^refs/pristine/tags/!refs/pristine/svntag/!
substitute branch s!^refs/pristine/branches/!refs/pristine/!
end match
### Handle compiler-rt's initial revision, which was out of trunk/
match /compiler-rt/
min revision 73172
max revision 73172
repository monorepo
branch refs/pristine/master
prefix compiler-rt/BlocksRuntime/
end match
match /
# Ignore move to trunk/
min revision 74290
max revision 74290
end match
### Handle debuginfo-tests initial revisions, which were not in a trunk subdir
match /debuginfo-tests/
max revision 113804
repository monorepo
branch refs/pristine/master
prefix debuginfo-tests/
end match
match /debuginfo-tests/
# Ignore revisions that just moved files from debuginfo-tests/ to debuginfo-tests/trunk/
min revision 113806
max revision 113811
end match
# Ignore added and then immediately removed build artifacts:
match /lldb/trunk/build/
end match
# Ignore creation and deletion of /lldb/tmp/
match /
min revision 324484
max revision 324484
end match
match /
min revision 343598
max revision 343598
end match
# Note: filtering of llvm.zip is done as a post-processing step,
# because it's copied into a bunch of branches, and filtering contents
# of partial-branch copies is tricky.
# lldb has a silly-named branch
match /lldb/branches/apple/calcite/lldb/
repository monorepo
prefix lldb/
branch refs/pristine/apple/calcite
end match
# Normally I'd handle this via NESTED_BRANCHNAMES, but there's also a
# libcxx/apple which isn't nested.
match /lldb/branches/(apple/[^/]+)/
repository monorepo
prefix lldb/
branch refs/pristine/\1
end match
# Ignore delete and rebranch of /llvm/trunk
match /llvm/trunk/
min revision 70891
max revision 70892
end match
# Ignore old stacker branches -- they're just cvs conversion detreitus.
match /stacker/(?:branches|tags)/
max revision 31457
end match
### Handle Monorepo projects
match /monorepo-root/trunk/
repository monorepo
branch refs/pristine/master
end match
match /monorepo-root/(${BRANCH_PATTERNS}|${TAG_PATTERNS})/
repository monorepo
branch refs/pristine/\1
substitute branch s!^refs/pristine/tags/RELEASE_35/rc1$!refs/pristine/tags/RELEASE_350/rc1!
substitute branch s!^refs/pristine/tags/RELEASE_28$!refs/pristine/tags/RELEASE_28/final!
substitute branch s!^refs/pristine/branches/apple$!refs/pristine/branches/apple-base!
substitute branch s!^refs/pristine/tags/!refs/pristine/svntag/!
substitute branch s!^refs/pristine/branches/!refs/pristine/!
end match
match /(${MONOREPO_PROJECTS})/trunk/
repository monorepo
branch refs/pristine/master
prefix \1/
end match
match /(${MONOREPO_PROJECTS})/(${BRANCH_PATTERNS}|${TAG_PATTERNS})/
repository monorepo
prefix \1/
branch refs/pristine/\2
substitute branch s!^refs/pristine/tags/RELEASE_35/rc1$!refs/pristine/tags/RELEASE_350/rc1!
substitute branch s!^refs/pristine/tags/RELEASE_28$!refs/pristine/tags/RELEASE_28/final!
substitute branch s!^refs/pristine/branches/apple$!refs/pristine/branches/apple-base!
substitute branch s!^refs/pristine/tags/!refs/pristine/svntag/!
substitute branch s!^refs/pristine/branches/!refs/pristine/!
end match
### Explicitly ignore others.
match /(${SEPARATED_PROJECTS}|${ARCHIVE_PROJECTS}|${IGNORED_PROJECTS})/
end match
match /README.(html|txt)
end match
# Note: any unhandled paths that reach the end are an error.