Permalink
Browse files

Merge pull request #21 from mounirlamouri/pretend

Add dry-run option.
  • Loading branch information...
2 parents d5078e0 + 0c66035 commit fdf52fad3b9a73e3680b5810011311ac0cf48d9f @jdm jdm committed Aug 13, 2012
Showing with 9 additions and 3 deletions.
  1. +9 −3 trychooser
View
@@ -460,8 +460,11 @@ For all questions, choosing Y means adding something to the TryChooser string. C
ui.write(_("View the results of your push at http://tbpl.mozilla.org/?tree=Try&rev=%s\n") % (repo[None].p1()))
- ui.write(_("Push to try server...\n"))
- commands.push(ui, repo, "ssh://hg.mozilla.org/try", force=True)
+ if opts.get('dry_run'):
+ ui.write(_("Pretending to push to try server...\n"))
+ else:
+ ui.write(_("Push to try server...\n"))
+ commands.push(ui, repo, "ssh://hg.mozilla.org/try", force=True)
# In Mercurial 2.1 phases support was added, and until Mozilla updates to
# this version and configures the try repository to be non-publishing, we
@@ -478,7 +481,10 @@ For all questions, choosing Y means adding something to the TryChooser string. C
cmdtable = {
"trychooser":
(run_mercurial_command,
- [('m', 'message', '', _('use text as try message'))],
+ [
+ ('n', 'dry-run', False, _('do not perform actions, just print output')),
+ ('m', 'message', '', _('use text as try message'))
+ ],
_('hg trychooser [-m TEXT]')
)
}

0 comments on commit fdf52fa

Please sign in to comment.