tests/test-branch-tag-confict.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 20 Oct 2012 21:43:46 -0400
branchstable
changeset 17847 1e4eb1faba6e
parent 16913 f2719b387380
permissions -rw-r--r--
largefiles: use 'default' instead of 'default-push' when pulling (issue3584) This only applies to downloading largefiles, and only when no source for the pull is explicitly provided. The repository itself was properly being pulled via 'default' previously. Using --all-largefiles is not necessary on a bare pull to test this (this existing test is merely a convenience), but it is required to test pulling on the rebase path. Note that the errors generated in the --rebase case are because the repo specified doesn't have the largefiles in its cache (though they are in the user cache), so the errors are misleading. Specifying --all-largefiles when cloning to 'b' fixes this, but instead of errors, it reports caching only 5 largefiles instead of the 9 that come up missing. Likely this is because the largefile download procedure tries to download missing files for each rev, and some of the files have standins in more than one rev that gets pulled.

Initial setup.

  $ hg init repo
  $ cd repo
  $ touch thefile
  $ hg ci -A -m 'Initial commit.'
  adding thefile

Create a tag.

  $ hg tag branchortag

Create a branch with the same name as the tag.

  $ hg branch branchortag
  marked working directory as branch branchortag
  (branches are permanent and global, did you want a bookmark?)
  $ hg ci -m 'Create a branch with the same name as a tag.'

This is what we have:

  $ hg log
  changeset:   2:10519b3f489a
  branch:      branchortag
  tag:         tip
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Create a branch with the same name as a tag.
  
  changeset:   1:2635c45ca99b
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Added tag branchortag for changeset f57387372b5d
  
  changeset:   0:f57387372b5d
  tag:         branchortag
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Initial commit.
  
Update to the tag:

  $ hg up 'tag(branchortag)'
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  $ hg parents
  changeset:   0:f57387372b5d
  tag:         branchortag
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Initial commit.
  
Updating to the branch:

  $ hg up 'branch(branchortag)'
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg parents
  changeset:   2:10519b3f489a
  branch:      branchortag
  tag:         tip
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     Create a branch with the same name as a tag.
  

  $ cd ..