githelp: add --dry-run for mv
authorAnton Shestakov <av6@dwimlabs.net>
Thu, 30 May 2019 16:40:34 +0800
changeset 42396 37ff80505dfd
parent 42395 eddff539f5be
child 42397 7752cd3a2f83
githelp: add --dry-run for mv Differential Revision: https://phab.mercurial-scm.org/D6460
hgext/githelp.py
--- 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")