문제

I've searched awhile for this and haven't seen anything. Which could mean, it's not supposed to be done or it just can't be done.

I looked at a list of hooks for mercurial and I could not seem to find (or get one working) that executed a script after you give the hg pull command.

Thank you

도움이 되었습니까?

해결책

From the hgrc docs section on "hooks" -

"incoming"
  Run after a changeset has been pulled, pushed, or unbundled into the
  local repository. The ID of the newly arrived changeset is in
  "$HG_NODE". URL that was source of changes came is in "$HG_URL".

or...

"post-<command>"
  Run after successful invocations of the associated command. The contents
  of the command line are passed as "$HG_ARGS" and the result code in
  "$HG_RESULT". Parsed command line arguments are passed as "$HG_PATS" and
  "$HG_OPTS". These contain string representations of the python data
  internally passed to <command>. "$HG_OPTS" is a dictionary of options
  (with unspecified options set to their defaults). "$HG_PATS" is a list
  of arguments. Hook failure is ignored.

(The documentation also goes into detail about what the config should actually look like and how hook scripts are called.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top