Commit Graph

632 Commits

Author SHA1 Message Date
Brian Tiger Chow
53e6a9bd1a fix(fsrepo): remove the Closer after closing it. 2015-01-14 03:02:23 -08:00
Brian Tiger Chow
6ec20b3574 huh 2015-01-14 03:02:23 -08:00
Brian Tiger Chow
76202a9444 fix(repo): clean the path before using it
no issue detected but it's good to be safe
2015-01-14 03:02:23 -08:00
Brian Tiger Chow
40e41d24f7 feat(fsrepo): protect with a repo lockfile
NB: daemon is one spot the repo lock is typically acquired
2015-01-14 03:02:23 -08:00
Brian Tiger Chow
67c161fb72 doc todo 2015-01-14 03:02:23 -08:00
Brian Tiger Chow
9700d2f94b use atomicfile for safer writes
for now, allow daemon and client to both hit config
2015-01-14 03:02:23 -08:00
Brian Tiger Chow
acbd9a2204 rm unused function 2015-01-14 03:02:22 -08:00
Brian Tiger Chow
9a7fbe3210 doc(fsrepo): Roadmap 2015-01-14 03:02:22 -08:00
Brian Tiger Chow
01f54d6966 refactor(fsrepo.test) use TempDir
@jbenet
2015-01-13 03:09:33 -08:00
Brian Tiger Chow
3eafb3e5ab style(repo): repo.Interface -> repo.Repo
The pkg.Interface style is modeled after heap.Interface. Generally, I
find it helpful for interfaces that have many implementations. It
provides clear distinction between the generic interface and the |n|
implementations that implement it (which may be interface types
themselves).

For clients who cannot keep the repo name, one can imagine that the most
likely rename is `ipfsrepo`. In that case, `ipfsrepo.Interface` remains
meaningful.

This is low-pri so it doesn't matter than much. But for the record, the
repo.Interface feels appropriate in this use-case.
2015-01-13 03:09:33 -08:00
Brian Tiger Chow
89afdabb7e refactor(fsrepo): move OpenerCounter 2015-01-13 03:09:33 -08:00
Brian Tiger Chow
4aba282379 feat(fsrepo): handle safe Removal 2015-01-13 03:09:33 -08:00
Brian Tiger Chow
3ec5c678ae fix(updates): record the occurrence of the auto-update check
This may have been failing before.
2015-01-13 03:09:33 -08:00
Brian Tiger Chow
899c419ac3 refactor(config): break it apart 2015-01-13 03:09:33 -08:00
Brian Tiger Chow
631d2154f2 fix(fsrepo): use "please run ipfs init" message 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
e84fc5df22 fix(config): avoid clobbering user-provided key value pairs
let me know if this looks off @whyrusleeping @jbenet
2015-01-13 03:09:32 -08:00
Brian Tiger Chow
bbaf70974d move utility method 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
306c7e2e7b doc(fsrepo) 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
b54c7de48c fix(fsrepo): add guard to ConfigKey methods 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
3986af7691 refactor(repo): move public methods 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
47e4a35e6b refactor(repo): privatize serialization methods 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
86258face6 refactor(config, repo): use repo.Interface to (Get|Set)ConfigKey 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
1b700864f9 refactor(repo): all config writes must go through repo 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
405afd2a02 refactor(config, repo): all writes go through FSRepo. next: privatize these 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
c2877b2045 refactor(init, repo): init logs in fsrepo 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
c5da1561b9 check datastore directory when opening the repo for use 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
fa4cfe8da2 refactor(init, fsrepo): go through repo to write to config 2015-01-13 03:09:30 -08:00
Brian Tiger Chow
44f3d95c3b refactor(repo/fsrepo): use repo to check whether config exists 2015-01-13 03:09:30 -08:00
Brian Tiger Chow
5b3164de5c refactor(repo/config) move config under repo 2015-01-13 03:09:30 -08:00
Brian Tiger Chow
d77c4bb5e0 refactor(peer): create peer through peerstore
for safety!

use mockpeer.WithID methods to create peers in tests

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 02:10:42 -08:00
Brian Tiger Chow
4d497f1c6e refactor(repo) mv ConfigureLogger to repo package
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Conflicts:
	cmd/ipfs/main.go
2014-11-24 16:05:51 -08:00
Brian Tiger Chow
2c38487eb0 fix(eventlog) configure logging if repo is initialized
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-24 16:05:51 -08:00