tests/test-default-push.t
author Dmitry Panov <dop@itoolabs.com>
Sun, 13 Nov 2011 00:29:26 +0000
branchstable
changeset 15505 ae04af1ce78d
parent 12640 6cc4b14fb76b
child 15447 9910f60a37ee
permissions -rw-r--r--
makedate: wrong timezone offset if DST rules changed this year (issue2511) Python's time module sets timezone and altzone based on UTC offsets of two dates: first and middle day of the current year. This approach doesn't work on a year when DST rules change. For example Russia abandoned winter time this year, so the correct UTC offset should be +4 now, but time.timezone returns 3 hours difference because that's what it was on 01.01.2011. Related python issue: http://bugs.python.org/issue1647654

  $ hg init a

  $ echo a > a/a
  $ hg --cwd a ci -Ama
  adding a

  $ hg clone a c
  updating to branch default
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved

  $ hg clone a b
  updating to branch default
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved

  $ echo b >> b/a
  $ hg --cwd b ci -mb

Push should push to 'default' when 'default-push' not set:

  $ hg --cwd b push
  pushing to $TESTTMP/a
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files

Push should push to 'default-push' when set:

  $ echo 'default-push = ../c' >> b/.hg/hgrc
  $ hg --cwd b push
  pushing to $TESTTMP/c
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files