Patchwork D6460: githelp: add --dry-run for mv

login
register
mail settings
Submitter phabricator
Date May 30, 2019, 6:02 p.m.
Message ID <32f5a3767922dd89143c7a0b36478ed9@localhost.localdomain>
Download mbox | patch
Permalink /patch/40275/
State Not Applicable
Headers show

Comments

phabricator - May 30, 2019, 6:02 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG37ff80505dfd: githelp: add --dry-run for mv (authored by av6, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6460?vs=15297&id=15300

REVISION DETAIL
  https://phab.mercurial-scm.org/D6460

AFFECTED FILES
  hgext/githelp.py

CHANGE DETAILS




To: av6, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/githelp.py b/hgext/githelp.py
--- a/hgext/githelp.py
+++ b/hgext/githelp.py
@@ -684,14 +684,17 @@ 
 def mv(ui, repo, *args, **kwargs):
     cmdoptions = [
         ('f', 'force', None, ''),
+        ('n', 'dry-run', None, ''),
     ]
     args, opts = parseoptions(ui, cmdoptions, args)
 
     cmd = Command('mv')
     cmd.extend(args)
 
     if opts.get('force'):
         cmd['-f'] = None
+    if opts.get('dry_run'):
+        cmd['-n'] = None
 
     ui.status((bytes(cmd)), "\n")