File tree 3 files changed +56
-0
lines changed
3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 25
25
26
26
[diff ]
27
27
renames = true
28
+
29
+ [svn ]
30
+ rmdir = true
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # Copyright (c) 2017
4
+ # Author: Victor Arribas <[email protected] >
5
+ # License: BSD-3-Clause <https://opensource.org/licenses/BSD-3-Clause>
6
+
7
+
8
+ test -z " $( git status --short --porcelain) "
9
+ dirty=$?
10
+
11
+ set -e
12
+
13
+ if [ $dirty -gt 0 ]; then
14
+ echo " Found dirty workspace, stashing it..."
15
+ git stash --all --include-untracked
16
+ fi
17
+
18
+ git svn rebase && git svn dcommit
19
+
20
+ [ $dirty -gt 0 ] && git stash pop
21
+ echo " git SVN push OK."
22
+
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # Copyright (c) 2017
4
+ # Author: Victor Arribas <[email protected] >
5
+ # License: BSD-3-Clause <https://opensource.org/licenses/BSD-3-Clause>
6
+ #
7
+ # Useful resources:
8
+ # * https://www.atlassian.com/git/tutorials/migrating-convert
9
+ # * http://www.janosgyerik.com/practical-tips-for-using-git-with-large-subversion-repositories/
10
+ # * https://github.com/varhub/git_status
11
+ #
12
+ # Clone command:
13
+ # $ git svn clone --stdlayout -A authors.txt <svn_url> <local name>
14
+ # - stdlayout is mandatory (see man for non canonical svn repos)
15
+ # - authors file must be complete
16
+
17
+
18
+ test -z " $( git status --short --porcelain) "
19
+ dirty=$?
20
+
21
+ set -e
22
+
23
+ if [ $dirty -gt 0 ]; then
24
+ echo " Found dirty workspace, stashing it..."
25
+ git stash --all --include-untracked
26
+ fi
27
+
28
+ git svn rebase
29
+
30
+ [ $dirty -gt 0 ] && git stash pop
31
+ echo " git SVN sync OK."
You can’t perform that action at this time.
0 commit comments