r46545 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46544‎ | r46545 | r46546 >
Date:19:13, 29 January 2009
Author:brion
Status:deferred
Tags:
Comment:
Add 'biglist' option to specify wikis which shouldn't have their histories dumped
Modified paths:
  • /trunk/backup/WikiDump.py (modified) (history)
  • /trunk/backup/worker.py (modified) (history)

Diff [purge]

Index: trunk/backup/WikiDump.py
@@ -89,6 +89,7 @@
9090 #"wiki": {
9191 "dblist": "",
9292 "privatelist": "",
 93+ "biglist": "",
9394 "dir": "",
9495 "forcenormal": "0",
9596 "halt": "0",
@@ -119,6 +120,12 @@
120121
121122 self.dbList = dbList(conf.get("wiki", "dblist"))
122123 self.privateList = dbList(conf.get("wiki", "privatelist"))
 124+ biglistFile = conf.get("wiki", "biglist")
 125+ if biglistFile:
 126+ self.bigList = dbList(biglistFile)
 127+ else:
 128+ self.bigList = []
 129+
123130 self.wikiDir = conf.get("wiki", "dir")
124131 self.forceNormal = conf.getint("wiki", "forceNormal")
125132 self.halt = conf.getint("wiki", "halt")
@@ -208,6 +215,9 @@
209216 def isPrivate(self):
210217 return self.dbName in self.config.privateList
211218
 219+ def isBig(self):
 220+ return self.dbName in self.config.bigList
 221+
212222 def isLocked(self):
213223 return os.path.exists(self.lockFile())
214224
Index: trunk/backup/worker.py
@@ -248,16 +248,20 @@
249249 "Discussion and user pages are included in this complete archive. Most mirrors won't want this extra material."),
250250 XmlDump("logging",
251251 "<big><b>Log events to all pages.</b></big>",
252 - "This contains the log of actions performed on pages."),
253 - BigXmlDump("meta-history",
254 - "All pages with complete page edit history (.bz2)",
255 - "These dumps can be *very* large, uncompressing up to 20 times the archive download size. " +
256 - "Suitable for archival and statistical use, most mirror sites won't want or need this."),
257 - XmlRecompressDump("meta-history",
258 - "All pages with complete edit history (.7z)",
259 - "These dumps can be *very* large, uncompressing up to 100 times the archive download size. " +
260 - "Suitable for archival and statistical use, most mirror sites won't want or need this.")]
 252+ "This contains the log of actions performed on pages.")]
261253
 254+ if not self.wiki.isBig():
 255+ self.items.append(
 256+ BigXmlDump("meta-history",
 257+ "All pages with complete page edit history (.bz2)",
 258+ "These dumps can be *very* large, uncompressing up to 20 times the archive download size. " +
 259+ "Suitable for archival and statistical use, most mirror sites won't want or need this."))
 260+ self.items.append(
 261+ XmlRecompressDump("meta-history",
 262+ "All pages with complete edit history (.7z)",
 263+ "These dumps can be *very* large, uncompressing up to 100 times the archive download size. " +
 264+ "Suitable for archival and statistical use, most mirror sites won't want or need this."))
 265+
262266 files = self.listFilesFor(self.items)
263267 self.prepareChecksums()
264268

Status & tagging log