Commit graph

2381 commits

Author SHA1 Message Date
Joey Hess
6dc23b889e one more hlint 2011-09-20 23:26:35 -04:00
Joey Hess
9f6b7935dd go go gadget hlint 2011-09-20 23:24:48 -04:00
Joey Hess
9d26192350 pull out pure code 2011-09-20 20:18:43 -04:00
Joey Hess
98fbeba0df bugfix
Different keys can have the same size, so can't make a Set of the sizes.

This version actually runs faster yet, too..
2011-09-20 20:14:17 -04:00
Joey Hess
9f5c7a246b status: Massively sped up; remove --fast mode.
Using Sets is the right thing; they have constant size lookup like my
SizeList, and logn insertation, which beats nub to death.

Runs faster than --fast mode did before, and gives accurate counts.

13 seconds total runtime with a warm cache in a repository with 40 thousand
keys.
2011-09-20 18:57:05 -04:00
Joey Hess
cabbefd9d2 status: In --fast mode, all status info is displayed now; but some of it is only approximate, and is marked as such. 2011-09-20 18:13:08 -04:00
Joey Hess
b62123c378 simplify 2011-09-20 00:59:13 -04:00
Joey Hess
5253379953 convert Token to have separate constructors for each peice of syntax 2011-09-20 00:49:40 -04:00
http://joey.kitenet.net/
a1578e33dc Added a comment 2011-09-19 18:57:52 +00:00
Joey Hess
b08b2b42a9 Merge branch 'master' of ssh://git-annex.branchable.com 2011-09-19 14:55:21 -04:00
http://joey.kitenet.net/
10db73426a Added a comment 2011-09-19 18:54:46 +00:00
Joey Hess
1ddc207b58 some of these are now done 2011-09-19 14:50:16 -04:00
http://joey.kitenet.net/
5c20ebcbf3 Added a comment 2011-09-19 18:46:35 +00:00
Joey Hess
73f3a00c1c typo 2011-09-19 12:21:53 -04:00
Joey Hess
3b2e462018 tweak 2011-09-19 02:04:54 -04:00
Joey Hess
a4aef6f115 clarify wording 2011-09-19 01:54:20 -04:00
Joey Hess
94ee28556f special case for --in .
Do not need to check the location log in this case, can just check inAnnex.
This is both an optimisation and perhaps a correctness measure
(fsck --in . should fsck files even if the location log is damaged.)
2011-09-19 01:52:17 -04:00
Joey Hess
dcded89129 reorg 2011-09-19 01:38:01 -04:00
Joey Hess
6e80f19514 golf 2011-09-19 01:03:16 -04:00
Joey Hess
c31a6a9e10 refactor 2011-09-18 23:09:40 -04:00
Joey Hess
4f1fea1a85 fix memory leak
filterM is not a good idea if you were streaming in a large list of files.

Fixing this memory leak that I introduced earlier today was a PITA because
to avoid the filterM, it's necessary to do the filtering only after
building up the data structures like BackendFile, and that means each
separate data structure needs it own function to apply the filter,
at least in this naive implementation.

There is also a minor performance regression, when using copy/drop/get/fsck
with a filter, git is now asked to look up attributes for all files,
since that now comes before the filter is applied. This is only a very
minor thing, since getting the attributes is very fast and --exclude was
probably not typically used to speed it up.
2011-09-18 22:40:31 -04:00
Joey Hess
8d1e8c0760 golfing with curry 2011-09-18 21:02:40 -04:00
Joey Hess
b516cecff2 probably better to error on unknown token 2011-09-18 20:58:34 -04:00
Joey Hess
8ea48c3e39 update docs 2011-09-18 20:56:37 -04:00
Joey Hess
33cd1ffbfe make find show files meeting limits, even when not present
find: Rather than only showing files whose contents are present, when used
with --exclude --copies or --in, displays all files that match the
specified conditions.

Note that this is a behavior change for find --exclude! Old behavior
can be gotten with find --in . --exclude=...
2011-09-18 20:42:15 -04:00
Joey Hess
9da23dff78 --copies=N can be used to make git-annex only operate on files with the specified number of copies.
(And --not --copies=N for the inverse.)
2011-09-18 20:23:08 -04:00
Joey Hess
1fc3ee2423 add --in limit 2011-09-18 20:14:18 -04:00
Joey Hess
dd463a3100 rework annex-ignore handling
Only one place need to filter the list of remotes for ignored remotes:
keyPossibilities. Make the full list available to everything else.

This allows getting rid of the special case handing for --from and --to
to make ignored remotes not be ignored with those options.
2011-09-18 20:11:39 -04:00
Joey Hess
d78b9f7d54 update man page for file matching options
(--in is not yet implemented)
2011-09-18 18:24:10 -04:00
Joey Hess
b9aa944b09 add --and --or --not -( and -)
I dislike -( and -), but without using a different option parser, can't
easily use bare parens.

--and and --or will become more useful once there are more interesting
limits than --exclude
2011-09-18 18:21:42 -04:00
Joey Hess
8a5a92480b refactor --exclude to use Utility.Matcher
This should change no behavior, but opens the poissibility to use the
matcher for other sorts of limits on which files git-annex processes.
2011-09-18 17:47:49 -04:00
Joey Hess
38c0f3eaf8 add a value to match against to match and matchM 2011-09-18 17:47:24 -04:00
Joey Hess
3e15187ac1 move to Utility 2011-09-18 16:36:30 -04:00
Joey Hess
0e499e67be convert to parameterized types, so the Operation can be any type the caller needs
Especially handy for running a match monadically.
2011-09-18 16:32:39 -04:00
Joey Hess
6ebaa85bdb a generic matcher 2011-09-18 16:17:41 -04:00
Joey Hess
756338fb2e idea 2011-09-17 18:37:38 -04:00
Joey Hess
b73d8225d5 add news item for git-annex 3.20110915 2011-09-17 09:21:21 -04:00
Joey Hess
3e73de4054 releasing version 3.20110915 2011-09-17 09:21:09 -04:00
Joey Hess
73769190b6 grouped commands into related sections 2011-09-15 22:22:43 -04:00
Joey Hess
cbd9ade075 remove now unnecessary git commits 2011-09-15 22:10:17 -04:00
Joey Hess
5ff04bf2af tweak 2011-09-15 16:59:52 -04:00
Joey Hess
35145202d2 remove command type definitions
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.
2011-09-15 16:50:49 -04:00
Joey Hess
456b45b9b3 move annex.numcopies parsing into withNumCopies 2011-09-15 16:24:47 -04:00
Joey Hess
d036cd590f bugfix: drop and fsck did not honor --exclude 2011-09-15 15:44:32 -04:00
Joey Hess
aedf84f7d6 wording 2011-09-15 15:39:48 -04:00
Joey Hess
e47d1fd43e add error for move --auto
It probably does not make sense to enable auto mode for move. I cannot
think of a situation where it would make sense to try to use it.

A hypothetical auto mode for move would only differ from a normal
move in one case -- when both repositories have a file, move deletes it
from one, and this reduces the number of copies. So an auto mode would
either only let move work in that situation, or avoid removing the file
in that situation, depending on the number of copies. This would be
complex to implement, and is perhaps not a very obvious behavior.

The error is a good thing to have, so users don't expect it to do something
it does not.
2011-09-15 15:33:20 -04:00
Joey Hess
a0d3a343b5 copy --auto
Only does copy when numcopies is not yet satisfied.
2011-09-15 15:28:58 -04:00
Joey Hess
7b90cb72fc document --auto all in one place 2011-09-15 15:15:47 -04:00
Joey Hess
fe5e4bdc64 comment 2011-09-15 14:34:15 -04:00
Joey Hess
9fe3c6d211 clean up params in usage display 2011-09-15 14:33:37 -04:00