diff options
-rw-r--r-- | Command/Lock.hs | 3 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bugs/git_annex_lock_dangerous.mdwn | 2 | ||||
-rw-r--r-- | doc/todo/windows_support.mdwn | 15 | ||||
-rw-r--r-- | standalone/windows/build.sh | 11 |
5 files changed, 29 insertions, 3 deletions
diff --git a/Command/Lock.hs b/Command/Lock.hs index 6dc58df74..bceba4a91 100644 --- a/Command/Lock.hs +++ b/Command/Lock.hs @@ -10,6 +10,7 @@ module Command.Lock where import Common.Annex import Command import qualified Annex.Queue +import qualified Annex def :: [Command] def = [notDirect $ command "lock" paramPaths seek SectionCommon @@ -21,6 +22,8 @@ seek = [withFilesUnlocked start, withFilesUnlockedToBeCommitted start] start :: FilePath -> CommandStart start file = do showStart "lock" file + unlessM (Annex.getState Annex.force) $ + error "Locking this file would discard any changes you have made to it. Use 'git annex add' to stage your changes. (Or, use --force to override)" next $ perform file perform :: FilePath -> CommandPerform diff --git a/debian/changelog b/debian/changelog index a6aa40341..155dc72f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ git-annex (5.20131131) UNRELEASED; urgency=low command to find DNS server, since there is no resolv.conf. * import: Add --skip-duplicates option. * Windows: watch and assistant work! (very experimental) + * lock: Require --force. -- Joey Hess <joeyh@debian.org> Sun, 01 Dec 2013 13:57:58 -0400 diff --git a/doc/bugs/git_annex_lock_dangerous.mdwn b/doc/bugs/git_annex_lock_dangerous.mdwn index f7b204784..ae0ff24b6 100644 --- a/doc/bugs/git_annex_lock_dangerous.mdwn +++ b/doc/bugs/git_annex_lock_dangerous.mdwn @@ -15,3 +15,5 @@ If you want my opinion, `git annex lock` should either require `-f` to throw awa ### What version of git-annex are you using? On what operating system? git version 1.8.1.2, git-annex version: 4.20130815, Kubuntu 13.04 + +> Agreed; [[done]] --[[Joey]] diff --git a/doc/todo/windows_support.mdwn b/doc/todo/windows_support.mdwn index 19ff9cc43..7281189d1 100644 --- a/doc/todo/windows_support.mdwn +++ b/doc/todo/windows_support.mdwn @@ -12,7 +12,20 @@ now! --[[Joey]] * Ssh connection caching does not work on Windows, so `git annex get` has to connect twice to the remote system over ssh per file, which is much slower than on systems supporting connection caching. -* Webapp doesn't build yet. +* Webapp doesn't build yet. Well, it all builds, but link fails: + "Unable to start C:\Program Files\Haskell + Platform\2013.2.0.0\mingw\bin/realgcc.exe (error code: 87)" + This is the same problem that occurs when trying to link it + with WebDAV or XMPP enabled. + + Filed a ghc bug: <https://ghc.haskell.org/trac/ghc/ticket/8596> + + Tried to do a minimal build with only the assistant and webapp, but that + also failed to link (was around 40k gcc command line). + + May need to separate out Common and Git into standalone libraries to + work around this? Ugh. + * `git annex watch` works, but does not detect when files are still open for write as they're being added (no lsof) * `git annex assistant` has not been tested, is probably quite incomplete. diff --git a/standalone/windows/build.sh b/standalone/windows/build.sh index cba4d87d1..58b2d2243 100644 --- a/standalone/windows/build.sh +++ b/standalone/windows/build.sh @@ -41,8 +41,15 @@ touch last-incremental-failed # Build git-annex withcyg cabal configure -withcyg cabal build - +withcyg cabal build || true + +# Works around link failure https://ghc.haskell.org/trac/ghc/ticket/8596 +# using a response file. +rm -f build.log gcc.opt +withcyg cabal build --ghc-options='-v -keep-tmp-files' > build.log 2>&1 +grep '"dist\\build\\git-annex\\git-annex.exe"' build.log | sed -e 's/^"[^"]*" //' -e 's/\\/\//g' > gcc.opt +gcc @gcc.opt + # Build the installer cabal install nsis ghc --make Build/NullSoftInstaller.hs |