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

Side by Side Diff: README.md

Issue 29599579: OffTopic: DependencyUpdater
Patch Set: Created Nov. 6, 2017, 2:04 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Easy dependency updating
2
3 ## Trivial
kzar 2017/11/10 14:32:00 Nit: Maybe rename this to Introduction and add a p
tlucas 2017/11/13 14:34:08 Done.
4
5 Since there won't be any way to bridge submodules / subrepositories between git and mercurial any time soon, we will stay dependent on a manual approach for mir roring these ourselves.
kzar 2017/11/10 14:32:01 Nit: "Git" and "Mercurial".
kzar 2017/11/10 14:32:01 Nit: Mind wrapping some of these long lines where
tlucas 2017/11/13 14:34:07 Done.
6
7 This program is meant to be pure convenience for those, who find themselves in t he need to update a project's dependency.
kzar 2017/11/10 14:32:00 I guess this sentence can go when the above paragr
tlucas 2017/11/13 14:34:08 Done.
8
9 ## Requirements
10
11 - [Python 2.7](https://www.python.org/download/releases/2.7/)
12 - [Git](https://git-scm.com/)
13 - [Mercurial](https://www.mercurial-scm.org/)
14
15 _(Please note, as soon as https://hg.adblockplus.org/buildtools/file/tip/ensure_ dependencies.py is made Python 3.* compatible, the requirement for Python 2.7.* will be removed.)_
16
17 ## Compatibility
18
19 This program runs with both Python 2.7.* and Python 3.*.
20
21 ## Installation
22
23 Execute setup.py:
24 ```
25 $ python setup.py install
26 ```
27
28 _Please note: setup.py will additionally install [jinja2](http://jinja.pocoo.org /docs/2.9/) on your machine._
29
30 ## Limitations
31
32 Mainly due to humans being involved in reporting issues, there is no guarantee t hat looking up integration notes will find everything that is needed to be done, in order to update to a new revision.
33
kzar 2017/11/10 14:32:01 Maybe add a note here that the revision for Mercur
tlucas 2017/11/13 14:34:08 As discussed ;)
34 ## Running the programm
kzar 2017/11/10 14:32:00 Would be nice to have an example which shows how t
tlucas 2017/11/13 14:34:08 Done.
35
36 Simply call the executable inside a repository which as dependencies.
37 A few examples:
38
39 ### Show a list of changes between the current revision and the remote master fo r adblockpluscore
40
41 ```
42 $ depup changes adblockpluscore
43
44 ( dbfc37143497 ) : Noissue - Fix the escaping of '{' and '}' in CSS selectors (b y Hubert Figuière)
45 ( 1bb277740973 ) : Issue 5160 - Alias new class names and properties. (by Hubert Figuière)
46 ( 280efb445cc1 ) : Issue 5147 - Invalidate wrapper on delete (by Hubert Figuière )
47
48 ```
49
50 ### Generate a bare issue body, but explicitly skip any mirroring
51
52 ```
53 $ depup issue adblockpluscore -r master -s
kzar 2017/11/10 14:32:01 When I read this example I tried it without the `-
tlucas 2017/11/13 14:34:07 The title of the example should be sufficient imho
54
kzar 2017/11/10 14:32:00 Missing closing ```.
tlucas 2017/11/13 14:34:08 Not quite, the closing ``` are below the issue bod
55 === Background ===
56
57 CHANGE ME!
58
59 === Included changes in `adblockpluscore` ===
60 The list of changes imported by this is:
61 [[TicketQuery(id=5728&id=5773&id=5797&id=5735,order=id,desc=1,format=table,col=s ummary|component)]]
62
63 || [https://hg.adblockplus.org/adblockpluscore/rev/dbfc37143497 dbfc37143497] || Noissue - Fix the escaping of '{' and '}' in CSS selectors || Hubert Figuière | |
64 || [https://hg.adblockplus.org/adblockpluscore/rev/b21bddce2678 b21bddce2678] || Noissue - Fixed typo with getLocalizedTexts function || Dave Barker ||
65 || [https://hg.adblockplus.org/adblockpluscore/rev/a1b481e7d728 a1b481e7d728] || Noissue - Updated recommended subscriptions || Wladimir Palant ||
66 || [https://hg.adblockplus.org/adblockpluscore/rev/fb758f96f7bb fb758f96f7bb] || Noissue - rename variable 'ret' to more meaningful 'filter' in lib/filterClasse s.js || Sergei Zabolotskikh ||
67
68
69 === What to change ===
70 Update the `adblockpluscore` dependency to:
71
72 || **mercurial** || **git** ||
73 || dbfc37143497 || NO MIRROR ||
74
75 === Integration Notes ===
76
77 CHANGE ME!
78
79 === Hints for testers ===
80
81 CHANGE ME!
82 ```
83
84 ### Print information on the last 5 commits and lookup possible "Integration Not es" for those
85
86 ```
87 (gitrepo)$ depup changes adblockpluscore -r HEAD~5 -l
88
89 WARNING: you are trying to downgrade the dependency!
90 Integration notes found: https://issues.adblockplus.org/ticket/5735
91 ( 2b57122 ) : Noissue - Fixed typo with getLocalizedTexts function Review: https ://codereview.adblockplus.org/29567746/ (by Dave Barker)
92 ( 662ce93 ) : Noissue - Updated recommended subscriptions (by Wladimir Palant)
93 ( 0591517 ) : Issue 5773 - use ES6 for stylesheets and cssRules. (by Hubert Figu ière)
94 ( 991b43c ) : Issue 5797 - Removed obsolete arguments from ElemHideEmulation con structor (by Sebastian Noack)
95 ( e533ded ) : Issue 5735 - Use JS Map instead of Object for matcher properties f ilterByKeyword and keywordByFilter (by Sergei Zabolotskikh)
96 ```
97
98 ## Templating
kzar 2017/11/10 14:32:00 Nit: IMO this section isn't too important, so shou
tlucas 2017/11/13 14:34:07 Done.
99
100 You can provide your own template, which can be rendered with all available info rmation. The default template renders as shown in the above example.
101
102 There are at any time these values exposed to the template:
103
104 - `repository` - the repository to update (equals the positional argument of dep up).
105 - `issue_ids` - A list of encountered Issue ids or an empty array.
106 - `noissues` - Changes which could not be associated with an issue id. Either an empty array, or a list of dictionaries, each containg the following key/value p airs:
107 * `author` - the author of the commit.
108 * `message` - the commit message, stripped to the first line.
109 * `date` - The commit date, in the rfc822 format.
110 * `git_hash` - the git hash of the commit, (mirrored if root VCS is mercurial, 'NO MIRROR' if mirroring was skipped)
111 * `git_url` - the revisions' url @ www.github.com
112 * `hg_hash` - the mercurial hash of the commit, (mirrored if root VCS is git, 'NO MIRROR' if mirroring was skipped)
113 * `hg_url` - the revisions url @ hg.adblockplus.org
114 - `hg_hash` - the mercurial hash for the new revision ('NO MIRROR' if mercurial is the mirror's vcs and mirroring is skipped)
115 - `git_hash` the git hash for the new revision ('NO MIRROR' if git is the mirror 's vcs and mirroring is skipped)
116
117 For more information, please consult [the jinja2 documentation](http://jinja.poc oo.org/docs/2.9/).
118
119 ## Help
120
121 Depup comes with an integrated help page for each subcommand. The full pages:
122
123 ### Root
124
125 ```
126 usage: depup [-h] {diff,issue,changes} ...
127
128 Prepare a dependency update.
129
130 This script executes the automatable work which needs to be done for a
131 dependency update and provides additional information, i.e. a complete
132 diff of imported changes, as well as related integration notes.
133
134 optional arguments:
135 -h, --help show this help message and exit
136
137 Subcommands:
138 {diff,issue,changes} Required, the actual command to be executed. Execute
139 run "<subcommand> -h" for more information.
140
141 ```
142
143 ### diff
144
145 ```
146 usage: depup diff [-h] [-r NEW_REVISION] [-f FILENAME] [-l] [-s]
147 [-m LOCAL_MIRROR] [-n UNIFIED_LINES]
148 dependency
149
150 optional arguments:
151 -h, --help show this help message and exit
152 -n UNIFIED_LINES, --n-context-lines UNIFIED_LINES
153 Number of unified context lines to be added to the
154 diff. Defaults to 16 (Used only with -d/--diff).
155
156 Shared options:
157 dependency The dependency to be updated, as specified in the
158 dependencies file.
159 -r NEW_REVISION, --revision NEW_REVISION
160 The revision to update to. Defaults to the remote
161 master bookmark/branch. Must be accessible by the
162 dependency's vcs.
163 -f FILENAME, --filename FILENAME
164 When specified, write the subcommand's output to the
165 given file, rather than to STDOUT.
166 -l, --lookup-integration-notes
167 Search https://issues.adblockplus.org for integration
168 notes associated with the included issue IDs. The
169 results are written to STDERR. CAUTION: This is a very
170 network heavy operation.
171 -s, --skip-mirror Do not use any mirror.
172 -m LOCAL_MIRROR, --mirrored-repository LOCAL_MIRROR
173 Path to the local copy of a mirrored repository. Used
174 to fetch the corresponding hash. If not given, the
175 source parsed from the dependencies file is used.
176
177 ```
178
179 ### changes
180
181 ```
182 usage: depup changes [-h] [-r NEW_REVISION] [-f FILENAME] [-l] [-s]
183 [-m LOCAL_MIRROR]
184 dependency
185
186 optional arguments:
187 -h, --help show this help message and exit
188
189 Shared options:
190 dependency The dependency to be updated, as specified in the
191 dependencies file.
192 -r NEW_REVISION, --revision NEW_REVISION
193 The revision to update to. Defaults to the remote
194 master bookmark/branch. Must be accessible by the
195 dependency's vcs.
196 -f FILENAME, --filename FILENAME
197 When specified, write the subcommand's output to the
198 given file, rather than to STDOUT.
199 -l, --lookup-integration-notes
200 Search https://issues.adblockplus.org for integration
201 notes associated with the included issue IDs. The
202 results are written to STDERR. CAUTION: This is a very
203 network heavy operation.
204 -s, --skip-mirror Do not use any mirror.
205 -m LOCAL_MIRROR, --mirrored-repository LOCAL_MIRROR
206 Path to the local copy of a mirrored repository. Used
207 to fetch the corresponding hash. If not given, the
208 source parsed from the dependencies file is used.
209
210 ```
211
212 ### issue
213
214 ```
215 usage: depup issue [-h] [-r NEW_REVISION] [-f FILENAME] [-l] [-s]
216 [-m LOCAL_MIRROR] [-t TMPL_PATH]
217 dependency
218
219 optional arguments:
220 -h, --help show this help message and exit
221 -t TMPL_PATH, --template TMPL_PATH
222 The template to use. Defaults to the provided
223 default.trac (Used only with -i/--issue).
224
225 Shared options:
226 dependency The dependency to be updated, as specified in the
227 dependencies file.
228 -r NEW_REVISION, --revision NEW_REVISION
229 The revision to update to. Defaults to the remote
230 master bookmark/branch. Must be accessible by the
231 dependency's vcs.
232 -f FILENAME, --filename FILENAME
233 When specified, write the subcommand's output to the
234 given file, rather than to STDOUT.
235 -l, --lookup-integration-notes
236 Search https://issues.adblockplus.org for integration
237 notes associated with the included issue IDs. The
238 results are written to STDERR. CAUTION: This is a very
239 network heavy operation.
240 -s, --skip-mirror Do not use any mirror.
241 -m LOCAL_MIRROR, --mirrored-repository LOCAL_MIRROR
242 Path to the local copy of a mirrored repository. Used
243 to fetch the corresponding hash. If not given, the
244 source parsed from the dependencies file is used.
245
246 ```
OLDNEW

Powered by Google App Engine
This is Rietveld