summaryrefslogtreecommitdiff
path: root/Command/Sync.hs
Commit message (Collapse)AuthorAge
* sync --content-of=pathGravatar Joey Hess2017-03-20
| | | | | | | For when you want to sync only some files' contents, not the whole working tree. This commit was sponsored by Anthony DeRobertis on Patreon.
* AssociatedFile newtypeGravatar Joey Hess2017-03-10
| | | | | | To prevent any further mistakes like 1a497cefb47557f0b4788c606f9071be422b2511 This commit was sponsored by Francois Marier on Patreon.
* sync hack to make updateInstead work on eg FATGravatar Joey Hess2017-02-17
| | | | | | | | | | | | sync: When syncing with a local repository located on a crippled filesystem, run the post-receive hook there, since it wouldn't get run otherwise. This makes pushing to repos on FAT-formatted removable drives update them when receive.denyCurrentBranch=updateInstead. Made Remote.Git export onLocal, which was cleaned up to not have so many caveats about its use. This commit was sponsored by Jeff Goeke-Smith on Patreon.
* make git-annex:git-annex push quiet againGravatar Joey Hess2017-02-17
| | | | | | | | | | | | Recent changes had a side effect of displaying errors in the fairly common case when this push fails. Since the synced/git-annex push is always forced, those errors are noise, so hide again. This means 3 separate pushes are done now, where before it only made 2. A bit more expensive, but ssh connection caching eliminates most of the costs. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
* sync: Improve integration with receive.denyCurrentBranch=updateInsteadGravatar Joey Hess2017-02-15
| | | | | | | | | | By displaying error messages from the remote then it fails to update its checked out branch. Error messages in the default receive.denyCurrentBranch are still suppressed, which matches user expectations. This commit was sponsored by Nick Daly on Patreon.
* forgot to compile last commit; fix mistakesGravatar Joey Hess2017-02-15
|
* sync, merge: Fail when the current branch has no commits yet, instead of not ↵Gravatar Joey Hess2017-02-14
| | | | | | | | | | | | | | | | | merging in anything from remotes and appearing to succeed. At first I wanted to make it go ahead and merge into the newborn branch, so made it use Git.Branch.currentUnsafe to get the current branch. But that failed: fatal: ambiguous argument 'refs/heads/master..refs/heads/synced/master': unknown revision or path not in the working tree. A whole nother code path to handle merging into newborn branches seemed excessive, so went with displaying a warning and propigating failure status. This commit was sponsored by Brock Spratlen on Patreon.
* make sync --no-commit override annex.annex.autocommitGravatar Joey Hess2017-02-03
|
* New annex.synccontent config settingGravatar Joey Hess2017-02-03
| | | | | | | | | | | | | | | | .. which can be set to true to make git annex sync default to --content. This may become the default at some point in the future. As well as being configuable by git config, it can be configured by git-annex config to control the default behavior in all clones of a repository. Had to add a separate --no-content switch to we can tell if it's been explicitly set, and should override annex.synccontent. If --content was the default, this complication would not be necessary. This commit was sponsored by Jake Vosloo on Patreon.
* annex.autocommit can be configured via git-annex configGravatar Joey Hess2017-02-03
| | | | | | | | | | | | | | | | | ... to control the default behavior in all clones of a repository. This includes a new Configurable data type, so the GitConfig type indicates which values can be configured this way. The implementation should be quite efficient; the config log is only read once, and only when a Configurable value has not already been set by git-config. Indeed, it would be nice in the future to extend this, so that git-config is itself only read on demand. Some commands may not need to look at the git configuration at all. This commit was sponsored by Trenton Cronholm on Patreon.
* improve commentGravatar Joey Hess2016-11-16
|
* Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* sync: Pass --allow-unrelated-histories to git merge when used with git git ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | 2.9.0 or newer. This makes merging a remote into a freshly created direct mode repository work the same as it works in indirect mode. The git-annex branches would get merged in any case by a sync, since that doesn't use git merge. This might need to be revisited later to better mirror git's behavior.
* fix bugs in handing of deep branches with sync and adjusted branchesGravatar Joey Hess2016-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sync: Previously, when run in a branch with a slash in its name, such as "foo/bar", the sync branch was "synced/bar". That conflicted with the sync branch used for branch "bar", so has been changed to "synced/foo/bar". * adjust: Previously, when adjusting a branch with a slash in its name, such as "foo/bar", the adjusted branch was "adjusted/bar(unlocked)". That conflicted with the adjusted branch used for branch "bar", so has been changed to "adjusted/foo/bar(unlocked)" * Also, running sync in an adjusted branch did not correctly sync changes back to the parent branch when it had a slash in its name. This bug has been fixed. Eliminate use of Git.Ref.under and Git.Ref.basename; using Git.Ref.underBase and Git.Ref.base make everything handle deep branches correctly. Probably noone was adjusting deep branches, and v6 is still experimental anyway, so I'm not going to worry about the mess that was left by that bug. In the case of git-annex sync, using a fixed git-annex with an old unfixed one will mean they use different sync branches for a deep branch, and so they may stop syncing until the old one is upgraded. However, that's only a problem when syncing between repositories without going via a central bare repository. Added a warning about this to the CHANGELOG, but it's probably not going to affect many people at all. This commit was sponsored by Riku Voipio.
* use keyLocations not loggedLocationsGravatar Joey Hess2016-09-06
| | | | Skip dead remotes.
* --branch, stage 2Gravatar Joey Hess2016-07-20
| | | | | | | | Show branch:file that is being operated on. I had to make ActionItem a type and not a type class because withKeyOptions' passed two different types of values when using the type class, and I could not get the type checker to accept that.
* --branch, stage 1Gravatar Joey Hess2016-07-20
| | | | | | | | | | | | | | | | Added --branch option to copy, drop, fsck, get, metadata, mirror, move, and whereis commands. This option makes git-annex operate on files that are included in a specified branch (or other treeish). The names of the files from the branch that are being operated on are not displayed yet; only the keys. Displaying the filenames will need changes to every affected command. Also, note that --branch can be specified repeatedly. This is not really documented, but seemed worth supporting, especially since we may later want the ability to operate on all branches matching a refspec. However, when operating on two branches that contain the same key, that key will be operated on twice.
* sync --content: Fix bug that caused transfers of files to be made to a git ↵Gravatar Joey Hess2016-06-02
| | | | | | | | | | | remote that does not have a UUID. This particularly impacted clones from gcrypt repositories. Added guard in Annex.Transfer to prevent this problem at a deeper level. I'm unhappy ith NoUUID, but having Maybe UUID instead wouldn't help either if nothing checked that there was a UUID. Since there legitimately need to be Remotes that do not have a UUID, I can't see a way to fix it at the type level, short making there be two separate types of Remotes.
* refactorGravatar Joey Hess2016-04-22
|
* assistant: Deal with upcoming git's refusal to merge unrelated histories by ↵Gravatar Joey Hess2016-04-22
| | | | | | | | | | | | | default git 2.8.1 (or perhaps 2.9.0) is going to prevent git merge from merging in unrelated branches. Since the webapp's pairing etc features often combine together repositories with unrelated histories, work around this behavior change by setting GIT_MERGE_ALLOW_UNRELATED_HISTORIES when the assistant merges. Note though that this is not done for git annex sync's merges, so it will follow git's default or configured behavior.
* add AdjBranch newtype; some simplicationsGravatar Joey Hess2016-04-09
|
* run out of tree merge with --no-ffGravatar Joey Hess2016-04-06
| | | | | | This is how direct mode does it too, and somehow, for reasons that currently escape me, this makes git merge not care if it's run with an empty work tree.
* fix auto merge conflict resolution when doing out of tree merge for adjusted ↵Gravatar Joey Hess2016-04-06
| | | | branch
* sync: Show output of git commit.Gravatar Joey Hess2016-04-05
| | | | | | Rationalle: User might have hook scripts whose output they want to see. Also, git commit output may tell the user they forgot to add a file. The output is not too ugly when there's nothing to commit.
* fixed merging of changes from adjusted branch + a remoteGravatar Joey Hess2016-03-31
|
* made some progress on syncing adjusted branches, but still buggyGravatar Joey Hess2016-03-31
|
* Merge branch 'master' into adjustedbranchGravatar Joey Hess2016-03-11
|\
| * remove redundant start messageGravatar Joey Hess2016-03-09
| |
* | working toward adjusted commit propigationGravatar Joey Hess2016-03-03
| |
* | push original branch, not adjusted branchGravatar Joey Hess2016-03-03
| |
* | fix bug introduced in recent commitGravatar Joey Hess2016-02-29
| |
* | update sync branch to the orig branch when in adjusted branchGravatar Joey Hess2016-02-29
| |
* | make assistant aware of adjusted branches when mergingGravatar Joey Hess2016-02-29
| |
* | make sync aware of adjusted branchesGravatar Joey Hess2016-02-29
|/ | | | | | | | | | So, it will pull and push the original branch, not the adjusted one. And, for merging, it will use updateAdjustedBranch (not implemented yet). Note that remaining uses of Git.Branch.current need to be checked too; for things that should act on the original branch, and not the adjusted branch.
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* arrange for regional output manager to run when -J is enabledGravatar Joey Hess2015-11-04
| | | | | | | | | | Commands that want to use it have to run their seek action inside allowConcurrentOutput. Which seems reasonable; perhaps some future command will want to support the -J flag but not use regions. The region state moved from Annex to MessageState. This makes sense organizationally, and note that some uses of onLocal use a different Annex state, but pass the MessageState into it, which is what is needed.
* improve layout and commentGravatar Joey Hess2015-10-15
|
* add VerifiedCopy data typeGravatar Joey Hess2015-10-08
| | | | | | | | | There should be no behavior changes in this commit, it just adds a more expressive data type and adjusts code that had been passing around a [UUID] or sometimes a Maybe Remote to instead use [VerifiedCopy]. Although, since some functions were taking two different [UUID] lists, there's some potential for me to have gotten it horribly wrong.
* Do verification of checksums of annex objects downloaded from remotes.Gravatar Joey Hess2015-10-01
| | | | | | | | | | | | | | | | * When annex objects are received into git repositories, their checksums are verified then too. * To get the old, faster, behavior of not verifying checksums, set annex.verify=false, or remote.<name>.annex-verify=false. * setkey, rekey: These commands also now verify that the provided file matches the key, unless annex.verify=false. * reinject: Already verified content; this can now be disabled by setting annex.verify=false. recvkey and reinject already did verification, so removed now duplicate code from them. fsck still does its own verification, which is ok since it does not use getViaTmp, so verification doesn't happen twice when using fsck --from.
* Improve bash completion, so it completes names of remotes and backends in ↵Gravatar Joey Hess2015-09-14
| | | | | | | | | appropriate places. Not necessarily everywhere, but a lot of the most often used places. Re the use of .Internal, see https://github.com/pcapriotti/optparse-applicative/issues/155
* sync: Add --no-commit, --no-pull, --no-push options to turn off parts of the ↵Gravatar Joey Hess2015-09-13
| | | | sync process, as well as supporting --commit, --pull, --push, and --no-content options to specify the (current) default behavior.
* 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.