Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

guess: fix partial match behavior

remove exact matches from partial source list, so they arent' reported twice.
Use floating point division to get a real percentage value

Changeset 63f105615e5f

Parent 890148e266c1

by Steve Borho

Changes to one file · Browse files at 63f105615e5f Showing diff from parent 890148e266c1 Diff from another changeset...

 
173
174
175
176
 
177
178
179
 
359
360
361
 
362
363
 
364
 
365
366
367
 
173
174
175
 
176
177
178
179
 
359
360
361
362
363
364
365
366
367
368
369
370
@@ -173,7 +173,7 @@
  self.findbtn.setEnabled(True)   self.matchbtn.setDisabled(model.isEmpty())   - pct = self.simslider.value() / 100 + pct = self.simslider.value() / 100.0   copies = not self.copycheck.isChecked()   model = self.matchlv.model()   model.clear() @@ -359,9 +359,12 @@
  # do not consider files of zero length   added = sorted([fctx for fctx in added if fctx.size() > 0])   removed = sorted([fctx for fctx in removed if fctx.size() > 0]) + exacts = []   for o, n in similar._findexactmatches(repo, added, removed):   old, new = o.path(), n.path() + exacts.append(old)   self.match.emit(old, new, '100%') + removed = [r for r in removed if r.path() not in exacts]   if self.minpct < 1.0:   for o, n, s in similar._findsimilarmatches(repo, added, removed,   self.minpct):