changeset 42396:37ff80505dfd

githelp: add --dry-run for mv Differential Revision: https://phab.mercurial-scm.org/D6460
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 30 May 2019 16:40:34 +0800
parents eddff539f5be
children 7752cd3a2f83
files hgext/githelp.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/githelp.py	Thu May 30 16:38:42 2019 +0800
+++ b/hgext/githelp.py	Thu May 30 16:40:34 2019 +0800
@@ -684,6 +684,7 @@
 def mv(ui, repo, *args, **kwargs):
     cmdoptions = [
         ('f', 'force', None, ''),
+        ('n', 'dry-run', None, ''),
     ]
     args, opts = parseoptions(ui, cmdoptions, args)
 
@@ -692,6 +693,8 @@
 
     if opts.get('force'):
         cmd['-f'] = None
+    if opts.get('dry_run'):
+        cmd['-n'] = None
 
     ui.status((bytes(cmd)), "\n")