Changeset 1415 in tailor for vcpx/repository/darcs/source.py


Ignore:
Timestamp:
06/30/07 15:32:05 (6 years ago)
Author:
lele@…
Hash name:
20070630133205-97f81-537e4cd059ec2746c45322f6e578b3c33ebbdf1c
Message:

Correct the case when the author contains multiple spaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/repository/darcs/source.py

    r1384 r1415  
    320320                pieces = l.rstrip().split('  ') 
    321321                assert len(pieces)>1, "Cannot parse %r as a patch timestamp" % l 
    322                 author = pieces.pop() 
    323                 date = ' '.join(pieces) 
     322 
     323                # Even the author part may contain double spaces: so 
     324                # join the date and time with a single space, and the 
     325                # remaining pieces with a double space. 
     326                date = ' '.join(pieces[:2]) 
     327                author = '  '.join(pieces[2:]) 
    324328                y,m,d,hh,mm,ss,d1,d2,d3 = strptime(date, "%a %b %d %H:%M:%S %Z %Y") 
    325329                date = datetime(y,m,d,hh,mm,ss,0,UTC) 
Note: See TracChangeset for help on using the changeset viewer.