view tests/test-diffdir.t @ 15932:4154338f0bc0

discovery: diet discovery.prepush from non-discovery code The ``discovery.prepush`` function was doing multiple things not related to discovery. This changeset move some code into the ``localrepo.push`` method. The old ``discovery.prepush`` function jobs is now restricted to checking for multple head creation. It was then renamed ``discovery.checkheads``. This new ``discovery.checkheads`` function may receive several other changes in the future but we are a bit too much near the freeze for a wider refactoring.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Thu, 19 Jan 2012 15:50:55 +0100
parents 2063d36b406e
children 29c8e35d3283
line wrap: on
line source

  $ hg init
  $ touch a
  $ hg add a
  $ hg ci -m "a"

  $ echo 123 > b
  $ hg add b
  $ hg diff --nodates
  diff -r 3903775176ed b
  --- /dev/null
  +++ b/b
  @@ -0,0 +1,1 @@
  +123

  $ hg diff --nodates -r tip
  diff -r 3903775176ed b
  --- /dev/null
  +++ b/b
  @@ -0,0 +1,1 @@
  +123

  $ echo foo > a
  $ hg diff --nodates
  diff -r 3903775176ed a
  --- a/a
  +++ b/a
  @@ -0,0 +1,1 @@
  +foo
  diff -r 3903775176ed b
  --- /dev/null
  +++ b/b
  @@ -0,0 +1,1 @@
  +123

  $ hg diff -r ""
  hg: parse error: empty query
  [255]
  $ hg diff -r tip -r ""
  hg: parse error: empty query
  [255]