packages feed

git-annex 6.20171018 → 6.20171026

raw patch · 17 files changed

+58/−63 lines, 17 filesdep +Win32-extrasdep ~Win32

Dependencies added: Win32-extras

Dependency ranges changed: Win32

Files

Annex/Init.hs view
@@ -152,7 +152,7 @@  probeCrippledFileSystem' :: FilePath -> IO (Bool, [String]) #ifdef mingw32_HOST_OS-probeCrippledFileSystem' _ = return True+probeCrippledFileSystem' _ = return (True, []) #else probeCrippledFileSystem' tmp = do 	let f = tmp </> "gaprobe"
Annex/MetaData.hs view
@@ -60,10 +60,11 @@ dateMetaData mtime old = MetaData $ M.fromList $ filter isnew 	[ (yearMetaField, S.singleton $ toMetaValue $ show y) 	, (monthMetaField, S.singleton $ toMetaValue $ show m)+	, (dayMetaField, S.singleton $ toMetaValue $ show d) 	]   where 	isnew (f, _) = S.null (currentMetaDataValues f old)-	(y, m, _d) = toGregorian $ utctDay mtime+	(y, m, d) = toGregorian $ utctDay mtime  {- Parses field=value, field+=value, field-=value, field?=value -} parseModMeta :: String -> Either String ModMeta
Annex/MetaData/StandardFields.hs view
@@ -9,6 +9,7 @@ 	tagMetaField, 	yearMetaField, 	monthMetaField,+	dayMetaField, 	lastChangedField, 	mkLastChangedField, 	isLastChangedField@@ -26,6 +27,9 @@  monthMetaField :: MetaField monthMetaField = mkMetaFieldUnchecked "month"++dayMetaField :: MetaField+dayMetaField = mkMetaFieldUnchecked "day"  lastChangedField :: MetaField lastChangedField = mkMetaFieldUnchecked lastchanged
Assistant/Restart.hs view
@@ -27,7 +27,7 @@ #ifndef mingw32_HOST_OS import System.Posix (signalProcess, sigTERM) #else-import Utility.WinProcess+import System.Win32.Process (terminateProcessById) #endif import Network.URI @@ -59,7 +59,7 @@ #ifndef mingw32_HOST_OS 		signalProcess sigTERM =<< getPID #else-		terminatePID =<< getPID+		terminateProcessById =<< getPID #endif  runRestart :: Assistant URLString
Assistant/TransferSlots.hs view
@@ -41,7 +41,7 @@ import System.Posix.Process (getProcessGroupIDOf) import System.Posix.Signals (signalProcessGroup, sigTERM, sigKILL) #else-import Utility.WinProcess+import System.Win32.Process (terminateProcessById) #endif  type TransferGenerator = Assistant (Maybe (Transfer, TransferInfo, Transferrer -> Assistant ()))@@ -270,7 +270,7 @@ 		threadDelay 50000 -- 0.05 second grace period 		signal sigKILL #else-		terminatePID pid+		terminateProcessById pid #endif  {- Start or resume a transfer. -}
Build/BundledPrograms.hs view
@@ -70,11 +70,13 @@ #ifndef mingw32_HOST_OS 	, Just "sh" #endif+#ifndef mingw32_HOST_OS #ifndef darwin_HOST_OS 	-- wget on OSX has been problematic, looking for certs in the wrong 	-- places. Don't ship it, use curl or the OSX's own wget if it has 	-- one. 	, ifset SysConfig.wget "wget"+#endif #endif 	, SysConfig.lsof 	, SysConfig.gcrypt
Build/Configure.hs view
@@ -24,14 +24,14 @@ tests = 	[ TestCase "version" (Config "packageversion" . StringConfig <$> getVersion) 	, TestCase "UPGRADE_LOCATION" getUpgradeLocation-	, TestCase "git" $ requireCmd "git" "git --version >/dev/null"+	, TestCase "git" $ testCmd "git" "git --version >/dev/null" 	, TestCase "git version" getGitVersion 	, testCp "cp_a" "-a" 	, testCp "cp_p" "-p" 	, testCp "cp_preserve_timestamps" "--preserve=timestamps" 	, testCp "cp_reflink_auto" "--reflink=auto"-	, TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 </dev/null"-	, TestCase "rsync" $ requireCmd "rsync" "rsync --version >/dev/null"+	, TestCase "xargs -0" $ testCmd "xargs_0" "xargs -0 </dev/null"+	, TestCase "rsync" $ testCmd "rsync" "rsync --version >/dev/null" 	, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null" 	, TestCase "wget" $ testCmd "wget" "wget --version >/dev/null" 	, TestCase "wget unclutter options" checkWgetUnclutter
Build/TestConfig.hs view
@@ -61,18 +61,6 @@ 	rest <- runTests ts 	return $ c:rest -{- Tests that a command is available, aborting if not. -}-requireCmd :: ConfigKey -> String -> Test-requireCmd k cmdline = do-	ret <- testCmd k cmdline-	handle ret-  where-	handle r@(Config _ (BoolConfig True)) = return r-	handle r = do-		testEnd r-		error $ "** the " ++ c ++ " command is required"-	c = head $ words cmdline- {- Checks if a command is available by running a command line. -} testCmd :: ConfigKey -> String -> Test testCmd k cmdline = do
CHANGELOG view
@@ -1,3 +1,20 @@+git-annex (6.20171026) unstable; urgency=medium++  * Windows: Fix reversion that caused the path used to link+    to annexed content to include the drive letter and full path, rather+    than being relative. (`git annex fix` will fix up after this problem).+  * Windows build fixed, and changed to use stack for more reliable build+    environment.+  * Windows: Remove wget from bundle; it needs libraries that are not+    included, and git for windows includes curl which git-annex will use+    instead.+  * Add day to metadata when annex.genmetadata is enabled.+    Thanks, Sean T Parsons+  * stack.yaml: Added nix packages section.+    Thanks, Sean T Parsons ++ -- Joey Hess <id@joeyh.name>  Thu, 26 Oct 2017 13:56:18 -0400+ git-annex (6.20171018) unstable; urgency=medium    * add: Replace work tree file atomically on systems supporting hard
Test.hs view
@@ -52,7 +52,9 @@ import qualified Git.LsTree import qualified Git.FilePath import qualified Annex.Locations+#ifndef mingw32_HOST_OS import qualified Types.GitConfig+#endif import qualified Types.KeySource import qualified Types.Backend import qualified Types.TrustLevel
Utility/Daemon.hs view
@@ -14,7 +14,7 @@ #ifndef mingw32_HOST_OS import Utility.LogFile #else-import Utility.WinProcess+import System.Win32.Process (terminateProcessById) import Utility.LockFile #endif @@ -162,7 +162,7 @@ #ifndef mingw32_HOST_OS 		signalProcess sigTERM pid #else-		terminatePID pid+		terminateProcessById pid #endif  {- Windows locks a lock file that corresponds with the pid of the process.
Utility/PID.hs view
@@ -13,7 +13,8 @@ import System.Posix.Types (ProcessID) import System.Posix.Process (getProcessID) #else-import System.Win32.Process (ProcessId, getCurrentProcessId)+import System.Win32.Process (ProcessId)+import System.Win32.Process.Current (getCurrentProcessId) #endif  #ifndef mingw32_HOST_OS
Utility/Path.hs view
@@ -136,17 +136,22 @@  -} relPathDirToFileAbs :: FilePath -> FilePath -> FilePath relPathDirToFileAbs from to-	| takeDrive from /= takeDrive to = to+#ifdef mingw32_HOST_OS+	| normdrive from /= normdrive to = to+#endif 	| otherwise = joinPath $ dotdots ++ uncommon   where 	pfrom = sp from 	pto = sp to-	sp = map dropTrailingPathSeparator . splitPath+	sp = map dropTrailingPathSeparator . splitPath . dropDrive 	common = map fst $ takeWhile same $ zip pfrom pto 	same (c,d) = c == d 	uncommon = drop numcommon pto 	dotdots = replicate (length pfrom - numcommon) ".." 	numcommon = length common+#ifdef mingw32_HOST_OS+	normdrive = map toLower . takeWhile (/= ':') . takeDrive+#endif  prop_relPathDirToFile_basics :: FilePath -> FilePath -> Bool prop_relPathDirToFile_basics from to
− Utility/WinProcess.hs
@@ -1,28 +0,0 @@-{- Windows processes- -- - Copyright 2014 Joey Hess <id@joeyh.name>- -- - License: BSD-2-clause- -}--{-# LANGUAGE ForeignFunctionInterface #-}--module Utility.WinProcess where--import Utility.PID--import System.Win32.Process-import Control.Exception (bracket)-import Control.Monad--terminatePID :: PID -> IO ()-terminatePID p = bracket -	(openProcess pROCESS_TERMINATE False p)-	(void . c_closeProcess)-	(\h -> void $ c_TerminateProcess h 1)--foreign import ccall unsafe "windows.h TerminateProcess"-	c_TerminateProcess :: ProcessHandle -> Int -> IO Int--foreign import ccall unsafe "windows.h CloseHandle"-	c_closeProcess :: ProcessHandle -> IO Bool
doc/git-annex.mdwn view
@@ -911,7 +911,7 @@   Set this to `true` to make git-annex automatically generate some metadata   when adding files to the repository. -  In particular, it stores year and month metadata, from the file's+  In particular, it stores year, month, and day metadata, from the file's   modification date.    When importfeed is used, it stores additional metadata from the feed,
git-annex.cabal view
@@ -1,5 +1,5 @@ Name: git-annex-Version: 6.20171018+Version: 6.20171026 Cabal-Version: >= 1.8 License: GPL-3 Maintainer: Joey Hess <id@joeyh.name>@@ -303,11 +303,6 @@   type: git   location: git://git-annex.branchable.com/ -custom-setup-  Setup-Depends: base (>= 4.5), hslogger, split, unix-compat, process,-    unix, filepath, exceptions, bytestring, directory, IfElse, data-default,-    Cabal- Executable git-annex   Main-Is: git-annex.hs   Build-Depends:@@ -385,7 +380,7 @@     Build-Depends: network (< 2.6), network (>= 2.4)    if (os(windows))-    Build-Depends: Win32 (>= 2.5), unix-compat (>= 0.4.1.3), setenv,+    Build-Depends: Win32 (== 2.3.1.1), Win32-extras, unix-compat (>= 0.4.1.3), setenv,       process (>= 1.4.2.0)   else     Build-Depends: unix@@ -428,6 +423,7 @@           if (! os(solaris) && ! os(linux))             CPP-Options: -DWITH_KQUEUE             C-Sources: Utility/libkqueue.c+            Includes: Utility/libkqueue.h             Other-Modules: Utility.DirWatcher.Kqueue    if flag(Dbus)@@ -1065,7 +1061,6 @@     Other-Modules:       Utility.LockFile.Windows       Utility.LockPool.Windows-      Utility.WinProcess   else     Other-Modules:       Utility.LockFile.Posix
stack.yaml view
@@ -24,3 +24,11 @@ explicit-setup-deps:   git-annex: true resolver: lts-9.9+nix:+  packages:+    - ncurses+    - icu+    - libcxx+    - gcc+    - zlib+    - rsync