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: more effectively prevent duplicate entries in related paths

Changeset 0df9bdd76f1a

Parent 5891829b2f07

by Steve Borho

Changes to one file · Browse files at 0df9bdd76f1a Showing diff from parent 5891829b2f07 Diff from another changeset...

 
341
342
343
344
345
 
 
 
 
 
 
 
346
347
348
 
 
 
 
349
350
 
351
352
353
 
358
359
360
361
 
 
 
 
 
362
363
 
364
365
366
 
341
342
343
 
 
344
345
346
347
348
349
350
351
352
 
353
354
355
356
357
 
358
359
360
361
 
366
367
368
 
369
370
371
372
373
374
 
375
376
377
378
@@ -341,13 +341,21 @@
  self.postpullbutton.setText(name)     # Refresh related paths - known = set(self.paths.values()) - known.add(self.repo.root) + known = set() + known.add(os.path.abspath(self.repo.root).lower()) + for path in self.paths.values(): + if hg.islocal(path): + known.add(os.path.abspath(hg.localpath(path)).lower()) + else: + known.add(path)   related = {}   for root, shortname in thgrepo.relatedRepositories(self.repo[0].node()): - if root not in known: + if root == self.repo.root: + continue + abs = os.path.abspath(root).lower() + if abs not in known:   related[root] = shortname - known.add(root) + known.add(abs)   if root in thgrepo._repocache:   # repositories already opened keep their ui instances in sync   repo = thgrepo._repocache[root] @@ -358,9 +366,13 @@
  tempui.readconfig(os.path.join(root, '.hg', 'hgrc'))   ui = tempui   for alias, path in ui.configitems('paths'): - if path not in known: + if hg.islocal(path): + abs = os.path.abspath(hg.localpath(path)).lower() + else: + abs = path + if abs not in known:   related[path] = alias - known.add(path) + known.add(abs)   pairs = [(alias, path) for path, alias in related.items()]   tm = PathsModel(pairs, self)   self.reltv.setModel(tm)