Mercurial > hg
view tests/test-histedit-outgoing.t @ 18234:a55b06885cda
branchmap: allow to use cache of subset
Filtered repository are *subset* of unfiltered repository. This means that a
filtered branchmap could be use to compute the unfiltered version.
And filtered version happen to be subset of each other:
- "all() - unserved()" is a subset of "all() - hidden()"
- "all() - hidden()" is a subset of "all()"
This means that branchmap with "unfiltered" filter can be used as a base for
"hidden" branchmap that itself could be used as a base for unfiltered
branchmap.
unserved < hidden < None
This changeset implements this mechanism. If the on disk branchcache is not valid
we use the branchcache of the nearest subset as base instead of computing it from
scratch. Such fallback can be cascaded multiple time is necessary.
Note that both "hidden" and "unserved" set are a bit volatile. We will add more
stable filtering in next changesets.
This changeset enables collaboration between no filtering and "unserved"
filtering. Fixing performance regression introduced by 47f00b0de337
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 07 Jan 2013 17:23:25 +0100 |
parents | f3a7f05f474a |
children | 0023a6e49268 |
line wrap: on
line source
$ cat >> $HGRCPATH <<EOF > [extensions] > graphlog= > histedit= > EOF $ initrepos () > { > hg init r > cd r > for x in a b c ; do > echo $x > $x > hg add $x > hg ci -m $x > done > cd .. > hg clone r r2 | grep -v updating > cd r2 > for x in d e f ; do > echo $x > $x > hg add $x > hg ci -m $x > done > cd .. > hg init r3 > cd r3 > for x in g h i ; do > echo $x > $x > hg add $x > hg ci -m $x > done > cd .. > } $ initrepos 3 files updated, 0 files merged, 0 files removed, 0 files unresolved show the edit commands offered by outgoing $ cd r2 $ HGEDITOR=cat hg histedit --outgoing ../r | grep -v comparing | grep -v searching pick 055a42cdd887 3 d pick e860deea161a 4 e pick 652413bf663e 5 f # Edit history between 055a42cdd887 and 652413bf663e # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # f, fold = use commit, but fold into previous commit (combines N and N-1) # d, drop = remove commit from history # m, mess = edit message without changing commit content # 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd .. show the error from unrelated repos $ cd r3 $ HGEDITOR=cat hg histedit --outgoing ../r | grep -v comparing | grep -v searching abort: repository is unrelated [1] $ cd .. show the error from unrelated repos $ cd r3 $ HGEDITOR=cat hg histedit --force --outgoing ../r comparing with ../r searching for changes warning: repository is unrelated pick 2a4042b45417 0 g pick 68c46b4927ce 1 h pick 51281e65ba79 2 i # Edit history between 2a4042b45417 and 51281e65ba79 # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # f, fold = use commit, but fold into previous commit (combines N and N-1) # d, drop = remove commit from history # m, mess = edit message without changing commit content # 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd ..