Changeset 1010 in tailor


Ignore:
Timestamp:
11/17/05 04:57:53 (8 years ago)
Author:
Brendan Cully <brendan@…>
Hash name:
20051117035753-0ae3a-f4cd98ed1e8331615044945055d7aaeb85b4e901
Message:

Don't crash on empty darcs changesets

The old guard code "if changeset" would never fail because the
expression being tested is a generator, which always exists even if it
never yields anything. Guard on the StopIteration? exception instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/darcs.py

    r1009 r1010  
    303303        changes = ExternalCommand(cwd=self.basedir, command=cmd) 
    304304        last = changesets_from_darcschanges(changes.execute(stdout=PIPE)[0]) 
    305         if last: 
     305        try: 
    306306            changeset.entries.extend(last.next().entries) 
     307        except StopIteration: 
     308            pass 
    307309 
    308310        return conflicts 
Note: See TracChangeset for help on using the changeset viewer.