tests/test-command-template.t
changeset 33968 42361715dd11
parent 33884 af20468eb0a4
child 34090 7bbc4e113e5f
equal deleted inserted replaced
33967:0d0cec9602c3 33968:42361715dd11
  2164 
  2164 
  2165   $ hg init unstable-hash
  2165   $ hg init unstable-hash
  2166   $ cd unstable-hash
  2166   $ cd unstable-hash
  2167   $ hg log --template '{date|age}\n' > /dev/null || exit 1
  2167   $ hg log --template '{date|age}\n' > /dev/null || exit 1
  2168 
  2168 
  2169   >>> from datetime import datetime, timedelta
  2169   >>> from __future__ import absolute_import
       
  2170   >>> import datetime
  2170   >>> fp = open('a', 'w')
  2171   >>> fp = open('a', 'w')
  2171   >>> n = datetime.now() + timedelta(366 * 7)
  2172   >>> n = datetime.datetime.now() + datetime.timedelta(366 * 7)
  2172   >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
  2173   >>> fp.write('%d-%d-%d 00:00' % (n.year, n.month, n.day))
  2173   >>> fp.close()
  2174   >>> fp.close()
  2174   $ hg add a
  2175   $ hg add a
  2175   $ hg commit -m future -d "`cat a`"
  2176   $ hg commit -m future -d "`cat a`"
  2176 
  2177