summaryrefslogtreecommitdiff
path: root/LocationLog.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-28 16:15:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-28 16:15:50 -0400
commit5034d8c2985dafeb141bba383ab70d75729b3cb6 (patch)
treeac5a6dcb4f3f8aa86a5cb86fa30fa68f1b5fdcac /LocationLog.hs
parente8068f2ffbeb25bc094ecb3763da6ace278586cc (diff)
Modify location log parser to allow future expansion.
Since the logs have just been moved into the git-annex branch, don't need to worry about backwards compatability with old versions of git-annex that would fail to parse location logs with extra fields tacked on.
Diffstat (limited to 'LocationLog.hs')
-rw-r--r--LocationLog.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/LocationLog.hs b/LocationLog.hs
index 4e2caca95..2a2bc6301 100644
--- a/LocationLog.hs
+++ b/LocationLog.hs
@@ -8,6 +8,8 @@
-
- A line of the log will look like: "date N UUID"
- Where N=1 when the repo has the file, and 0 otherwise.
+ - (After the UUID can optionally come a white space and other data,
+ - for future expansion.)
-
- Copyright 2010-2011 Joey Hess <joey@kitenet.net>
-
@@ -65,7 +67,7 @@ instance Read LogLine where
-- read without an exception being thrown.
-- Such lines have a status of Undefined.
readsPrec _ string =
- if length w == 3
+ if length w >= 3
then maybe bad good pdate
else bad
where