Added DIRHASH_LOWER to external special remote protocol.
This commit is contained in:
parent
9b73c85952
commit
4b9ddb9429
5 changed files with 25 additions and 1 deletions
|
@ -227,6 +227,8 @@ handleRequest' lck external req mp responsehandler
|
||||||
maybe noop (\a -> liftIO $ a bytesprocessed) mp
|
maybe noop (\a -> liftIO $ a bytesprocessed) mp
|
||||||
handleRemoteRequest (DIRHASH k) =
|
handleRemoteRequest (DIRHASH k) =
|
||||||
send $ VALUE $ hashDirMixed def k
|
send $ VALUE $ hashDirMixed def k
|
||||||
|
handleRemoteRequest (DIRHASH_LOWER k) =
|
||||||
|
send $ VALUE $ hashDirLower def k
|
||||||
handleRemoteRequest (SETCONFIG setting value) =
|
handleRemoteRequest (SETCONFIG setting value) =
|
||||||
liftIO $ atomically $ do
|
liftIO $ atomically $ do
|
||||||
let v = externalConfig external
|
let v = externalConfig external
|
||||||
|
|
2
Remote/External/Types.hs
vendored
2
Remote/External/Types.hs
vendored
|
@ -176,6 +176,7 @@ data RemoteRequest
|
||||||
= VERSION ProtocolVersion
|
= VERSION ProtocolVersion
|
||||||
| PROGRESS BytesProcessed
|
| PROGRESS BytesProcessed
|
||||||
| DIRHASH Key
|
| DIRHASH Key
|
||||||
|
| DIRHASH_LOWER Key
|
||||||
| SETCONFIG Setting String
|
| SETCONFIG Setting String
|
||||||
| GETCONFIG Setting
|
| GETCONFIG Setting
|
||||||
| SETCREDS Setting String String
|
| SETCREDS Setting String String
|
||||||
|
@ -198,6 +199,7 @@ instance Proto.Receivable RemoteRequest where
|
||||||
parseCommand "VERSION" = Proto.parse1 VERSION
|
parseCommand "VERSION" = Proto.parse1 VERSION
|
||||||
parseCommand "PROGRESS" = Proto.parse1 PROGRESS
|
parseCommand "PROGRESS" = Proto.parse1 PROGRESS
|
||||||
parseCommand "DIRHASH" = Proto.parse1 DIRHASH
|
parseCommand "DIRHASH" = Proto.parse1 DIRHASH
|
||||||
|
parseCommand "DIRHASH_LOWER" = Proto.parse1 DIRHASH_LOWER
|
||||||
parseCommand "SETCONFIG" = Proto.parse2 SETCONFIG
|
parseCommand "SETCONFIG" = Proto.parse2 SETCONFIG
|
||||||
parseCommand "GETCONFIG" = Proto.parse1 GETCONFIG
|
parseCommand "GETCONFIG" = Proto.parse1 GETCONFIG
|
||||||
parseCommand "SETCREDS" = Proto.parse3 SETCREDS
|
parseCommand "SETCREDS" = Proto.parse3 SETCREDS
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -8,6 +8,7 @@ git-annex (6.20160420) UNRELEASED; urgency=medium
|
||||||
again later.
|
again later.
|
||||||
* Android: Icon refresh.
|
* Android: Icon refresh.
|
||||||
Thanks, freewheelinfranks.
|
Thanks, freewheelinfranks.
|
||||||
|
* Added DIRHASH_LOWER to external special remote protocol.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Thu, 28 Apr 2016 13:17:04 -0400
|
-- Joey Hess <id@joeyh.name> Thu, 28 Apr 2016 13:17:04 -0400
|
||||||
|
|
||||||
|
|
|
@ -230,7 +230,15 @@ in control.
|
||||||
* `DIRHASH Key`
|
* `DIRHASH Key`
|
||||||
Gets a two level hash associated with a Key. Something like "aB/Cd".
|
Gets a two level hash associated with a Key. Something like "aB/Cd".
|
||||||
This is always the same for any given Key, so can be used for eg,
|
This is always the same for any given Key, so can be used for eg,
|
||||||
creating hash directory structures to store Keys in.
|
creating hash directory structures to store Keys in. This is the same
|
||||||
|
directory hash that git-annex uses inside `.git/annex/objects/`
|
||||||
|
(git-annex replies with VALUE followed by the value.)
|
||||||
|
* `DIRHASH_LOWER Key`
|
||||||
|
Gets a two level hash associated with a Key, using only lower-case.
|
||||||
|
Something like "abc/def".
|
||||||
|
This is always the same for any given Key, so can be used for eg,
|
||||||
|
creating hash directory structures to store Keys in. This is the same
|
||||||
|
directory hash that is used by eg, the directory special remote.
|
||||||
(git-annex replies with VALUE followed by the value.)
|
(git-annex replies with VALUE followed by the value.)
|
||||||
* `SETCONFIG Setting Value`
|
* `SETCONFIG Setting Value`
|
||||||
Sets one of the special remote's configuration settings.
|
Sets one of the special remote's configuration settings.
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 26"""
|
||||||
|
date="2016-05-03T17:29:02Z"
|
||||||
|
content="""
|
||||||
|
I don't think there's any particularly good reason why DIRHASH uses the
|
||||||
|
mixed case format. However, it can't be changed without busting existing
|
||||||
|
stuff.
|
||||||
|
|
||||||
|
So yeah, I've gone ahead and added a `DIRHASH_LOWER`.
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue