Commit graph

123 commits

Author SHA1 Message Date
Joey Hess
9d24cc7bdb make commands that take a key as a parameter error if it's bad 2011-03-15 22:46:47 -04:00
Joey Hess
2e1cc2f8b9 fixed dropkey, setkey, and git-annex-shell subcommands
key is now specified as the full key, no --backend needed
2011-03-15 22:42:34 -04:00
Joey Hess
4594bd51c1 rename file 2011-03-15 22:04:50 -04:00
Joey Hess
9d49fe2c17 first pass at using new keys
It compiles. It sorta works. Several subcommands are FIXME marked and
broken, because things that used to accept separate --backend and --key
params need to be changed to accept just a --key that encodes all the key
info, now that there is metadata in keys.
2011-03-15 21:34:13 -04:00
Joey Hess
83a9bb624b fix error throwing 2011-03-15 11:50:40 -04:00
Joey Hess
bc5c54c987 symlink touching fun
When adding files to the annex, the symlinks pointing at the annexed
content are made to have the same mtime as the original file. While git
does not preserve that information, this allows a tool like metastore to be
used with annexed files.
2011-03-14 23:00:23 -04:00
Joey Hess
72d2684016 Rethink filename encoding handling for display. Since filename encoding may or may not match locale settings, any attempt to decode filenames will fail for some files. So instead, do all output in binary mode. 2011-03-12 15:30:17 -04:00
Joey Hess
ef92bd2b0b add copy count 2011-03-05 17:41:36 -04:00
Joey Hess
0de3005c64 whereis: New subcommand to show where a file's content has gotten to. 2011-03-05 17:23:55 -04:00
Joey Hess
6c1607ce66 Support ssh remotes with a port specified. 2011-03-05 15:47:00 -04:00
Joey Hess
aad1372880 move repoConfig out of Remotes 2011-03-05 15:31:46 -04:00
Joey Hess
acde7a1736 improve GitRepos functions for pulling apart URL to repo 2011-03-05 15:13:16 -04:00
Joey Hess
7b2762fb92 better quoting of description via show 2011-03-03 17:22:17 -04:00
Joey Hess
657395b628 add describe subcommand 2011-03-03 17:21:00 -04:00
Joey Hess
b5b78f26ec fix up commands that are trouble on bare repos
Most will just abort. init does a basic init and gives a command to
run elsewhere to finish it.
2011-03-03 16:40:55 -04:00
Joey Hess
b88637fff1 prevent trust commands from trying to do things in a bare repo
Since they need to stage changes, they would actually, if allowed to run,
succeed, but wipe out existing trust.log content.
2011-03-03 16:22:53 -04:00
Joey Hess
9f20aee219 avoid logging to location log when in a bare repo
This assumes that changes to content in bare repos are made from some
non-bare repo, and that the location log is updated on that side.

That's true for move --from and move --to.

It's *not* true for dropkey and setkey and recvkey. But those are plumbing
level commands, so I guess it's ok to assume that someone running those
in a bare repo knows what they're doing. And git-annex-shell is used to
run those, and if the bare repo is non-local, it needs to be able to use
them even though they cannot update the location log. So this seems
unavoidable.
2011-03-03 15:22:53 -04:00
Joey Hess
6206b46e60 fsck: Check for and repair location log damage. 2011-03-02 14:30:36 -04:00
Joey Hess
4cd96ad2db rename 2011-02-28 16:25:31 -04:00
Joey Hess
fcdc4797a9 use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes,
throughout the code.
2011-02-28 16:18:55 -04:00
Joey Hess
836e71297b Support filenames that start with a dash; when such a file is passed to a utility it will be escaped to avoid it being interpreted as an option. 2011-02-25 01:13:01 -04:00
Joey Hess
5a50a7cf13 update unicode FilePath handling
Based on http://hackage.haskell.org/trac/ghc/ticket/3307 ,
whether FilePath contains decoded unicode varies by OS.
So, add a configure check for it.

Also, renamed showFile to filePathToString
2011-02-11 15:37:37 -04:00
Michael Kenney
285fb2bb08 Fixed missing import of Messages module 2011-02-10 21:06:00 -04:00
Joey Hess
fe55b4644e Fix display of unicode filenames.
Internally, the filenames are stored as un-decoded unicode.
I tried decoding them, but then haskell tries to access the wrong files.
Hmm.

So, I've unhappily chosen option "B", which is to decode filenames before
they are displayed.
2011-02-10 14:21:44 -04:00
Joey Hess
35a6506812 unannex: Fix recently introduced bug when attempting to unannex more than one file at a time. 2011-02-09 11:02:21 -04:00
Joey Hess
81e045a539 tweak 2011-02-08 18:26:38 -04:00
Joey Hess
c1b69d1511 fill color for host boxes 2011-02-08 18:17:46 -04:00
Joey Hess
c0ec5a35db show trusted repos in green 2011-02-08 18:04:19 -04:00
Joey Hess
3ae654254d make remotes absolute while spidering 2011-02-08 17:52:32 -04:00
Joey Hess
97d5e23430 map bugfix
Need to find the absolute repo path before looking up the full info for the
repo. Otherwise, it doesn't find the right full info.
2011-02-08 17:46:52 -04:00
Joey Hess
ef2d4f650e fix absrepo data loss
it was dropping the config map for the repos it changed
2011-02-04 01:56:45 -04:00
Joey Hess
926df3d91e node ordering 2011-02-04 00:13:47 -04:00
Joey Hess
0fd0e414ec color unreachable nodes 2011-02-04 00:06:23 -04:00
Joey Hess
67c1facad1 fix infinite loop
Local repos with the same path are not different. :)
2011-02-03 23:23:36 -04:00
Joey Hess
dff47d51e6 cleanup 2011-02-03 23:23:16 -04:00
Joey Hess
1b1a37b7b1 refactor 2011-02-03 22:44:17 -04:00
Joey Hess
17829be0fd map improvements
added uuid.log repos

group repos by host

avoid displaying most urls

display remote names on edges

still some bugs
2011-02-03 22:20:55 -04:00
Joey Hess
0c7d17ae06 new map subcommand, basically working
Still todo:

- add repos from uuid.log that were not directly found
- group repos into their respective hosts
- display inaccessible repos and broken remote connections in red
- anonymize the url display somewhat, so the maps can be shared
- use uuid info to tell when two apparently different repos are actually
  the same repo accessed in different ways
2011-02-03 19:05:15 -04:00
Joey Hess
0e7984a793 add check for unclean tree 2011-02-01 22:02:19 -04:00
Joey Hess
c77ac11acc unannex: Commit staged changes at end
to avoid some confusing behavior with the pre-commit hook, which would see
some types of commits after an unannex as checking in of an unlocked file.
2011-02-01 21:27:23 -04:00
Joey Hess
755029ae0e use forM_ in a few places 2011-01-31 23:27:53 -04:00
Joey Hess
d007e58a54 use mapM_ 2011-01-31 13:52:11 -04:00
Joey Hess
96e561bc47 use Set instead of existence Map
more efficient and idiomatic

I did try using Set.difference, it's still slower than my method.
2011-01-30 01:41:15 -04:00
Joey Hess
c64b50a0ce shutdown no longer a special case 2011-01-29 23:32:32 -04:00
Joey Hess
5584ccc8ad factor out pure code 2011-01-29 23:30:08 -04:00
Joey Hess
e6da7eb177 Improved temp file handling
* Improved temp file handling. Transfers of content can now be resumed
  from temp files later; the resume does not have to be the immediate
  next git-annex run.
* unused: Include partially transferred content in the list.
2011-01-28 14:10:50 -04:00
Joey Hess
04fe906ac6 use safewritefile 2011-01-28 12:35:51 -04:00
Joey Hess
167523f09d better directory handling
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.
2011-01-27 17:00:32 -04:00
Joey Hess
dee9655237 bugfix to move --to
Due to recent changes, the remotes config was not read before the remote
to act on was picked.
2011-01-27 15:45:22 -04:00
Joey Hess
e1d213d6e3 make filename available to fsck messages 2011-01-26 20:37:46 -04:00