Mercurial > hg
comparison tests/test-hgweb-json.t @ 24564:5ec4bda3097a
hgweb: add phase to {changeset} template
It's pretty surprising phase wasn't part of this template call already.
We now expose {phase} to the {changeset} template and we expose this
data to JSON.
This brings JSON output in line with the output from `hg log -Tjson`.
The lone exception is hweb doesn't print the numeric rev. As has been
stated previously, I don't believe hgweb should be exposing these
unstable identifiers. (We can add them later if we really want them.)
There is still work to bring hgweb in parity with --verbose and
--debug output from the CLI.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 31 Mar 2015 22:29:12 -0700 |
parents | 830280536946 |
children | 0bf54479a9eb |
comparison
equal
deleted
inserted
replaced
24563:830280536946 | 24564:5ec4bda3097a |
---|---|
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21 (leaving bookmark bookmark1) | 21 (leaving bookmark bookmark1) |
22 $ hg mv foo foo-new | 22 $ hg mv foo foo-new |
23 $ hg commit -m 'move foo' | 23 $ hg commit -m 'move foo' |
24 $ hg tag -m 'create tag' tag1 | 24 $ hg tag -m 'create tag' tag1 |
25 $ hg phase --public -r . | |
25 $ echo baz > da/foo | 26 $ echo baz > da/foo |
26 $ hg commit -m 'another commit to da/foo' | 27 $ hg commit -m 'another commit to da/foo' |
27 $ hg tag -m 'create tag2' tag2 | 28 $ hg tag -m 'create tag2' tag2 |
28 $ hg bookmark bookmark2 | 29 $ hg bookmark bookmark2 |
29 $ hg -q up -r 0 | 30 $ hg -q up -r 0 |
160 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", | 161 "node": "cc725e08502a79dd1eda913760fbe06ed7a9abc7", |
161 "parents": [ | 162 "parents": [ |
162 "ceed296fe500c3fac9541e31dad860cb49c89e45", | 163 "ceed296fe500c3fac9541e31dad860cb49c89e45", |
163 "ed66c30e87eb65337c05a4229efaa5f1d5285a90" | 164 "ed66c30e87eb65337c05a4229efaa5f1d5285a90" |
164 ], | 165 ], |
166 "phase": "draft", | |
165 "tags": [ | 167 "tags": [ |
166 "tip" | 168 "tip" |
167 ], | 169 ], |
168 "user": "test" | 170 "user": "test" |
169 } | 171 } |
183 "desc": "move foo", | 185 "desc": "move foo", |
184 "node": "78896eb0e102174ce9278438a95e12543e4367a7", | 186 "node": "78896eb0e102174ce9278438a95e12543e4367a7", |
185 "parents": [ | 187 "parents": [ |
186 "8d7c456572acf3557e8ed8a07286b10c408bcec5" | 188 "8d7c456572acf3557e8ed8a07286b10c408bcec5" |
187 ], | 189 ], |
190 "phase": "public", | |
188 "tags": [ | 191 "tags": [ |
189 "tag1" | 192 "tag1" |
190 ], | 193 ], |
191 "user": "test" | 194 "user": "test" |
192 } | 195 } |
208 "desc": "modify da/foo", | 211 "desc": "modify da/foo", |
209 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", | 212 "node": "8d7c456572acf3557e8ed8a07286b10c408bcec5", |
210 "parents": [ | 213 "parents": [ |
211 "f8bbb9024b10f93cdbb8d940337398291d40dea8" | 214 "f8bbb9024b10f93cdbb8d940337398291d40dea8" |
212 ], | 215 ], |
216 "phase": "public", | |
213 "tags": [], | 217 "tags": [], |
214 "user": "test" | 218 "user": "test" |
215 } | 219 } |
216 | 220 |
217 changeset/{revision} shows branches | 221 changeset/{revision} shows branches |
229 "desc": "create test branch", | 233 "desc": "create test branch", |
230 "node": "6ab967a8ab3489227a83f80e920faa039a71819f", | 234 "node": "6ab967a8ab3489227a83f80e920faa039a71819f", |
231 "parents": [ | 235 "parents": [ |
232 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" | 236 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" |
233 ], | 237 ], |
238 "phase": "draft", | |
234 "tags": [], | 239 "tags": [], |
235 "user": "test" | 240 "user": "test" |
236 } | 241 } |
237 | 242 |
238 manifest/{revision}/{path} shows info about a directory at a revision | 243 manifest/{revision}/{path} shows info about a directory at a revision |