Changeset 40 in tracdarcs for tracdarcs/repository.py


Ignore:
Timestamp:
08/09/06 00:03:37 (7 years ago)
Author:
sreeram@…
Hash name:
20060808220337-05313-bb7127043e9b8bdb16c47399d9891411df3d97d2
Message:

Now using a darcs diff based hack for getting file contents, using the slower annotate option as a fallback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tracdarcs/repository.py

    r37 r40  
    2424        CHANGE_EDITED, CHANGE_MOVED_EDITED 
    2525from dbutil import query_nodes_for_revision 
    26 import ann2ascii 
    2726 
    2827''' 
     
    248247            data = str(row[0]) 
    249248            return StringIO.StringIO( data ) 
    250         # load the file content from the repo using ann2ascii 
     249        # load the file content from the repo 
    251250        c.execute( 'SELECT hash FROM darcs_revisions ' + 
    252251                'WHERE rev = %s', (self.rev,) ) 
    253252        hash = c.fetchone()[0] 
    254         annotate = self.__cmd.annotate( hash, self.path ) 
    255         ann = ann2ascii.parse_annotate( StringIO.StringIO(annotate) ) 
    256         out = StringIO.StringIO() 
    257         ann.write( out ) 
    258         data = out.getvalue() 
     253        data = self.__cmd.cat( hash, self.path ) 
    259254 
    260255        # save the file content in the cache 
Note: See TracChangeset for help on using the changeset viewer.