Mercurial > evolve
comparison tests/test-inhibit.t @ 1346:9a1415f8b21b
inhbit: don't crash on commit with no changes
Before this patch inhibit would crash when running hg amend with no changes.
This patch fixes this case and adds a test to prevent regression.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 20 May 2015 10:58:32 -0700 |
parents | 41628bd60ee6 |
children | a143037892d6 |
comparison
equal
deleted
inserted
replaced
1345:37c505975e28 | 1346:9a1415f8b21b |
---|---|
674 | | 674 | |
675 o 4:98065434e5c6 add cE | 675 o 4:98065434e5c6 add cE |
676 | | 676 | |
677 o 0:54ccbc537fc2 add cA | 677 o 0:54ccbc537fc2 add cA |
678 | 678 |
679 $ cat >> $HGRCPATH <<EOF | |
680 > [extensions] | |
681 > EOF | |
682 $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH | |
683 | |
684 Empty commit | |
685 $ hg amend | |
686 nothing changed | |
687 [1] | |
679 | 688 |
680 Inhibit should not work without directaccess | 689 Inhibit should not work without directaccess |
681 $ cat >> $HGRCPATH <<EOF | 690 $ cat >> $HGRCPATH <<EOF |
682 > [extensions] | 691 > [extensions] |
683 > directaccess=! | 692 > directaccess=! |
684 > EOF | 693 > EOF |
685 $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH | |
686 | |
687 $ hg up 15 | 694 $ hg up 15 |
688 abort: Cannot use inhibit without the direct access extension | 695 abort: Cannot use inhibit without the direct access extension |
689 [255] | 696 [255] |
690 | 697 |