remotedaemon: Don't list --stop in help since it's not supported.
Also, move out of plumbing section. When using tor, the remotedaemon is part of the user's workflow, as it runs the tor hidden service.
This commit is contained in:
parent
5fbf30301a
commit
2b55a2b882
10 changed files with 36 additions and 24 deletions
|
@ -7,6 +7,7 @@ git-annex (7.20190913) UNRELEASED; urgency=medium
|
||||||
* Test: Use more robust directory removal when built with directory-1.2.7.
|
* Test: Use more robust directory removal when built with directory-1.2.7.
|
||||||
* Close sqlite databases more robustly.
|
* Close sqlite databases more robustly.
|
||||||
* adjust --lock: This enters an adjusted branch where files are locked.
|
* adjust --lock: This enters an adjusted branch where files are locked.
|
||||||
|
* remotedaemon: Don't list --stop in help since it's not supported.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Thu, 19 Sep 2019 11:11:19 -0400
|
-- Joey Hess <id@joeyh.name> Thu, 19 Sep 2019 11:11:19 -0400
|
||||||
|
|
||||||
|
|
|
@ -407,16 +407,20 @@ data DaemonOptions = DaemonOptions
|
||||||
, stopDaemonOption :: Bool
|
, stopDaemonOption :: Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
parseDaemonOptions :: Parser DaemonOptions
|
parseDaemonOptions :: Bool -> Parser DaemonOptions
|
||||||
parseDaemonOptions = DaemonOptions
|
parseDaemonOptions canstop
|
||||||
<$> switch
|
| canstop = DaemonOptions <$> foreground <*> stop
|
||||||
|
| otherwise = DaemonOptions <$> foreground <*> pure False
|
||||||
|
where
|
||||||
|
foreground = switch
|
||||||
( long "foreground"
|
( long "foreground"
|
||||||
<> help "do not daemonize"
|
<> help "do not daemonize"
|
||||||
)
|
)
|
||||||
<*> switch
|
stop = switch
|
||||||
( long "stop"
|
( long "stop"
|
||||||
<> help "stop daemon"
|
<> help "stop daemon"
|
||||||
)
|
)
|
||||||
|
|
||||||
completeRemotes :: HasCompleter f => Mod f a
|
completeRemotes :: HasCompleter f => Mod f a
|
||||||
completeRemotes = completer $ mkCompleter $ \input -> do
|
completeRemotes = completer $ mkCompleter $ \input -> do
|
||||||
r <- maybe (pure Nothing) (Just <$$> Git.Config.read)
|
r <- maybe (pure Nothing) (Just <$$> Git.Config.read)
|
||||||
|
|
|
@ -34,7 +34,7 @@ data AssistantOptions = AssistantOptions
|
||||||
|
|
||||||
optParser :: CmdParamsDesc -> Parser AssistantOptions
|
optParser :: CmdParamsDesc -> Parser AssistantOptions
|
||||||
optParser _ = AssistantOptions
|
optParser _ = AssistantOptions
|
||||||
<$> parseDaemonOptions
|
<$> parseDaemonOptions True
|
||||||
<*> switch
|
<*> switch
|
||||||
( long "autostart"
|
( long "autostart"
|
||||||
<> help "start in known repositories"
|
<> help "start in known repositories"
|
||||||
|
|
|
@ -15,9 +15,9 @@ import Utility.Daemon
|
||||||
|
|
||||||
cmd :: Command
|
cmd :: Command
|
||||||
cmd = noCommit $
|
cmd = noCommit $
|
||||||
command "remotedaemon" SectionMaintenance
|
command "remotedaemon" SectionCommon
|
||||||
"persistent communication with remotes"
|
"persistent communication with remotes"
|
||||||
paramNothing (run <$$> const parseDaemonOptions)
|
paramNothing (run <$$> const (parseDaemonOptions False))
|
||||||
|
|
||||||
run :: DaemonOptions -> CommandSeek
|
run :: DaemonOptions -> CommandSeek
|
||||||
run o
|
run o
|
||||||
|
|
|
@ -15,7 +15,7 @@ cmd :: Command
|
||||||
cmd = notBareRepo $
|
cmd = notBareRepo $
|
||||||
command "watch" SectionCommon
|
command "watch" SectionCommon
|
||||||
"watch for changes and autocommit"
|
"watch for changes and autocommit"
|
||||||
paramNothing (seek <$$> const parseDaemonOptions)
|
paramNothing (seek <$$> const (parseDaemonOptions True))
|
||||||
|
|
||||||
seek :: DaemonOptions -> CommandSeek
|
seek :: DaemonOptions -> CommandSeek
|
||||||
seek o = commandAction $ start False o Nothing
|
seek o = commandAction $ start False o Nothing
|
||||||
|
|
|
@ -22,3 +22,5 @@ Just `kill`ing it seems to do the job, however :-)
|
||||||
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
||||||
|
|
||||||
Yes for many years, just finally getting round to exploring the more advanced features :-)
|
Yes for many years, just finally getting round to exploring the more advanced features :-)
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2019-09-30T18:31:55Z"
|
||||||
|
content="""
|
||||||
|
It's fine to just kill it. It doesn't write a pid file and so --stop
|
||||||
|
can't work, and my inclination is that there's no point in complicating it
|
||||||
|
with that. I've removed the --stop option.
|
||||||
|
"""]]
|
|
@ -9,20 +9,15 @@ git annex remotedaemon
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
The remotedaemon provides persistent communication with remotes.
|
The remotedaemon provides persistent communication with remotes.
|
||||||
It detects when git branches on remotes have changes, and fetches
|
|
||||||
the changes from them.
|
|
||||||
|
|
||||||
The assistant runs the remotedaemon and communicates with it on
|
|
||||||
stdio using a simple textual protocol.
|
|
||||||
|
|
||||||
Several types of remotes are supported:
|
Several types of remotes are supported:
|
||||||
|
|
||||||
For ssh remotes, the remotedaemon tries to maintain a connection to the
|
For ssh remotes, the remotedaemon tries to maintain a connection to the
|
||||||
remote git repository, and uses git-annex-shell notifychanges to detect
|
remote git repository, and uses git-annex-shell notifychanges to detect
|
||||||
when the remote git repository has changed. For this to work, the git
|
when the remote git repository has changed, and fetches changes from it.
|
||||||
remote must have [[git-annex-shell]](1) installed, with notifychanges
|
For this to work, the git remote must have [[git-annex-shell]](1)
|
||||||
support. The first version of git-annex-shell that supports it is
|
installed, with notifychanges support. The first version of git-annex-shell
|
||||||
5.20140405.
|
that supports it is 5.20140405.
|
||||||
|
|
||||||
For tor-annex remotes, the remotedaemon runs a tor hidden service,
|
For tor-annex remotes, the remotedaemon runs a tor hidden service,
|
||||||
accepting connections from other nodes and serving up the contents of the
|
accepting connections from other nodes and serving up the contents of the
|
||||||
|
|
|
@ -197,6 +197,12 @@ subdirectories).
|
||||||
|
|
||||||
See [[git-annex-webapp]](1) for details.
|
See [[git-annex-webapp]](1) for details.
|
||||||
|
|
||||||
|
* `remotedaemon`
|
||||||
|
|
||||||
|
Persistant communication with remotes.
|
||||||
|
|
||||||
|
See [[git-annex-remotedaemon]](1) for details.
|
||||||
|
|
||||||
# REPOSITORY SETUP COMMANDS
|
# REPOSITORY SETUP COMMANDS
|
||||||
|
|
||||||
* `init [description]`
|
* `init [description]`
|
||||||
|
@ -687,12 +693,6 @@ subdirectories).
|
||||||
|
|
||||||
See [[git-annex-smudge]](1) for details.
|
See [[git-annex-smudge]](1) for details.
|
||||||
|
|
||||||
* `remotedaemon`
|
|
||||||
|
|
||||||
Detects when network remotes have received git pushes and fetches from them.
|
|
||||||
|
|
||||||
See [[git-annex-remotedaemon]](1) for details.
|
|
||||||
|
|
||||||
* `findref [ref]`
|
* `findref [ref]`
|
||||||
|
|
||||||
Lists files in a git ref. (deprecated)
|
Lists files in a git ref. (deprecated)
|
||||||
|
|
|
@ -33,4 +33,5 @@ detecting manual commits wouldn't be a stretch.
|
||||||
> You can do this now by pausing committing via the webapp,
|
> You can do this now by pausing committing via the webapp,
|
||||||
> or setting `annex.autocommit=false`.
|
> or setting `annex.autocommit=false`.
|
||||||
>
|
>
|
||||||
> The assistant probably doesn't push such commits yet.
|
> When configured this way, the assistant doesn't push commits
|
||||||
|
> that you manually make, of course you can also manually push. --[[Joey]]
|
||||||
|
|
Loading…
Reference in a new issue