Modify

Opened 4 years ago

Closed 12 months ago

Last modified 7 months ago

#6887 closed defect (fixed)

GitHub out of date

Reported by: simon04 Owned by: team
Priority: normal Milestone:
Component: unspecified Version:
Keywords: github mirror Cc: bastiK

Description

JOSM's GitHub mirror is out of date and hasn't been updated since Sept, 19, 2011.

Attachments (0)

Change History (14)

comment:1 Changed 4 years ago by olejorgenb

Any word on this?

comment:2 Changed 4 years ago by stoecker

This is no official part of JOSM. The responsible persons need to be contacted directly (whoever they are).

comment:3 Changed 4 years ago by stoecker

  • Cc bastiK added

comment:4 Changed 4 years ago by simon04

comment:5 Changed 4 years ago by bastiK

It is run by Ævar Arnfjörð Bjarmason, I also contacted him 2 days ago.

comment:6 Changed 4 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 15 months ago by akks

  • Resolution fixed deleted
  • Status changed from closed to reopened

The mirror is outdated again.

If we had fast-updating github mirror, we could also use Travis CI (automatic building and testing after each commit) and detect broken commits.

comment:9 Changed 15 months ago by simon04

Ticket #9483 has been marked as a duplicate of this ticket.

comment:10 Changed 12 months ago by simon04

  • Resolution set to fixed
  • Status changed from reopened to closed

Brought GitHub mirror back to life. Now, it runs on my personal VPS.

This git-svn thing isn't always easy, especially to reattach a Git clone to a SVN repository. Approximately, this is what I did (with the help of http://stackoverflow.com/a/13105418/205629):

git clone https://github.com/openstreetmap/josm.git
git fetch --all
git checkout master
git config svn-remote.svn.url http://josm.openstreetmap.de/svn/trunk
git config svn-remote.svn.fetch :refs/remotes/trunk
git update-ref refs/remotes/trunk c96225bf2118bd2bd4692b155e5f4575172f828c # corresponding to the latest commit of branch master
git svn fetch
git svn rebase

Now, I run the syncing in a cronjob

*/5 * * * * bash /home/simon/mirrors/openstreetmap-mirror/josm-mirror.sh >/dev/null 2>/dev/null

where josm-mirror.sh is from https://github.com/openstreetmap/openstreetmap-mirror with this modifications

  • josm-mirror.sh

    diff --git a/josm-mirror.sh b/josm-mirror.sh
    index 26e373e..b2c167f 100644
    a b  
    11#!/bin/bash -e
    22
     3cd ~/mirrors/josm/
     4
    35# Changes already pulled, merge them to the mirror branch
    46git branch mirror || :
    57git checkout mirror
    git config user.email "openstreetmap@v.nix.is" 
    1820git add .
    1921git commit -m"josm-mirror: bumped externals" || :
    2022
    21 # Evil revision hack
    22 perl -pi -e 's[<arg value="."/>][<arg value="http://josm.openstreetmap.de/svn/trunk"/>]g' build.xml
    23 git commit -m"josm-mirror: evil build.xml revision hack" build.xml || :
    24 
    2523# Push the mirror to GitHub
    26 git remote add mirror git@github.com:openstreetmap/josm.git || :
     24git remote add mirror git@github.com-josm:openstreetmap/josm.git || :
    2725
    2826# Push to our mirrors
    2927git push -v mirror master

comment:11 Changed 12 months ago by bastiK

This is great, thanks Simon!

comment:12 Changed 12 months ago by Don-vip

Thanks!

comment:13 Changed 11 months ago by simon04

The update wasn't running since I forgot the git svn commands … Here's the current diff against the openstreetmap-mirror repo:

  • josm-mirror.sh

    diff --git a/josm-mirror.sh b/josm-mirror.sh
    index 26e373e..31800d6 100644
    a b  
    11#!/bin/bash -e
    22
     3date -Is
     4
     5cd /home/simon/mirrors/josm/
     6
     7# Pull changes from Subversion
     8echo $ git checkout master
     9git checkout master
     10echo $ git svn fetch
     11git svn fetch
     12echo $ git svn rebase
     13git svn rebase
     14
    315# Changes already pulled, merge them to the mirror branch
     16echo $ git branch mirror
    417git branch mirror || :
     18echo $ git checkout mirror
    519git checkout mirror
    6 git merge master
     20echo '$ git merge master -m"Merge branch 'master' into mirror"'
     21git merge master -m"Merge branch 'master' into mirror"
    722
    823# Just do a plain copy of the externals into this repository.
     24echo $ svn export ....
    925svn export --force http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/bzip2                    src/org/apache/tools/bzip2   >/dev/null
    1026svn export --force http://svn.openstreetmap.org/applications/viewer/jmapviewer/src/org/openstreetmap/gui             src/org/openstreetmap/gui    >/dev/null
    1127svn export --force http://svn.openstreetmap.org/applications/share/map-icons/classic.small                           images/styles/standard       >/dev/null
    svn export --force http://svn.apache.org/repos/asf/commons/proper/codec/trunk/sr 
    1531git config user.name "JOSM GitHub mirror"
    1632git config user.email "openstreetmap@v.nix.is"
    1733
     34echo $ git add .
    1835git add .
     36echo '$ git commit -m"josm-mirror: bumped externals"'
    1937git commit -m"josm-mirror: bumped externals" || :
    2038
    21 # Evil revision hack
    22 perl -pi -e 's[<arg value="."/>][<arg value="http://josm.openstreetmap.de/svn/trunk"/>]g' build.xml
    23 git commit -m"josm-mirror: evil build.xml revision hack" build.xml || :
    24 
    2539# Push the mirror to GitHub
    26 git remote add mirror git@github.com:openstreetmap/josm.git || :
     40echo $ git remote add mirror git@github.com-josm:openstreetmap/josm.git
     41git remote add mirror git@github.com-josm:openstreetmap/josm.git || :
    2742
    2843# Push to our mirrors
     44echo $ git push -v mirror master
    2945git push -v mirror master
     46echo $ git push -v mirror mirror
    3047git push -v mirror mirror
     48
     49echo Done ...
     50echo

comment:14 Changed 7 months ago by Don-vip

The mirror is broken again :(

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.