| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Kqueue needs to remember which files failed to be added due to being open,
and retry them. This commit gets the data in place for such a retry thread.
Broke KeySource out into its own file, and added Eq and Ord instances
so it can be stored in a Set.
|
|
|
|
|
|
| |
generating a key
This already made migrate's code a lot simpler.
|
| |
|
|
|
|
| |
as ReKey is plumbing, this makes sense
|
|
|
|
| |
files en masse.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now gitattributes are looked up, efficiently, in only the places that
really need them, using the same approach used for cat-file.
The old CheckAttr code seemed very fragile, in the way it streamed files
through git check-attr.
I actually found that cad8824852aa0623dc41eac02a9e2bae47d88ec4
was still deadlocking with ghc 7.4, at the end of adding a lot of files.
This should fix that problem, and avoid future ones.
The best part is that this removes withAttrFilesInGit and withNumCopies,
which were complicated Seek methods, as well as simplfying the types
for several other Seek methods that had a Backend tupled in.
|
| |
|
|
|
|
|
| |
Left a few Prelude.head's in where it was checked not null and too hard to
remove, etc.
|
|
|
|
| |
code melt for lunch
|
|
|
|
|
|
|
|
|
|
| |
Supporting multiple directory hash types will allow converting to a
different one, without a flag day.
gitAnnexLocation now checks which of the possible locations have a file.
This means more statting of files. Several places currently use
gitAnnexLocation and immediately check if the returned file exists;
those need to be optimised.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Mostly only refactoring, but this does remove one redundant stat of the
symlink by copy.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many functions took the repo as their first parameter. Changing it
consistently to be the last parameter allows doing some useful things with
currying, that reduce boilerplate.
In particular, g <- gitRepo is almost never needed now, instead
use inRepo to run an IO action in the repo, and fromRepo to get
a value from the repo.
This also provides more opportunities to use monadic and applicative
combinators.
|
| |
|
|
|
|
|
|
|
|
|
| |
This new approach allows filtering out checks from the default set that are
not appropriate for a command, rather than having to list every check
that is appropriate. It also reduces some boilerplate.
Haskell does not define Eq for functions, so I had to go a long way around
with each check having a unique id. Meh.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
no code changes
|
| |
|
| |
|
|
|
|
|
|
|
| |
These were a mistake, they make the type signatures harder to read and
less flexible. The CommandSeek, CommandStart, CommandPerform, and
CommandCleanup types were a good idea, but composing them with the
parameters expected is going too far.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The tricky part about this is that to generate a key, the file must be
present already. Worked around by adding (back) an URL key type, which
is used for addurl --fast.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only remaining vestiage of backends is different types of keys. These
are still called "backends", mostly to avoid needing to change user interface
and configuration. But everything to do with storing keys in different
backends was gone; instead different types of remotes are used.
In the refactoring, lots of code was moved out of odd corners like
Backend.File, to closer to where it's used, like Command.Drop and
Command.Fsck. Quite a lot of dead code was removed. Several data structures
became simpler, which may result in better runtime efficiency. There should
be no user-visible changes.
|
|
|
|
|
| |
Just more golfing.. I am pretty sure something in a library somewhere can
do this, but I have been unable to find it.
|
|
|
|
| |
the filename affects the key name.
|
| |
|
|
|
|
| |
that can be used for free space checking.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
already present in .git/annex/objects.
For example, this could happen if using SHA1 and a file with content
"foo" were added to that backend. Then a file with "content" foo were
migrated from the WORM backend.
Assume that, if a backend assigned the same key, the already annexed
content must be the same. So, the "old" content can be reused.
|
|
|
|
|
|
|
|
| |
Free space checking is now done, for transfers of data for keys that have free space metadata.
(Notably, not for SHA* keys generated with git-annex 0.24 or earlier.)
The code is believed to work on Linux, FreeBSD, and OSX; check compile-time
messages to see if it is not enabled for your OS.
|
|
|
|
|
| |
There are two types of commands; those that access the repository and those
that don't. Sorted.
|
|
|
|
|
|
|
|
|
|
| |
Rename Locations functions for better consitency, and make their values
more consistent too.
Used </> rather than manually building paths. There are still more places
that manually do so, but are tricky, due to the behavior of </> when
the second FilePath is absolute. So I only changed places where
it obviously was relative.
|
|
|
|
|
| |
This allows the Backend type to not depend on the Annex type, and
so the Annex type can later be moved out of TypeInternals.
|
|
|
|
| |
Most of it was to do with managing annexed Content, so put there
|
| |
|
| |
|
|
backend, safely and with no duplication of content.
|