tests/test-rebase-transaction.t
author Gregory Szorc <gregory.szorc@gmail.com>
Fri, 02 Mar 2018 18:50:49 -0500
changeset 36608 1151c731686e
parent 34504 8cef8f7d51d0
child 36815 f4e9e89330d4
permissions -rw-r--r--
sshpeer: don't read from stderr when that behavior is disabled We previously prevented the creation of doublepipe instances when we're not supposed to automatically read from stderr. However, there were other automatic calls to read from stderr that were undermining this effort. This commit prevents all automatic reads from stderr from occurring when they are supposed to be disabled. Because stderr is no longer being read, we need to call "readavailable" from tests so stderr is read from. Test output changes because stderr is now always (manually) read after stdout. And, since sshpeer no longer automatically tends to stderr, no "remote: " messages are printed. This should fix non-deterministic test output. FWIW, doublepipe automatically reads from stderr when reading from stdout, so I'm not sure some of these calls to self._readerr() are even needed. Differential Revision: https://phab.mercurial-scm.org/D2571
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30580
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     2
  > [extensions]
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
  > rebase=
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
  > drawdag=$TESTDIR/drawdag.py
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     5
  > 
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
  > [phases]
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
  > publish=False
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
  > 
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
  > [alias]
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    10
  > tglog = log -G --template "{rev}: {desc}"
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
  > EOF
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
33619
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    13
Rebasing using a single transaction
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    14
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    15
  $ hg init singletr && cd singletr
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    16
  $ cat >> .hg/hgrc <<EOF
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    17
  > [rebase]
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    18
  > singletransaction=True
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    19
  > EOF
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    20
  $ hg debugdrawdag <<'EOF'
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    21
  >   Z
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    22
  >   |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    23
  >   | D
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    24
  >   | |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    25
  >   | C
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    26
  >   | |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    27
  >   Y B
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    28
  >   |/
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    29
  >   A
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    30
  > EOF
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    31
- We should only see two status stored messages. One from the start, one from
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    32
- the end.
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    33
  $ hg rebase --debug -b D -d Z | grep 'status stored'
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    34
  rebase status stored
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    35
  rebase status stored
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    36
  $ hg tglog
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    37
  o  5: D
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    38
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    39
  o  4: C
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    40
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    41
  o  3: B
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    42
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    43
  o  2: Z
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    44
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    45
  o  1: Y
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    46
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    47
  o  0: A
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    48
  
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    49
  $ cd ..