aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samples/ignore-branch.rules31
-rw-r--r--samples/merged-branches-tags.rules31
-rw-r--r--samples/min-max-revision.rules39
-rw-r--r--samples/recurse.rules37
-rw-r--r--samples/standardlayout.rules26
-rw-r--r--samples/two-projects.rules32
6 files changed, 196 insertions, 0 deletions
diff --git a/samples/ignore-branch.rules b/samples/ignore-branch.rules
new file mode 100644
index 0000000..28b4bf0
--- /dev/null
+++ b/samples/ignore-branch.rules
@@ -0,0 +1,31 @@
+#
+# Declare the repositories we know about:
+#
+
+create repository myproject
+end repository
+
+#
+# Declare the rules
+# Note: rules must end in a slash
+#
+
+match /trunk/
+ repository myproject
+ branch master
+end match
+
+# Ignore this branch:
+# We ignore a branch by not telling svn-all-fast-export what to do
+# with this path
+# Note that rules are applied in order of appearance, so this rule
+# must appear before the generic branch rule
+match /branches/abandoned-work/
+end match
+
+match /branches/([^/]+)/
+ repository myproject
+ branch \1
+end match
+
+# No tag processing
diff --git a/samples/merged-branches-tags.rules b/samples/merged-branches-tags.rules
new file mode 100644
index 0000000..c1ab75c
--- /dev/null
+++ b/samples/merged-branches-tags.rules
@@ -0,0 +1,31 @@
+#
+# Declare the repositories we know about:
+#
+
+create repository myproject
+end repository
+
+#
+# Declare the rules
+# Note: rules must end in a slash
+#
+
+match /trunk/
+ repository myproject
+ branch master
+end match
+
+# Subversion doesn't understand the Git concept of tags
+# In Subversion, tags are really branches
+#
+# Only a post-processing (i.e., after converting to Git) of the tag
+# branches can we be sure that a tag wasn't moved or changed from the
+# branch it was copied from
+#
+# So we don't pretend that SVN tags are Git tags and then import
+# everything as one
+
+match /(branches|tags)/([^/]+)/
+ repository myproject
+ branch \2
+end match
diff --git a/samples/min-max-revision.rules b/samples/min-max-revision.rules
new file mode 100644
index 0000000..32ccd8e
--- /dev/null
+++ b/samples/min-max-revision.rules
@@ -0,0 +1,39 @@
+#
+# Declare the repositories we know about:
+#
+
+create repository myproject
+end repository
+
+#
+# Declare the rules
+# Note: rules must end in a slash
+#
+
+# Ignore this particular revision in trunk
+# See ignore-branch.rules first
+# Note that rules are applied in order of appearance, so this rule
+# must appear before the generic trunk rule
+match /trunk/
+ min revision 123
+ max revision 123
+end match
+
+# Stop importing trunk
+# If we don't specify a max revision, then there is no limit
+# The same applies to min revision (i.e., min revision is 0)
+match /trunk/
+ min revision 1234
+end match
+
+match /trunk/
+ repository myproject
+ branch master
+end match
+
+match /branches/([^/]+)/
+ repository myproject
+ branch \1
+end match
+
+# No tag processing
diff --git a/samples/recurse.rules b/samples/recurse.rules
new file mode 100644
index 0000000..bfce621
--- /dev/null
+++ b/samples/recurse.rules
@@ -0,0 +1,37 @@
+#
+# Declare the repositories we know about:
+#
+
+create repository project1
+end repository
+
+create repository project2
+end repository
+
+#
+# Declare the rules
+# Note: rules must end in a slash
+#
+
+match /trunk/([^/]+)/
+ repository \1
+ branch master
+end match
+
+match /branches/([^/]+)/([^/]+)/
+ repository \1
+ branch \2
+end match
+
+
+#
+# Example of the recurse rule:
+# We tell svn-all-fast-export to not import anything
+# but to go inside and recurse in the subdirs
+# Note how the ending slash is missing in this particular case
+
+match /branches/[^/]+
+ action recurse
+end match
+
+# No tag processing
diff --git a/samples/standardlayout.rules b/samples/standardlayout.rules
new file mode 100644
index 0000000..b5e102f
--- /dev/null
+++ b/samples/standardlayout.rules
@@ -0,0 +1,26 @@
+#
+# Declare the repositories we know about:
+#
+
+create repository myproject
+end repository
+
+#
+# Declare the rules
+# Note: rules must end in a slash
+#
+
+match /trunk/
+ repository myproject
+ branch master
+end match
+
+match /branches/([^/]+)/
+ repository myproject
+ branch \1
+end match
+
+match /tags/([^/]+)/
+ repository myproject
+ branch refs/tags/\1
+end match
diff --git a/samples/two-projects.rules b/samples/two-projects.rules
new file mode 100644
index 0000000..c30715b
--- /dev/null
+++ b/samples/two-projects.rules
@@ -0,0 +1,32 @@
+#
+# Declare the repositories we know about:
+#
+
+create repository project1
+end repository
+
+create repository project2
+end repository
+
+#
+# Declare the rules
+# Note: rules must end in a slash
+#
+
+match /project1/trunk/
+ repository project1
+ branch master
+end match
+
+match /project2/trunk/
+ repository project2
+ branch master
+end match
+
+# Note how we can use regexp to capture the repository name
+match /([^/]+)/branches/([^/]+)/
+ repository \1
+ branch \2
+end match
+
+# No tag processing