mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Pull command
- Added pull command for cloning databases
This commit is contained in:
parent
0d364746c7
commit
68d5e3f296
11 changed files with 137 additions and 12 deletions
|
@ -170,14 +170,14 @@ a second database.
|
|||
|
||||
Here is a basic example of the procedure:
|
||||
|
||||
$ rsync myremotehost:.task/undo.data /tmp/undo_remote.data
|
||||
$ task merge /tmp/undo_remote.data
|
||||
$ rsync ${HOME}/.task/*.data myremotehost:.task/
|
||||
$ task merge ssh://user@myremotehost/.task/
|
||||
$ task push ssh://user@myremotehost/.task/
|
||||
|
||||
First you need to get the undo.data file from the remote system, or removable
|
||||
media. When the merge command completes, you should copy all the local .data
|
||||
files to the remote system. This way you ensure that both systems are fully
|
||||
synchronized.
|
||||
The first command fetches the undo.data file from the remote system, reads the
|
||||
changes made and updates the local database. When this merge command completes,
|
||||
you should copy all the local .data files to the remote system either by using
|
||||
the push command explicitly or by activating the merge.autopush feature in the
|
||||
~/.taskrc file. This way you ensure that both systems are fully synchronized.
|
||||
|
||||
.TP
|
||||
.B Q: The undo.data file gets very large - do I need it?
|
||||
|
|
|
@ -143,9 +143,33 @@ Exports all tasks in YAML 1.1 format.
|
|||
Redirect the output to a file, if you wish to save it, or pipe it to another command.
|
||||
|
||||
.TP
|
||||
.B merge path/to/second/undo.data
|
||||
.B merge URL
|
||||
Merges two task databases by comparing the modifications that are stored in the
|
||||
undo.data files. The location of the second undo.data file must be passed on as argument.
|
||||
undo.data files. The location of the second undo.data file must be passed on as argument. URL may have the following syntaxes:
|
||||
|
||||
|
||||
ssh://[user@]host.xz[:port]/path/to/undo.data
|
||||
|
||||
rsync://[user@]host.xz[:port]/path/to/undo.data
|
||||
|
||||
[user@]host.xz:path/to/undo.data
|
||||
|
||||
/path/to/local/undo.data
|
||||
|
||||
You can set aliases for frequently used URLs in the .taskrc.
|
||||
|
||||
.TP
|
||||
.B push URL
|
||||
Pushes the task database to a remote another location for distributing the
|
||||
changes made by the merge command.
|
||||
|
||||
(See annotations above for valid URL syntaxes.)
|
||||
|
||||
.TP
|
||||
.B pull URL
|
||||
Overwrites the task database with those files found at the URL.
|
||||
|
||||
(See annotations above for valid URL syntaxes.)
|
||||
|
||||
.TP
|
||||
.B color [sample | legend]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue