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

login
register
mail settings
Submitter phabricator
Date May 30, 2019, 8:47 a.m.
Message ID <differential-rev-PHID-DREV-ez6kbui3bns5upc74m5w-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/40273/
State Superseded
Headers show

Comments

phabricator - May 30, 2019, 8:47 a.m.
av6 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/githelp.py

CHANGE DETAILS




To: av6, #hg-reviewers
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")