view tests/test-empty-dir.t @ 21200:a1381eea7c7d stable

graft: do not use `.remove` on a smart set (regression) Revset calls use to return a list. Graft use to mutate that list. We cannot do this anymore leading to a crash when grafting multiple changeset with a revset. File ".../mercurial/commands.py", line 3117, in graft revs.remove(rev) AttributeError: '_addset' object has no attribute 'remove' We are late in code-freeze so we make the shortest possible fix by turning it back to a list.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 28 Apr 2014 17:25:36 -0700
parents 3b165c127690
children
line wrap: on
line source

  $ hg init

  $ echo 123 > a
  $ hg add a
  $ hg commit -m "first" a

  $ mkdir sub
  $ echo 321 > sub/b
  $ hg add sub/b
  $ hg commit -m "second" sub/b

  $ cat sub/b
  321

  $ hg co 0
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved

  $ cat sub/b 2>/dev/null || echo "sub/b not present"
  sub/b not present

  $ test -d sub || echo "sub not present"
  sub not present