tests/test-unrelated-pull.t
author timeless <timeless@gmail.com>
Sun, 02 Jan 2011 18:51:59 +0200
changeset 13236 3f299f5d9a29
parent 12316 4134686b83e1
child 13742 7abab875e647
permissions -rw-r--r--
progress: handle days, weeks and years using hg clone svn://anonsvn.kde.org/home/kde/trunk kde ... with progress yields 3008/1210830 1314h56m, which is unusable. Add code to switch to days at 30 hours, to weeks at 15 days, and to years at 55 weeks. A day has 24 hours, a week has 7 days, and a year has 52 weeks. Months are intentionally omitted because they do not have a fixed length. The Use of 52 weeks is a known and understandable estimate for a year. It might make sense to spell our year to alert people when progress is impractical, but...

  $ mkdir a
  $ cd a
  $ hg init
  $ echo 123 > a
  $ hg add a
  $ hg commit -m "a" -u a

  $ cd ..
  $ mkdir b
  $ cd b
  $ hg init
  $ echo 321 > b
  $ hg add b
  $ hg commit -m "b" -u b

  $ hg pull ../a
  pulling from ../a
  searching for changes
  abort: repository is unrelated
  [255]

  $ hg pull -f ../a
  pulling from ../a
  searching for changes
  warning: repository is unrelated
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files (+1 heads)
  (run 'hg heads' to see heads, 'hg merge' to merge)

  $ hg heads
  changeset:   1:9a79c33a9db3
  tag:         tip
  parent:      -1:000000000000
  user:        a
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     a
  
  changeset:   0:01f8062b2de5
  user:        b
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     b