Patchwork D1522: Update hg githelp apply

login
register
mail settings
Submitter phabricator
Date Nov. 27, 2017, 7:02 p.m.
Message ID <differential-rev-PHID-DREV-x6ow5ytsvq46sqklnpr6-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25772/
State Superseded
Headers show

Comments

phabricator - Nov. 27, 2017, 7:02 p.m.
gabrys created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Current:
  
  $ hg githelp apply abc.diff
  hg import abc.diff
  
  Expected:
  
  $ hg githelp apply abc.diff
  hg import --no-commit abc.diff
  
  git apply doesn't commit the applied diff, hg import (without the flag) does.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext3rd/githelp.py

CHANGE DETAILS




To: gabrys, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext3rd/githelp.py b/hgext3rd/githelp.py
--- a/hgext3rd/githelp.py
+++ b/hgext3rd/githelp.py
@@ -201,7 +201,7 @@ 
     ]
     args, opts = parseoptions(ui, cmdoptions, args)
 
-    cmd = Command('import')
+    cmd = Command('import --no-commit')
     if (opts.get('p')):
         cmd['-p'] = opts.get('p')
     cmd.extend(args)