tests/test-pull-update.t
author Mads Kiilerich <madski@unity3d.com>
Sun, 12 Jan 2014 23:28:21 +0100
changeset 20244 47d0843647d1
parent 19798 76df01e56e7f
child 26968 216cc65cf227
permissions -rw-r--r--
util: introduce util.debugstacktrace for showing a stack trace without crashing This is often very handy when hacking/debugging. Calling util.debugstacktrace('hey') from a place in hg will give something like: hey at: ./hg:38 in <module> /home/user/hgsrc/mercurial/dispatch.py:28 in run /home/user/hgsrc/mercurial/dispatch.py:65 in dispatch /home/user/hgsrc/mercurial/dispatch.py:88 in _runcatch /home/user/hgsrc/mercurial/dispatch.py:740 in _dispatch /home/user/hgsrc/mercurial/dispatch.py:514 in runcommand /home/user/hgsrc/mercurial/dispatch.py:830 in _runcommand /home/user/hgsrc/mercurial/dispatch.py:801 in checkargs /home/user/hgsrc/mercurial/dispatch.py:737 in <lambda> /home/user/hgsrc/mercurial/util.py:472 in check ...

  $ hg init t
  $ cd t
  $ echo 1 > foo
  $ hg ci -Am m
  adding foo

  $ cd ..
  $ hg clone t tt
  updating to branch default
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ cd tt
  $ echo 1.1 > foo
  $ hg ci -Am m

  $ cd ../t
  $ echo 1.2 > foo
  $ hg ci -Am m

Should not update:

  $ hg pull -u ../tt
  pulling from ../tt
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files (+1 heads)
  not updating: not a linear update
  (merge or update --check to force update)

  $ cd ../tt

Should not update:

  $ hg pull -u ../t
  pulling from ../t
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files (+1 heads)
  not updating: not a linear update
  (merge or update --check to force update)

  $ HGMERGE=true hg merge
  merging foo
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
  (branch merge, don't forget to commit)
  $ hg ci -mm

  $ cd ../t

Should work:

  $ hg pull -u ../tt
  pulling from ../tt
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files (-1 heads)
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved

  $ cd ..