Mercurial > hg
view tests/test-fncache.t @ 13033:026053f691a4
mq: add an '-e/--exact' option to qpush
This patch adds an '--exact/-e' option to qpush that will try to push the
patches in the correct location in the DAG. Specifying this option does the
following:
* If --move is specified, abort. It makes no sense to move a patch to the front
of the queue and try to apply it to its parent, because its parent is one of
the patches we just moved it in front of!
* If patches are already applied, abort. We don't want patch changesets
scattered throughout the DAG.
* If local changes are present, abort unless --force is used, as usual.
* Find the first patch we're going to push (if we're pushing multiple patches
with a target or --all).
* If that patch doesn't have a parent, abort, obviously.
* If the parent doesn't exist in the repo, abort. Something is wrong.
* Update to the parent, then continue pushing the patches as normal.
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Wed, 17 Nov 2010 21:18:44 -0500 |
parents | 4134686b83e1 |
children | 3efc99ac2ac4 |
line wrap: on
line source
Init repo1: $ hg init repo1 $ cd repo1 $ echo "some text" > a $ hg add adding a $ hg ci -m first $ cat .hg/store/fncache data/a.i Testing a.i/b: $ mkdir a.i $ echo "some other text" > a.i/b $ hg add adding a.i/b $ hg ci -m second $ cat .hg/store/fncache data/a.i data/a.i.hg/b.i Testing a.i.hg/c: $ mkdir a.i.hg $ echo "yet another text" > a.i.hg/c $ hg add adding a.i.hg/c $ hg ci -m third $ cat .hg/store/fncache data/a.i data/a.i.hg/b.i data/a.i.hg.hg/c.i Testing verify: $ hg verify checking changesets checking manifests crosschecking files in changesets and manifests checking files 3 files, 3 changesets, 3 total revisions $ rm .hg/store/fncache $ hg verify checking changesets checking manifests crosschecking files in changesets and manifests checking files data/a.i@0: missing revlog! data/a.i.hg/c.i@2: missing revlog! data/a.i/b.i@1: missing revlog! 3 files, 3 changesets, 3 total revisions 3 integrity errors encountered! (first damaged changeset appears to be 0) [1] $ cd .. Non store repo: $ hg --config format.usestore=False init foo $ cd foo $ mkdir tst.d $ echo foo > tst.d/foo $ hg ci -Amfoo adding tst.d/foo $ find .hg | sort .hg .hg/00changelog.i .hg/00manifest.i .hg/data .hg/data/tst.d.hg .hg/data/tst.d.hg/foo.i .hg/dirstate .hg/last-message.txt .hg/requires .hg/undo .hg/undo.branch .hg/undo.desc .hg/undo.dirstate $ cd .. Non fncache repo: $ hg --config format.usefncache=False init bar $ cd bar $ mkdir tst.d $ echo foo > tst.d/Foo $ hg ci -Amfoo adding tst.d/Foo $ find .hg | sort .hg .hg/00changelog.i .hg/dirstate .hg/last-message.txt .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00manifest.i .hg/store/data .hg/store/data/tst.d.hg .hg/store/data/tst.d.hg/_foo.i .hg/store/undo .hg/undo.branch .hg/undo.desc .hg/undo.dirstate $ cd ..