Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.3, 2.0.4, and 2.0.5

stable sync: use a more strict output node verify routine

Changeset 868ccf195869

Parent 99d48b85041d

by Steve Borho

Changes to one file · Browse files at 868ccf195869 Showing diff from parent 99d48b85041d Diff from another changeset...

 
752
753
754
 
 
 
 
 
755
756
757
 
758
759
760
 
752
753
754
755
756
757
758
759
760
761
 
762
763
764
765
@@ -752,9 +752,14 @@
  urlu = hglib.tounicode(url)   self.showMessage.emit(_('Finding outgoing changesets to %s...') % urlu)   if self.embedded and not self.opts.get('subrepos'): + def verifyhash(hash): + if len(hash) != 40: + return False + bad = [c for c in hash if c not in '0123456789abcdef'] + return not bad   def outputnodes(ret, data):   if ret == 0: - nodes = [n for n in data.splitlines() if len(n) == 40] + nodes = [n for n in data.splitlines() if verifyhash(n)]   if nodes:   self.outgoingNodes.emit(nodes)   self.showMessage.emit(_('%d outgoing changesets to %s') %