Commit graph

195 commits

Author SHA1 Message Date
Joey Hess
af10b2854a v3 upgrade code works
but write the index file a lot, so slow
2011-06-23 02:30:20 -04:00
Joey Hess
aad73c5721 rewrite loggedkeys to use git-annex branch
That sucking sound is a whole page of code vanishing to be replaced with
  return . catMaybes . map (logFileKey . takeFileName) =<< Branch.files
What can I say, git is my database, and haskell my copilot.
2011-06-22 23:24:14 -04:00
Joey Hess
ad3770e0b2 add merge subcommand 2011-06-22 18:46:56 -04:00
Joey Hess
80302d0b46 improve bare repo handing
Many more commands can work in bare repos now, thanks to the git-annex
branch.
2011-06-22 18:32:41 -04:00
Joey Hess
944c51ba26 improve version checking for v3
Do not set annex.version whenever any command is run. Just do it in init.
This ensures that, if a repo has annex.version=3, it has a git-annex
branch, so we don't have to run a command every time to check for the
branch.

Remove the old ad-hoc logic for v0 and v1, to simplify version checking.
2011-06-22 18:07:45 -04:00
Joey Hess
4c4ebf2d75 store trust.log and remote.log in the git-annex branch
.. and I think that's everything that will use the branch
2011-06-22 17:08:51 -04:00
Joey Hess
1870186632 fixed logFile 2011-06-22 16:17:16 -04:00
Joey Hess
e0bd9d43a2 update for git-annex branch
stop changing gitattributes on init

create git-annex branch on init

ugly special case for init in a bare repository goes away, yay!

git annex init is also faster, at least in a large existing repo, as
it does not need to run the slow 'git add'
2011-06-22 16:03:26 -04:00
Joey Hess
5c706d1ec4 stop undoing gitattributes on uninit
v2 upgrade will undo them
2011-06-22 16:03:09 -04:00
Joey Hess
d3f0106f2e move LocationLog into Annex monad from IO
It will need to run in Annex so it can use Branch
2011-06-22 14:27:50 -04:00
Joey Hess
9f9e17aa0f unlock: Made atomic. 2011-06-20 22:38:18 -04:00
Joey Hess
90dd245522 get --from is the same as copy --from
get not honoring --from has surprised me a few times, so least surprise
suggests it should just behave like copy --from. This leaves the difference
between get and copy being that copy always requires the remote to copy
from, while get will decide whether to get a file from a key/value store or
a remote.
2011-06-09 18:54:49 -04:00
Joey Hess
703c437bd9 rename modules for data types into Types/ directory 2011-06-01 21:56:04 -04:00
Joey Hess
971ab27e78 better types allowed breaking module dep loop 2011-06-01 19:11:27 -04:00
Joey Hess
a8fb97d2ce Add --trust, --untrust, and --semitrust options. 2011-06-01 17:57:31 -04:00
Joey Hess
869cb82f49 remove unnecessary imports 2011-06-01 11:53:43 -04:00
Joey Hess
038da52bdd Somewhat sped up git commit of modifications to unlocked files.
Avoid git reset here too, so I no longer need to care that it's much more
expensive than seems wise (but I asked the git list about that anyway).

It's not necessary to reset the staged file content from the index, as
the `git add` of the the symlink will replace it anyway.

`git commit` of unlocked files is still slow, since git still has to shove
their entire content into the index, only to have it be thrown away. So it's
still better to use `git annex add`
2011-05-31 16:08:37 -04:00
Joey Hess
fb259033d4 Fix locking of files with staged changes.
Previously, lock would skip files that had staged changes, but that is
counterintuitive, I think.
2011-05-31 15:00:56 -04:00
Joey Hess
fafe60768f Massively sped up git annex lock by avoiding use of the uber-slow git reset, and only running git checkout once, even when many files are being locked. 2011-05-31 14:50:41 -04:00
Joey Hess
86c5bd0327 unused --from . checks local repo, for consistency 2011-05-28 22:37:17 -04:00
Joey Hess
14ffb5d47b bugfix: fix unused list numbering
Introduced in 43f0a666f0
2011-05-28 22:30:06 -04:00
Joey Hess
66a99d3740 tweak 2011-05-28 22:24:48 -04:00
Joey Hess
25b13673f0 improve unused command's output
Display the name of the remote being checked, with "." for the current
remote, echoing the way describe takes that to change its description.
2011-05-28 22:20:22 -04:00
Joey Hess
fdead6b9bb improve error message when no remote name is specified
list available remotes in case user wanted to use or change one of them
2011-05-28 21:58:48 -04:00
Joey Hess
c38f826435 Data.Tuple.swap not available with ghc 6.12.3 2011-05-28 11:56:48 -04:00
Joey Hess
f81c1f10e6 show a warning message when failing to find requested key
Otherwise, the user sees only a rsync protocol error message and then
git-annex's less specific failure message.
2011-05-22 14:03:06 -04:00
Joey Hess
c91929f693 add whenM and unlessM
Just more golfing.. I am pretty sure something in a library somewhere can
do this, but I have been unable to find it.
2011-05-17 03:13:11 -04:00
Joey Hess
75a3f5027f tweak 2011-05-17 01:59:44 -04:00
Joey Hess
33e6425d10 tweak 2011-05-16 22:49:41 -04:00
Joey Hess
21953a802a am I silly to worry about length overflowing int max? 2011-05-16 22:22:37 -04:00
Joey Hess
5068985020 rejigger what's --fast 2011-05-16 22:19:15 -04:00
Joey Hess
1e3da8efb0 add info about any temp files and bad content files 2011-05-16 22:01:50 -04:00
Joey Hess
a8816efc14 status: New subcommand to show info about an annex, including its size. 2011-05-16 21:18:34 -04:00
Joey Hess
d006586cd0 add a message in potenatially confusing copy --fast failure situation 2011-05-16 13:27:19 -04:00
Joey Hess
93c5fb5da7 support remote config values with spaces and other characters 2011-05-16 13:07:56 -04:00
Joey Hess
ceff04ff3e better multiword parameter handling
This way, individual words as entered on the command line are available
to commands.
2011-05-16 12:25:54 -04:00
Joey Hess
5256a6b011 migrate: Use current filename when generating new key, for backends where the filename affects the key name. 2011-05-16 12:10:08 -04:00
Joey Hess
cad0e1c8b7 simplified a bunch of Maybe handling 2011-05-15 03:38:08 -04:00
Joey Hess
56bc3e95ca refactor some boilerplate 2011-05-15 02:02:46 -04:00
Joey Hess
43f0a666f0 unused: Now also lists files fsck places in .git/annex/bad/ 2011-04-29 13:59:00 -04:00
Joey Hess
76911a446a Avoid using absolute paths when staging location log, as that can confuse git when a remote's path contains a symlink. Closes: #621386
This was a real PITA to fix, since location logs can be staged in
both the current repo, as well as in local remote's repos, in
which case the cwd will not be in the repo. And git add needs different
params in both cases, when absolute paths are not used.

In passing, git annex fsck now stages location log fixes.
2011-04-25 14:54:24 -04:00
Joey Hess
1e84dab4c8 RemoteConfig type 2011-04-15 15:09:36 -04:00
Joey Hess
8ad901a647 refactor 2011-04-09 14:26:32 -04:00
Joey Hess
bc51387e6d Periodically flush git command queue, to avoid boating memory usage too much.
Since the queue is flushed in between subcommand actions being run,
there should be no issues with actions that expect to queue up some stuff
and have it run after they do other stuff. So I didn't have to audit for
such assumptions.
2011-04-07 13:59:31 -04:00
Joey Hess
868300d4c1 unused/dropunused: support --from 2011-04-02 21:35:02 -04:00
Joey Hess
ed7fc4fce9 Bugfix: copy --to --fast never really copied, fixed. 2011-04-01 12:34:06 -04:00
Joey Hess
0a4c610b4f initremote works 2011-03-29 14:55:59 -04:00
Joey Hess
05751d55cd clean up remote.log handling 2011-03-29 14:10:12 -04:00
Joey Hess
b1db436816 started on initremote 2011-03-28 23:22:31 -04:00
Joey Hess
996e5eee01 Merge branch 'master' into s3
Conflicts:
	debian/changelog
2011-03-28 16:34:58 -04:00