comparison upmana/updatemana.py @ 57:9014d7861bb3 traipse_dev

Removed some extra print messages from the server. Cleaned up the Manifest that was causing problems on linux. Might have been an errouneous push. Testing on WinXP
author sirebral
date Fri, 07 Aug 2009 23:21:37 -0500
parents 0b79d5dbbe9e
children 27e58b0483e7
comparison
equal deleted inserted replaced
56:c7f04d3c76f5 57:9014d7861bb3
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 print ignore.split('/')[len(ignore.split('/')) - 1]
105 shutil.copyfile(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1], ignore) 106 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]) 107 os.remove(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1])
107 108
108 def LoadDoc(self): 109 def LoadDoc(self):
109 ignore = open(self.filename) 110 ignore = open(self.filename)
193 194
194 def BranchInfo(self, branch): 195 def BranchInfo(self, branch):
195 self.filelist.SetValue('') 196 self.filelist.SetValue('')
196 self.filelist.AppendText("Files that will change\n\n") 197 self.filelist.AppendText("Files that will change\n\n")
197 self.changelog.SetValue('') 198 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!!" 199 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') 200 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.") 201 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 202
202 #### Files works but not fully without the change log information, pulled for Dev 0.1 203 #### Files works but not fully without the change log information, pulled for Dev 0.1
203 #for f in files: 204 #for f in files:
475 self.open_rpg.add_component("log", self.log) 476 self.open_rpg.add_component("log", self.log)
476 self.open_rpg.add_component("xml", orpg.orpg_xml) 477 self.open_rpg.add_component("xml", orpg.orpg_xml)
477 self.open_rpg.add_component("dir_struct", orpg.dirpath.dir_struct) 478 self.open_rpg.add_component("dir_struct", orpg.dirpath.dir_struct)
478 self.validate = orpg.tools.validate.Validate() 479 self.validate = orpg.tools.validate.Validate()
479 self.open_rpg.add_component("validate", self.validate) 480 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) 481 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: 482 if self.manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False:
482 self.AutoUpdate(); self.OnExit() 483 self.AutoUpdate(); self.OnExit()
483 else: pass 484 else: pass
484 if self.manifest.GetString('updatemana', 'no_update', '') == 'on' and self.main == False: 485 if self.manifest.GetString('updatemana', 'no_update', '') == 'on' and self.main == False:
485 self.OnExit() 486 self.OnExit()
502 commands.pull(self.ui, self.repo, capture, rev='', update=False, force=True) 503 commands.pull(self.ui, self.repo, capture, rev='', update=False, force=True)
503 filename = 'ignorelist.txt' 504 filename = 'ignorelist.txt'
504 self.filename = orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + filename 505 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") 506 orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep).config_file(filename, "default_ignorelist.txt")
506 self.mana = self.LoadDoc() 507 self.mana = self.LoadDoc()
507 for ignore in self.ignorelist: #Checked or not, if it is here, it is ignored. 508 for ignore in self.ignorelist:
508 try: shutil.copy(ignore, orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep) 509 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) 510 hg.clean(self.repo, self.current)
511 for ignore in self.ignorelist: 511 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) 512 print ignore.split('/')[len(ignore.split('/')) - 1]
513 except: pass 513 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]) 514 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!' 515 else: print 'No default repository set, skipping Auto Update!'
517 516
518 def LoadDoc(self): 517 def LoadDoc(self):
519 ignore = open(self.filename) 518 ignore = open(self.filename)
520 self.ignorelist = [] 519 self.ignorelist = []