tests/test-chg.t
author Jun Wu <quark@fb.com>
Fri, 06 May 2016 23:57:56 +0100
changeset 29088 983353035cec
parent 28516 3bf2892f685f
child 29274 148a9a5379f0
permissions -rw-r--r--
chgserver: remove _clearenvaliases Since we expand environment variables in alias lazily, the _clearenvaliases hack is no longer necessary. This resolves an issue that a non-shell alias which has environment variables in its arguments and is set to use pager will not use pager running with chg.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28516
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     1
init repo
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     2
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
  $ hg init foo
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
  $ cd foo
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     5
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
ill-formed config
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
  $ hg status
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
  $ echo '=brokenconfig' >> $HGRCPATH
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
    10
  $ hg status
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
  hg: parse error at * (glob)
3bf2892f685f chgserver: handle ParseError during validate
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
  [255]
29088
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    13
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    14
alias having an environment variable and set to use pager
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    15
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    16
  $ rm $HGRCPATH
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    17
  $ cat >> $HGRCPATH <<'EOF'
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    18
  > [ui]
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    19
  > formatted = yes
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    20
  > [extensions]
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    21
  > pager =
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    22
  > [pager]
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    23
  > pager = sed -e 's/^/P/'
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    24
  > attend = printa
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    25
  > [alias]
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    26
  > printa = log -T "$A\n" -r 0
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    27
  > EOF
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    28
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    29
  $ A=1 hg printa
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    30
  P1
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    31
  $ A=2 hg printa
983353035cec chgserver: remove _clearenvaliases
Jun Wu <quark@fb.com>
parents: 28516
diff changeset
    32
  P2