openstreetmap-website
https://github.com/openstreetmap/openstreetmap-website
Ruby
The Rails application that powers OpenStreetMap
ChangesetController#download
download the changeset as an osmChange document. to make it easier to revert diffs it would be better if the osmChange format were reversible, i.e: contained both old and new versions of modified elements. but it doesn't at the moment... this method cannot order the database changes fully (i.e: timestamp and version number may be too coarse) so the resulting diff may not apply to a different database. however since changesets are not atomic this behaviour cannot be guaranteed anyway and is the result of a design choice.
Edit
git clone [email protected]:openstreetmap/openstreetmap-website.git
cd openstreetmap-website
open app/controllers/changeset_controller.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ChangesetController-download-for-pr
# Commit to gitgit add app/controllers/changeset_controller.rbgit commit -m "better docs for ChangesetController#download"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ChangesetController-download-for-pr
hub pull-request
# Celebrate!