591
591
svntest.actions.run_and_verify_update(wc_dir,
592
592
expected_output, None, None)
594
def node_hidden_info(sbox):
595
"fetch svn info on 'hidden' nodes"
599
sbox.simple_rm('A/B/E/alpha')
601
svntest.actions.run_and_verify_svn(None, [],
602
'up', '--set-depth', 'exclude',
603
sbox.ospath('A/B/E/beta'))
605
sbox.simple_copy('A/B/E', 'E')
607
# Running info on BASE not-present fails
608
expected_err = '.*(E|W)155010: The node \'.*alpha\' was not found.*'
609
svntest.actions.run_and_verify_svn(None, expected_err,
610
'info', sbox.ospath('A/B/E/alpha'))
614
'Path': re.escape(sbox.ospath('A/B/E/beta')),
615
'Schedule': 'normal',
620
'Path': re.escape(sbox.ospath('E/alpha')),
621
'Schedule': 'delete',
623
'Node Kind': 'unknown',
626
'Path': re.escape(sbox.ospath('E/beta')),
627
'Schedule': 'normal',
633
svntest.actions.run_and_verify_info(expected_info,
634
sbox.ospath('A/B/E/beta'),
635
sbox.ospath('E/alpha'),
636
sbox.ospath('E/beta'))
639
def info_item_simple(sbox):
642
sbox.build(read_only=True)
643
svntest.actions.run_and_verify_svn(
645
'info', '--show-item=revision', '--no-newline',
649
def info_item_simple_multiple(sbox):
650
"show one info item with multiple targets"
652
sbox.build(read_only=True)
654
svntest.actions.run_and_verify_svn(
655
r'^jrandom\s+\S+(/|\\)info_tests-\d+((/|\\)[^/\\]+)?$', [],
656
'info', '--show-item=last-changed-author',
657
'--depth=immediates', sbox.ospath(''))
659
svntest.actions.run_and_verify_svn(
660
r'^1\s+\S+(/|\\)info_tests-\d+(/|\\)[^/\\]+$', [],
661
'info', '--show-item=last-changed-revision',
662
sbox.ospath('A'), sbox.ospath('iota'))
665
def info_item_url(sbox):
666
"show one info item with URL targets"
668
sbox.build(create_wc=False, read_only=True)
670
svntest.actions.run_and_verify_svn(
672
'info', '--show-item=last-changed-revision',
676
svntest.actions.run_and_verify_svn(
677
r'^1\s+[^/:]+://.+/repos/[^/]+$', [],
678
'info', '--show-item=last-changed-revision',
679
sbox.repo_url + '/A', sbox.repo_url + '/iota')
682
# Empty working copy root on URL targets
683
svntest.actions.run_and_verify_svn(
685
'info', '--show-item=wc-root',
689
def info_item_uncommmitted(sbox):
690
"show one info item on uncommitted targets"
694
svntest.main.file_write(sbox.ospath('newfile'), 'newfile')
695
sbox.simple_add('newfile')
696
sbox.simple_mkdir('newdir')
698
svntest.actions.run_and_verify_svn(
700
'info', '--show-item=last-changed-revision',
701
sbox.ospath('newfile'))
703
svntest.actions.run_and_verify_svn(
705
'info', '--show-item=last-changed-author',
706
sbox.ospath('newdir'))
708
svntest.actions.run_and_verify_svn(
709
r'\s+\S+(/|\\)new(file|dir)', [],
710
'info', '--show-item=last-changed-date',
711
sbox.ospath('newfile'), sbox.ospath('newdir'))
713
svntest.actions.run_and_verify_svn(
714
r'\^/new(file|dir)\s+\S+(/|\\)new(file|dir)', [],
715
'info', '--show-item=relative-url',
716
sbox.ospath('newfile'), sbox.ospath('newdir'))
719
def info_item_failures(sbox):
720
"failure modes of 'svn info --show-item'"
722
sbox.build(read_only=True)
724
svntest.actions.run_and_verify_svn(
725
None, r'.*E200009:.*',
726
'info', '--show-item=revision',
727
sbox.ospath('not-there'))
729
svntest.actions.run_and_verify_svn(
730
None, r".*E205000: .*; did you mean 'wc-root'\?",
731
'info', '--show-item=root',
734
svntest.actions.run_and_verify_svn(
735
None, (r".*E205000: --show-item is not valid in --xml mode"),
736
'info', '--show-item=revision', '--xml',
739
svntest.actions.run_and_verify_svn(
740
None, (r".*E205000: --incremental is only valid in --xml mode"),
741
'info', '--show-item=revision', '--incremental',
744
svntest.actions.run_and_verify_svn(
745
None, (r".*E205000: --no-newline is only available.*"),
746
'info', '--show-item=revision', '--no-newline',
747
sbox.ospath('A'), sbox.ospath('iota'))
594
750
########################################################################