summaryrefslogtreecommitdiff
path: root/Command/Sync.hs
Commit message (Collapse)AuthorAge
...
* make sync --no-content be acceptedGravatar Joey Hess2015-08-20
| | | | It's the default, but this is a step toward changing that default later..
* sync: Support --jobsGravatar Joey Hess2015-08-14
| | | | | | * sync: Support --jobs * sync --content: Avoid unnecessary second pull from remotes when no file transfers are made.
* Simplify setup process for a ssh remote.Gravatar Joey Hess2015-08-05
| | | | | | | | | | | | | | | | | | | | | | Now it suffices to run git remote add, followed by git-annex sync. Now the remote is automatically initialized for use by git-annex, where before the git-annex branch had to manually be pushed before using git-annex sync. Note that this involved changes to git-annex-shell, so if the remote is using an old version, the manual push is still needed. Implementation required git-annex-shell be changed, so configlist can autoinit a repository even when no git-annex branch has been pushed yet. Unfortunate because we'll have to wait for it to get deployed to servers before being able to rely on this change in the documentation. Did consider making git-annex sync push the git-annex branch to repos that didn't have a uuid, but this seemed difficult to do without complicating it in messy ways. It would be cleaner to split a command out from configlist to handle the initialization. But this is difficult without sacrificing backwards compatability, for users of old git-annex versions which would not use the new command.
* sync --content: Fix bug that caused files to be uploaded to eg, more archive ↵Gravatar Joey Hess2015-07-20
| | | | remotes than wanted copies, only to later be dropped to satisfy the preferred content settings.
* wipGravatar Joey Hess2015-07-09
| | | | | | | Current status: * building again, but several commands are commented out * still need to implement global options, file matching options, etc
* convert all commands to work with optparse-applicativeGravatar Joey Hess2015-07-08
| | | | Still no options though.
* display cmdparamdesc in optparse-applicative usage messagesGravatar Joey Hess2015-07-08
| | | | | Since optparse-applicative display "FOO" as "[FOO]", the paramOptional modifier which wrapped it in square brackets was removed from most places.
* started converting to use optparse-applicativeGravatar Joey Hess2015-07-08
| | | | | | | | | | | | This is a work in progress. It compiles and is able to do basic command dispatch, including git autocorrection, while using optparse-applicative for the core commandline parsing. * Many commands are temporarily disabled before conversion. * Options are not wired in yet. * cmdnorepo actions don't work yet. Also, removed the [Command] list, which was only used in one place.
* sync: When annex.autocommit=false, avoid making any commit of local changes, ↵Gravatar Joey Hess2015-07-07
| | | | while still merging with remote to the extent possible.
* merge: Avoid creating the synced/master branch.Gravatar Joey Hess2015-07-07
| | | | | | The branch needs to be created when merging from the remote in sync, since we diff between it and the remote's sync branch. But git annex merge should not be creating sync branches.
* move commentGravatar Joey Hess2015-06-16
|
* avoid building unused bloomfilter when run without --allGravatar Joey Hess2015-06-16
|
* on second thought, sync --content --unused is probably not useful, removeGravatar Joey Hess2015-06-16
|
* use bloom filter in second pass of sync --all --contentGravatar Joey Hess2015-06-16
| | | | | | | | This is needed because when preferred content matches on files, the second pass would otherwise want to drop all keys. Using a bloom filter avoids this, and in the case of a false positive, a key will be left undropped that preferred content would allow dropping. Chances of that happening are a mere 1 in 1 million.
* Increased the default annex.bloomaccuracy from 1000 to 10000000Gravatar Joey Hess2015-06-16
| | | | | | | | | | | | | | | | | | | This makes git annex unused use around 48 mb more memory than it did before, but the massive increase in accuracy makes this worthwhile for all but the smallest systems. Also, I want to use the bloom filter for sync --all --content, to avoid dropping files that the preferred content doesn't want, and 1/1000 false positives would be far too many in that use case, even if it were acceptable for unused. Actual memory use numbers: 1000: 21.06user 3.42system 0:26.40elapsed 92%CPU (0avgtext+0avgdata 501552maxresident)k 1000000: 21.41user 3.55system 0:26.84elapsed 93%CPU (0avgtext+0avgdata 549496maxresident)k 10000000: 21.84user 3.52system 0:27.89elapsed 90%CPU (0avgtext+0avgdata 549920maxresident)k Based on these numbers, 10 million seemed a better pick than 1 million.
* sync: Add support for --all and --unused.Gravatar Joey Hess2015-06-16
|
* switch code to using associated filesGravatar Joey Hess2015-06-16
|
* get, move, copy, mirror: Concurrent downloads and uploads are now supported!Gravatar Joey Hess2015-04-10
| | | | | | | | | | | This works, and seems fairly robust. Clean get of 20 files at -J3. At -J10, there are some messages about ssh multiplexing, probably due to a race spinning up the ssh connection cacher. But, it manages to get all the files ok regardless. The progress bars are a scrambled mess though, due to bugs in ascii-progress, which I've already filed. Particularly this one: https://github.com/yamadapc/haskell-ascii-progress/issues/8
* sync: Fix committing when in a direct mode repo that has no HEAD ref.Gravatar Joey Hess2015-03-04
| | | | | | | | Seen for example, a newly checked out git submodule. In this case, .git/HEAD is a raw sha, rather than the usual reference to a ref. Removed currentSha in passing, since it was a more roundabout way of doing what headSha does, and headSha is more robust.
* fix innaccurate commentGravatar Joey Hess2015-03-04
|
* sync: As well as the synced/git-annex push, attempt a git-annex:git-annex ↵Gravatar Joey Hess2015-02-27
| | | | | | | | | | | push, as long as the remote branch is an ancestor of the local branch, to better support bare git repos. See my comment in the bug report for analysis; basically this is safe because it's a non-forced push, so won't lose history. Even if it was a forced push or somehow races, things will eventually become consistent and no git-annex branch info will be lost. (This used to be done, but it forgot to do it since version 4.20130909.)
* propigate ssh-options everywhere ssh caching is usedGravatar Joey Hess2015-02-12
| | | | | | | | | * sync: Use the ssh-options git config when doing git pull and push. * remotedaemon: Use the ssh-options git config. Note that the rename env var means that if a new git-annex calls an old one for git-annex ssh, or a new calls an old, nothing much will go wrong; just ssh caching won't happen.
* sync, assistant: Include repository name in head branch commit message.Gravatar Joey Hess2015-02-11
| | | | | | Note that while the assistant detects changes made to remote names, I left the commit message fixed rather than calculating it after every commit. It doesn't seem worth the CPU to do the latter.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* devblogGravatar Joey Hess2015-01-13
|
* handle sync's use of setCurrentDirectory to work with relative pathsGravatar Joey Hess2015-01-06
| | | | | | I think this is the last problimatic setCurrentDirectory. I also audited for extrnal commands that git-annex might run with cwd = foo, and did not find any that were passed any FilePath that might be absolute.
* sync: Fix an edge case where syncing in a bare repository would try to merge ↵Gravatar Joey Hess2015-01-05
| | | | | | | | and so fail. In the case where a remote of the bare repo has a fetch = configuration, refs/remotes/origin/master will exist, and so the merge code path tried to run in the bare repo.
* sync: Now supports remote groups, the same way git remote update does.Gravatar Joey Hess2014-12-29
|
* doh't use "def" for command definitions, it conflicts with Data.Default.defGravatar Joey Hess2014-10-14
|
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* sync: Ensure that pending changes to git-annex branch are committed when in ↵Gravatar Joey Hess2014-09-11
| | | | direct mode. (Fixing a very minor reversion.)
* support commit.gpgsignGravatar Joey Hess2014-07-04
| | | | | | | | | | | | | | | | | | | | | Support users who have set commit.gpgsign, by disabling gpg signatures for git-annex branch commits and commits made by the assistant. The thinking here is that a user sets commit.gpgsign intending the commits that they manually initiate to be gpg signed. But not commits made in the background, whether by a deamon or implicitly to the git-annex branch. gpg signing those would be at best a waste of CPU and at worst would fail, or flood the user with gpg passphrase prompts, or put their signature on changes they did not directly do. See Debian bug #753720. Also makes all commits done by git-annex go through a few central control points, to make such changes easier in future. Also disables commit.gpgsign in the test suite. This commit was sponsored by Antoine Boegli.
* assistant: Fix one-way assistant->assistant sync in direct mode.Gravatar Joey Hess2014-06-16
| | | | | | | | | | | | | | When in direct mode, update the master branch after committing to the annex/direct/master branch. Also, update the synced/master branch. This fixes a topology A->B where both A and B are in direct mode and running the assistant, and a change is made to B. Before this fix, A pulled the changes from B, but since they were only on the annex/direct/master branch, it did not merge them. Note that I considered making the assistant merge the remotes/B/annex/direct/master, but decided to keep it simple and only merge the sync branches as before.
* replace (Key, Backend) with KeyGravatar Joey Hess2014-04-17
| | | | | | | | | | Only fsck and reinject and the test suite used the Backend, and they can look it up as needed from the Key. This simplifies the code and also speeds it up. There is a small behavior change here. Before, all commands would warn when acting on an annexed file with an unknown backend. Now, only fsck and reinject show that warning.
* sync, assistant, remotedaemon: Use ssh connection caching for git pushes and ↵Gravatar Joey Hess2014-04-12
| | | | | | | | | | | | | | | | | pulls. For sync, saves 1 ssh connection per remote. For remotedaemon, the same ssh connection that is already open to run git-annex-shell notifychanges is reused to pull from the remote. Only potential problem is that this also enables connection caching when the assistant syncs with a ssh remote. Including the sync it does when a network connection has just come up. In that case, cached ssh connections are likely to be stale, and so using them would hang. Until I'm sure such problems have been dealt with, this commit needs to stay on the remotecontrol branch, and not be merged to master. This commit was sponsored by Alexandre Dupas.
* copy --fast --to remote: Avoid printing anything for files that are already ↵Gravatar Joey Hess2014-03-13
| | | | believed to be present on the remote.
* sync: Automatically resolve merge conflict between and annexed file and a ↵Gravatar Joey Hess2014-03-04
| | | | | | | | | | | | | | | | | | | regular git file. This is a new feature, it was not handled before, since it's a bit of an edge case. However, it can be handled exactly the same as a file/dir conflict, just leave the non-annexed item alone. While implementing this, the core resolveMerge' function got a lot simpler and clearer. Note especially that where before there was an asymetric call to stagefromdirectmergedir, now graftin is called symmetrically in both cases. And, in order to add that `graftin us`, the current branch needed to be known (if there is no current branch, there cannot be a merge conflict). This led to some cleanups of how autoMergeFrom behaved when there is no current branch. This commit was sponsored by Philippe Gauthier.
* factor out Annex.AutoMerge from Command.SyncGravatar Joey Hess2014-03-04
|
* improved direct mode dir/file conflicted merge resultion, using tree graftingGravatar Joey Hess2014-03-04
|
* much improved test and real fix for FAT symlink loss on conflicted mergeGravatar Joey Hess2014-03-04
| | | | | | | | | | | I think that f5ce1a15d7a35b85ffa938ee950f4749bf445939 didn't quite manage to actually fix the bug, although I have not checked since its "fix" got redone. The test suite now actually checks the file staged in git is a symlink, rather than relying on the bug casing a later sync failure. This seems a more reliable way to detect it, and probably avoids a heisenbug in the test suite.
* finish fixing direct mode merge bug involving unstaged local filesGravatar Joey Hess2014-03-04
| | | | | | | | | | Added test cases for both ways this can happen, with a conflict involving a file, or a directory. Cleaned up resolveMerge to not touch the work tree in direct mode, which turned out to be the only way to handle things.. And makes it much nicer. Still need to run test suite on windows.
* rename for clarityGravatar Joey Hess2014-03-03
|
* simplfyGravatar Joey Hess2014-03-03
|
* sync: Fix bug in direct mode that caused a file not checked into git to be ↵Gravatar Joey Hess2014-03-03
| | | | deleted when merging with a remote that added a file by the same name. (Thanks, jkt)
* pre-commit-annex hook script to automatically extract metadata from lots of ↵Gravatar Joey Hess2014-03-02
| | | | | | | | | | | | | | | | | | types of files Using the extract(1) program to do the heavy lifting. Decided to make git-annex run pre-commit-annex when committing. Since git-annex pre-commit also runs it, it'll be run when git commit is run too, via the pre-commit hook. This basically gives back the pre-commit hook that git-annex took away. The implementation avoids repeatedly looking for the hook script when the assistant is running and committing repeatedly; only checks if the hook is available once. To make the script simpler, made git-annex metadata -s field?=value only set a field when it's not already got a value. This commit was sponsored by bak.
* remove Read instance for RefGravatar Joey Hess2014-02-19
| | | | | | | | Removed instance, got it all to build using fromRef. (With a few things that really need to show something using a ref for debugging stubbed out.) Then added back Read instance, and made Logs.View use it for serialization. This changes the view log format.
* hlint to give autobuilder something to doGravatar Joey Hess2014-02-11
|
* add test case & fix conflict resolution bug on Windows & FATGravatar Joey Hess2014-02-04
| | | | | | | | | | | | | | | Fix bug in automatic merge conflict resolution code when used on a filesystem not supporting symlinks, which resulted in it losing track of the symlink bit of annexed files. This was the underlying bug that was causing another test to fail, which got worked around in f5d0c8f0bf7f018479eb4da7e8c41598b7aacb7d. I've chosen to keep 2 separate test cases since the old test case only detected the problem accidentially. Test suite passes on FAT & in windows, as well as on proper unix systems. This commit was sponsored by Ellis Whitehead.
* sync --content: Drop files from remotes that don't have them after getting them.Gravatar Joey Hess2014-02-02
| | | | | | Need to include the uuid of the local repo in the list of belived locations of a key after getting it, in order for the drop from remote to include it in the numcopies calculation.
* update function name in commentGravatar Joey Hess2014-02-02
|