Created
May 7, 2012 10:12
-
-
Save cointoss1973/2627033 to your computer and use it in GitHub Desktop.
TEST batch file for hg heads on hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM hg heads on hook | |
hg version | |
hg init tmphook | |
REM ----- Setup hooks ----- | |
cd tmphook | |
echo hg heads > .hg\heads.bat | |
echo [hooks] > .hg\hgrc | |
echo pretxnchangegroup.heads = .hg\heads.bat >> .hg\hgrc | |
REM ----- some commits ----- | |
echo a > a | |
hg commit -Am "added a" | |
echo b > b | |
hg commit -Am "added b" | |
cd .. | |
REM ----- clone ----- | |
hg clone tmphook tmphookc | |
cd tmphookc | |
hg up 0 | |
echo 1 > 1 | |
hg commit -Am "added 1" | |
REM hg heads | |
REM ----- push -f (multipul heads) ----- | |
hg push -f | |
cd .. |
Mercurial 2.1.2 on Windows 7 is OK.
Mercurial 2.2.1 on Windows 7 is NG.
c:\Users\tkondou\hgrepo\tmphook>hg heads
abort: 00changelog.i@8b59e1e912ee: no node!
transaction abort!
rollback completed
abort: pretxnchangegroup.heads hook exited with status 255
c:\Users\tkondou\hgrepo\tmphookc>cd ..
tkondou@MATRIX ~/hgrepo
$ hg version
Mercurial Distributed SCM (version 2.2.1)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mercurial 2.2.1 on Windows 7 : NG
Mercurial 1.9.3 on Windows XP: OK