Exemple #1
0
def blame_merge_out_of_range(sbox):
  "don't look for merged files out of range"

  from log_tests import merge_history_repos
  merge_history_repos(sbox)

  wc_dir = sbox.wc_dir
  upsilon_path = os.path.join(wc_dir, 'trunk', 'A', 'upsilon')

  exit_code, output, error = svntest.actions.run_and_verify_svn(
    None, None, [],
    'blame', '-g', upsilon_path)

  expected_blame = [
      { 'revision' : 4,
        'author' : 'jrandom',
        'text' : "This is the file 'upsilon'.\n",
        'merged' : 0,
      },
      { 'revision' : 11,
        'author': 'jrandom',
        'text' : "There is also the file 'xi'.\n",
        'merged' : 1,
      },
    ]
  parse_and_verify_blame(output, expected_blame, 1)
Exemple #2
0
def blame_merge_out_of_range(sbox):
    "don't look for merged files out of range"

    from log_tests import merge_history_repos
    merge_history_repos(sbox)

    wc_dir = sbox.wc_dir
    upsilon_path = os.path.join(wc_dir, 'trunk', 'A', 'upsilon')

    exit_code, output, error = svntest.actions.run_and_verify_svn(
        None, None, [], 'blame', '-g', upsilon_path)

    expected_blame = [
        {
            'revision': 4,
            'author': 'jrandom',
            'text': "This is the file 'upsilon'.\n",
            'merged': 0,
        },
        {
            'revision': 11,
            'author': 'jrandom',
            'text': "There is also the file 'xi'.\n",
            'merged': 1,
        },
    ]
    parse_and_verify_blame(output, expected_blame, 1)
Exemple #3
0
def blame_merge_info(sbox):
  "test 'svn blame -g'"

  from log_tests import merge_history_repos
  merge_history_repos(sbox)

  wc_dir = sbox.wc_dir
  iota_path = os.path.join(wc_dir, 'trunk', 'iota')

  exit_code, output, error = svntest.actions.run_and_verify_svn(
    None, None, [],
    'blame', '-g', iota_path)

  expected_blame = [
      { 'revision' : 2,
        'author' : 'jrandom',
        'text' : "This is the file 'iota'.\n",
        'merged' : 0,
      },
      { 'revision' : 11,
        'author' : 'jrandom',
        'text' : "'A' has changed a bit, with 'upsilon', and 'xi'.\n",
        'merged' : 1,
      },
    ]
  parse_and_verify_blame(output, expected_blame, 1)
Exemple #4
0
def blame_merge_info(sbox):
    "test 'svn blame -g'"

    from log_tests import merge_history_repos
    merge_history_repos(sbox)

    wc_dir = sbox.wc_dir
    iota_path = os.path.join(wc_dir, 'trunk', 'iota')

    output, error = svntest.actions.run_and_verify_svn(None, None, [], 'blame',
                                                       '-g', iota_path)
    expected_blame = [
        {
            'revision': 2,
            'author': 'jrandom',
            'text': "This is the file 'iota'.\n",
            'merged': 0,
        },
        {
            'revision': 11,
            'author': 'jrandom',
            'text': "'A' has changed a bit, with 'upsilon', and 'xi'.\n",
            'merged': 1,
        },
    ]
    parse_and_verify_blame(output, expected_blame, 1)
Exemple #5
0
def blame_merge_info(sbox):
    "test 'svn blame -g'"

    from log_tests import merge_history_repos
    merge_history_repos(sbox)

    wc_dir = sbox.wc_dir
    iota_path = os.path.join(wc_dir, 'trunk', 'iota')
    mu_path = os.path.join(wc_dir, 'trunk', 'A', 'mu')

    exit_code, output, error = svntest.actions.run_and_verify_svn(
        None, [], 'blame', '-g', iota_path)

    expected_blame = [
        {
            'revision': 2,
            'author': 'jrandom',
            'text': "This is the file 'iota'.\n",
            'merged': 0,
        },
        {
            'revision': 11,
            'author': 'jrandom',
            'text': "'A' has changed a bit, with 'upsilon', and 'xi'.\n",
            'merged': 1,
        },
    ]
    parse_and_verify_blame(output, expected_blame, 1)

    exit_code, output, error = svntest.actions.run_and_verify_svn(
        None, [], 'blame', '-g', '-r10:11', iota_path)

    expected_blame = [
        {
            'revision': None,
            'author': None,
            'text': "This is the file 'iota'.\n",
            'merged': 0,
        },
        {
            'revision': None,
            'author': None,
            'text': "'A' has changed a bit.\n",
            'merged': 0,
        },
    ]
    parse_and_verify_blame(output, expected_blame, 1)

    exit_code, output, error = svntest.actions.run_and_verify_svn(
        None, [], 'blame', '-g', '-r16:17', mu_path)

    expected_blame = [
        {
            'revision': None,
            'author': None,
            'text': "This is the file 'mu'.\n",
            'merged': 0,
        },
        {
            'revision': 16,
            'author': 'jrandom',
            'text': "Don't forget to look at 'upsilon', as well.\n",
            'merged': 1,
        },
        {
            'revision': 16,
            'author': 'jrandom',
            'text': "This is yet more content in 'mu'.\n",
            'merged': 1,
        },
    ]
    parse_and_verify_blame(output, expected_blame, 1)