Mercurial > hg
view tests/test-sparse-merges.t @ 35410:83014fa95435
rebase: fix for hgsubversion
5c25fe7fb1e broke something in the hgsubversion test path, causing it raise an
abort (Abort: nothing to merge) during a perfectly good rebase. I tracked it
down to this change. It's probably not hgsubversion related.
I suspect that using the same `wctx` from before the initial update causes
problems with the wctx's cached manifest property. I noticed we also sometimes
stick random gunk on the wctx object in other places (like in `copies.py`) so
it's probably best to reset it for now.
The line I added before was actually useless since we don't pass wctx to the
initial `merge.update`, so it defaults to `repo[None]`. So I just removed it.
Differential Revision: https://phab.mercurial-scm.org/D1679
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Tue, 12 Dec 2017 22:05:21 -0800 |
parents | c9cbf4de27ba |
children | 91c405f84cf7 |
line wrap: on
line source
test merging things outside of the sparse checkout $ hg init myrepo $ cd myrepo $ cat > .hg/hgrc <<EOF > [extensions] > sparse= > EOF $ echo foo > foo $ echo bar > bar $ hg add foo bar $ hg commit -m initial $ hg branch feature marked working directory as branch feature (branches are permanent and global, did you want a bookmark?) $ echo bar2 >> bar $ hg commit -m 'feature - bar2' $ hg update -q default $ hg debugsparse --exclude 'bar**' $ hg merge feature temporarily included 1 file(s) in the sparse checkout for merging 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) Verify bar was merged temporarily $ ls bar foo $ hg status M bar Verify bar disappears automatically when the working copy becomes clean $ hg commit -m "merged" cleaned up 1 temporarily added file(s) from the sparse checkout $ hg status $ ls foo $ hg cat -r . bar bar bar2 Test merging things outside of the sparse checkout that are not in the working copy $ hg strip -q -r . --config extensions.strip= $ hg up -q feature $ touch branchonly $ hg ci -Aqm 'add branchonly' $ hg up -q default $ hg debugsparse -X branchonly $ hg merge feature temporarily included 2 file(s) in the sparse checkout for merging 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit)