tests/test-xdg.t
author Pulkit Goyal <7895pulkit@gmail.com>
Fri, 03 Mar 2017 13:04:32 +0530
changeset 31159 76a64c1e5439
parent 30961 354020079723
child 32467 7d8da7b54dc0
permissions -rw-r--r--
py3: add pycompat.open and replace open() calls open() requires mode argument as unicodes on Python 3. This patch introduces pycompat.open() which is inserted to files using transformer and replaces builtins.open() calls.

#if no-windows no-osx

  $ mkdir -p xdgconf/hg
  $ echo '[ui]' > xdgconf/hg/hgrc
  $ echo 'username = foobar' >> xdgconf/hg/hgrc
  $ XDG_CONFIG_HOME="`pwd`/xdgconf" ; export XDG_CONFIG_HOME
  $ unset HGRCPATH
  $ hg config ui.username
  foobar

#endif