summaryrefslogtreecommitdiff
path: root/Command/Sync.hs
Commit message (Collapse)AuthorAge
* git config remote.name.annex-sync can be used to control whether a remote ↵Gravatar Joey Hess2012-10-11
| | | | gets synced.
* fix last zombies in the assistantGravatar Joey Hess2012-10-04
| | | | | Made Git.LsFiles return cleanup actions, and everything waits on processes now, except of course for Seek.
* sync: Pushes the git-annex branch to remote/synced/git-annex, rather than ↵Gravatar Joey Hess2012-09-16
| | | | | | | | | | | | | directly to remote/git-annex. This fixes a problem I was seeing in the assistant where two remotes would attempt to sync with one another at the same time, and both failed pushing the diverged git-annex branch. Then when both tried to resolve the failed push, they each modified their git-annex branch, which again each blocked the other from pushing into it. The result was that the git-annex branches were perpetually diverged (despite having the same content!) and once the assistant fell into this trap, it couldn't get out and always had to do the slow push/fail/pull/merge/push/fail cycle.
* add decodeW8Gravatar Joey Hess2012-09-13
|
* refactorGravatar Joey Hess2012-08-26
|
* refactorGravatar Joey Hess2012-08-26
|
* avoid unnecessary transfer scans when syncing a disconnected remoteGravatar Joey Hess2012-08-22
| | | | | | | | | | | | | | | | | | | | Found a very cheap way to determine when a disconnected remote has diverged, and has new content that needs to be transferred: Piggyback on the git-annex branch update, which already checks for divergence. However, this does not check if new content has appeared locally while disconnected, that should be transferred to the remote. Also, this does not handle cases where the two git repos are in sync, but their content syncing has not caught up yet. This code could have its efficiency improved: * When multiple remotes are synced, if any one has diverged, they're all queued for transfer scans. * The transfer scanner could be told whether the remote has new content, the local repo has new content, or both, and could optimise its scan accordingly.
* add routes to pause/start/cancel transfersGravatar Joey Hess2012-08-08
| | | | | | | | | | | | | | | | This commit includes a paydown on technical debt incurred two years ago, when I didn't know that it was bad to make custom Read and Show instances for types. As the routes need Read and Show for Transfer, which includes a Key, and deriving my own Read instance of key was not practical, I had to finally clean that up. So the compact Key read and show functions are now file2key and key2file, and Read and Show are now derived instances. Changed all code that used the old instances, compiler checked. (There were a few places, particularly in Command.Unused, and the test suite where the Show instance continue to be used for legitimate comparisons; ie show key_x == show key_y (though really in a bloom filter))
* handle case of adding populated drive to just created repoGravatar Joey Hess2012-08-05
| | | | | The just created repo has no master branch commits yet. This is now handled, merging in the master branch from the populated drive.
* fix crashes when run in a git repo that has been initted but has no master ↵Gravatar Joey Hess2012-08-05
| | | | branch yet
* Merge branch 'master' into assistantGravatar Joey Hess2012-06-27
|\
| * typoGravatar Joey Hess2012-06-27
| |
* | Merge branch 'master' into assistantGravatar Joey Hess2012-06-27
|\|
| * use "variant" rather than "version"Gravatar Joey Hess2012-06-27
| | | | | | | | | | | | While this word may be less familiar to some users, it avoids the connotation that version 2 is better than version 1, which is wrong when the two variants were conflicting.
| * better filenames for conflict resolution filesGravatar Joey Hess2012-06-27
| |
| * commit merge resolutionGravatar Joey Hess2012-06-27
| | | | | | | | this is necessary so the sync can continue successfully with its push phase
| * fix file nameGravatar Joey Hess2012-06-27
| |
| * don't automerge when the symlinks cannot be parsed as keysGravatar Joey Hess2012-06-27
| |
| * sync: Automatically resolves merge conflicts.Gravatar Joey Hess2012-06-27
| | | | | | | | untested, but it compiles :)
| * properly handle deleted files when processing ls-files --unmergedGravatar Joey Hess2012-06-27
| |
* | Merge branch 'master' into assistantGravatar Joey Hess2012-06-23
|\|
| * sync: Avoid recent git's interactive merge.Gravatar Joey Hess2012-06-23
| |
* | the syncer now pushes out changes to remotes, in parallelGravatar Joey Hess2012-06-22
|/ | | | | | | | | Note that, since this always pushes branch synced/master to the remote, it assumes that master has already gotten all the commits that are on the remote merged in. Otherwise, fast-forward prevention may prevent the push. That's probably ok, because the next stage is to automatically detect incoming pushes and merge.
* sync: Show a nicer message if a user tries to sync to a special remote.Gravatar Joey Hess2012-05-27
|
* added ifM and nuked 11 lines of codeGravatar Joey Hess2012-03-14
| | | | no behavior changes
* sync: Sync to lower cost remotes first.Gravatar Joey Hess2012-03-10
| | | | | | | | | This has two benefits. 1. When a lot of refs are going to be received, get them via lower cost connection when possible. 2. Allows ctrl-c of sync after the cheaper remotes have been pulled from (or pushed to).
* improve alwayscommit=false modeGravatar Joey Hess2012-02-25
| | | | | | | | | | | | | | Now changes are staged into the branch's index, but not committed, which avoids growing a large journal. And sync and merge always explicitly commit, ensuring that even when they do nothing else, they commit the staged changes. Added a flag file to indicate that the branch's journal contains uncommitted changes. (Could use git ls-files, but don't want to run that every time.) In the future, this ability to have uncommitted changes staged in the journal might be used on remotes after a series of oneshot commands.
* hlintGravatar Joey Hess2012-02-16
|
* look up --to and --from remote names only onceGravatar Joey Hess2012-01-06
| | | | This will speed up commands like move and drop.
* tweakGravatar Joey Hess2012-01-02
|
* skip local remotes that are not available (ie, not mounted)Gravatar Joey Hess2011-12-31
| | | | | | | With --fast, unavailable local remotes are filtered out of the fast set. This way, if there are local remotes, --fast always acts only on them, and if none are mounted, acts on nothing. This consistency is better than --fast acting on different remotes depending on what's mounted.
* type alias cleanupGravatar Joey Hess2011-12-31
|
* refactor and check for a detached HEADGravatar Joey Hess2011-12-31
|
* better filtering out of special remotesGravatar Joey Hess2011-12-31
|
* never pick special remotes in --fastGravatar Joey Hess2011-12-31
| | | | even if they have the lowest cost, we cannot use them
* remove unnecessary checkGravatar Joey Hess2011-12-31
| | | | | mergeLocal always creates the local sync branch, so no need to check that it exists later.
* refactorGravatar Joey Hess2011-12-31
|
* really fix check that remote needs mergedGravatar Joey Hess2011-12-31
|
* tweakGravatar Joey Hess2011-12-31
|
* tweakGravatar Joey Hess2011-12-31
|
* fix check that remote branch needs mergedGravatar Joey Hess2011-12-31
|
* minor cleanupsGravatar Joey Hess2011-12-31
| | | | mergeFrom is never called on branches that don't exist anymore
* avoid syncing remotes configured annex-ignore, unless explicitly specifiedGravatar Joey Hess2011-12-31
|
* sync --fast: Selects some of the remotes with the lowest annex.cost and ↵Gravatar Joey Hess2011-12-30
| | | | syncs those, in addition to any specified at the command line.
* push when git-annex branch changedGravatar Joey Hess2011-12-30
| | | | I was too heavy-handed in optimising away pushes
* automated syncingGravatar Joey Hess2011-12-30
| | | | | | Some changes to make automated syncing nicer. Merge from both the remote's $branch and its synced/$branch; either could have new changes. Create synced/$branch on the remote when pushing.
* automatically create the syncbranchGravatar Joey Hess2011-12-30
|
* refactorGravatar Joey Hess2011-12-30
|
* refactorGravatar Joey Hess2011-12-30
|
* check that synced/master exists before trying to use itGravatar Joey Hess2011-12-30
| | | | and a nice error message if syncing is not set up yet