Changeset 704 in tailor


Ignore:
Timestamp:
08/27/05 17:44:23 (8 years ago)
Author:
R.Ghetta <birrachiara@…>
Hash name:
20050827154423-2c016-4efd6ae519371fc331c1ddc032822b64ff408023
Message:

aligned wc handling to other backends, small cleanings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/monotone.py

    r699 r704  
    441441        # now childs is a list of revids, we must transform it in a list of changesets 
    442442        childs = outstr[0].getvalue().split() 
    443 #        mtr = MonotoneRevToCset(repository=self.repository, working_dir=self.basedir) 
    444 #        allrev = [sincerev] 
    445 #        allrev.extend(childs) 
    446 #        return mtr( allrev, False ) 
    447443        chlist = [] 
    448444        anc=sincerev 
     
    459455        mtl.execute() 
    460456        if mtl.exit_status: 
    461             self.log_info("'mtn update' returned status %s" % mtl.exit_status) 
    462 #            raise ChangesetApplicationFailure("'mtn update' returned status %s" % mtl.exit_status) 
     457#        self.log_info("'mtn update' returned status %s" % mtl.exit_status) 
     458            raise ChangesetApplicationFailure("'mtn update' returned status %s" % mtl.exit_status) 
    463459        self.oldrev = changeset.lin_ancestor 
    464460        mtr = MonotoneRevToCset(repository=self.repository, working_dir=self.basedir) 
     
    502498            else: 
    503499                fnames.append(fn) 
    504  
    505         cmd = [self.repository.MONOTONE_CMD, "add"] 
    506         add = ExternalCommand(cwd=self.basedir, command=cmd) 
    507         add.execute(fnames) 
    508         if add.exit_status: 
    509             raise ChangesetApplicationFailure("%s returned status %s" % (str(add),add.exit_status)) 
     500        if len(fnames): 
     501            # ok, we still have something to add 
     502            cmd = [self.repository.MONOTONE_CMD, "add"] 
     503            add = ExternalCommand(cwd=self.basedir, command=cmd) 
     504            add.execute(fnames) 
     505            if add.exit_status: 
     506                raise ChangesetApplicationFailure("%s returned status %s" % (str(add),add.exit_status)) 
     507         
    510508 
    511509    def _addSubtree(self, subdir): 
     
    592590        cmd = [self.repository.MONOTONE_CMD, "rename"] 
    593591        rename = ExternalCommand(cwd=self.basedir, command=cmd) 
    594         o1, o2 =rename.execute(oldname, newname, stderr=PIPE) 
    595         stderr.write(o2.read()) 
     592        rename.execute(oldname, newname) 
    596593         
    597594        # redo the rename ... 
     
    684681        Setup the monotone working copy 
    685682 
    686         The user must setup a monotone working directory himself. Then 
     683        The user must setup a monotone working directory himself or use the 
     684        tailor config file to provide parameters for creation. Then 
    687685        we simply use 'monotone commit', without having to specify a database 
    688686        file or branch. Monotone looks up the database and branch in it's MT 
     
    693691            raise TargetInitializationFailure("Please setup '%s' as a monotone working directory" % self.basedir) 
    694692 
    695         self._addSubtree([self.repository.subdir]) 
     693#        self._addSubtree([self.repository.subdir]) 
     694        SyncronizableTargetWorkingDir._initializeWorkingDir(self) 
Note: See TracChangeset for help on using the changeset viewer.