[darcs-users] [patch92] resolve issue1308 push should warn about unpulled

Florent Becker bugs at darcs.net
Thu Nov 19 10:26:23 UTC 2009


Florent Becker <florent.becker at ens-lyon.org> added the comment:

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 at 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.

----------
status: review-in-progress -> accepted-pending-tests

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch92>
__________________________________


More information about the darcs-users mailing list