[Bug 3974] New: "abort no node!" when pulling after amending changeset with a shared bookmark

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Tue Jul 2 04:12:59 CDT 2013


http://bz.selenic.com/show_bug.cgi?id=3974

          Priority: normal
            Bug ID: 3974
                CC: mercurial-devel at selenic.com
          Assignee: pierre-yves.david at logilab.fr
           Summary: "abort no node!" when pulling after amending changeset
                    with a shared bookmark
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: martin at geisler.net
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.6.3
         Component: evolution
           Product: Mercurial

After sharing a bookmark X between client and server, 'hg pull' on the client
fails with

  abort: 00changelog.i@<server node id>: no node!

when the bookmark X is at <server node id> on the server, but at <other id> on
the client due to an amend on the client. That is, changeset <server node id>
is hidden on the client and the updating of bookmarks fails because of this.

The traceback:

$ hg pull --traceback
pulling from http://localhost:8000/
searching for changes
no changes found
Traceback (most recent call last):
  File "/home/mg/src/mercurial/mercurial/dispatch.py", line 97, in _runcatch
    return _dispatch(req)
  File "/home/mg/src/mercurial/mercurial/dispatch.py", line 778, in _dispatch
    cmdpats, cmdoptions)
  File "/home/mg/src/mercurial/mercurial/dispatch.py", line 549, in runcommand
    ret = _runcommand(ui, options, cmd, d)
    return orig(ui, options, cmd, cmdfunc)
  File "/home/mg/src/mercurial/mercurial/extensions.py", line 188, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/home/mg/src/mercurial/hgext/color.py", line 405, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/home/mg/src/mercurial/mercurial/dispatch.py", line 869, in _runcommand
    return checkargs()
  File "/home/mg/src/mercurial/mercurial/dispatch.py", line 840, in checkargs
    return cmdfunc()
  File "/home/mg/src/mercurial/mercurial/dispatch.py", line 775, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/extensions.py", line 143, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mercurial/hgext/mq.py", line 3528, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/extensions.py", line 143, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mutable-history/hgext/evolve.py", line 584, in
warnobserrors
    ret = orig(ui, repo, *args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/extensions.py", line 143, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mutable-history/hgext/evolve.py", line 563, in
wrapmayobsoletewc
    res = origfn(ui, repo, *args, **opts)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/extensions.py", line 143, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mercurial/hgext/rebase.py", line 780, in pullrebase
    orig(ui, repo, *args, **opts)
  File "/home/mg/src/mercurial/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mercurial/mercurial/commands.py", line 4553, in pull
    bookmarks.updatefromremote(ui, repo, remotebookmarks, source)
  File "/home/mg/src/mercurial/mercurial/bookmarks.py", line 236, in
updatefromremote
    if nr in repo:
  File "/home/mg/src/mercurial/mercurial/localrepo.py", line 391, in
__contains__
    return bool(self.lookup(changeid))
  File "/home/mg/src/mercurial/mercurial/localrepo.py", line 664, in lookup
    return self[key].node()
  File "/home/mg/src/mercurial/mercurial/localrepo.py", line 387, in
__getitem__
    return context.changectx(self, changeid)
  File "/home/mg/src/mercurial/mercurial/context.py", line 98, in __init__
    self._rev = repo.changelog.rev(self._node)
  File "/home/mg/src/mercurial/mercurial/changelog.py", line 186, in rev
    raise error.LookupError(hex(node), self.indexfile, _('no node'))
LookupError: 00changelog.i at b5dfb6593278d7cdaa1b7ae82653709bb324ee2e: no node
abort: 00changelog.i at b5dfb6593278d7cdaa1b7ae82653709bb324ee2e: no node!

Steps to reproduce:

Install evolve extension

  $ hg clone -q https://bitbucket.org/marmoute/mutable-history -u stable
  $ echo '[extensions]' >> $HGRCPATH
  $ echo 'rebase =' >> $HGRCPATH
  $ echo "evolve = $TESTTMP/mutable-history/hgext/evolve.py" >> $HGRCPATH

Pull after amending bookmarked changeset:

  $ hg init a
  $ cd a
  $ echo x > x.txt
  $ hg add x.txt
  $ hg commit -m x
  $ echo xx > x.txt
  $ hg commit -m xx
  $ hg bookmark X
  $ echo '[phases]' > .hg/hgrc
  $ echo 'publish = False' >> .hg/hgrc
  $ hg serve -p $HGPORT -d --pid-file=../hg.pid
  $ cat ../hg.pid >> $DAEMON_PIDS

  $ cd ..
  $ hg clone http://localhost:$HGPORT/ b
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 2 changesets with 2 changes to 1 files
  updating to branch default
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ cd b
  $ echo xxx > x.txt
  $ hg commit --amend -m xxx
  $ hg pull
  pulling from http://localhost:$HGPORT/
  searching for changes
  no changes found
  abort: 00changelog.i at 1b712fd6fd85352d6729dda09fde9661005215e9: no node!
  [255]
  $ hg log --hidden -r 1b712fd6fd85352d6729dda09fde9661005215e9
  changeset:   1:1b712fd6fd85
  user:        test
  date:        Thu Jan 01 00:00:00 1970 +0000
  summary:     xx

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list