summaryrefslogtreecommitdiff
path: root/Assistant
Commit message (Collapse)AuthorAge
* Makefile now builds using cabal, taking advantage of cabal's automatic ↵Gravatar Joey Hess2013-02-27
| | | | | | | | | detection of appropriate build flags. The only thing lost is ./ghci Speed: make fast used to take 20 seconds here, when rebuilding from touching Command/Unused.hs. With cabal, it's 29 seconds.
* webapp: Display any error message from git init if it fails to create a ↵Gravatar Joey Hess2013-02-26
| | | | repository.
* fix inverted logicGravatar Joey Hess2013-02-22
|
* remove debug printsGravatar Joey Hess2013-02-19
|
* fully support core.symlinks=false in all relevant symlink handling codeGravatar Joey Hess2013-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored annex link code into nice clean new library. Audited and dealt with calls to createSymbolicLink. Remaining calls are all safe, because: Annex/Link.hs: ( liftIO $ createSymbolicLink linktarget file only when core.symlinks=true Assistant/WebApp/Configurators/Local.hs: createSymbolicLink link link test if symlinks can be made Command/Fix.hs: liftIO $ createSymbolicLink link file command only works in indirect mode Command/FromKey.hs: liftIO $ createSymbolicLink link file command only works in indirect mode Command/Indirect.hs: liftIO $ createSymbolicLink l f refuses to run if core.symlinks=false Init.hs: createSymbolicLink f f2 test if symlinks can be made Remote/Directory.hs: go [file] = catchBoolIO $ createSymbolicLink file f >> return True fast key linking; catches failure to make symlink and falls back to copy Remote/Git.hs: liftIO $ catchBoolIO $ createSymbolicLink loc file >> return True ditto Upgrade/V1.hs: liftIO $ createSymbolicLink link f v1 repos could not be on a filesystem w/o symlinks Audited and dealt with calls to readSymbolicLink. Remaining calls are all safe, because: Annex/Link.hs: ( liftIO $ catchMaybeIO $ readSymbolicLink file only when core.symlinks=true Assistant/Threads/Watcher.hs: ifM ((==) (Just link) <$> liftIO (catchMaybeIO $ readSymbolicLink file)) code that fixes real symlinks when inotify sees them It's ok to not fix psdueo-symlinks. Assistant/Threads/Watcher.hs: mlink <- liftIO (catchMaybeIO $ readSymbolicLink file) ditto Command/Fix.hs: stopUnless ((/=) (Just link) <$> liftIO (catchMaybeIO $ readSymbolicLink file)) $ do command only works in indirect mode Upgrade/V1.hs: getsymlink = takeFileName <$> readSymbolicLink file v1 repos could not be on a filesystem w/o symlinks Audited and dealt with calls to isSymbolicLink. (Typically used with getSymbolicLinkStatus, but that is just used because getFileStatus is not as robust; it also works on pseudolinks.) Remaining calls are all safe, because: Assistant/Threads/SanityChecker.hs: | isSymbolicLink s -> addsymlink file ms only handles staging of symlinks that were somehow not staged (might need to be updated to support pseudolinks, but this is only a belt-and-suspenders check anyway, and I've never seen the code run) Command/Add.hs: if isSymbolicLink s || not (isRegularFile s) avoids adding symlinks to the annex, so not relevant Command/Indirect.hs: | isSymbolicLink s -> void $ flip whenAnnexed f $ only allowed on systems that support symlinks Command/Indirect.hs: whenM (liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus f) $ do ditto Seek.hs:notSymlink f = liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus f used to find unlocked files, only relevant in indirect mode Utility/FSEvents.hs: | Files.isSymbolicLink s = runhook addSymlinkHook $ Just s Utility/FSEvents.hs: | Files.isSymbolicLink s -> Utility/INotify.hs: | Files.isSymbolicLink s -> Utility/INotify.hs: checkfiletype Files.isSymbolicLink addSymlinkHook f Utility/Kqueue.hs: | Files.isSymbolicLink s = callhook addSymlinkHook (Just s) change all above are lower-level, not relevant Audited and dealt with calls to isSymLink. Remaining calls are all safe, because: Annex/Direct.hs: | isSymLink (getmode item) = This is looking at git diff-tree objects, not files on disk Command/Unused.hs: | isSymLink (LsTree.mode l) = do This is looking at git ls-tree, not file on disk Utility/FileMode.hs:isSymLink :: FileMode -> Bool Utility/FileMode.hs:isSymLink = checkMode symbolicLinkMode low-level Done!!
* fix assistant's use of lsof in crippled filesystem modeGravatar Joey Hess2013-02-15
|
* crippled filesystem support, probing and initial supportGravatar Joey Hess2013-02-14
| | | | | | | | | | | | git annex init probes for crippled filesystems, and sets direct mode, as well as `annex.crippledfilesystem`. Avoid manipulating permissions of files on crippled filesystems. That would likely cause an exception to be thrown. Very basic support in Command.Add for cripped filesystems; avoids the lock down entirely since doing it needs both permissions and hard links. Will make this better soon.
* deal with Android's nonstandard shell locationGravatar Joey Hess2013-02-13
| | | | | | This is so gratutious and pointless. It's a shame that everything we learned about Unix portability and the importance of standards has been thrown out the window by these guys.
* support Android's crippled lsofGravatar Joey Hess2013-02-11
|
* can now build Android targeted binaryGravatar Joey Hess2013-02-10
| | | | | | | | | | | | | | | | Various things that don't work on Android are just ifdefed out. * the webapp (needs template haskell for arm) * --include and --exclude globbing (needs libpcre, which is not ported; probably I'll make it use the pure haskell glob library instead) * annex.diskreserve checking (missing sys/statvfs.h) * timestamp preservation support (yawn) * S3 * WebDAV * XMPP The resulting 17mb binary has been tested on Android, and it is able to, at least, print its usage message.
* avoid a warningGravatar Joey Hess2013-02-06
|
* fix build with webapp disabledGravatar Joey Hess2013-02-06
| | | | Broken by recent thread manager and restarting improvements.
* pre-commit: Update direct mode mappings.Gravatar Joey Hess2013-02-06
| | | | | | | | | | | | | | | | Making the pre-commit hook look at git diff-index to find changed direct mode files and update the mappings works pretty well. One case where it does not work is when a file is git annex added, and then git rmed, and then this is committed. That's a no-op commit, so the hook probably doesn't even run, and it certianly never notices that the file was deleted, so the mapping will still have the original filename in it. For this and other reasons, it's important that the mappings still be treated as possibly inconsistent. Also, the assistant now allows the pre-commit hook to run when in direct mode, so the mappings also get updated there.
* assistant: Fix location log when adding new file in direct mode.Gravatar Joey Hess2013-02-05
|
* closeGravatar Joey Hess2013-01-28
|
* assistant: Ignore .DS_Store on OSX.Gravatar Joey Hess2013-01-28
|
* annex.autocommitGravatar Joey Hess2013-01-27
| | | | | | | New setting, can be used to disable autocommit of changed files by the assistant, while it still does data syncing and other tasks. Also wired into webapp UI
* webapp: Now allows restarting any threads that crash.Gravatar Joey Hess2013-01-26
|
* use async to track and manage threadsGravatar Joey Hess2013-01-26
|
* log alerts in notice mode, which is enabled by defaultGravatar Joey Hess2013-01-15
|
* write alerts to log in debug modeGravatar Joey Hess2013-01-15
|
* webapp: Now always logs to .git/annex/daemon.logGravatar Joey Hess2013-01-15
| | | | | | | | It used to not log to daemon.log when a repository was first created, and when starting the webapp. Now both do. Redirecting stdout and stderr to the log is tricky when starting the webapp, because the web browser may want to communicate with the user. (Either a console web browser, or web.browser = echo) This is handled by restoring the original fds when running the browser.
* assistant: Avoid committer crashing if a file is deleted at the wrong instant.Gravatar Joey Hess2013-01-14
|
* catch failure to start dbus serviceGravatar Joey Hess2013-01-14
|
* fixGravatar Joey Hess2013-01-10
|
* fix fix to namesGravatar Joey Hess2013-01-10
|
* seems I got the name wrongGravatar Joey Hess2013-01-10
|
* assistant: Support new gvfs dbus names used in Gnome 3.6. (untested)Gravatar Joey Hess2013-01-10
|
* webapp: Use IP address, rather than localhostGravatar Joey Hess2013-01-09
| | | | | | | | | since some systems may have configuration problems or other issues that prevent web browsers from connecting to the right localhost IP for the webapp. Tested on both ipv4 and ipv6 localhost. Url for the latter looks like: http://[::1]:50676
* assistant: Detect when system is not configured with a user name, and set ↵Gravatar Joey Hess2013-01-06
| | | | environment to prevent git from failing.
* guard readSymbolicLinkGravatar Joey Hess2013-01-05
| | | | throws an exception if the file is not a symlink
* assistant: Make expensive transfer scan work fully in direct mode.Gravatar Joey Hess2013-01-05
| | | | | | | | | | | | | The expensive scan uses lookupFile, but in direct mode, that doesn't work for files that are present. So the scan was not finding things that are present that need to be uploaded. (It did find things not present that needed to be downloaded.) Now lookupFile also works in direct mode. Note that it still prefers symlinks on disk to info committed to git, in direct mode. This is necessary to make things like Assistant.Threads.Watcher.onAddSymlink work correctly, when given a new symlink not yet checked into git (or replacing a file checked into git).
* restart UIGravatar Joey Hess2013-01-03
| | | | | Browser behavior is not ideal; a new tab is opened on restart. Browsers won't let me redirect to a file:// so I cannot use the old tab.
* fix typo in name of authorized_keys file when canceling adding a keyGravatar Joey Hess2013-01-03
|
* webapp: Add UI to stop assistant.Gravatar Joey Hess2013-01-03
| | | | | | | Would like to also have restart UI, but that's rather harder to do, seems it'd need to start another copy of the webapp, and redirect the browser to its new url, but running two assistants in the same repo at the same time isn't good.
* type based git config handling for remotesGravatar Joey Hess2013-01-01
| | | | | Still a couple of places that use git config ad-hoc, but this is most of it done.
* type based git config handlingGravatar Joey Hess2012-12-29
| | | | | | | | | | | Now there's a Config type, that's extracted from the git config at startup. Note that laziness means that individual config values are only looked up and parsed on demand, and so we get implicit memoization for all of them. So this is not only prettier and more type safe, it optimises several places that didn't have explicit memoization before. As well as getting rid of the ugly explicit memoization code. Not yet done for annex.<remote>.* configuration settings.
* avoid double commits with inotify when direct mode file is createdGravatar Joey Hess2012-12-29
|
* OSX assistant: Uses direct mode by default when setting up a new local ↵Gravatar Joey Hess2012-12-28
| | | | repository.
* add missing modifyHook for watcherGravatar Joey Hess2012-12-28
| | | | | Needed for FSEvents, which calls that hook for modified files. inotify seems to call the add hook, so I didn't notice it before.
* assistant direct mode file add/change bookkeepingGravatar Joey Hess2012-12-25
| | | | | | | | | | | | | | When a file is changed in direct mode, the old content is probably lost (at least from the local repo), and bookeeping needs to be updated to reflect this. Also, synthetic add events are generated at assistant startup, so make it detect when the file has not really changed, and avoid re-adding it. This does add the overhead of querying the runing git cat-file for the key that's recorded in git for the file, each time a file is added or modified in direct mode.
* use sync command merge engine in assistantGravatar Joey Hess2012-12-25
| | | | To handle direct mode merging.
* assistant adding of modified files in direct modeGravatar Joey Hess2012-12-24
| | | | | Works with inotify, but I think in kqueue we don't get events existing files that get modified.
* make startup scan for deleted files work in direct modeGravatar Joey Hess2012-12-24
| | | | | | | | | | git add --update cannot be used, because it'll stage typechanged direct mode files. Intead, use ls-files to find deleted files, and stage them ourselves. It seems that no commit was made before when the scan staged deleted files. (Probably masked since if files were added, a commit happened then..) Now that I'm doing the staging, I was also able to fix that bug.
* assistant adding of files in direct modeGravatar Joey Hess2012-12-24
|
* move thirdparty program installation for standalone bundle into haskell programGravatar Joey Hess2012-12-14
| | | | | | | | | This allows it to use Build.SysConfig to always install the programs configure detected. Amoung other fixes, this ensures the right uuid generator and checksum programs are installed. I also cleaned up the handling of lsof's path; configure now checks for it in PATH, but falls back to looking for it in sbin directories.
* whitespace fixesGravatar Joey Hess2012-12-13
|
* assistant: Fix syncing to just created ssh remotes.Gravatar Joey Hess2012-12-06
| | | | | This got broken when I optimised reconnecting with remotes, to not do a full scan if the remote was not diverged.
* webapp: Allow user to specify the ssh port when setting up a remote.Gravatar Joey Hess2012-12-06
|
* --auto fixesGravatar Joey Hess2012-12-06
| | | | | | | * get/copy --auto: Transfer data even if it would exceed numcopies, when preferred content settings want it. * drop --auto: Fix dropping content when there are no preferred content settings.