comparison tests/test-topic.t @ 1843:0ba067a97d06

revset: add a topic() revset for querying topics
author Augie Fackler <augie@google.com>
date Wed, 10 Jun 2015 15:26:50 -0400
parents 1bc5e62fc0c7
children 862cabc132fd
comparison
equal deleted inserted replaced
1842:94bbc18daa99 1843:0ba067a97d06
328 328
329 --clear when we don't have an active topic isn't an error: 329 --clear when we don't have an active topic isn't an error:
330 330
331 $ hg topics --clear 331 $ hg topics --clear
332 332
333 Topic revset
334 $ hg log -r 'topic()' -G
335 o changeset: 9:0469d521db49
336 | tag: tip
337 | topic: fran
338 | parent: 3:a53952faf762
339 | user: test
340 | date: Thu Jan 01 00:00:00 1970 +0000
341 | summary: start on fran
342 |
343 $ hg log -r 'not topic()' -G
344 o changeset: 8:ae074045b7a7
345 |\ parent: 7:54c943c1c167
346 | | parent: 6:7c34953036d6
347 | | user: test
348 | | date: Thu Jan 01 00:00:00 1970 +0000
349 | | summary: Finish narf
350 | |
351 | o changeset: 7:54c943c1c167
352 | | parent: 5:c01515cfc331
353 | | user: test
354 | | date: Thu Jan 01 00:00:00 1970 +0000
355 | | summary: Narf is like `zort` or `poit`!
356 | |
357 o | changeset: 6:7c34953036d6
358 | | parent: 4:fb147b0b417c
359 | | user: test
360 | | date: Thu Jan 01 00:00:00 1970 +0000
361 | | summary: narf!
362 | |
363 | @ changeset: 5:c01515cfc331
364 |/ user: test
365 | date: Thu Jan 01 00:00:00 1970 +0000
366 | summary: what is narf, pinky?
367 |
368 o changeset: 4:fb147b0b417c
369 | user: test
370 | date: Thu Jan 01 00:00:00 1970 +0000
371 | summary: start on narf
372 |
373 o changeset: 3:a53952faf762
374 | user: test
375 | date: Thu Jan 01 00:00:00 1970 +0000
376 | summary: Add file delta
377 |
378 o changeset: 2:15d1eb11d2fa
379 | user: test
380 | date: Thu Jan 01 00:00:00 1970 +0000
381 | summary: Add file gamma
382 |
383 o changeset: 1:c692ea2c9224
384 | user: test
385 | date: Thu Jan 01 00:00:00 1970 +0000
386 | summary: Add file beta
387 |
388 o changeset: 0:c2b7d2f7d14b
389 user: test
390 date: Thu Jan 01 00:00:00 1970 +0000
391 summary: Add file alpha
392
393 No matches because narf is already closed:
394 $ hg log -r 'topic(narf)' -G
395 This regexp should match the topic `fran`:
396 $ hg log -r 'topic("re:.ra.")' -G
397 o changeset: 9:0469d521db49
398 | tag: tip
399 | topic: fran
400 | parent: 3:a53952faf762
401 | user: test
402 | date: Thu Jan 01 00:00:00 1970 +0000
403 | summary: start on fran
404 |
405 Exact match on fran:
406 $ hg log -r 'topic(fran)' -G
407 o changeset: 9:0469d521db49
408 | tag: tip
409 | topic: fran
410 | parent: 3:a53952faf762
411 | user: test
412 | date: Thu Jan 01 00:00:00 1970 +0000
413 | summary: start on fran
414 |
415
333 Move to fran, note that the topic activates, then deactivate the topic. 416 Move to fran, note that the topic activates, then deactivate the topic.
334 417
335 $ hg co fran 418 $ hg co fran
336 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 419 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
337 $ hg topics 420 $ hg topics