tests/test-revset-dirstate-parents.t
author Greg Ward <greg@gerg.ca>
Tue, 27 Sep 2011 22:38:47 -0400
changeset 15164 7bddec632821
parent 12936 bdb766e64d35
child 16218 81a1a00f5738
permissions -rw-r--r--
patchbomb: make it easy for the user to decline sending an intro message. - prompt(): respect interactive mode; clarify logic a bit - rename introneeded() to introwanted() and give it only one caller - add 'numbered' arg to makepatch() so it does not need to call introwanted() - factor makeintro() out of getpatchmsgs(), so it's easier to skip the intro message based on the user's behaviour Unexpected but perfectly reasonable side effect: in non-interactive mode, we don't show unanswerable "Cc" or "From" prompts anymore, so remove those from the test expectations.

  $ HGENCODING=utf-8
  $ export HGENCODING

  $ try() {
  >   hg debugrevspec --debug $@
  > }

  $ log() {
  >   hg log --template '{rev}\n' -r "$1"
  > }

  $ hg init repo
  $ cd repo

  $ try 'p1()'
  ('func', ('symbol', 'p1'), None)
  $ try 'p2()'
  ('func', ('symbol', 'p2'), None)
  $ try 'parents()'
  ('func', ('symbol', 'parents'), None)

null revision
  $ log 'p1()'
  $ log 'p2()'
  $ log 'parents()'

working dir with a single parent
  $ echo a > a
  $ hg ci -Aqm0
  $ log 'p1()'
  0
  $ log 'tag() and p1()'
  $ log 'p2()'
  $ log 'parents()'
  0
  $ log 'tag() and parents()'

merge in progress
  $ echo b > b
  $ hg ci -Aqm1
  $ hg up -q 0
  $ echo c > c
  $ hg ci -Aqm2
  $ hg merge -q
  $ log 'p1()'
  2
  $ log 'p2()'
  1
  $ log 'tag() and p2()'
  $ log 'parents()'
  1
  2