D6459: githelp: translate --directory of git apply to --prefix

2022-03-21 Thread ThomasKenny (Thomas Kenny)
Herald added a subscriber: mercurial-patches.
ThomasKenny added a comment.


  there is strong competition between these online movies providing companies 
and they are also charging low prices. Along with that they are informing about 
something new called best spanish transcription 
 as a promotional 
activity. I hope people will get good quality.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6459/new/

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

To: av6, #hg-reviewers, pulkit
Cc: mercurial-patches, ThomasKenny, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6459: githelp: translate --directory of git apply to --prefix

2019-05-30 Thread av6 (Anton Shestakov)
av6 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  According to the help pages, these flags do the same.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/githelp.py
  tests/test-githelp.t

CHANGE DETAILS

diff --git a/tests/test-githelp.t b/tests/test-githelp.t
--- a/tests/test-githelp.t
+++ b/tests/test-githelp.t
@@ -256,6 +256,10 @@
   $ hg githelp -- apply -p 5
   hg import --no-commit -p 5
 
+githelp for apply with prefix directory
+  $ hg githelp -- apply --directory=modules
+  hg import --no-commit --prefix modules
+
 git merge-base
   $ hg githelp -- git merge-base --is-ancestor
   ignoring unknown option --is-ancestor
diff --git a/hgext/githelp.py b/hgext/githelp.py
--- a/hgext/githelp.py
+++ b/hgext/githelp.py
@@ -192,12 +192,15 @@
 def apply(ui, repo, *args, **kwargs):
 cmdoptions = [
 ('p', 'p', int, ''),
+('', 'directory', '', ''),
 ]
 args, opts = parseoptions(ui, cmdoptions, args)
 
 cmd = Command('import --no-commit')
 if (opts.get('p')):
 cmd['-p'] = opts.get('p')
+if opts.get('directory'):
+cmd['--prefix'] = opts.get('directory')
 cmd.extend(args)
 
 ui.status((bytes(cmd)), "\n")



To: av6, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel