summaryrefslogtreecommitdiff
path: root/Command
Commit message (Collapse)AuthorAge
...
| * add: Prevent (most) modifications from being made to a file while it is ↵Gravatar Joey Hess2012-06-05
| | | | | | | | | | | | | | | | | | | | | | being added to the annex. Anything that tries to open the file for write, or delete the file, or replace it with something else, will not affect the add. Only if a process has the file open for write before add starts can it still change it while (or after) it's added to the annex. (fsck will catch this later of course)
| * use createAnnexDirectory when setting up tmp dirGravatar Joey Hess2012-06-05
| |
| * separate source of content from the filename associated with the key when ↵Gravatar Joey Hess2012-06-05
| | | | | | | | | | | | generating a key This already made migrate's code a lot simpler.
* | run event handlers all in the same Annex monadGravatar Joey Hess2012-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses a MVar again, as there seems no other way to thread the state through inotify events. This is a rather unsatisfactory result. I had wanted to run them in the same monad so that the git queue could be used to coleasce git commands and speed things up. But, that led to fragility: If several files are added, and one is removed before queue flush, git add will fail to add any of them. So, the queue is still explicitly flushed after each add for now. TODO: Investigate using git add --ignore-errors. This would need to be done in Command.Add. And, git add still exits nonzero with it, so would need to avoid crashing on queue flush.
* | avoid explicit queue flushGravatar Joey Hess2012-06-04
| | | | | | | | | | The queue is still flushed on add, because each add event is handled by a separate Annex monad. That needs to be fixed to speed up add a lot.
* | ignore-unmatch when removing a staged fileGravatar Joey Hess2012-06-04
| | | | | | | | | | When a file is added, and then deleted before the add action runs, the delete event was unhappy that the file never did get staged.
* | refactorGravatar Joey Hess2012-06-04
| |
* | notice deleted files on startupGravatar Joey Hess2012-06-04
| |
* | deletionGravatar Joey Hess2012-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a new file is annexed, a deletion event occurs when it's moved away to be replaced by a symlink. Most of the time, there is no problimatic race, because the same thread runs the add event as the deletion event. So, once the symlink is in place, the deletion code won't run at all, due to existing checks that a deleted file is really gone. But there is a race at startup, as then the inotify thread is running at the same time as the main thread, which does the initial tree walking and annexing. It would be possible for the deletion inotify to run in a perfect race with the addition, and remove the newly added symlink from the git cache. To solve this race, added event serialization via a MVar. We putMVar before running each event, which blocks if an event is already running. And when an event finishes (or crashes!), we takeMVar to free the lock. Also, make rm -rf not spew warnings by passing --ignore-unmatch when deleting directories.
* | suppress "recording state in git" message during addGravatar Joey Hess2012-06-04
| |
* | add handling of symlink addition eventsGravatar Joey Hess2012-06-04
| | | | | | | | | | | | | | | | And just like that, annexed files can be moved and copies around within the tree, and are automatically fixed to point to the content, and staged in git. Huzzah! Delete still remains TODO, with its troublesome race during add..
* | handle directory deletionGravatar Joey Hess2012-06-04
| | | | | | | | | | When a directory is deleted, or moved away, git rm -r it to stage the deletion.
* | add events for symlink creation and directory removalGravatar Joey Hess2012-06-04
| | | | | | | | | | | | | | | | | | | | Improved the inotify code, so it will also notice directory removal and symlink creation. In the watch code, optimised away a stat of a file that's being added, that's done by Command.Add.start. This is the reason symlink creation is handled separately from file creation, since during initial tree walk at startup, a stat was already done, and can be reused.
* | Merge branch 'master' into watchGravatar Joey Hess2012-06-04
|\|
| * import: New subcommand, pulls files from a directory outside the annex and ↵Gravatar Joey Hess2012-05-31
| | | | | | | | | | | | adds them Use case for this was developed somewhere on the Transiberian Railroad.
| * lock: Reset unlocked file to index, rather than to branch head.Gravatar Joey Hess2012-05-30
| | | | | | | | | | | | | | | | Resetting an unlocked file to the branch head failed if it had just been added, not committed, and unlocked, since the branch didbn't have it. The code was concerned about dropping any changes that might be staged in the index, but I cannot see why.
| * sync: Show a nicer message if a user tries to sync to a special remote.Gravatar Joey Hess2012-05-27
| |
| * Clean up handling of git directory and git worktree.Gravatar Joey Hess2012-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baked into the code was an assumption that a repository's git directory could be determined by adding ".git" to its work tree (or nothing for bare repos). That fails when core.worktree, or GIT_DIR and GIT_WORK_TREE are used to separate the two. This was attacked at the type level, by storing the gitdir and worktree separately, so Nothing for the worktree means a bare repo. A complication arose because we don't learn where a repository is bare until its configuration is read. So another Location type handles repositories that have not had their config read yet. I am not entirely happy with this being a Location type, rather than representing them entirely separate from the Git type. The new code is not worse than the old, but better types could enforce more safety. Added support for core.worktree. Overriding it with -c isn't supported because it's not really clear what to do if a git repo's config is read, is not bare, and is then overridden to bare. What is the right git directory in this case? I will worry about this if/when someone has a use case for overriding core.worktree with -c. (See Git.Config.updateLocation) Also removed and renamed some functions like gitDir and workTree that misused git's terminology. One minor regression is known: git annex add in a bare repository does not print a nice error message, but runs git ls-files in a way that fails earlier with a less nice error message. This is because before --work-tree was always passed to git commands, even in a bare repo, while now it's not.
| * Fix use of several config settingsGravatar Joey Hess2012-05-05
| | | | | | | | | | | | | | annex.ssh-options, annex.rsync-options, annex.bup-split-options. And adjust types to avoid the bugs that broke several config settings recently. Now "annex." prefixing is enforced at the type level.
| * addunused: New command, the opposite of dropunused, it relinks unused ↵Gravatar Joey Hess2012-05-02
| | | | | | | | content into the git repository.
| * dropunused: Allow specifying ranges to drop.Gravatar Joey Hess2012-05-02
| | | | | | | | | | Sort of by popular demand, but the last straw for not using seq was that it can run into command line length limits.
| * percentage libraryGravatar Joey Hess2012-04-29
| |
| * show percent the bloom filter is fullGravatar Joey Hess2012-04-29
| |
| * show amount of reserved spaceGravatar Joey Hess2012-04-23
| |
| * Add annex.httpheaders and annex.httpheader-command config settingsGravatar Joey Hess2012-04-22
| | | | | | | | | | | | Allow custom headers to be sent with all HTTP requests. (Requested by the Internet Archive)
| * noopGravatar Joey Hess2012-04-21
| |
| * better file mode setting codeGravatar Joey Hess2012-04-21
| |
| * Support git's core.sharedRepository configurationGravatar Joey Hess2012-04-21
| | | | | | | | | | | | This is incomplete, it does not honor it yet for hash directories and other annex bookkeeping files. Some of that is not needed for a bare repo; some of it may be.
| * export a more generalized checkDiskSpaceGravatar Joey Hess2012-04-20
| |
* | watch subcommandGravatar Joey Hess2012-04-12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far this only handles auto-annexing new files that are created inside the repository while it's running. To make this really useful, it needs to at least: - notice deleted files and stage the deletion (tricky; there's a race with add..) - notice renamed files, auto-fix the symlink, and stage the new file location - periodically auto-commit staged changes - honor .gitignore, not adding files it excludes Also nice to have would be: - Somehow sync remotes, possibly using a push sync like dvcs-autosync does, so they are immediately updated. - Somehow get content that is unavilable. This is problimatic with inotify, since we only get an event once the user has tried (and failed) to read from the file. Perhaps instead, automatically copy content that is added out to remotes, with the goal of all repos eventually getting a copy, if df allows. - Drop files that have not been used lately, or meet some other criteria (as long as there's a copy elsewhere). - Perhaps automatically dropunused files that have been deleted, although I cannot see a way to do that, since by the time the inotify deletion event arrives, the file is deleted, and we cannot see what its symlink pointed to! Alternatievely, perhaps automatically do an expensive unused/dropunused cleanup process. Some of this probably needs the currently stateless threads to maintain a common state.
* use unabbreviated size units in statusGravatar Joey Hess2012-04-06
|
* Rewrote free disk space checking codeGravatar Joey Hess2012-03-22
| | | | | Moving the portability handling into a small C library cleans up things a lot, avoiding the pain of unpacking structs from inside haskell code.
* use new getConfigGravatar Joey Hess2012-03-22
|
* rationalize getConfigGravatar Joey Hess2012-03-22
| | | | | | | | | | getConfig got a remote-specific config, and this confusing name caused it to be used a couple of places that only were interested in global configs. Rename to getRemoteConfig and make getConfig only get global configs. There are no behavior changes here, but remote.<name>.annex-web-options never actually worked (and per-remote web options is a very unlikely to be useful case so I didn't make it work), so fix the documentation for it.
* tweakGravatar Joey Hess2012-03-22
|
* status: Prints available local disk space, or shows if git-annex doesn't know.Gravatar Joey Hess2012-03-21
|
* fun with symbolsGravatar Joey Hess2012-03-17
| | | | | | Nothing at all on hackage is using <&&> or <||>. (Also, <&&> should short-circuit on failure.)
* optimize monadic ||Gravatar Joey Hess2012-03-16
| | | | | (||) used applicative style runs both conditions rather than short circuiting. Add an orM that properly short-circuits.
* added ifM and nuked 11 lines of codeGravatar Joey Hess2012-03-14
| | | | no behavior changes
* Merge branch 'master' into bloomGravatar Joey Hess2012-03-14
|\ | | | | | | | | | | Conflicts: Command/Commit.hs debian/changelog
| * ignore hook exit statusGravatar Joey Hess2012-03-14
| |
| * git-annex-shell: Runs hooks/annex-content after content is received or dropped.Gravatar Joey Hess2012-03-14
| |
* | git-annex-shell: Runs hooks/annex-content after content is received or dropped.Gravatar Joey Hess2012-03-14
| |
* | Merge branch 'master' into bloomGravatar Joey Hess2012-03-12
|\| | | | | | | | | Conflicts: debian/changelog
* | finish bloom filtersGravatar Joey Hess2012-03-12
| | | | | | | | | | | | | | | | Add tuning, docs, etc. Not sure if status is the right place to remote size.. perhaps unused should report the size and also warn if it sees more keys than the bloom filter allows?
* | added second stage bloom filterGravatar Joey Hess2012-03-12
| |
* | fixed bloom filter creation space leakGravatar Joey Hess2012-03-12
| | | | | | | | it works!
* | try at using bloom filtersGravatar Joey Hess2012-03-12
| | | | | | | | leaks memory
| * status: More accurate display of sizes of tmp and bad keys.Gravatar Joey Hess2012-03-12
|/ | | | | | | | | Can't trust the key size to be accurate for tmp and bad keys, so check actual file size. In the wild I saw the old code be wrong by a factor of about 100! If all tmp/bad keys are empty, they're not shown in status at all. Showing 0 bytes and suggesting to clean it up seemed weird..
* prettifyGravatar Joey Hess2012-03-11
|