tests/test-default-push.t
author Idan Kamara <idankk86@gmail.com>
Fri, 24 Jun 2011 16:30:43 +0300
branchstable
changeset 14727 d4b9d3b91ce7
parent 12640 6cc4b14fb76b
child 15447 9910f60a37ee
permissions -rw-r--r--
dispatch: check for None before closing repo We were trying to call close() if repo == None and req.repo != None. This can happen when running commands that don't take a repo.

  $ 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