Mercurial > hg
changeset 20064:99c4b8f79324 stable
shelve: unshelve using an unfiltered repository
when evolve is enabled and a hidden obsolete changeset exists
in the repository, the strip during unshelve will fail due to
filtered revs. we use an unfiltered repository like to
repair.strip to strip the proper nodes.
author | David Soria Parra <davidsp@fb.com> |
---|---|
date | Thu, 07 Nov 2013 20:36:26 -0800 |
parents | 8a021cd38719 |
children | 08fffc33af47 64b4f0cd7336 |
files | hgext/shelve.py tests/test-shelve.t |
diffstat | 2 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/shelve.py Thu Nov 07 01:56:40 2013 +0100 +++ b/hgext/shelve.py Thu Nov 07 20:36:26 2013 -0800 @@ -610,7 +610,7 @@ # but it doesn't update the inmemory structures, so addchangegroup # hooks still fire and try to operate on the missing commits. # Clean up manually to prevent this. - repo.changelog.strip(oldtiprev, tr) + repo.unfiltered().changelog.strip(oldtiprev, tr) unshelvecleanup(ui, repo, basename, opts) finally:
--- a/tests/test-shelve.t Thu Nov 07 01:56:40 2013 +0100 +++ b/tests/test-shelve.t Thu Nov 07 20:36:26 2013 -0800 @@ -520,4 +520,23 @@ $ hg status A d +test bug 4073 we need to enable obsolete markers for it + + $ cat > ../obs.py << EOF + > import mercurial.obsolete + > mercurial.obsolete._enabled = True + > EOF + $ echo '[extensions]' >> $HGRCPATH + $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH + $ hg shelve + shelved as default + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg debugobsolete `hg --debug id -i -r 1` + $ hg unshelve + unshelving change 'default' + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 2 files (+1 heads) + $ cd ..