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.
This commit is contained in:
parent
e8068f2ffb
commit
5034d8c298
3 changed files with 4 additions and 8 deletions
|
@ -8,6 +8,8 @@
|
||||||
-
|
-
|
||||||
- A line of the log will look like: "date N UUID"
|
- A line of the log will look like: "date N UUID"
|
||||||
- Where N=1 when the repo has the file, and 0 otherwise.
|
- 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>
|
- Copyright 2010-2011 Joey Hess <joey@kitenet.net>
|
||||||
-
|
-
|
||||||
|
@ -65,7 +67,7 @@ instance Read LogLine where
|
||||||
-- read without an exception being thrown.
|
-- read without an exception being thrown.
|
||||||
-- Such lines have a status of Undefined.
|
-- Such lines have a status of Undefined.
|
||||||
readsPrec _ string =
|
readsPrec _ string =
|
||||||
if length w == 3
|
if length w >= 3
|
||||||
then maybe bad good pdate
|
then maybe bad good pdate
|
||||||
else bad
|
else bad
|
||||||
where
|
where
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
||||||
git-annex (3.20110625) UNRELEASED; urgency=low
|
git-annex (3.20110625) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* Always ensure git-annex branch exists.
|
* Always ensure git-annex branch exists.
|
||||||
|
* Modify location log parser to allow future expansion.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sun, 26 Jun 2011 21:01:06 -0400
|
-- Joey Hess <joeyh@debian.org> Sun, 26 Jun 2011 21:01:06 -0400
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,3 @@ location log:
|
||||||
|
|
||||||
This way, each remote can store its own key-specfic data in the same place
|
This way, each remote can store its own key-specfic data in the same place
|
||||||
as other key-specific data, with minimal overhead.
|
as other key-specific data, with minimal overhead.
|
||||||
|
|
||||||
Unfortunatly, the current location log parser throws out lines that it
|
|
||||||
cannot parse, so making this change would involve something of a flag day
|
|
||||||
upgrade. Also unfortunatly, the location log and other .git-annex/ data
|
|
||||||
does not have its own version that can be checked to force an upgrade
|
|
||||||
across all clones. It might be best to deal with this at the same time
|
|
||||||
the ideas in [[branching]] are done. --[[Joey]]
|
|
||||||
|
|
Loading…
Reference in a new issue