comparison upmana/updatemana.py @ 16:281ca8daa911 grumpy-goblin

Traipse 'OpenRPG' {090808-00} 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. 'Grumpy-Goblin' was created as a stablizing branch in an effort to remove bugs from core code. Update Summary: This version is stable. ServerGUI works with very few problems, Update Manager is working quite well, and the software has been improved in overall stability This update cleans print statements, adds the /tmp/tmp.txt placeholder, and removes one major bug that caused errors to appear with the ServerGUI
author sirebral
date Sat, 08 Aug 2009 00:35:09 -0500
parents e8260c6cb309
children 265b987cce4f
comparison
equal deleted inserted replaced
15:b6c6ec28ba8a 16:281ca8daa911
97 filename = 'ignorelist.txt' 97 filename = 'ignorelist.txt'
98 self.filename = orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + filename 98 self.filename = orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + filename
99 orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep).config_file(filename, "default_ignorelist.txt") 99 orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep).config_file(filename, "default_ignorelist.txt")
100 self.mana = self.LoadDoc() 100 self.mana = self.LoadDoc()
101 for ignore in self.ignorelist: 101 for ignore in self.ignorelist:
102 shutil.copy(ignore, orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep) 102 shutil.copy(ignore, orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep +ignore.split('/')[len(ignore.split('/')) - 1])
103 hg.clean(self.repo, self.current) 103 hg.clean(self.repo, self.current)
104 for ignore in self.ignorelist: 104 for ignore in self.ignorelist:
105 shutil.copyfile(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1], ignore) 105 shutil.copyfile(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1], ignore)
106 os.remove(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1]) 106 os.remove(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1])
107 107
193 193
194 def BranchInfo(self, branch): 194 def BranchInfo(self, branch):
195 self.filelist.SetValue('') 195 self.filelist.SetValue('')
196 self.filelist.AppendText("Files that will change\n\n") 196 self.filelist.AppendText("Files that will change\n\n")
197 self.changelog.SetValue('') 197 self.changelog.SetValue('')
198 changelog = "Traipse 'OpenRPG' Update Manager.\n\nThis is Dev Build 0.6.9(stable) of the Update Manager. This version is nearly 100% functional. Users can now add repositories of OpenRPG, choose from different branches available from those repositories, and add files to an ignore list.\n\nThe Update Manager is divided into tabs, Updater, Repos, Manifest, and Control. \n\nUpdater: Set your update type on startup; Auto, None. Select a package of changes from a branch and update.\n\nRepos: Collect repositories of different projects. Set a name then assign it a URL. Refresh repositories in your list or delete them from your list.\n\nManifest: A complete list of all the files in your current change set. Check files off that you want to be safe from future updates.\n\nControl: Incomplete. Future revisions will allow users to update to specific revision branchs and delete branches from their computer.\n\nThis is a good start. Enjoy the freedom!!" 198 changelog = "Traipse 'OpenRPG' Update Manager.\n\nThis is Dev Build 0.7 (open beta) of the Update Manager. This version is nearly 100% functional. Users can now add repositories of OpenRPG, choose from different branches available from those repositories, and add files to an ignore list.\n\nThe Update Manager is divided into tabs, Updater, Repos, Manifest, and Control. \n\nUpdater: Set your update type on startup; Auto, None. Select a package of changes from a branch and update.\n\nRepos: Collect repositories of different projects. Set a name then assign it a URL. Refresh repositories in your list or delete them from your list.\n\nManifest: A complete list of all the files in your current change set. Check files off that you want to be safe from future updates.\n\nControl: Incomplete. Future revisions will allow users to update to specific revision branchs and delete branches from their computer.\n\nThis is a good start. Enjoy the freedom!!"
199 self.changelog.AppendText(changelog + '\n') 199 self.changelog.AppendText(changelog + '\n')
200 self.filelist.AppendText("Traipse 'OpenRPG'\n\n Currently selected branch: " + branch + "\n\nFile List: When Control is completed this field will display a list of files that will be affected by your selection of branch. The window to the left will display the description of the branch.\n\nDescription: Stable releases will have a formated Description that displays the Build Number, a summary of the branch, and a summary of the changes in the selected changeset.") 200 self.filelist.AppendText("Traipse 'OpenRPG'\n\n Currently selected branch: " + branch + "\n\nFile List: When Control is completed this field will display a list of files that will be affected by your selection of branch. The window to the left will display the description of the branch.\n\nDescription: Stable releases will have a formated Description that displays the Build Number, a summary of the branch, and a summary of the changes in the selected changeset.")
201 201
202 #### Files works but not fully without the change log information, pulled for Dev 0.1 202 #### Files works but not fully without the change log information, pulled for Dev 0.1
203 #for f in files: 203 #for f in files:
475 self.open_rpg.add_component("log", self.log) 475 self.open_rpg.add_component("log", self.log)
476 self.open_rpg.add_component("xml", orpg.orpg_xml) 476 self.open_rpg.add_component("xml", orpg.orpg_xml)
477 self.open_rpg.add_component("dir_struct", orpg.dirpath.dir_struct) 477 self.open_rpg.add_component("dir_struct", orpg.dirpath.dir_struct)
478 self.validate = orpg.tools.validate.Validate() 478 self.validate = orpg.tools.validate.Validate()
479 self.open_rpg.add_component("validate", self.validate) 479 self.open_rpg.add_component("validate", self.validate)
480 self.updater = updaterFrame(self, "OpenRPG Update Manager 0.6.9 (open beta)", self.open_rpg, self.manifest, self.main) 480 self.updater = updaterFrame(self, "OpenRPG Update Manager 0.7 (open beta)", self.open_rpg, self.manifest, self.main)
481 if self.manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False: 481 if self.manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False:
482 self.AutoUpdate(); self.OnExit() 482 self.AutoUpdate(); self.OnExit()
483 else: pass 483 else: pass
484 if self.manifest.GetString('updatemana', 'no_update', '') == 'on' and self.main == False: 484 if self.manifest.GetString('updatemana', 'no_update', '') == 'on' and self.main == False:
485 self.OnExit() 485 self.OnExit()
502 commands.pull(self.ui, self.repo, capture, rev='', update=False, force=True) 502 commands.pull(self.ui, self.repo, capture, rev='', update=False, force=True)
503 filename = 'ignorelist.txt' 503 filename = 'ignorelist.txt'
504 self.filename = orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + filename 504 self.filename = orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + filename
505 orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep).config_file(filename, "default_ignorelist.txt") 505 orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep).config_file(filename, "default_ignorelist.txt")
506 self.mana = self.LoadDoc() 506 self.mana = self.LoadDoc()
507 for ignore in self.ignorelist: #Checked or not, if it is here, it is ignored. 507 for ignore in self.ignorelist:
508 try: shutil.copy(ignore, orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep) 508 shutil.copy(ignore, orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep +ignore.split('/')[len(ignore.split('/')) - 1])
509 except: pass
510 hg.clean(self.repo, self.current) 509 hg.clean(self.repo, self.current)
511 for ignore in self.ignorelist: 510 for ignore in self.ignorelist:
512 try: shutil.copyfile(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1], ignore) 511 print ignore.split('/')[len(ignore.split('/')) - 1]
513 except: pass 512 shutil.copyfile(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1], ignore)
514 try: os.remove(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1]) 513 os.remove(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1])
515 except: pass
516 else: print 'No default repository set, skipping Auto Update!' 514 else: print 'No default repository set, skipping Auto Update!'
517 515
518 def LoadDoc(self): 516 def LoadDoc(self):
519 ignore = open(self.filename) 517 ignore = open(self.filename)
520 self.ignorelist = [] 518 self.ignorelist = []