[osmosis-dev] Version Control Full History and GIT Test

2011-09-07 Thread Brett Henderson
Hi All,

I've been playing in a couple of areas with regards to Osmosis version
control.

   - I'm pondering a move to GIT.  Primarily because it gives people a
   better opportunity to experiment with the codebase.  Secondly because I am
   experimenting with GIT anyway and wanted a real-world task to work with.
   - The svn history is disjointed due to the early history being hosted on
   my server, and subsequent history being on the osm svn server.  In addition
   there have been some renames and re-organisation that are confusing and
   break potential migrations to other tools (ie. GIT).

I decided I'd try to fix the SVN history and produce a single repo with
complete history.  What started out as a simple shell script with some grep
and sed statements quickly got out of hand and became a full-blown
java-based SVN dump file re-writer that looks quite a lot like Osmosis
itself.  Perhaps I should have written it as an Osmosis plugin :-)  Anyway,
it does the following major operations.

   - Creates a new empty repo with standard trunk/tags/branches structure at
   the root.
   - Extracts history from http://www.bretth.com/repos/main from revision
   417-471 which was the initial period of Osmosis when it was called
   conduit.
  - Replaces the conduit path with trunk.
  - Removes the initial creation of conduit directory which isn't
  necessary as data will be imported into existing trunk.
  - Renumbers the revisions from 1 upwards.
  - Skips revision 472 which was a rename from conduit to osmosis.  We
   don't need this because the project name isn't reflected in the new repo,
   the project is stored in the root.
   - Extracts history from revision 473-474 which are the only two revisions
   with code stored in the root of the osmosis project.
  - Replaces the osmosis path with trunk.
  - Renumbers the revisions.
  - Skips revision 475 which was a re-organisation into a
   trunk/tags/branches structure.  This is already done in the new repository.
   - Extracts all remaining revisions in my repository from 475-HEAD.
  - Removes the osmosis prefix on paths.
  - Renumbers the revisions.
  - Skips 4742 because that's the original import which is already done
   in the new repo.
   - Extracts history from
   http://svn.openstreetmap.org/applications/utils/osmosis from 4743-12410.
   - Replaces the applications/utils/osmosis path with trunk.
  - Renumbers the revisions.
  - Skips 12411 which was a re-organisation into a trunk/tags/branches
   structure.
   - Extracts remaining history from 12412-HEAD.
  - Replaces a copyfrom path for creation of 0.28 and 0.29 tags which
  refer to revisions prior to the repo re-structure and thus have incorrect
  path structures in the dump file.
  - Removes the applications/utils/osmosis prefix on paths.
  - Renumbers the revisions.

It seems to have all worked well.  It provides a single repo with full
history from day 1, gives a consistent directory layout for the entire
history, and includes all tags that were ever created.  I got part way there
with shell scripts, but the real trick was the revision renumbering which
had to be done because there are numerous occasions where revisions copy
files from significantly older revisions where the main svn repo moved on
between me copying a latest version file and actually doing a commit.
Renumbering required knowledge of entire history and called for a better
language.  One thing I haven't fixed is the svn:mergeinfo tags (it's hard),
so I'll probably remove them completely to avoid any confusion.

If you want to try it out for yourself, the migration app is here:
https://www.bretth.com/repos/main/osmosis-svn-to-git

If you load it up in Eclipse, you can simply run the DumpFileMigrator
class.  From a command line you'd need to compile the app and run it with
the shell scripts in your working directory.  Note that it will take a
*very* long time the first time you run it because it generates a complete
snapshot of the main osm repository locally using svnsync.  If you already
have a replica you can copy it in because it continues to update the one it
has each time you run it.

Any thoughts re a possible GIT move?

Brett
___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev


Re: [osmosis-dev] Version Control Full History and GIT Test

2011-09-07 Thread Igor Podolskiy

Hi Brett,


  • I'm pondering a move to GIT.  Primarily because it gives people a
better opportunity to experiment with the codebase.  Secondly because I
am experimenting with GIT anyway and wanted a real-world task to work
with.

[...]

Any thoughts re a possible GIT move?
that would be _really_ cool. In fact, I've been running more or less of 
a mirror of the latest revisions of Osmosis trunk on Github [1]. It is 
really much simpler to work and try things out and keep track of 
upstream and so on than with SVN. There's even a place for a GIT 
repository already, the Openstreetmap organization on GitHub [2].


The only thing we'd need to change would be the build script for the 
snapshot version string - currently it uses the SVN revision. In 
osmosis-fastused, I already made a similar Ant build script which uses 
the git revision (or tag, if available), to be found here [3].


Greetings from Stuttgart,
Igor

[1] https://github.com/podolsir/osmosis-trunk-mirror
[2] https://github.com/openstreetmap
[3] https://github.com/podolsir/osmosis-fastused/blob/master/build.xml#L35

___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev


Re: [osmosis-dev] SEVERE: Thread for task 1-rx failed

2011-09-07 Thread Igor Podolskiy

Hi Clay,

FINE: Waiting for task 1-rx to complete.
Sep 6, 2011 4:51:01 PM
org.openstreetmap.osmosis.core.pipeline.common.ActiveTask
Manager waitForCompletion
SEVERE: Thread for task 1-rx failed
java.lang.NullPointerException
at org.mapsforge.preprocessing.map.osmosis.MapFileWriterTask.release(Map
FileWriterTask.java:192)
judging by the stack trace, the pipeline fails somewhere in the map file 
writer task which seems to be a plugin - in any case, it is AAFAIK not 
part of Osmosis proper. I would suggest you ask the developers of this 
plugin about further help.


Greeting from Stuttgart
Igor

___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev