1

I am using jenkins, when executing Hg purge --all -R D:\path in jenkins pipeline it will return hg: unknown command 'purge'.

But when executing the same command in Windows Terminal it will execute correctly

Note : Jenkins in the same machine the Mercurial exist and purge plugin exist in the big repo and and sub repo

How to solve that issue ?

Net Sim
  • 337
  • 2
  • 6
  • 20

1 Answers1

2

On the rights on delirium:

  • You may have more than one Mercurial on your host and Jenkins configured to use another instance (without extension), than command-prompt
  • You run Jenkins under different user and different mercurial.ini used, without extension (per-repository config can't be read)

You can (select any method):

  • enable extension on system-wide basis (and disable it in repositories, there you don't want it)
  • replace extension by "old-style" mercurial alias
  • forcibly enable extension for single command hg purge --config extensions.purge=

From my POV, system-wide extension in mercurial.ini will be most easy and logical solution

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • can you share with me your knowledge in that question : https://stackoverflow.com/questions/56515835/mercurial-plugin-config-panel-not-shown-for-manage-jenkins-configure-system Regarding to that question – Net Sim Jun 09 '19 at 15:34