tests/test-update-dest.t
author Ryan McElroy <rmcelroy@fb.com>
Fri, 07 Apr 2017 05:41:03 -0700
changeset 31844 478999e8281d
child 31845 86246530b8d2
permissions -rw-r--r--
tests: move update requiredest test to own test file More tests for this flag are coming in upcoming patches.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31844
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     1
Test update.requiredest
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     2
  $ cd $TESTTMP
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     4
  > [commands]
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     5
  > update.requiredest = True
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     6
  > EOF
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     7
  $ hg init repo
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     8
  $ cd repo
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
     9
  $ echo a >> a
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    10
  $ hg commit -qAm aa
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    11
  $ hg up
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    12
  abort: you must specify a destination
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    13
  (for example: hg update ".::")
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    14
  [255]
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    15
  $ hg up .
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    16
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    17
  $ HGPLAIN=1 hg up
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    18
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    19
  $ hg --config commands.update.requiredest=False up
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    20
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    21
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    22
  $ cd ..
478999e8281d tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
    23