Exemplo n.º 1
0
def fix_rev(repo_dir, rev):
  """"""

  check_formats(repo_dir)

  # Back up the file
  if not os.path.exists(rev_file_path(repo_dir, rev) + '.orig'):
    pass
    # cp -a "$FILE" "$FILE.orig"

  # Keep looking for verification errors in r$REV and fixing them while we can.
  while fix_one_error(repo_dir, rev):
    pass
  print "Revision " + rev + " verifies OK."
Exemplo n.º 2
0
def replace_in_rev_file(repo_dir, rev, old, new):
  rev_file = rev_file_path(repo_dir, rev)
  replace_in_file(rev_file, old, new)
Exemplo n.º 3
0
def replace_in_rev_file(repo_dir, rev, old, new):
    """Replace all occurrences of the string OLD with the string NEW in the
     revision file for revision REV in the repository at REPO_DIR.  Raise an
     error if nothing changes."""
    rev_file = rev_file_path(repo_dir, rev)
    replace_in_file(rev_file, old, new)
Exemplo n.º 4
0
def replace_in_rev_file(repo_dir, rev, old, new):
  """Replace all occurrences of the string OLD with the string NEW in the
     revision file for revision REV in the repository at REPO_DIR.  Raise an
     error if nothing changes."""
  rev_file = rev_file_path(repo_dir, rev)
  replace_in_file(rev_file, old, new)