-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvn.txt
163 lines (101 loc) · 1.77 KB
/
svn.txt
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
#
# links
#
# git and svn commands compared
http://git.or.cz/course/svn.html
# svn quick guide
http://www.tutorialspoint.com/svn/svn_quick_guide.htm
#
# basics
#
# help: status symbols
svn help status
svn info
svn status
svn status -u <path>
svn diff
svn log
svn add <files>
svn commit -m 'commit message'
#
# reset
#
svn revert (<folder>)
# reset all changes
svn revert --depth infinity .
svn revert -R .
# remove untracked files
svn status | rm -rf $(awk '/^?/{$1 = ""; print $0}')
svn status | awk '/^?/{$1 = ""; print $0}'
#
# checkout and stuff
#
# git pull
svn update
# git clone, svn checkout (co)
svn checkout http://svn.server.com/svn/project_repo --username=tom
#
# update
#
# checkout older revision
svn up -r107176
#
# merging
#
# resolve conflicts
svn resolve --accept=working README
# undo last commit
svn merge -c -lastrevision .
svn merge -c -91628 CMakefile.txt
svn merge -c -91654 -c -91657 -c -91658
#
# fix mistakes
#
# throw away changes
svn revert array.c
# go up one revision
svn up
#
# copy file structure to destination
#
svn status | awk '{printf "%s\n", $2}' | grep -e ".*\.cpp$" -e ".*\.h$" | xargs tar cvf - | (cd ../r48733_bkp ; tar xfp -)
#
# svn branches
#
svn copy <url> <url>
svn update
# list directories
svn list <url>
#
# svn patch
#
# create patch
svn diff > abc.patch
# apply patch
svn patch abc.patch --dry-run
#
# diff
#
# show only files
diff -r --brief V1.3.0/ V1.4.0/
# show changes in revision
svn diff -c <revision> path/to/repo
svn diff -c r19881 .
# show changed files for revision
svn log -v -r r19881
#
# commit
#
svn commit -m "abc" some_path
#
# svn log
#
# show log messages
svn log -v --limit 5
#
# workflow:
#
# check for upstream changes
svn st -u V1.3/
# get upstream changes
svn up V1.3/