Mercurial > traipse_dev
diff upmana/updatemana.py @ 45:50e82d8090cf traipse_dev
A few more commits. This gets Manifest working, Refresh should be working on
Windows platforms now.
author | sirebral |
---|---|
date | Wed, 05 Aug 2009 18:56:43 -0500 |
parents | 15a76be834dc |
children | 599f727e3833 |
line wrap: on
line diff
--- a/upmana/updatemana.py Wed Aug 05 15:15:09 2009 -0500 +++ b/upmana/updatemana.py Wed Aug 05 18:56:43 2009 -0500 @@ -347,7 +347,7 @@ self.id = self.pull_list[event.GetEventObject()] self.manifest.SetString('updaterepo', str(self.box_name[self.id]), self.url[self.id].GetValue()) try: - commands.pull(self.ui, self.r, self.url[self.id].GetValue(), force=True) + commands.pull(self.ui, self.r, self.url[self.id].GetValue(), rev='', update=False, force=True) except: pass @@ -357,21 +357,50 @@ self.ui = ui.ui() self.repo = hg.repository(self.ui, ".") self.c = self.repo.changectx('tip') + self.manifestlist = [] self.manifestlist = self.c.manifest().keys() 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 = '.hgignore' + self.filename = orpg.dirpath.dir_struct["user"] + filename + orpg.tools.validate.Validate().config_file('.hgignore',"default.hgignore") + 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) self.sizer.AddGrowableRow(0) self.SetSizer(self.sizer) self.SetAutoLayout(True) + def GetChecked(self, event): + self.mana = [] + for manifest in self.manifestlog.GetChecked(): + self.mana.append(self.manifestlist[manifest]) + self.SaveDoc() + + def SaveDoc(self): + f = open(self.filename, "w") + for mana in self.mana: + f.write(mana+'\n') + f.close() + + def LoadDoc(self): + ignore = open(self.filename) + ignorelist = [] + for i in ignore: + ignorelist.append(str(i [:len(i)-1])) + self.manifestlog.SetCheckedStrings(ignorelist) + manifest = ignore.read() + ignore.close() + class Control(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent)