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:
Joey Hess 2019-09-30 14:40:46 -04:00
parent 5fbf30301a
commit 2b55a2b882
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
10 changed files with 36 additions and 24 deletions

View file

@ -7,6 +7,7 @@ git-annex (7.20190913) UNRELEASED; urgency=medium
* Test: Use more robust directory removal when built with directory-1.2.7.
* Close sqlite databases more robustly.
* 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

View file

@ -407,16 +407,20 @@ data DaemonOptions = DaemonOptions
, stopDaemonOption :: Bool
}
parseDaemonOptions :: Parser DaemonOptions
parseDaemonOptions = DaemonOptions
<$> switch
parseDaemonOptions :: Bool -> Parser DaemonOptions
parseDaemonOptions canstop
| canstop = DaemonOptions <$> foreground <*> stop
| otherwise = DaemonOptions <$> foreground <*> pure False
where
foreground = switch
( long "foreground"
<> help "do not daemonize"
)
<*> switch
stop = switch
( long "stop"
<> help "stop daemon"
)
completeRemotes :: HasCompleter f => Mod f a
completeRemotes = completer $ mkCompleter $ \input -> do
r <- maybe (pure Nothing) (Just <$$> Git.Config.read)

View file

@ -34,7 +34,7 @@ data AssistantOptions = AssistantOptions
optParser :: CmdParamsDesc -> Parser AssistantOptions
optParser _ = AssistantOptions
<$> parseDaemonOptions
<$> parseDaemonOptions True
<*> switch
( long "autostart"
<> help "start in known repositories"

View file

@ -15,9 +15,9 @@ import Utility.Daemon
cmd :: Command
cmd = noCommit $
command "remotedaemon" SectionMaintenance
command "remotedaemon" SectionCommon
"persistent communication with remotes"
paramNothing (run <$$> const parseDaemonOptions)
paramNothing (run <$$> const (parseDaemonOptions False))
run :: DaemonOptions -> CommandSeek
run o

View file

@ -15,7 +15,7 @@ cmd :: Command
cmd = notBareRepo $
command "watch" SectionCommon
"watch for changes and autocommit"
paramNothing (seek <$$> const parseDaemonOptions)
paramNothing (seek <$$> const (parseDaemonOptions True))
seek :: DaemonOptions -> CommandSeek
seek o = commandAction $ start False o Nothing

View file

@ -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)
Yes for many years, just finally getting round to exploring the more advanced features :-)
> [[fixed|done]] --[[Joey]]

View file

@ -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.
"""]]

View file

@ -9,20 +9,15 @@ git annex remotedaemon
# DESCRIPTION
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:
For ssh remotes, the remotedaemon tries to maintain a connection to the
remote git repository, and uses git-annex-shell notifychanges to detect
when the remote git repository has changed. For this to work, the git
remote must have [[git-annex-shell]](1) installed, with notifychanges
support. The first version of git-annex-shell that supports it is
5.20140405.
when the remote git repository has changed, and fetches changes from it.
For this to work, the git remote must have [[git-annex-shell]](1)
installed, with notifychanges support. The first version of git-annex-shell
that supports it is 5.20140405.
For tor-annex remotes, the remotedaemon runs a tor hidden service,
accepting connections from other nodes and serving up the contents of the

View file

@ -197,6 +197,12 @@ subdirectories).
See [[git-annex-webapp]](1) for details.
* `remotedaemon`
Persistant communication with remotes.
See [[git-annex-remotedaemon]](1) for details.
# REPOSITORY SETUP COMMANDS
* `init [description]`
@ -687,12 +693,6 @@ subdirectories).
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]`
Lists files in a git ref. (deprecated)

View file

@ -33,4 +33,5 @@ detecting manual commits wouldn't be a stretch.
> You can do this now by pausing committing via the webapp,
> 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]]