Skip to content

Commit

Permalink
Use HG_TXNNAME to detect hg
Browse files Browse the repository at this point in the history
If the hook is used with pretxnclose a push of a bookmark without
changesets won't contain any HG_NODE
  • Loading branch information
misery committed Jul 22, 2024
1 parent 18a226c commit 25da164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/mercurial_git_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,7 @@ def hook(stdin=None):
level=get_logging_level(logging))

try:
if 'HG_NODE' in os.environ:
if 'HG_TXNNAME' in os.environ:
log.debug('Mercurial detected...')
return process_mercurial_hook(stdin)
else:
Expand Down

0 comments on commit 25da164

Please sign in to comment.