Changeset 31950 in osm


Ignore:
Timestamp:
2016-01-05T16:18:28+01:00 (9 years ago)
Author:
floscher
Message:

[mapillary] Simplify installation instructions, especially setting up git-svn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/INSTALL.md

    r31394 r31950  
     1If you don't want to tinker with the code, just [install JOSM](https://josm.openstreetmap.de/) and open the Settings dialog in JOSM, choose the Plugin tab, check "Mapillary" and you are ready to go.
     2
     3But if you want to explore the sourcecode and maybe even improve it, first of all a :thumbsup: for you, and here are the instructions on getting the source code and building it on your machine:
     4
    15## Setting up your local git-repo
    26
    37```shell
    4 git clone https://github.com/floscher/josm-mapillary-plugin
     8git clone git@github.com:floscher/josm-mapillary-plugin.git
    59cd josm-mapillary-plugin
    6 git svn init --prefix=svn/ http://svn.openstreetmap.org/applications/editors/josm/plugins/mapillary #You have to use http://, _not_ https://
    7 git config --local svn.authorsfile authors.txt
    8 git svn fetch #this might take a while
    9 ```
    10 
    11 ## Fetching from the SVN-repo into your local git-repo
    12 
    13 ```shell
    14 git svn fetch
    1510```
    1611
     
    3328(look for the results in the directory `build/reports`)
    3429
    35 And finally if you have JOSM installed on your machine, you can execute the following to build the plugin from source,
    36 installs it for you in JOSM and then even starts JOSM with the plugin loaded:
     30And finally, you can execute the following to build the plugin from source, and run the latest JOSM with the Mapillary plugin already loaded.
     31This works regardless if you have JOSM installed, or which version of it. Any already present JOSM-installation stays untouched by the following command.
    3732```shell
    3833./gradlew runJosm
     
    4439```
    4540
    46 ## Making changes to the repo and committing them back to SVN
     41---
     42
     43If you don't have push-access to the SVN-server, you should now be ready to go.
     44
     45The following paragraphs only deal with transferring commits grom the GitHub-repository to the SVN-server and the other way around.
     46
     47---
     48
     49## Connecting the git-repo to the SVN-server (optional)
     50
     51This step is normally only relevant, if you either have push-access to the SVN-server and want to push your commits from the git-repo to the SVN-repo. Otherwise just skip it.
     52
     53First, you need to have [`git-svn`](https://git-scm.com/docs/git-svn) installed. E.g. on Ubuntu, just run `sudo apt install git-svn`. On Windows you probably already installed it together with `git`.
     54
     55Then run the following commands:
     56```shell
     57git svn init --prefix=svn/ http://svn.openstreetmap.org/applications/editors/josm/plugins/mapillary #You have to use http://, _not_ https://
     58git config --local svn.authorsfile authors.txt
     59mkdir .git/refs/remotes/svn
     60git rev-parse master > .git/refs/remotes/svn/git-svn # creates a file containing the SHA1 of master-branch
     61git svn fetch
     62git reset --hard svn/git-svn
     63```
     64
     65## Making changes to the repo and committing back to SVN (if you have git-svn set up as described above)
     66
    4767The following steps are for those with commit-privileges for the SVN repository containing the plugins for JOSM.
    4868All others can simply file pull requests against the master-branch on github.
     
    111131This command will ask for your password and shows you the commit message of every git-commit before it
    112132applies it to the SVN-repo.
    113 
    114 ---
    115 
    116 __Pro-tip:__
    117 
    118 If you want to use a different text-editor than git currently uses, execute the following command:
    119 `git config --global core.editor ‹insert_your_favourite_text_editor›` and git will in the future always fire the new
    120 editor up instead.
    121 
    122 The same applies for the merge-tool: After executing `git config --global merge.tool ‹insert_your_favourite_merge_tool›`
    123 you can omit the --tool option when executing `git mergetool` in the future.
Note: See TracChangeset for help on using the changeset viewer.