Changeset 868 in tailor


Ignore:
Timestamp:
10/03/05 13:44:34 (8 years ago)
Author:
lele@…
Hash name:
20051003114434-97f81-cf7f393f2f65c2161a1e3810156164c59558201c
Message:

Report back svn failure message that's printed on stderr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/svn.py

    r856 r868  
    230230        retry = 0 
    231231        while True: 
    232             out = svnup.execute(stdout=PIPE)[0] 
     232            out, err = svnup.execute(stdout=PIPE, stderr=PIPE) 
    233233 
    234234            if svnup.exit_status == 1: 
     
    237237                    break 
    238238                delay = 2**retry 
    239                 self.log_info("%s returned status %s saying \"%s\", " 
     239                self.log_info("%s returned status %s saying %r, " 
    240240                              "retrying in %d seconds..." % 
    241                               (str(svnup), svnup.exit_status, out.read(), 
     241                              (str(svnup), svnup.exit_status, err.read(), 
    242242                               delay)) 
    243243                sleep(delay) 
     
    274274                                          "--revision", "1:HEAD") 
    275275            svnlog = ExternalCommand(command=cmd) 
    276             output = svnlog.execute("%s%s" % (self.repository.repository, 
    277                                               self.repository.module), 
    278                                     stdout=PIPE)[0] 
     276            out, err = svnlog.execute("%s%s" % (self.repository.repository, 
     277                                                self.repository.module), 
     278                                      stdout=PIPE, stderr=PIPE) 
    279279 
    280280            if svnlog.exit_status: 
    281281                raise TargetInitializationFailure( 
    282                     "%s returned status %d saying \"%s\"" % 
    283                     (str(svnlog), svnlog.exit_status, output.read())) 
    284  
    285             csets = changesets_from_svnlog(output, 
     282                    "%s returned status %d saying %r" % 
     283                    (str(svnlog), svnlog.exit_status, err.read())) 
     284 
     285            csets = changesets_from_svnlog(out, 
    286286                                           self.repository.repository, 
    287287                                           self.repository.module) 
     
    295295                                          "--revision", revision) 
    296296            svnco = ExternalCommand(command=cmd) 
    297             svnco.execute("%s%s" % (self.repository.repository, 
    298                                     self.repository.module), self.basedir) 
     297            out, err = svnco.execute("%s%s" % (self.repository.repository, 
     298                                               self.repository.module), 
     299                                     self.basedir, stdout=PIPE, stderr=PIPE) 
    299300            if svnco.exit_status: 
    300301                raise TargetInitializationFailure( 
    301                     "%s returned status %s" % (str(svnco), svnco.exit_status)) 
     302                    "%s returned status %s saying %r" % (str(svnco), 
     303                                                         svnco.exit_status, 
     304                                                         err.read())) 
    302305        else: 
    303306            self.log_info("%s already exists, assuming it's a svn working dir" % self.basedir) 
     
    307310                                          "--revision", revision=='HEAD' and 'COMMITTED' or revision) 
    308311            svnlog = ExternalCommand(cwd=self.basedir, command=cmd) 
    309             output = svnlog.execute(stdout=PIPE)[0] 
     312            out, err = svnlog.execute(stdout=PIPE, stderr=PIPE) 
    310313 
    311314            if svnlog.exit_status: 
    312315                raise TargetInitializationFailure( 
    313                     "%s returned status %d saying \"%s\"" % 
    314                     (str(changes), changes.exit_status, output.read())) 
    315  
    316             csets = changesets_from_svnlog(output, 
     316                    "%s returned status %d saying %r" % 
     317                    (str(changes), changes.exit_status, err.read())) 
     318 
     319            csets = changesets_from_svnlog(out, 
    317320                                           self.repository.repository, 
    318321                                           self.repository.module) 
     
    376379        log.close() 
    377380 
    378         cmd = self.repository.command("commit", "--file", rontf.name) 
     381        cmd = self.repository.command("commit", "--quiet", "--file", rontf.name) 
    379382        commit = ExternalCommand(cwd=self.basedir, command=cmd) 
    380383 
Note: See TracChangeset for help on using the changeset viewer.