391 $TESTTMP/server2/bar 6:87d6d6676308 |
392 $TESTTMP/server2/bar 6:87d6d6676308 |
392 $TESTTMP/server2/foo 3:62615734edd5 |
393 $TESTTMP/server2/foo 3:62615734edd5 |
393 default/bar 6:87d6d6676308 |
394 default/bar 6:87d6d6676308 |
394 default/foo 8:3e1487808078 |
395 default/foo 8:3e1487808078 |
395 * foo 8:3e1487808078 |
396 * foo 8:3e1487808078 |
|
397 |
|
398 Testing the names argument to remotenames, remotebranches and remotebookmarks revsets |
|
399 -------------------------------------------------------------------------------------- |
|
400 |
|
401 $ cd .. |
|
402 $ hg clone ssh://user@dummy/server client2 |
|
403 requesting all changes |
|
404 adding changesets |
|
405 adding manifests |
|
406 adding file changes |
|
407 added 9 changesets with 9 changes to 9 files (+1 heads) |
|
408 new changesets 18d04c59bb5d:3e1487808078 |
|
409 updating to branch default |
|
410 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
411 $ cd server2 |
|
412 $ hg up wat |
|
413 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
414 $ echo foo > watwat |
|
415 $ hg ci -Aqm "added watwat" |
|
416 $ hg bookmark bar |
|
417 abort: bookmark 'bar' already exists (use -f to force) |
|
418 [255] |
|
419 $ hg up ec24 |
|
420 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
421 $ echo i > i |
|
422 $ hg ci -Aqm "added i" |
|
423 |
|
424 $ cd ../client2 |
|
425 $ echo "[paths]" >> .hg/hgrc |
|
426 $ echo "server2 = $TESTTMP/server2" >> .hg/hgrc |
|
427 $ hg pull server2 |
|
428 pulling from $TESTTMP/server2 |
|
429 searching for changes |
|
430 adding changesets |
|
431 adding manifests |
|
432 adding file changes |
|
433 added 2 changesets with 2 changes to 2 files |
|
434 new changesets f34adec73c21:bf433e48adea |
|
435 (run 'hg update' to get a working copy) |
|
436 |
|
437 $ hg log -Gr 'remotenames()' -T '{rev}:{node|short} {desc}\n({remotebranches}) [{remotebookmarks}]\n\n' |
|
438 o 10:bf433e48adea added i |
|
439 | (server2/default) [] |
|
440 | |
|
441 | o 9:f34adec73c21 added watwat |
|
442 | | (server2/wat) [] |
|
443 | | |
|
444 | o 8:3e1487808078 added bar |
|
445 | : (default/wat) [default/foo] |
|
446 | : |
|
447 @ : 7:ec2426147f0e Added h |
|
448 | : (default/default) [] |
|
449 | : |
|
450 o : 6:87d6d6676308 Added g |
|
451 :/ () [default/bar server2/bar] |
|
452 : |
|
453 o 3:62615734edd5 Added d |
|
454 | () [server2/foo] |
|
455 ~ |
|
456 |
|
457 Testing for a single remote name which exists |
|
458 |
|
459 $ hg log -r 'remotebranches("default/wat")' -GT "{rev}:{node|short} {remotebranches}\n" |
|
460 o 8:3e1487808078 default/wat |
|
461 | |
|
462 ~ |
|
463 |
|
464 $ hg log -r 'remotebookmarks("server2/foo")' -GT "{rev}:{node|short} {remotebookmarks}\n" |
|
465 o 3:62615734edd5 server2/foo |
|
466 | |
|
467 ~ |
|
468 |
|
469 $ hg log -r 'remotenames("re:default")' -GT "{rev}:{node|short} {remotenames}\n" |
|
470 o 10:bf433e48adea server2/default |
|
471 | |
|
472 | o 8:3e1487808078 default/foo default/wat |
|
473 | | |
|
474 | ~ |
|
475 @ 7:ec2426147f0e default/default |
|
476 | |
|
477 o 6:87d6d6676308 default/bar server2/bar |
|
478 | |
|
479 ~ |
|
480 |
|
481 Testing for a single name which does not exists |
|
482 |
|
483 $ hg log -r 'remotebranches(def)' -GT "{rev}:{node|short} {remotenames}\n" |
|
484 |
|
485 $ hg log -r 'remotebookmarks("server3")' -GT "{rev}:{node|short} {remotenames}\n" |
|
486 |
|
487 $ hg log -r 'remotenames("server3")' -GT "{rev}:{node|short} {remotenames}\n" |
|
488 |
|
489 Testing for multiple names where all of them exists |
|
490 |
|
491 $ hg log -r 'remotenames("re:default", "re:server2")' -GT "{rev}:{node|short} {remotenames}\n" |
|
492 o 10:bf433e48adea server2/default |
|
493 | |
|
494 | o 9:f34adec73c21 server2/wat |
|
495 | | |
|
496 | o 8:3e1487808078 default/foo default/wat |
|
497 | : |
|
498 @ : 7:ec2426147f0e default/default |
|
499 | : |
|
500 o : 6:87d6d6676308 default/bar server2/bar |
|
501 :/ |
|
502 o 3:62615734edd5 server2/foo |
|
503 | |
|
504 ~ |
|
505 |
|
506 $ hg log -r 'remotebranches("default/wat", "server2/wat")' -GT "{rev}:{node|short} {remotebranches}\n" |
|
507 o 9:f34adec73c21 server2/wat |
|
508 | |
|
509 o 8:3e1487808078 default/wat |
|
510 | |
|
511 ~ |
|
512 |
|
513 $ hg log -r 'remotebookmarks("default/foo", "server2/foo")' -GT "{rev}:{node|short} {remotebookmarks}\n" |
|
514 o 8:3e1487808078 default/foo |
|
515 : |
|
516 o 3:62615734edd5 server2/foo |
|
517 | |
|
518 ~ |
|
519 |
|
520 Testing for multipe names where some exists and some not |
|
521 |
|
522 $ hg log -r 'remotenames(def, "re:server2")' -GT "{rev}:{node|short} {remotenames}\n" |
|
523 o 10:bf433e48adea server2/default |
|
524 : |
|
525 : o 9:f34adec73c21 server2/wat |
|
526 : : |
|
527 o : 6:87d6d6676308 default/bar server2/bar |
|
528 :/ |
|
529 o 3:62615734edd5 server2/foo |
|
530 | |
|
531 ~ |
|
532 |
|
533 $ hg log -r 'remotebranches("default/default", server)' -GT "{rev}:{node|short} {remotebranches}\n" |
|
534 @ 7:ec2426147f0e default/default |
|
535 | |
|
536 ~ |
|
537 |
|
538 $ hg log -r 'remotebookmarks("default/foo", serv)' -GT "{rev}:{node|short} {remotebookmarks}\n" |
|
539 o 8:3e1487808078 default/foo |
|
540 | |
|
541 ~ |
|
542 |
|
543 Where multiple names specified and None of them exists |
|
544 |
|
545 $ hg log -r 'remotenames(def, serv2)' -GT "{rev}:{node|short} {remotenames}\n" |
|
546 |
|
547 $ hg log -r 'remotebranches(defu, server)' -GT "{rev}:{node|short} {remotebranches}\n" |
|
548 |
|
549 $ hg log -r 'remotebookmarks(delt, serv)' -GT "{rev}:{node|short} {remotebookmarks}\n" |
|
550 |
|
551 Testing pattern matching |
|
552 |
|
553 $ hg log -r 'remotenames("re:def")' -GT "{rev}:{node|short} {remotenames}\n" |
|
554 o 10:bf433e48adea server2/default |
|
555 | |
|
556 | o 8:3e1487808078 default/foo default/wat |
|
557 | | |
|
558 | ~ |
|
559 @ 7:ec2426147f0e default/default |
|
560 | |
|
561 o 6:87d6d6676308 default/bar server2/bar |
|
562 | |
|
563 ~ |
|
564 |
|
565 $ hg log -r 'remotebranches("re:ser.*2")' -GT "{rev}:{node|short} {remotebranches}\n" |
|
566 o 10:bf433e48adea server2/default |
|
567 | |
|
568 ~ |
|
569 o 9:f34adec73c21 server2/wat |
|
570 | |
|
571 ~ |
|
572 |
|
573 $ hg log -r 'remotebookmarks("re:def", "re:.*2")' -GT "{rev}:{node|short} {remotebookmarks}\n" |
|
574 o 8:3e1487808078 default/foo |
|
575 : |
|
576 : o 6:87d6d6676308 default/bar server2/bar |
|
577 :/ |
|
578 o 3:62615734edd5 server2/foo |
|
579 | |
|
580 ~ |