[tahoe-dev] Minor patch to parse_date to provide additional resolution to expire.cutoff-date

Jeffrey Schiller jeffrey.schiller at gmail.com
Mon Jul 12 01:07:07 UTC 2010

I have setup a private personal (I'm the only one using it) Grid using
three nodes. However I do not have a lot of disk space available, so I
sometimes need to cleanup disk space usage. I have done this by using
the cutoff-date garbage collector. However it only provides date level
resolution. So If in the morning I allocate a lot of space and by
afternoon decide it was a waste. I cannot clean it up until tomorrow.

To alleviate this, I modified parse_date so that it can accept a
complete UTC timestamp. I can then edit tahoe.cfg to have a full UTC
timestamp in the expire.cutoff-date field. I have included a "darcs
send" of the change below (I am new to darcs, so hopefully I did this
correctly!). You are welcome to incorporate this into the official
sources, or not. Thanks.


Sun Jul 11 20:57:38 EDT 2010  Jeffrey.Schiller at gmail.com
  * Parse Date Change
  Modify parse_date so it can accept a complete UTC timestamp in addition
  to a date without a time portion.
Hash: SHA1

New patches:

[Parse Date Change
Jeffrey.Schiller at gmail.com**20100712005738
 Ignore-this: 9c4f75f9fa13aab00dccc6feee29f6df
 Modify parse_date so it can accept a complete UTC timestamp in addition
 to a date without a time portion.
] hunk ./src/allmydata/util/time_format.py 69
 def parse_date(s):
     # return seconds-since-epoch for the UTC midnight that starts the given
     # day
- -    return int(iso_utc_time_to_seconds(s + "T00:00:00"))
- -
+    if s.find('T') == -1:
+        return int(iso_utc_time_to_seconds(s + "T00:00:00"))
+    else:
+        return int(iso_utc_time_to_seconds(s))


terrellrussell at gmail.com**20100708193903]
freestorm77 at gmail.com**20100605191721
 Ignore-this: b450c76dc875f5ac8cca229a666cbd0a

 - The storage server version is 0 for all storage nodes in the Welcome Page

[NEWS: add NEWS snippets about two recent patches
zooko at zooko.com**20100708162058
 Ignore-this: 6c9da6a0ad7351a960bdd60f81532899
freestorm77 at gmail.com**20100622205301
 Ignore-this: 1d770d975e0c414c996564774f049bca

 The div tag with the link "Return to Welcome page" on the
directory.xhtml page is not correct

freestorm77 at gmail.com**20100622210046
 Ignore-this: 5b3ebb2e0f52bbba718a932f80c246c0

 CSS modification to be correctly diplayed with Internet Explorer 8

 The links on the top of page directory.xhtml are not diplayed in the
same line as display with Firefox.

freestorm77 at gmail.com**20100622214714
 Ignore-this: e0db73d68740aad09a7b9ae60a08c05c

 Runnin test for changes in tahoe.css file

freestorm77 at gmail.com**20100622201403
 Ignore-this: f8962463fce50b9466405cb59fe11d43

 Runnin test for diretory.xhtml top banner

[stringutils.py: tolerate sys.stdout having no 'encoding' attribute.
david-sarah at jacaranda.org**20100626040817
 Ignore-this: f42cad81cef645ee38ac1df4660cc850
[quickstart.html: python 2.5 -> 2.6 as recommended version
david-sarah at jacaranda.org**20100705175858
 Ignore-this: bc3a14645ea1d5435002966ae903199f
[SFTP: don't call .stopProducing on the producer registered with
OverwriteableFileConsumer (which breaks with warner's new downloader).
david-sarah at jacaranda.org**20100628231926
 Ignore-this: 131b7a5787bc85a9a356b5740d9d996f
[docs/how_to_make_a_tahoe-lafs_release.txt: trivial correction,
install.html should now be quickstart.html.
david-sarah at jacaranda.org**20100625223929
 Ignore-this: 99a5459cac51bd867cc11ad06927ff30
[setup: in the Makefile, refuse to upload tarballs unless someone has
passed the environment variable "BB_BRANCH" with value "trunk"
zooko at zooko.com**20100619034928
 Ignore-this: 276ddf9b6ad7ec79e27474862e0f7d6
[trivial: tiny update to in-line comment
zooko at zooko.com**20100614045715
 Ignore-this: 10851b0ed2abfed542c97749e5d280bc
 (I'm actually committing this patch as a test of the new
eager-annotation-computation of trac-darcs.)
[docs: about.html link to home page early on, and be decentralized
storage instead of cloud storage this time around
zooko at zooko.com**20100619065318
 Ignore-this: dc6db03f696e5b6d2848699e754d8053
[docs: update about.html, especially to have a non-broken link to
quickstart.html, and also to comment out the broken links to "for
Paranoids" and "for Corporates"
zooko at zooko.com**20100619065124
 Ignore-this: e292c7f51c337a84ebfeb366fbd24d6c
[TAG allmydata-tahoe-1.7.0
zooko at zooko.com**20100619052631
 Ignore-this: d21e27afe6d85e2e3ba6a3292ba2be1
Patch bundle hash:
Version: GnuPG v1.4.9 (GNU/Linux)


More information about the tahoe-dev mailing list