Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: update-copyright/README.md

Issue 29459580: Issue 5250 - Add copyright update script (Closed) Base URL: https://hg.adblockplus.org/codingtools
Left Patch Set: Created June 8, 2017, 1:39 p.m.
Right Patch Set: Fix indentation and default args Created July 17, 2017, 1:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « .hgignore ('k') | update-copyright/tests/data/hg_page.html » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
1 # update-copyright 1 # update-copyright
2 2
3 A script that opens each repo listed on [hg.adblockplus.org](https://hg.adblockp lus.org/) and updates the copyrights on each page to the current year. 3 This script will attempt to update the eyeo copyright information on each
4 page of each repo listed on a Mercurial index page.
5 By default, running the script will scrape [https://hg.adblockplus.org/](https:/ /hg.adblockplus.org/),
6 and then for each repo, it will:
7 * make a local copy of the repo
8 * update the copyright information on each file to the current year
9 * attempt to push the updates to `ssh://hg@hg.adblockplus.org/`
4 10
5 ## Usage 11 If a user doesn't have permission to push to a repo, the script will make a
12 local `repo-name.patch` file to submit later.
6 13
7 $ python3 update_copyright.py 14 You are free to use this for other projects but please keep in mind that we
15 make no stability guarantees whatsoever and might change functionality any
16 time.
18 ## How to use
20 To update the copyright on all the repos indexed at [https://hg.adblockplus.org/ ](https://hg.adblockplus.org/),
21 simply run the script, e.g.:
23 ./update_copyright.py
25 To run the script elsewhere, you must specify the URL for a Mercurial index
26 site to scrape, and the location of the base URL to push to, e.g.:
28 ./update_copyright.py -u https://hg.example.com/ -p ssh://user@hg.example.co m/
8 29
9 ## Testing 30 ## Testing
10 31
11 The tests can be run via [Tox](http://tox.readthedocs.org/) 32 Testing can be run via [tox](http://tox.readthedocs.org/).
Jon Sonesen 2017/06/13 16:30:19 I think you can pass the url to the webpage to be
rosie 2017/06/23 14:39:20 Done.

Powered by Google App Engine
This is Rietveld