Changeset 1064 in tailor


Ignore:
Timestamp:
02/12/06 18:33:51 (7 years ago)
Author:
Cameron Patrick <cameron@…>
Hash name:
20060212173351-a57c3-8a8199690e3b006e1f6566fc2c9f1a6efb18730a
Message:

Fix handling of tla archives with "untagged-source unrecognized" set
If a tla archive has the "untagged-source unrecognized" option in its
tagging-method file, tla will complain if there are any foreign files
present (e.g. the _darcs directory containing darcs metadata). The
tla backend was supposed to fix this but the code there didn't work
properly, as it was too fussy about tla exit codes and the output
formats of tla tree-lint.
This patch makes it work again (tested with tla 1.3.3).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/tla.py

    r979 r1064  
    217217                            command=self.repository.command("tree-lint", "-tu")) 
    218218        out = c.execute(stdout=PIPE)[0] 
    219         tempdir = None 
    220         if c.exit_status: 
    221             tempdir = mkdtemp("", "++tailor-", self.basedir) 
    222             try: 
    223                 for e in out: 
    224                     e = e.strip() 
    225                     ht = os.path.split(e) 
    226                     # only accept inventory violations at the root 
    227                     if ht[0] and ht[1]: 
    228                         raise ChangesetApplicationFailure( 
    229                             "%s complains about \"%s\"" % (str(c), e)) 
    230                     os.rename(os.path.join(self.basedir, e), 
    231                               os.path.join(tempdir, e)) 
    232             except: 
    233                 self.__restore_foreign_entries(tempdir) 
    234                 raise 
     219        tempdir = mkdtemp("", "++tailor-", self.basedir) 
     220        try: 
     221            for e in out: 
     222                e = e.strip() 
     223                ht = os.path.split(e) 
     224                # only move inventory violations at the root 
     225                if ht[0] and ht[1]: 
     226                    continue 
     227                os.rename(os.path.join(self.basedir, e), 
     228                          os.path.join(tempdir, e)) 
     229        except: 
     230            self.__restore_foreign_entries(tempdir) 
     231            raise 
    235232        return tempdir 
    236233 
Note: See TracChangeset for help on using the changeset viewer.