Hello community,

here is the log from the commit of package ghc-shelly for openSUSE:Factory 
checked in at 2016-07-05 09:52:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-shelly (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-shelly.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-shelly"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-shelly/ghc-shelly.changes    2016-07-01 
09:58:48.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-shelly.new/ghc-shelly.changes       
2016-07-05 09:52:56.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Jun 27 11:42:06 UTC 2016 - mimi...@gmail.com
+
+- update to 1.6.8
+* added sshPairsWithOptions function
+
+-------------------------------------------------------------------

Old:
----
  shelly-1.6.7.tar.gz

New:
----
  shelly-1.6.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-shelly.spec ++++++
--- /var/tmp/diff_new_pack.SHYeyS/_old  2016-07-05 09:52:57.000000000 +0200
+++ /var/tmp/diff_new_pack.SHYeyS/_new  2016-07-05 09:52:57.000000000 +0200
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:           ghc-shelly
-Version:        1.6.7
+Version:        1.6.8
 Release:        0
 Summary:        Shell-like (systems) programming in Haskell
 License:        BSD-3-Clause

++++++ shelly-1.6.7.tar.gz -> shelly-1.6.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.7/ChangeLog.md 
new/shelly-1.6.8/ChangeLog.md
--- old/shelly-1.6.7/ChangeLog.md       2016-06-24 23:28:40.000000000 +0200
+++ new/shelly-1.6.8/ChangeLog.md       2016-06-26 17:59:27.000000000 +0200
@@ -1,3 +1,7 @@
+# 1.6.8
+
+* added sshPairsWithOptions function
+
 # 1.6.7
 
 * flush stdout when using `echo`, not just `echo_n`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.7/shelly.cabal 
new/shelly-1.6.8/shelly.cabal
--- old/shelly-1.6.7/shelly.cabal       2016-06-24 23:28:44.000000000 +0200
+++ new/shelly-1.6.8/shelly.cabal       2016-06-26 17:59:25.000000000 +0200
@@ -1,6 +1,6 @@
 Name:       shelly
 
-Version:     1.6.7
+Version:     1.6.8
 Synopsis:    shell-like (systems) programming in Haskell
 
 Description: Shelly provides convenient systems programming in Haskell,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.7/src/Shelly.hs 
new/shelly-1.6.8/src/Shelly.hs
--- old/shelly-1.6.7/src/Shelly.hs      2016-06-24 23:22:47.000000000 +0200
+++ new/shelly-1.6.8/src/Shelly.hs      2016-06-26 17:54:45.000000000 +0200
@@ -34,7 +34,7 @@
          , bash, bash_, bashPipeFail
          , (-|-), lastStderr, setStdin, lastExitCode
          , command, command_, command1, command1_
-         , sshPairs, sshPairs_
+         , sshPairs, sshPairs_, sshPairsWithOptions
          , ShellCmd(..), CmdArg (..)
 
          -- * Running commands Using handles
@@ -1036,14 +1036,25 @@
 -- Internally the list of commands are combined with the string @&&@ before 
given to ssh.
 sshPairs :: Text -> [(FilePath, [Text])] -> Sh Text
 sshPairs _ [] = return ""
-sshPairs server cmds = sshPairs' run server cmds
+sshPairs server cmds = sshPairsWithOptions' run server [] cmds
 
 sshPairs' :: (FilePath -> [Text] -> Sh a) -> Text -> [(FilePath, [Text])] -> 
Sh a
-sshPairs' run' server actions = escaping False $ do
+sshPairs' run' server actions = sshPairsWithOptions' run' server [] actions
+   
+-- | Like 'sshPairs', but allows for arguments to the call to ssh. 
+sshPairsWithOptions :: Text                  -- ^ Server name.
+                    -> [Text]                -- ^ Arguments to ssh (e.g. 
["-p","22"]).
+                    -> [(FilePath, [Text])]  -- ^ Pairs of commands to run on 
the remote.
+                    -> Sh Text               -- ^ Returns the standard output.
+sshPairsWithOptions _ _ [] = return ""
+sshPairsWithOptions server sshargs cmds = sshPairsWithOptions' run server 
sshargs cmds
+
+sshPairsWithOptions' :: (FilePath -> [Text] -> Sh a) -> Text -> [Text] -> 
[(FilePath, [Text])] -> Sh a
+sshPairsWithOptions' run' server sshargs actions = escaping False $ do
     let ssh_commands = surround '\'' $ foldl1
           (\memo next -> memo <> " && " <> next)
           (map toSSH actions)
-    run' "ssh" [server, ssh_commands]
+    run' "ssh" ([server] ++ sshargs ++ [ssh_commands])
   where
     toSSH (exe,args) = show_command exe args
 


Reply via email to