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

reporegistry: add the same repo at most once

Changeset 4843d743a2e1

Parent e6c3c3b4de13

by Adrian Buehlmann

Changes to one file · Browse files at 4843d743a2e1 Showing diff from parent e6c3c3b4de13 Diff from another changeset...

 
142
143
144
 
 
 
 
 
 
145
146
147
 
166
167
168
169
 
 
 
 
142
143
144
145
146
147
148
149
150
151
152
153
 
172
173
174
 
175
176
177
@@ -142,6 +142,12 @@
  all = self.allrepos   all.appendChild(RepoItem(reporoot))   + def getRepoItem(self, reporoot): + for c in self.allrepos.childs: + if c.rootpath == reporoot: + return c + return None +    class RepoRegistryView(QWidget):   def __init__(self, parent=None): @@ -166,4 +172,6 @@
  self.tview.expandToDepth(0)     def addRepo(self, reporoot): - self.tmodel.addRepo(reporoot) + m = self.tmodel + if m.getRepoItem(reporoot) == None: + m.addRepo(reporoot)