Ejemplo n.º 1
0
  def svn_mkdir(self, rpath):
    lpath = local_path(rpath)
    actions.run_and_verify_svn(None, None, [], 'mkdir', lpath)

    self.state.add({
      rpath : wc.StateItem(status='A ')
    })
Ejemplo n.º 2
0
 def __init__(self, wc_dir, repo):
     """Initialize the object to use the existing WC at path WC_DIR and
 the existing repository object REPO."""
     self.wc_absdir = os.path.abspath(wc_dir)
     # 'state' is, at all times, the 'wc.State' representation of the state
     # of the WC, with paths relative to 'wc_absdir'.
     #self.state = wc.State('', {})
     initial_wc_tree = tree.build_tree_from_wc(self.wc_absdir,
                                               load_props=True)
     self.state = initial_wc_tree.as_state()
     self.state.add({'': wc.StateItem()})
     self.repo = repo
Ejemplo n.º 3
0
    def svn_file_create_add(self, rpath, content=None, props=None):
        "Make and add a file with some default content, and keyword expansion."
        lpath = local_path(rpath)
        ldirname, filename = os.path.split(lpath)
        if content is None:
            # Default content
            content = "This is the file '" + filename + "'.\n" + \
                      "Last changed in '$Revision$'.\n"
        main.file_write(lpath, content)
        actions.run_and_verify_svn(None, [], 'add', lpath)

        self.state.add({rpath: wc.StateItem(status='A ')})
        if props is None:
            # Default props
            props = {'svn:keywords': 'Revision'}
        self.svn_set_props(rpath, props)