-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvn_replay.example.conf
110 lines (96 loc) · 4.18 KB
/
svn_replay.example.conf
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
# This is an example of the configuration file for svn_replay.
# It defines two source repositories and contains all possible
# parameters recognized by svn_replay.
# The root element must be a hash.
{
# And the only required key in this hash is SourceRepositories,
# which is an array of hashes that define parameters of the
# source repositories. In the example below, two source
# repositories are defined.
SourceRepositories =>
[
{
# The name of the source repository. This name is used
# by svn_replay to refer to this repository in the
# progress output. This is a required parameter.
RepoName => 'source_repo_one',
# The URL of the source repository. Another required
# parameter.
RootURL => 'file:///path/to/svn/repos/source_repo_one',
# Map of paths in this source repository to the
# correspondent paths in the target repository.
# This is a required parameter.
PathMapping =>
[
{
SourcePath => 'include/path/to/project',
TargetPath => 'include/project'
},
{
SourcePath => 'src/path/to/project',
TargetPath => 'src'
}
],
# By default, all new revisions from a source
# repository are replicated in the target repository.
# This parameter makes the replication process stop at
# a certain revision number in the source repository
# (that is, the commit history will be read up to and
# including the specified revision). This parameter is
# optional.
StopAtRevision => 123456,
# Do not copy the svn:externals property over to the
# target repository. This parameter is optional.
# By default, the svn:externals property is copied
# verbatim.
DiscardSvnExternals => 1
},
{
RepoName => 'source_repo_two',
RootURL => 'file:///path/to/svn/repos/source_repo_two',
# Because this configuration file is a Perl source, the
# language functions can help initialize repetitive
# structures.
PathMapping => [map {{SourcePath => $_, TargetPath => $_}}
qw(common/path/one
common/path/two)],
StopAtRevision => 128,
DiscardSvnExternals => 1,
# Pre-commit hook is a Perl subroutine that is called
# right before the target repository modifications are
# committed. The commit is aborted if this subroutine
# returns zero. This parameter is optional.
PreCommitHook => sub
{
my ($Revision) = @_;
$Revision->{LogMessage} =~ s/find/replace/gso
if $Revision->{LogMessage};
return !system('/path/to/pre-commit.sh',
$Revision->{LogMessage})
}
}
],
# Optional authentication parameters for the target repository.
# Can be either a two-element array consisting of the username
# and password or a scalar, if only the username is needed.
# Caution: the password will be seen in the output of 'ps'.
# Alternative syntax without the password:
# CommitCredentials => 'username',
CommitCredentials =>
[
'username',
'password'
],
# Whether to preserve the author of the original revision.
# This parameter is enabled by default.
PreserveRevisionAuthors => 1,
# By default, commit timestamps of the original revisions
# are preserved in the target repository. However, when the
# pre-revprop-change hook in the target repository prohibits
# changing the 'svn:date' property or when other actors (for
# example, other svn_replay processes) also commit to the same
# target repository, this functionality can be turned off by
# setting PreserveRevisionTimestamps to '0'.
PreserveRevisionTimestamps => 1
}
# vim: filetype=perl tabstop=4 shiftwidth=4 softtabstop=4 expandtab