Bug 4039 - `hg log -r 0:null` is like `hg log -r null`
Summary: `hg log -r 0:null` is like `hg log -r null`
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 2.7.1
Hardware: PC Linux
: wish bug
Assignee: Bugzilla
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2013-09-17 16:00 UTC by neuhauser+selenic.com
Modified: 2014-07-19 14:17 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description neuhauser+selenic.com 2013-09-17 16:00 UTC
unlike `hg log -r null:0`, which is a set of two revisions.

fixture:

  $ export HGRCPATH="$PWD/hgrc"
  $ cat > "$HGRCPATH" <<EOF
  > [ui]
  > interactive = False
  > logtemplate = "{ifeq(rev, '-1', '(init) ', '{desc|firstline|nonempty}')} {rev}\n"
  > quiet = True
  > username = J. Random Hacker <hackjr@example.org>
  > [extensions]
  > hgext.graphlog =
  > EOF

  $ hg init
  $ for i in 0 1 2; do
  >   echo c$i > f
  >   hg ci -Am commit-$i f
  > done

  $ hg glog -r tip:null
  @  commit-2 2
  |
  o  commit-1 1
  |
  o  commit-0 0
  |
  o  (init)  -1


one of these is unlike the others:

  $ hg log -r null:null
  (init)  -1

  $ hg log -r null:null
  (init)  -1

  $ hg log -r null:0
  (init)  -1
  commit-0 0

  $ hg log -r 0:null
  (init)  -1

  $ hg log -r null:1
  (init)  -1
  commit-0 0
  commit-1 1

  $ hg log -r 1:null
  commit-1 1
  commit-0 0
  (init)  -1

  $ hg log -r null:2
  (init)  -1
  commit-0 0
  commit-1 1
  commit-2 2

  $ hg log -r 2:null
  commit-2 2
  commit-1 1
  commit-0 0
  (init)  -1
Comment 1 HG Bot 2014-03-13 13:15 UTC
Fixed by http://selenic.com/repo/hg/rev/58c32a9c8e7b
Cristian Zamfir <cristi_zmf@yahoo.com>
hg log: solves bug regarding hg log -r 0:null (issue4039)

'hg log -r 0:null' was showing only one changeset(the '-1' one) instead of the first two changesets.

(please test the fix)