Skip to content

Commit f2c0c3d

Browse files
committed
Merge branch 'unlimiteck' (discard changes at user)
2 parents 95e345f + 1b30e1c commit f2c0c3d

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.gitconfig

+3
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@
2525

2626
[diff]
2727
renames = true
28+
29+
[svn]
30+
rmdir = true

bin/git-svn-push

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+

bin/git-svn-sync

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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."

0 commit comments

Comments
 (0)