comparison upmana/updatemana.py @ 62:e8029caed892 ornery-dev

Traipse Dev 'OpenRPG' {090813-01} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc''s main goal is to offer more advanced features and enhance the productivity of the user. Update Summary: Minor fix to Update Manager. Files only shows files added to the most recent commit. Please Manifest your important files when switching branches. Nodehandler now adds .xml to saved nodes if .xml is not the last 4 characters.
author sirebral
date Thu, 13 Aug 2009 13:01:09 -0500
parents f3d8101211c4
children c54768cffbd4
comparison
equal deleted inserted replaced
61:f3d8101211c4 62:e8029caed892
174 branches = dict.copy(self.repo.branchtags()) 174 branches = dict.copy(self.repo.branchtags())
175 self.BranchInfo(self.current) 175 self.BranchInfo(self.current)
176 176
177 def BranchInfo(self, branch): 177 def BranchInfo(self, branch):
178 cs = self.repo.changectx( self.current ).changeset() 178 cs = self.repo.changectx( self.current ).changeset()
179 rev = self.repo.changelog.rev(self.repo.branchtags()[self.current]) #Current revision number. Use in Controls
179 self.changelog.SetValue('') 180 self.changelog.SetValue('')
180 changelog = cs[4] 181 changelog = cs[4]
181 self.changelog.AppendText(changelog + '\n') 182 self.changelog.AppendText(changelog + '\n')
182 self.filelist.SetValue('') 183 self.filelist.SetValue('')
183 self.filelist.AppendText("Currently selected branch: " + branch + "\n\nAuthor: "+cs[1]+"\n\nFiles Modified (in branch): \n") 184 self.filelist.AppendText("Currently selected branch: " + branch + "\n\nAuthor: "+cs[1]+"\n\nFiles Modified (in update): \n")
184 for f in cs[3]: 185 for f in cs[3]: self.filelist.AppendText(f+"\n")
185 self.filelist.AppendText(f+"\n")
186 186
187 def get_packages(self, type=None): 187 def get_packages(self, type=None):
188 #Fixed and ready for Test. Can be cleaner 188 #Fixed and ready for Test. Can be cleaner
189 self.package_list = [] 189 self.package_list = []
190 b = self.repo.branchtags() 190 b = self.repo.branchtags()
191 heads = dict.fromkeys(self.repo.heads(), 1) 191 heads = dict.fromkeys(self.repo.heads(), 1) #The code below looks superfluous but there is good info inside
192 l = [((n in heads), self.repo.changelog.rev(n), n, t) for t, n in b.items()] 192 l = [((n in heads), self.repo.changelog.rev(n), n, t) for t, n in b.items()]
193 l.sort() 193 l.sort()
194 l.reverse() 194 l.reverse()
195 for ishead, r, n, t in l: self.package_list.append(t) 195 for ishead, r, n, t in l: self.package_list.append(t)
196 196
197 def get_package(self): 197 def get_package(self):
198 #Fixed and ready for test.
199 self.get_packages() 198 self.get_packages()
200 if self.package_list == None: return None 199 if self.package_list == None: return None
201 return None 200 return None
202 201
203 class Repos(wx.Panel): 202 class Repos(wx.Panel):
237 self.sizers["newrepo_layout"].Add(empty, -1) 236 self.sizers["newrepo_layout"].Add(empty, -1)
238 self.sizers["newrepo_layout"].Add(reponame, -1, wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL|wx.ALL) 237 self.sizers["newrepo_layout"].Add(reponame, -1, wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL|wx.ALL)
239 self.sizers["newrepo_layout"].Add(self.texts["reponame"], -1, wx.EXPAND) 238 self.sizers["newrepo_layout"].Add(self.texts["reponame"], -1, wx.EXPAND)
240 self.sizers["newrepo_layout"].AddGrowableCol(1) 239 self.sizers["newrepo_layout"].AddGrowableCol(1)
241 self.sizers["newbutton"].Add(self.sizers["newrepo_layout"], -1, wx.EXPAND) 240 self.sizers["newbutton"].Add(self.sizers["newrepo_layout"], -1, wx.EXPAND)
241
242 #Repo List Panel 242 #Repo List Panel
243 self.repopanel = wx.ScrolledWindow(self) 243 self.repopanel = wx.ScrolledWindow(self)
244 self.repopanel.SetScrollbars(20,20,55,40) 244 self.repopanel.SetScrollbars(20,20,55,40)
245 self.repopanel.Scroll(50,10) 245 self.repopanel.Scroll(50,10)
246 self.box_sizers["repolist"] = wx.StaticBox(self.repopanel, -1, "Current Repo List") 246 self.box_sizers["repolist"] = wx.StaticBox(self.repopanel, -1, "Current Repo List")
447 447
448 def OnClose(self, event): 448 def OnClose(self, event):
449 if self.main == False: self.Destroy() 449 if self.main == False: self.Destroy()
450 if self.main == True: self.Hide() 450 if self.main == True: self.Hide()
451 451
452
453 class updateApp(wx.App): 452 class updateApp(wx.App):
454 def OnInit(self): 453 def OnInit(self):
455 self.open_rpg = open_rpg 454 self.open_rpg = open_rpg
456 self.main = False 455 self.main = False
457 self.log = orpg.tools.orpg_log.orpgLog(orpg.dirpath.dir_struct["user"] + "runlogs/") 456 self.log = orpg.tools.orpg_log.orpgLog(orpg.dirpath.dir_struct["user"] + "runlogs/")