Patch 92 resolve issue1308 push should warn about unpulled

Title resolve issue1308 push should warn about unpulled
Superseder Nosy List darcs-users, galbolle, ganesh, volothamp
Related Issues
Status accepted Assigned To galbolle

Created on 2009-11-18.18:04:57 by volothamp, last changed 2009-11-22.16:23:20 by ganesh.

File name Status Uploaded Type Edit Remove
1308 volothamp, 2009-11-18.18:04:57 application/octet-stream
unnamed volothamp, 2009-11-18.18:04:57 text/plain
See mailing list archives for discussion on individual patches.
msg9421 (view) Author: volothamp Date: 2009-11-18.18:04:57
I moved the reminder:
msg9426 (view) Author: galbolle Date: 2009-11-19.10:26:22
Just moves the pull remainder before patch selection. Review ok, please apply.

New patches:

[resolve issue1308 push should warn about unpulled patches *before* patch-selection
Luca Molteni <volothamp@gmail.com>**20091115102701
 Ignore-this: 1f6fe64ad5cd84e7a8cae4261fcfa018
] hunk ./src/Darcs/Commands/Push.lhs 103
florent> […] Moving the pull_reminder around, this is good.

                  RL a C(y z) -> PatchSet p C(t) -> IO ()
 prePushChatter opts common us us' them = do
   checkUnrelatedRepos opts common us them
-  putVerbose opts $ text "We have the following patches to push:"
-                               $$ (vcat $ mapRL description us')
+  let num_to_pull = lengthRL them
+  let pull_reminder = if num_to_pull > 0
+                      then text $ "The remote repository has " ++ show num_to_pull 
+                      ++ " " ++ englishNum num_to_pull (Noun "patch") " to pull."
+                      else empty
+  putVerbose opts $ text "We have the following patches to push:" $$ (vcat $
mapRL description us')
+  when (not $ nullRL us') $ do putInfo opts $ pull_reminder

florent> I'm not sure this condition is useful. If I push but am in
florent> fact late with respect to the repository i'm pushing to, 
florent> then reminding me of that fact is probably a good thing.
msg9456 (view) Author: ganesh Date: 2009-11-22.16:23:20
This was applied a while ago but darcswatch didn't notice
Date User Action Args
2009-11-18 18:04:57volothampcreate
2009-11-19 10:15:33galbollesetstatus: needs-review -> review-in-progress
nosy: + galbolle
assignedto: galbolle
2009-11-19 10:26:23galbollesetstatus: review-in-progress -> accepted-pending-tests
messages: + msg9426
2009-11-22 16:23:20ganeshsetstatus: accepted-pending-tests -> accepted
nosy: + ganesh
messages: + msg9456