Mercurial > traipse_dev
diff upmana/updatemana.py @ 48:0aeee1992423 traipse_dev
This updates fixes three things. Branch names are now current to your udpate
and updates take place before the program starts and minor error in update
code (unremarked, removed '.')
author | sirebral |
---|---|
date | Thu, 06 Aug 2009 04:26:02 -0500 |
parents | 52f6a38f8885 |
children | b41ea7d28a9e |
line wrap: on
line diff
--- a/upmana/updatemana.py Thu Aug 06 03:31:21 2009 -0500 +++ b/upmana/updatemana.py Thu Aug 06 04:26:02 2009 -0500 @@ -57,7 +57,7 @@ self.SetAutoLayout(True) self.get_package - self.current = self.c.branch() + self.current = self.repo.dirstate.branch() self.BranchInfo(self.current) ## Event Handlers @@ -88,13 +88,13 @@ self.repo = hg.repository(self.ui, ".") self.c = self.repo.changectx('tip') - filename = '.ignorelist.txt' + filename = 'ignorelist.txt' self.filename = orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + filename orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep).config_file(filename, "default_ignorelist.txt") self.mana = self.LoadDoc() for ignore in self.ignorelist: shutil.copy(ignore, orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep) - #hg.clean(self.repo, self.current) + hg.clean(self.repo, self.current) for ignore in self.ignorelist: shutil.copyfile(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1], ignore) os.remove(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1]) @@ -113,7 +113,11 @@ dlg = wx.Dialog(self, wx.ID_ANY, "Package Selector", style=wx.DEFAULT_DIALOG_STYLE) if wx.Platform == '__WXMSW__': icon = wx.Icon(self.dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO) else: icon = wx.Icon(self.dir_struct["icon"]+"d20.xpm", wx.BITMAP_TYPE_XPM ) - dlg.SetIcon(icon) + dlg.SetIcon(icon) + + self.ui = ui.ui() + self.repo = hg.repository(self.ui, ".") + self.c = self.repo.changectx('tip') dlgsizer = wx.GridBagSizer(hgap=1, vgap=1) Yes = wx.Button( dlg, wx.ID_OK, "Ok" ) @@ -125,7 +129,7 @@ if self.package_list == None: return types = self.package_list row=0; col=0 - self.current = self.c.branch() + self.current = self.repo.dirstate.branch() self.package_type = self.current self.btnlist = {}; self.btn = {} self.id = 1 @@ -217,7 +221,7 @@ self.r = hg.repository(self.ui, ".") self.c = self.r.changectx('tip') - mainpanel = self + #mainpanel = self self.openrpg = openrpg self.manifest = manifest self.buttons = {} @@ -356,23 +360,18 @@ self.ui = ui.ui() self.repo = hg.repository(self.ui, ".") self.c = self.repo.changectx('tip') - self.manifestlist = [] self.manifestlist = self.c.manifest().keys() for mana in self.manifestlist: mana = os.sep + 'orpg' + os.sep + mana self.manifestlist.sort() - self.SetBackgroundColour(wx.WHITE) self.sizer = wx.GridBagSizer(hgap=1, vgap=1) - self.manifestlog = wx.CheckListBox( self, -1, wx.DefaultPosition, wx.DefaultSize, self.manifestlist, wx.LC_REPORT|wx.SUNKEN_BORDER|wx.EXPAND|wx.LC_HRULES) - filename = 'ignorelist.txt' self.filename = orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + filename orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep).config_file(filename, "default_ignorelist.txt") self.mana = self.LoadDoc() - self.manifestlog.Bind(wx.EVT_CHECKLISTBOX, self.GetChecked) self.sizer.Add(self.manifestlog, (0,0), flag=wx.EXPAND) self.sizer.AddGrowableCol(0) @@ -458,13 +457,13 @@ self.ui = ui.ui() self.repo = hg.repository(self.ui, ".") self.c = self.repo.changectx('tip') - filename = '.ignorelist.txt' + filename = 'ignorelist.txt' self.filename = orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + filename orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep).config_file(filename, "default_ignorelist.txt") self.mana = self.LoadDoc() for ignore in self.ignorelist: shutil.copy(ignore, orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep) - #hg.clean(self.repo, self.current) + hg.clean(self.repo, self.current) for ignore in self.ignorelist: shutil.copyfile(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1], ignore) os.remove(orpg.dirpath.dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep + ignore.split('/')[len(ignore.split('/')) - 1])