summaryrefslogtreecommitdiff
path: root/Utility/Directory.hs
Commit message (Collapse)AuthorAge
* add git annex view commandGravatar Joey Hess2014-02-18
| | | | | | | | | | | | | | | | | | (And a vpop command, which is still a bit buggy.) Still need to do vadd and vrm, though this also adds their documentation. Currently not very happy with the view log data serialization. I had to lose the TDFA regexps temporarily, so I can have Read/Show instances of View. I expect the view log format will change in some incompatable way later, probably adding last known refs for the parent branch to View or something like that. Anyway, it basically works, although it's a bit slow looking up the metadata. The actual git branch construction is about as fast as it can be using the current git plumbing. This commit was sponsored by Peter Hogg.
* Windows: Avoid using unix-compat's rename, which refuses to rename directories.Gravatar Joey Hess2014-01-29
| | | | Opened a bug about this: https://github.com/jystic/unix-compat/issues/10
* convert hacky shell linux mklibs code to haskell ; fixing symlink bugGravatar Joey Hess2013-12-24
| | | | | | The shell code was nasty, and buggy. New haskell code is much nicer, and it's easy to do complicated calculations to properly convert possibly absolute symlinks between libraries into relative links using it.
* need to stat symlinkGravatar Joey Hess2013-12-18
|
* assistant: Fix OSX-specific bug that caused the startup scan to try to ↵Gravatar Joey Hess2013-12-18
| | | | follow symlinks to other directories, and add their contents to the annex.
* import: Skip .git directories.Gravatar Joey Hess2013-10-07
|
* add dirContentsRecursiveSkippingGravatar Joey Hess2013-10-05
|
* better nukefileGravatar Joey Hess2013-05-21
| | | | | Fixed handling of case when file does not exist to work like it did before, and avoid an excess stat call.
* better nukeFileGravatar Joey Hess2013-05-21
| | | | This fixes a bug where a direct mode sync fails to delete broken symlinks.
* rename moduleGravatar Joey Hess2013-05-12
|
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* no need to stub moveFile, it worksGravatar Joey Hess2013-05-11
|
* fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey Hess2013-05-10
| | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* stub out posix stuff for WindowsGravatar Joey Hess2013-05-10
| | | | This is enough to let the configure program build.
* finished where indentation changesGravatar Joey Hess2012-12-13
|
* Fix dirContentsRecursive, which had missed some files in deeply nested ↵Gravatar Joey Hess2012-11-26
| | | | subdirectories. Could affect various parts of git-annex.
* cleanupGravatar Joey Hess2012-10-16
|
* releasing version 3.201210163.20121016Gravatar Joey Hess2012-10-16
|
* remove unused functionGravatar Joey Hess2012-10-16
|
* flip catchDefaultIOGravatar Joey Hess2012-09-17
|
* avoid untrappable exception if dirContentsRecursive is run on a directoryGravatar Joey Hess2012-07-02
| | | | | | | | that doesn't exist, or cannot be read The problem is its use of unsafeInterleaveIO, which causes its IO code to run when the thunk is forced, outside any exception trapping the caller may do.
* kqueue: add directory content tracking, and change determinationGravatar Joey Hess2012-06-18
| | | | | | | | | | | | | | This *may* now return Add or Delete Changes as appropriate. All I know for sure is that it compiles. I had hoped to avoid maintaining my own state about the content of the directory tree, and rely on git to check what was changed. But I can't; I need to know about new and deleted subdirectories to add them to the watch list, and git doesn't deal with (empty) directories. So, wrote all the code to scan directories, remember their past contents, compare with current contents, generate appropriate Change events, and update bookkeeping info appropriately.
* added dirTreeGravatar Joey Hess2012-06-18
|
* hlintGravatar Joey Hess2012-06-12
|
* factor out nukeFileGravatar Joey Hess2012-06-06
|
* add dirContentsRecursiveGravatar Joey Hess2012-05-31
|
* 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.
* noopGravatar Joey Hess2012-04-21
|
* moveGravatar Joey Hess2012-03-11
|
* IO exception reworkGravatar Joey Hess2012-02-03
| | | | | | ghc 7.4 comaplains about use of System.IO.Error to catch exceptions. Ok, use Control.Exception, with variants specialized to only catch IO exceptions.
* remove Utility.Conditional and use IfElseGravatar Joey Hess2012-01-24
| | | | | | | This drops the >>! and >>? with the nice low fixity. IfElse does have undocumented >>=>>! and >>=>>? operators, but I deem that too fishy. Anyway, using whenM and unlessM is easier; I sometimes mixed the operators up.
* hslintGravatar Joey Hess2011-12-09
|
* support .git/annex on a different disk than the rest of the repoGravatar Joey Hess2011-11-28
The only fully supported thing is to have the main repository on one disk, and .git/annex on another. Only commands that move data in/out of the annex will need to copy it across devices. There is only partial support for putting arbitrary subdirectories of .git/annex on different devices. For one thing, but this can require more copies to be done. For example, when .git/annex/tmp is on one device, and .git/annex/journal on another, every journal write involves a call to mv(1). Also, there are a few places that make hard links between various subdirectories of .git/annex with createLink, that are not handled. In the common case without cross-device, the new moveFile is actually faster than renameFile, avoiding an unncessary stat to check that a file (not a directory) is being moved. Of course if a cross-device move is needed, it is as slow as mv(1) of the data.