Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gitlab-mirrors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wonko
gitlab-mirrors
Commits
823e3f00
Commit
823e3f00
authored
11 years ago
by
Nikolaus Krismer
Browse files
Options
Downloads
Patches
Plain Diff
#4 fixed
Adding ability to mirror tags in svn repository
parent
1175cb96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
update_mirror.sh
+6
-0
6 additions, 0 deletions
update_mirror.sh
with
6 additions
and
0 deletions
update_mirror.sh
+
6
−
0
View file @
823e3f00
...
...
@@ -35,6 +35,12 @@ if git config --get svn-remote.svn.url &> /dev/null;then
git reset
--hard
git svn fetch
git svn rebase
git
for
-each-ref
--format
=
"%(objectname:short) %(refname)"
refs/remotes/tags |
while
read
ref
;
do
objectname
=
$(
echo
$ref
|
cut
-d
" "
-f
1
)
tagname
=
$(
echo
$ref
|
cut
-d
" "
-f
2 |
cut
-d
/
-f
4
)
GIT_COMMITTER_DATE
=
"
$(
git show
--format
=
%aD |
head
-1
)
"
git tag
-a
$tagname
-m
"import '
$tagname
' tag from svn"
$objectname
done
cd
.git
git config
--bool
core.bare
true
#bug fix for when gitlab is off-line during a cron job the bare setting gets set back to false when the git command fails
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment