except getopt.GetoptError as err:
        # unrecognized option
        usage(str(err))
    for b in args:
        flag_branches[b] = 1

    for opt, _ in optlist:
        if opt == "-d":
            u.increment_verbosity()
        elif opt == "-D":
            flag_dryrun = True
            flag_echo = True
        elif opt == "-e":
            flag_echo = True
        elif opt == "-a":
            flag_allbranches = True
            if args:
                usage("if -a is used, don't supply branch names")
    if not flag_branches and not flag_allbranches:
        usage("supply a branch name as arg, or use -a option")


#
#......................................................................
#
# Main portion of script
#
parse_args()
u.setdeflanglocale()
perform()
 def setUpClass(cls):
   u.unit_test_enable()
   u.setdeflanglocale()
Exemplo n.º 3
0
    ltf = tempfile.NamedTemporaryFile(mode="w",
                                      prefix="svnpreddifftmp_REV%s_" % leftrev,
                                      delete=True)
    leftname = ltf.name
    u.verbose(1, "left temp file is: %s" % leftname)
    u.docmdout("svn cat -r%d %s" % (leftrev, flag_target_file), leftname)
    if flag_save_temps:
      save_temps(ltf, leftrev)
  else:
    u.verbose(1, "left file is: %s" % flag_target_file)
    leftname = flag_target_file
  rtf = tempfile.NamedTemporaryFile(mode="w",
                                    prefix="svnpreddifftmp_REV%s_" % rightrev,
                                    delete=True)
  rightname = rtf.name
  u.verbose(1, "right temp file is: %s" % rightname)
  u.docmdout("svn cat -r%d %s" % (rightrev, flag_target_file), rightname)
  if flag_save_temps:
    save_temps(rtf, rightrev)
  # Perform diff
  u.docmd("%s %s %s" % (flag_diff_cmd, leftname, rightname))


#----------------------------------------------------------------------
#
# Main portion of script
#
parse_args()
u.setdeflanglocale()
perform_diff()
Exemplo n.º 4
0
 def setUpClass(cls):
     u.unit_test_enable()
     u.setdeflanglocale()