You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,57 @@ Write the Rules
42
42
You need to write a rules file that describes how to slice the Subversion history into Git repositories and branches. See https://techbase.kde.org/Projects/MoveToGit/UsingSvn2Git.
43
43
The rules are also documented in the 'samples' directory of the svn2git repository. Feel free to add more documentation here as well.
44
44
45
+
Rules
46
+
-----
47
+
### `create respository`
48
+
49
+
```
50
+
create repository REPOSITORY NAME
51
+
[PARAMETERS...]
52
+
end repository
53
+
```
54
+
55
+
`PARAMETERS` is any number of:
56
+
57
+
-`repository TARGET REPOSITORY` Creates a forwarding repository , which allows for redirecting to another repository, typically with some `prefix`.
58
+
-`prefix PREFIX` prefixes each file with `PREFIX`, allowing for merging repositories.
59
+
-`description DESCRIPTION TEXT` writes a `DESCRIPTION TEXT` to the `description` file in the repository
60
+
61
+
### `match`
62
+
63
+
```
64
+
match REGEX
65
+
[PARAMETERS...]
66
+
end match
67
+
```
68
+
69
+
Creates a rule that matches paths by `REGEX` and applies some `PARAMETERS` to them. Matching groups can be created, and the values used in the parameters.
70
+
71
+
`PARAMETERS` is any number of:
72
+
73
+
-`repository TARGET REPOSITORY` determines the repository
74
+
-`branch BRANCH NAME` determines which branch this path will be placed in. Can also be used to make lightweight tags with `refs/tags/TAG NAME` although note that tags in SVN are not always a single commit, and will not be created correctly unless they are a single copy from somewhere else, with no further changes. See also `annotate true` to make them annotated tags.
75
+
-`[min|max] revision REVISION NUMBER` only match if revision is above/below the specified revision number
76
+
-`prefix PREFIX` prefixes each file with `PREFIX`, allowing for merging repositories. Same as when used in a `create repository` stanza.
77
+
- Note that this will create a separate commit for each prefix matched, even if they were in the same SVN revision.
78
+
-`substitute [repository|branch] s/PATTERN/REPLACEMENT/` performs a regex substitution on the repository or branch name. Useful when eliminating characters not supported in git branch names.
79
+
-`action ACTION` determines the action to take, from the below three:
80
+
81
+
-`export` I have no idea what this does
82
+
-`ignore` ignores this path
83
+
-`recurse` tells svn2git to ignore this path and continue searching it's children.
84
+
85
+
-`annotate true` creates annotated tags instead of lightweight tags
86
+
87
+
### `include FILENAME`
88
+
89
+
Include the contents of another rules file
90
+
91
+
### `declare VAR=VALUE`
92
+
93
+
Define variables that can be referenced later. `${VAR}` in any line will be replaced by `VALUE`.
0 commit comments