Mercurial command line client, read commands, parameters and arguments from a file?

Is there a way to ask Mercurial to read most / all of the commands, parameters and arguments that I want to pass from the response file, instead of passing them on the command line?

For example, instead:

hg commit -m "commit message" --INCLUDE file1 --INCLUDE file2 ...

I would create a text file containing

-m "commit message" --INCLUDE file1 --INCLUDE file2 ...

and then ask Mercurial to read it with this (hypothetical) syntax:

hg commit @responses.txt

The reason I'm asking is because I am building a wrapper library for .NET around the Mercurial command line client, and this SO question made me worried that the length of the command line might be a problem for me at Some point : "Command line result for hg.exe too long" in Mercurial .

+3
2

, , , , .

Mercurial internal API script. , , (.. "" ).

( API. , , , , Mercurial, .)

+1

...

  • .hg, .hg\response.

  • .hg\hgrc

    %include response

  • - , . [defaults], ( , ), .

    [defaults]
    commit = -m "This is a commit message" -I file1 -I file2 ...

( Microsoft, - 8191 XP . , .)

0

Source: https://habr.com/ru/post/1781802/


All Articles