# HG changeset patch # User Ryan McElroy # Date 2017-04-07 12:41:03 # Node ID 478999e8281da0fc37580f264d3d99844358259b # Parent 526e4597cca5d3baa0edced648fbcd8bd273a924 tests: move update requiredest test to own test file More tests for this flag are coming in upcoming patches. diff --git a/tests/test-update-dest.t b/tests/test-update-dest.t new file mode 100644 --- /dev/null +++ b/tests/test-update-dest.t @@ -0,0 +1,23 @@ +Test update.requiredest + $ cd $TESTTMP + $ cat >> $HGRCPATH < [commands] + > update.requiredest = True + > EOF + $ hg init repo + $ cd repo + $ echo a >> a + $ hg commit -qAm aa + $ hg up + abort: you must specify a destination + (for example: hg update ".::") + [255] + $ hg up . + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ HGPLAIN=1 hg up + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg --config commands.update.requiredest=False up + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + + $ cd .. + diff --git a/tests/test-update-names.t b/tests/test-update-names.t --- a/tests/test-update-names.t +++ b/tests/test-update-names.t @@ -88,23 +88,3 @@ Test that warning is printed if cwd is d (consider changing to repo root: $TESTTMP/r1/r4) #endif - - $ cd $TESTTMP - $ cat >> $HGRCPATH < [commands] - > update.requiredest = True - > EOF - $ hg init dest - $ cd dest - $ echo a >> a - $ hg commit -qAm aa - $ hg up - abort: you must specify a destination - (for example: hg update ".::") - [255] - $ hg up . - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ HGPLAIN=1 hg up - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg --config commands.update.requiredest=False up - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved