File tree 1 file changed +8
-10
lines changed
1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -789,16 +789,14 @@ def update(
789
789
if lines :
790
790
self ._choose_lines_or_arcs (lines = True )
791
791
792
- with con .execute (
793
- "select file.path, context.context, line_bits.numbits " +
794
- "from line_bits " +
795
- "inner join file on file.id = line_bits.file_id " +
796
- "inner join context on context.id = line_bits.context_id" ,
797
- ) as cur :
798
- for path , context , numbits in cur :
799
- key = (aliases_map (path ), context )
800
- if key in lines :
801
- lines [key ] = numbits_union (lines [key ], numbits )
792
+ for (file , context ), numbits in lines .items ():
793
+ with con .execute (
794
+ "select numbits from line_bits where file_id = ? and context_id = ?" ,
795
+ (file_ids [file ], context_ids [context ]),
796
+ ) as cur :
797
+ existing = list (cur )
798
+ if existing :
799
+ lines [(file , context )] = numbits_union (numbits , existing [0 ][0 ])
802
800
803
801
con .executemany_void (
804
802
"insert or replace into line_bits " +
You can’t perform that action at this time.
0 commit comments