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: Also test strings and non-eyeo copyright info Created July 7, 2017, 3:55 p.m.
Right Patch Set: Fix indentation and default args Created July 17, 2017, 1:22 p.m.
Left:
Right:
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')
LEFTRIGHT
1 # update-copyright 1 # update-copyright
2 2
3 This script accepts a URL to a mercurial index as input. It then: 3 This script will attempt to update the eyeo copyright information on each
4 * makes a local copy of each repo 4 page of each repo listed on a Mercurial index page.
5 * updates the copyright information on every file to the current year 5 By default, running the script will scrape [https://hg.adblockplus.org/](https:/ /hg.adblockplus.org/),
6 * attempts to push the updates 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/`
7 10
8 If a user doesn't have permission to push to a repo, the script will make a 11 If a user doesn't have permission to push to a repo, the script will make a
9 local `repo-name.patch` file to submit later. 12 local `repo-name.patch` file to submit later.
10 13
11 You are free to use this for other projects but please keep in mind that we 14 You are free to use this for other projects but please keep in mind that we
12 make no stability guarantees whatsoever and might change functionality any 15 make no stability guarantees whatsoever and might change functionality any
13 time. 16 time.
14 17
15 ## How to use 18 ## How to use
16 19
17 To update the copyright on all the repos indexed at 20 To update the copyright on all the repos indexed at [https://hg.adblockplus.org/ ](https://hg.adblockplus.org/),
18 [https://hg.adblockplus.org/](https://hg.adblockplus.org/), you can use the 21 simply run the script, e.g.:
19 accompanying shell script, e.g.:
20 22
21 ./run_update_copyright.sh 23 ./update_copyright.py
22 24
23 To run the script elsewhere, you must specify the URL for a Mercurial index 25 To run the script elsewhere, you must specify the URL for a Mercurial index
24 site to scrape, e.g.: 26 site to scrape, and the location of the base URL to push to, e.g.:
25 27
26 ./update_copyright.py -u https://hg.example.com/ 28 ./update_copyright.py -u https://hg.example.com/ -p ssh://user@hg.example.co m/
27
28 You may also specify a base URL of a remote repo to push to, if it is
29 different than the base URL of the index page, e.g.:
30
31 ./update_copyright.py -u https://hg.example.com/ -p ssh://user@hg.
32 example.com/
33 29
34 ## Testing 30 ## Testing
35 31
36 Testing can be run via [tox](http://tox.readthedocs.org/). 32 Testing can be run via [tox](http://tox.readthedocs.org/).
LEFTRIGHT

Powered by Google App Engine
This is Rietveld