-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
226 lines (144 loc) · 6.79 KB
/
README
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
svn_rebase(1) svn_rebase(1)
NAME
svn_rebase - rebase a svn repository
SYNOPSIS
svn_rebase [-r REVISIONS|--revisions=REVISIONS] [-d DESTINATION|--des‐
tination=DESTINATION] [-m|--manual-commit] source_url
svn_rebase [-c|--continue] [-a|--abort]
DESCRIPTION
This script does merging using svn merge with multiple revisions. For
example:
svn_rebase -r1000-1005,1008 http://svnserver/path
will merge revisions 1000-1005 and 1008 from http://svnserver/path into
the current directory.
It merges one revision at a time. If there's a conflict, the user can
resolve it manually and continue the merge.
---
Reasons for using this script:
svnmerge also allows merging multiple commits. svnmerge will merge
all the commits into the current tree and let the user commits it. The
problem comes when the user merges lots of commits in one go, losing
version history and making "svn ann" useless.
This script will commit after merging every commit, and commit with
the original message with the original revision number. So it is pos‐
sible to use "svn ann" to find out which commit changed what line and
the commit message with it.
OPTIONS
-h, --help
Show the help message for this program.
-a, --abort
Remove the state of the rebasing process.
-c, --continue
Restart the rebasing process after having resolved a merge con‐
flict.
-m, --manual-commit
After merging a commit, let the user commit manually.
-r REVISIONS, --revisions=REVISIONS
Revisions to merge
-d DESTINATION, --destination=DESTINATION
Target directory of the merges.
EXAMPLES
You created a branch from trunk, trunk has since changed. You want to
update your branch with trunk changes.
1. Remove the branch:
$ svn rm https://svnserver/branches/branch
$ svn commit
...
Committed revision 1234
2. Copy the current trunk into a new branch:
$ svn cp https://svnserver/branches/trunk
https://svnserver/branches/branch
$ svn commit
$ svn co https://svnserver/branches/branch
$ cd branch
3. Start rebasing: (Use the branch before we rename it)
$ svn_rebase https://svnserver/branches/branch@1233
4. Resolve conflicts if there are any:
It'll show a message like: Use "svn commit -F commit_message" to
commit
- Manually edit files to resolve conficts
- $ svn resolve file1
- $ svn commit -F commit_message
5. Continue the merge:
$ svn_rebase --continue
BUGS
If you found any bugs or have any feature requests, please open an
issue at http://github.com/karenc/svn_rebase/issues.
AUTHOR
Karen Chan <[email protected]>
svn_rebase(1)
------------------------------------------------------------
svn_merge(1) svn_merge(1)
NAME
svn_merge - merge changesets from one svn repository to the working
directory
SYNOPSIS
svn_merge [-r REVISIONS|--revisions=REVISIONS] [-d DESTINATION|--desti‐
nation=DESTINATION] [-m|--manual-commit] source_url
svn_merge [-c|--continue] [-a|--abort]
DESCRIPTION
This script does merging using svn merge with multiple revisions. For
example:
svn_merge -r1000-1005,1008 http://svnserver/path
will merge revisions 1000-1005 and 1008 from http://svnserver/path into
the current directory.
It merges one revision at a time. If there's a conflict, the user can
resolve it manually and continue the merge.
---
Reasons for using this script:
svnmerge also allows merging multiple commits. svnmerge will merge
all the commits into the current tree and let the user commits it. The
problem comes when the user merges lots of commits in one go, losing
version history and making "svn ann" useless.
This script will commit after merging every commit, and commit with
the original message with the original revision number. So it is pos‐
sible to use "svn ann" to find out which commit changed what line and
the commit message with it.
OPTIONS
-h, --help
Show the help message for this program.
-a, --abort
Remove the state of the merging process.
-c, --continue
Restart the merging process after having resolved a merge conflict.
-m, --manual-commit
After merging a commit, let the user commit manually.
-r REVISIONS, --revisions=REVISIONS
Revisions to merge
-d DESTINATION, --destination=DESTINATION
Target directory of the merges.
EXAMPLES
Scenario 1: Merging from one tree to another tree
You want to merge changes from one branch into another branch. For
example, you created a branch from trunk to fix a ticket, now it's done
and you want to merge it back into trunk.
1. Go to the trunk directory
2. Start merging:
$ svn_merge https://svnserver/branches/trunk_1234
3. Resolve conflicts and continue the merge
4. Resolve conflicts if there are any:
It'll show a message like: Use "svn commit -F commit_message" to
commit
- Manually edit files to resolve conficts
- $ svn resolve file1
- $ svn commit -F commit_message
5. Continue the merge:
$ svn_merge --continue
-----
Scenario 2: Merging some changesets from one tree to another tree
You want to cherry pick changesets to merge from one tree to another.
For example, you want to get some changesets from "branch" to "trunk".
1. Go to the trunk directory
2. Select changesets to merge:
$ svn_merge -r1000-1005,1008 https://svnserver/branches/branch
Or if your target directory is different from your source directory:
$ svn_merge -r 1000-1005,1008 -d dir2
https://svnserver/branches/branch/dir
Or if you want to manually commit the changes:
$ svn_merge -m https://svnserver/branches/branch
BUGS
If you found any bugs or have any feature requests, please open an
issue at http://github.com/karenc/svn_rebase/issues.
AUTHOR
Karen Chan <[email protected]>
svn_merge(1)