summaryrefslogtreecommitdiff
path: root/Command/Import.hs
Commit message (Collapse)AuthorAge
* addurl, importfeed: Changed to honor annex.largefiles settings, when the ↵Gravatar Joey Hess2015-12-02
| | | | | | | | | content of the url is downloaded. (Not when using --fast or --relaxed.) importfeed just calls addurl functions, so inherits this from it. Note that addurl still generates a temp file, and uses that key to download the file. It just adds it to the work tree at the end when the file is small.
* import: Changed to honor annex.largefiles settings.Gravatar Joey Hess2015-12-02
|
* work around git check-ignore --batch bad exit status bug, and bring back ↵Gravatar Joey Hess2015-11-06
| | | | import -J
* import -J fails at the end, disable util it can be fixedGravatar Joey Hess2015-11-05
|
* import: Avoid very ugly error messages when the directory files are imported ↵Gravatar Joey Hess2015-11-05
| | | | to is not a directort, but perhaps an annexed file.
* -J for add/addurl/importGravatar Joey Hess2015-11-05
|
* fix local dropping to not require extra locking of copies, but only that the ↵Gravatar Joey Hess2015-10-09
| | | | local copy be locked for removal
* rename constructorGravatar Joey Hess2015-10-09
|
* verify local copy of content with lockingGravatar Joey Hess2015-10-09
|
* improve drop proof codeGravatar Joey Hess2015-10-09
|
* support invalidating existing VerifiedCopysGravatar Joey Hess2015-10-08
|
* 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.
* convert ImportGravatar Joey Hess2015-07-13
|
* finished converting all the main optionsGravatar Joey Hess2015-07-10
|
* convert all commands to work with optparse-applicativeGravatar Joey Hess2015-07-08
| | | | Still no options though.
* 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.
* import --clean-duplicates: Fix bug that didn't count local or trusted repo's ↵Gravatar Joey Hess2015-06-03
| | | | copy of a file as one of the necessary copies to allow removing it from the import location.
* import: Refuse to import files that are within the work tree, as that does ↵Gravatar Joey Hess2015-05-11
| | | | not make sense and could cause data loss.
* improve messagesGravatar Joey Hess2015-04-30
|
* import: Before removing a duplicate file in --deduplicate or ↵Gravatar Joey Hess2015-04-30
| | | | --clean-duplicates mode, verify that enough copies of its content still exist.
* import: Don't stop entire import when one file fails due to being gitignored ↵Gravatar Joey Hess2015-04-29
| | | | or conflicting with something in the work tree.
* import: Check for gitignored files before moving them into the tree. (Needs ↵Gravatar Joey Hess2015-04-29
| | | | git 1.8.4 or newer.)
* Steer towards deduplicationGravatar Jean Jordaan2015-04-03
|
* import: --deduplicate and --cleanduplicates now output the keys ↵Gravatar Joey Hess2015-03-31
| | | | corresponding to duplicated files they process.
* better option handlingGravatar Joey Hess2015-02-08
| | | | At least it avoids the big truth table lookup
* import: Avoid checksumming file twice when run in the default or --duplicate ↵Gravatar Joey Hess2015-02-08
| | | | | | | | | mode. --deduplicate, --skip-duplicates, and --clean-duplicates still checksum the file twice, the first time to determine if it's a duplicate. This cannot be easily merged with the checksumming done to add the file, since the file needs to be locked down before that second checksum is taken.
* The file matching options are now only accepted by commands that can ↵Gravatar Joey Hess2015-02-06
| | | | actually use them.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* revert parentDir changeGravatar Joey Hess2015-01-09
| | | | | | | | Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c Unfortunately, this caused breakage on Windows, and possibly elsewhere, because parentDir and takeDirectory do not behave the same when there is a trailing directory separator.
* made parentDir return a Maybe FilePath; removed most uses of itGravatar Joey Hess2015-01-06
| | | | | | | | parentDir is less safe than takeDirectory, especially when working with relative FilePaths. It's really only useful in loops that want to terminate at / This commit was sponsored by Audric SCHILTKNECHT.
* doh't use "def" for command definitions, it conflicts with Data.Default.defGravatar Joey Hess2014-10-14
|
* hlintGravatar Joey Hess2014-10-09
|
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* Do not preserve permissions and acls when copying files from one local git ↵Gravatar Joey Hess2014-08-26
| | | | | | | | | | | | | | | | | repository to another. Timestamps are still preserved as long as cp --preserve=timestamps is supported. This avoids cp -a overriding the default mode acls that the user might have set in a git repository. With GNU cp, this behavior change should not be a breaking change, because git-anex also uses rsync sometimes in the same situation, and has only ever preserved timestamps when using rsync. Systems without GNU cp will no longer use cp -a, but instead just cp. So, timestamps will no longer be preserved. Preserving timestamps when copying between repos is not guaranteed anyway. Closes: #729757
* 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
* reorganize some files and importsGravatar Joey Hess2014-01-26
|
* fix inversion of control in CommandSeek (no behavior changes)Gravatar Joey Hess2014-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've been disliking how the command seek actions were written for some time, with their inversion of control and ugly workarounds. The last straw to fix it was sync --content, which didn't fit the Annex [CommandStart] interface well at all. I have not yet made it take advantage of the changed interface though. The crucial change, and probably why I didn't do it this way from the beginning, is to make each CommandStart action be run with exceptions caught, and if it fails, increment a failure counter in annex state. So I finally remove the very first code I wrote for git-annex, which was before I had exception handling in the Annex monad, and so ran outside that monad, passing state explicitly as it ran each CommandStart action. This was a real slog from 1 to 5 am. Test suite passes. Memory usage is lower than before, sometimes by a couple of megabytes, and remains constant, even when running in a large repo, and even when repeatedly failing and incrementing the error counter. So no accidental laziness space leaks. Wall clock speed is identical, even in large repos. This commit was sponsored by an anonymous bitcoiner.
* better handling of overwriting an existing file/directory/broken link when ↵Gravatar Joey Hess2013-12-09
| | | | | | | | | importing Previous test did not notice if there is a dangling symlink. Also, if a directory exists with the same name as the imported file, that cannot work, so don't let --force have an effect.
* import: Add --skip-duplicates option.Gravatar Joey Hess2013-12-04
| | | | | | | Note that the hash backends were made to stop printing a (checksum..) message as part of this, since it showed up without a file when deciding whether to act on a file. Should have probably removed that message a while ago anyway, I suppose.
* implement import --deduplicate and import --clean-duplicatesGravatar Joey Hess2013-08-20
| | | | | | | | Note that --deduplicate currently checksums each file twice, once to see if it's a known key, and once when importing it. Perhaps this could be revisited and the extra checksum gotten rid of, at the cost of not locking down the file when adding it.
* implement import --duplicateGravatar Joey Hess2013-08-11
| | | | | The other two options are harder, due to needing to get the key for a file before adding it.
* Support import in direct mode.Gravatar Joey Hess2013-07-22
|
* fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
|
* git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
|
* add section metadata to all commandsGravatar Joey Hess2013-03-24
| | | | Not yet used .. mindless train work.
* convert notBareRepo to a CommandCheckGravatar Joey Hess2012-12-29
| | | | | | This avoids some small overhead by only running the check once per command; it also ensures that, even if the command doesn't find anything to run on, it still fails to run when in a bare repo.
* block all commands that don't work in direct modeGravatar Joey Hess2012-12-29
| | | | | I left status working in direct mode, although it doesn't show correct stats for known annex keys.
* whitespace fixesGravatar Joey Hess2012-12-13
|
* 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.