diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-13 14:36:21 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-02-13 14:36:21 +0000 |
commit | 30d4d8eedf640ce1c8b9a4ba5bd583075a1beceb (patch) | |
tree | 20f085c119f98c7eb7234d3b8b65e66ba527908b | |
parent | ca86f90c1d5fb9c66c82d40f94a26579adcdbf36 (diff) | |
download | gsc-30d4d8eedf640ce1c8b9a4ba5bd583075a1beceb.tar.gz gsc-30d4d8eedf640ce1c8b9a4ba5bd583075a1beceb.tar.bz2 |
Bugfixes
git-svn-id: file:///svnroot/gsc/trunk@336 d2de0444-eb31-0410-8365-af798a554d48
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | git/git-svn-mirror-finish | 35 | ||||
-rwxr-xr-x | git/git-svn-mirror-synch | 1 |
3 files changed, 43 insertions, 1 deletions
@@ -1,3 +1,11 @@ | |||
1 | 2009-02-13 Sergey Poznyakoff <gray@gnu.org.ua> | ||
2 | |||
3 | Bugfix | ||
4 | |||
5 | * git-svn-mirror-synch: Call git reset. | ||
6 | * git/git-svn-mirror-finish: Install SVN hook and add a README.git | ||
7 | file to SVN. | ||
8 | |||
1 | 2009-01-24 Sergey Poznyakoff <gray@gnu.org.ua> | 9 | 2009-01-24 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 10 | ||
3 | Improve gnupload | 11 | Improve gnupload |
diff --git a/git/git-svn-mirror-finish b/git/git-svn-mirror-finish index 41f5ba9..04d2a4b 100755 --- a/git/git-svn-mirror-finish +++ b/git/git-svn-mirror-finish | |||
@@ -14,9 +14,12 @@ | |||
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | SVNROOT=file:///svnroot | ||
17 | GITROOT=/gitroot | 18 | GITROOT=/gitroot |
18 | HEADPFX= | 19 | HEADPFX= |
19 | 20 | ||
21 | set -e | ||
22 | |||
20 | if [ -r /etc/mirror/git/config ]; then | 23 | if [ -r /etc/mirror/git/config ]; then |
21 | . /etc/mirror/git/config | 24 | . /etc/mirror/git/config |
22 | fi | 25 | fi |
@@ -50,7 +53,7 @@ if [ $# -ne 1 ]; then | |||
50 | exit 1 | 53 | exit 1 |
51 | fi | 54 | fi |
52 | 55 | ||
53 | cd $GITROOT/$1 || exit 1 | 56 | cd $GITROOT/$1 |
54 | 57 | ||
55 | git branch -r | | 58 | git branch -r | |
56 | while read tag | 59 | while read tag |
@@ -77,3 +80,33 @@ if [ -x .git/hooks/pre-receive ]; then | |||
77 | echo "Keeping old pre-receive hook in $GITROOT/$1/.git/hooks/pre-receive.mirror" | 80 | echo "Keeping old pre-receive hook in $GITROOT/$1/.git/hooks/pre-receive.mirror" |
78 | mv .git/hooks/pre-receive .git/hooks/pre-receive.mirror | 81 | mv .git/hooks/pre-receive .git/hooks/pre-receive.mirror |
79 | fi | 82 | fi |
83 | |||
84 | if test -n "$SVNREADME" -a -r "$SVNREADME"; then | ||
85 | readme=$(basename "$SVNREADME") | ||
86 | cd /tmp | ||
87 | CONAME=$1.$$ | ||
88 | svn co -q $SVNROOT/$1/trunk $CONAME | ||
89 | cd $CONAME | ||
90 | if test "$SVNREMOVE" = "yes"; then | ||
91 | echo "Removing SVN trunk" | ||
92 | svn remove --force --non-interactive * | ||
93 | fi | ||
94 | echo "Installing the $readme file" | ||
95 | if test -x "$SVNREADME"; then | ||
96 | $SVNREADME $1 > "$readme" | ||
97 | else | ||
98 | cp "$SVNREADME" "$readme" | ||
99 | fi | ||
100 | svn add "$readme" | ||
101 | svn commit --non-interactive -m "Add $readme (by $0)" | ||
102 | cd /tmp | ||
103 | rm -rf "$CONAME" | ||
104 | fi | ||
105 | |||
106 | if test -n "$SVNHOOK" -a -r "$SVNHOOK"; then | ||
107 | echo "Installing SVN pre-commit hook" | ||
108 | dir=${SVNROOT##file://}/$1/hooks | ||
109 | cp $SVNHOOK $dir/pre-commit | ||
110 | chmod +x $dir/pre-commit | ||
111 | fi | ||
112 | |||
diff --git a/git/git-svn-mirror-synch b/git/git-svn-mirror-synch index 94a341a..95bf13c 100755 --- a/git/git-svn-mirror-synch +++ b/git/git-svn-mirror-synch | |||
@@ -64,6 +64,7 @@ git branch | sed 's/^\*//' | tr -d ' ' | tee $BRANCHLIST | | |||
64 | git svn rebase -l | 64 | git svn rebase -l |
65 | done | 65 | done |
66 | git checkout master | 66 | git checkout master |
67 | git reset --hard refs/remotes/trunk | ||
67 | 68 | ||
68 | echo "Checking for new branches & tags..." | 69 | echo "Checking for new branches & tags..." |
69 | git tag > $TAGLIST | 70 | git tag > $TAGLIST |