rename aux directory to contrib
authorAdrian Buehlmann <adrian@cadifra.com>
Sun, 03 Apr 2011 11:51:01 +0200
changeset 55 59814494f238
parent 54 0b2722bb35c9
child 56 bc4b0df08e0d
rename aux directory to contrib On Windows, aux is a reserved name and can't be used for files or directories.
aux/convert-mbox-date.py
aux/convert-mbox-maildir.py
contrib/convert-mbox-date.py
contrib/convert-mbox-maildir.py
--- a/aux/convert-mbox-date.py	Mon Nov 15 10:46:46 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-
-from mercurial.util import parsedate, datestr
-import glob, mailbox
-
-issues = glob.glob('.issues/*')
-
-for i in issues:
-	mbox=mailbox.mbox(i)
-	for k in xrange(len(mbox)):
-		msg = mbox[k]
-		print msg['Date']
-		d = parsedate(msg['Date'], ['%a, %d %b %Y %H:%M:%S %Z', '%a, %d %b %Y %H:%M:%S'])
-		print d
-		print datestr(d, '%a, %d %b %Y %H:%M:%S')
-		msg.replace_header('Date', datestr(d, '%a, %d %b %Y %H:%M:%S'))
-		mbox[k] = msg
-	mbox.flush()
--- a/aux/convert-mbox-maildir.py	Mon Nov 15 10:46:46 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-import mailbox, glob, os.path, os
-import artemis
-from mercurial import ui, hg
-
-repo = hg.repository(ui.ui())
-
-issue_filenames = glob.glob(os.path.join(artemis.issues_dir, '*'))
-for fn in issue_filenames:
-    mb = mailbox.mbox(fn)
-    messages = [m for m in mb]
-    mb.close()
-    os.unlink(fn)
-    repo.remove([fn])
-    md = mailbox.Maildir(fn)
-    md.lock()
-    keys = [md.add(m) for m in messages]
-    md.close()
-    for k in keys: repo.add([fn + '/new/' + k])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/convert-mbox-date.py	Sun Apr 03 11:51:01 2011 +0200
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+from mercurial.util import parsedate, datestr
+import glob, mailbox
+
+issues = glob.glob('.issues/*')
+
+for i in issues:
+	mbox=mailbox.mbox(i)
+	for k in xrange(len(mbox)):
+		msg = mbox[k]
+		print msg['Date']
+		d = parsedate(msg['Date'], ['%a, %d %b %Y %H:%M:%S %Z', '%a, %d %b %Y %H:%M:%S'])
+		print d
+		print datestr(d, '%a, %d %b %Y %H:%M:%S')
+		msg.replace_header('Date', datestr(d, '%a, %d %b %Y %H:%M:%S'))
+		mbox[k] = msg
+	mbox.flush()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/convert-mbox-maildir.py	Sun Apr 03 11:51:01 2011 +0200
@@ -0,0 +1,18 @@
+import mailbox, glob, os.path, os
+import artemis
+from mercurial import ui, hg
+
+repo = hg.repository(ui.ui())
+
+issue_filenames = glob.glob(os.path.join(artemis.issues_dir, '*'))
+for fn in issue_filenames:
+    mb = mailbox.mbox(fn)
+    messages = [m for m in mb]
+    mb.close()
+    os.unlink(fn)
+    repo.remove([fn])
+    md = mailbox.Maildir(fn)
+    md.lock()
+    keys = [md.add(m) for m in messages]
+    md.close()
+    for k in keys: repo.add([fn + '/new/' + k])