##// END OF EJS Templates
bisect: avoid adding irrelevant revisions to bisect state...
bisect: avoid adding irrelevant revisions to bisect state When adding new revisions to the bisect state, it only makes sense to add information about revisions that are under consideration (i.e., those that are topologically between the known good and bad revisions). However, if the user passes in a revset (e.g., '!merge()' to exclude merge commits), hg will resolve the revset first and add all matching revisions to the bisect state (which in this case would likely be the majority of revisions in the repo). To avoid this, revisions should only be added to the bisect state if they are between the good and bad revisions (and therefore relevant to the bisection). -- Here are the results of some performance tests using the `mozilla-central` repo (since it is one of the largest freely-available hg repositories in the wild). These tests compare the performance of a locally-built `hg` before and after application of this series. Note that `--noupdate` is passed to avoid including update time (which should not vary across cases). Setup (run between each test): $ hg bisect --reset $ hg bisect --noupdate --bad 56c3ad4bde5c70714b784ccf15d099e0df0f5bde $ hg bisect --noupdate --good 57426696adaf08298af3027fa77486fee0633b13 Test using a revset that returns a very large number of revisions: $ time hg bisect --noupdate --skip '!merge()' > /dev/null Before: real 0m9.398s user 0m9.233s sys 0m0.120s After: real 0m1.513s user 0m1.425s sys 0m0.052s Test using a revset that is expensive to compute: $ time hg bisect --noupdate --skip 'desc("Bug")' > /dev/null Before: real 0m49.853s user 0m49.580s sys 0m0.243s After: real 0m4.120s user 0m4.036s sys 0m0.048s

File last commit:

r49942:cb21c9c1 default
r50337:81623652 default
Show More
test-narrow.t
552 lines | 16.4 KiB | text/troff | Tads3Lexer
Augie Fackler
tests: fold narrow treemanifest tests into main test file using testcases...
r36101 #testcases flat tree
Matt Harbison
lfs: consult the narrow matcher when extracting pointers from ctx (issue5794)...
r40422 #testcases lfs-on lfs-off
Martin von Zweigbergk
tests: move a config write to top of file since it applies to all tests...
r43200 $ cat >> $HGRCPATH << EOF
> [experimental]
> evolution=createmarkers
> EOF
Matt Harbison
lfs: consult the narrow matcher when extracting pointers from ctx (issue5794)...
r40422 #if lfs-on
$ cat >> $HGRCPATH <<EOF
> [extensions]
> lfs =
> EOF
#endif
Augie Fackler
tests: fold narrow treemanifest tests into main test file using testcases...
r36101
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ . "$TESTDIR/narrow-library.sh"
Augie Fackler
tests: fold narrow treemanifest tests into main test file using testcases...
r36101 #if tree
$ cat << EOF >> $HGRCPATH
> [experimental]
> treemanifest = 1
> EOF
#endif
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg init master
$ cd master
$ cat >> .hg/hgrc <<EOF
> [narrow]
> serveellipses=True
> EOF
$ for x in `$TESTDIR/seq.py 0 10`
> do
> mkdir d$x
> echo $x > d$x/f
> hg add d$x/f
> hg commit -m "add d$x/f"
> done
Martin von Zweigbergk
tests: use {rev} instead of {node|short} and (glob) in narrow tests...
r39397 $ hg log -T "{rev}: {desc}\n"
10: add d10/f
9: add d9/f
8: add d8/f
7: add d7/f
6: add d6/f
5: add d5/f
4: add d4/f
3: add d3/f
2: add d2/f
1: add d1/f
0: add d0/f
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ cd ..
Error if '.' or '..' are in the directory to track.
$ hg clone --narrow ssh://user@dummy/master foo --include ./asdf
abort: "." and ".." are not allowed in narrowspec paths
[255]
$ hg clone --narrow ssh://user@dummy/master foo --include asdf/..
abort: "." and ".." are not allowed in narrowspec paths
[255]
$ hg clone --narrow ssh://user@dummy/master foo --include a/./c
abort: "." and ".." are not allowed in narrowspec paths
[255]
Names with '.' in them are OK.
Charles Chamberlain
narrow: add capabilities for local repos, not just remote peers...
r47664 $ hg clone --narrow ./master should-work --include a/.b/c
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 0 changes to 0 files
new changesets * (glob)
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Arseniy Alekseyev
narrow: support debugupgraderepo...
r49960 The "narrow" repo requirement is ignored by [debugupgraderepo]
#if tree
$ (cd should-work; hg debugupgraderepo)
abort: cannot upgrade repository; unsupported source requirement: treemanifest
[255]
#else
$ (cd should-work; hg debugupgraderepo | grep 'no format upgrades found in existing repository')
(no format upgrades found in existing repository)
#endif
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 Test repo with local changes
$ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6
requesting all changes
adding changesets
adding manifests
adding file changes
added 6 changesets with 3 changes to 3 files
new changesets *:* (glob)
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd narrow-local-changes
$ echo local change >> d0/f
$ hg ci -m 'local change to d0'
$ hg co '.^'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo local change >> d3/f
$ hg ci -m 'local hidden change to d3'
created new head
$ hg ci --amend -m 'local change to d3'
$ hg tracked --removeinclude d0
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
The following changeset(s) or their ancestors have local changes not on the remote:
* (glob)
abort: local changes found
(use --force-delete-local-changes to ignore)
Martin von Zweigbergk
errors: raise more specifc errors from narrowcommands...
r46733 [20]
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 Check that nothing was removed by the failed attempts
$ hg tracked
I path:d0
I path:d3
I path:d6
$ hg files
d0/f
d3/f
d6/f
$ find *
d0
d0/f
d3
d3/f
d6
d6/f
$ hg verify -q
Force deletion of local changes
Martin von Zweigbergk
tests: use {rev} instead of {node|short} and (glob) in narrow tests...
r39397 $ hg log -T "{rev}: {desc} {outsidenarrow}\n"
8: local change to d3
6: local change to d0
5: add d10/f outsidenarrow
4: add d6/f
3: add d5/f outsidenarrow
2: add d3/f
1: add d2/f outsidenarrow
0: add d0/f
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg tracked --removeinclude d0 --force-delete-local-changes
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
The following changeset(s) or their ancestors have local changes not on the remote:
* (glob)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 moving unwanted changesets to backup
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d0/f.i (reporevlogstore !)
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 deleting meta/d0/00manifest.i (tree !)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !)
deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !)
deleting data/d0/f/index (reposimplestore !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Gregory Szorc
tests: conditionalize test output for simple store...
r37365
Martin von Zweigbergk
tests: use {rev} instead of {node|short} and (glob) in narrow tests...
r39397 $ hg log -T "{rev}: {desc} {outsidenarrow}\n"
7: local change to d3
5: add d10/f outsidenarrow
4: add d6/f
3: add d5/f outsidenarrow
2: add d3/f
1: add d2/f outsidenarrow
0: add d0/f outsidenarrow
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 Can restore stripped local changes after widening
$ hg tracked --addinclude d0 -q
$ hg unbundle .hg/strip-backup/*-narrow.hg -q
$ hg --hidden co -r 'desc("local change to d0")' -q
$ cat d0/f
0
local change
Pruned commits affecting removed paths should not prevent narrowing
$ hg co '.^'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'`
debugobsolete: also issue the "new obsmarkers" messsage...
r43163 1 new obsolescence markers
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 obsoleted 1 changesets
$ hg tracked --removeinclude d0
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 moving unwanted changesets to backup
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d0/f.i (reporevlogstore !)
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 deleting meta/d0/00manifest.i (tree !)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !)
deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !)
deleting data/d0/f/index (reposimplestore !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Gregory Szorc
tests: conditionalize test output for simple store...
r37365
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 Updates off of stripped commit if necessary
$ hg co -r 'desc("local change to d3")' -q
$ echo local change >> d6/f
$ hg ci -m 'local change to d6'
$ hg tracked --removeinclude d3 --force-delete-local-changes
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
The following changeset(s) or their ancestors have local changes not on the remote:
* (glob)
* (glob)
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 moving unwanted changesets to backup
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d3/f.i (reporevlogstore !)
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 deleting meta/d3/00manifest.i (tree !)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !)
deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !)
deleting data/d3/f/index (reposimplestore !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg log -T '{desc}\n' -r .
add d10/f
Updates to nullid if necessary
$ hg tracked --addinclude d3 -q
$ hg co null -q
$ mkdir d3
$ echo local change > d3/f
$ hg add d3/f
$ hg ci -m 'local change to d3'
created new head
$ hg tracked --removeinclude d3 --force-delete-local-changes
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
The following changeset(s) or their ancestors have local changes not on the remote:
* (glob)
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 moving unwanted changesets to backup
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d3/f.i (reporevlogstore !)
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 deleting meta/d3/00manifest.i (tree !)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !)
deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !)
deleting data/d3/f/index (reposimplestore !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg id
000000000000
$ cd ..
Martin von Zweigbergk
narrow: don't resurrect old commits when narrowing (don't strip obsmarkers)...
r40864 Narrowing doesn't resurrect old commits (unlike what regular `hg strip` does)
$ hg clone --narrow ssh://user@dummy/master narrow-obsmarkers --include d0 --include d3 -q
$ cd narrow-obsmarkers
$ echo a >> d0/f2
$ hg add d0/f2
$ hg ci -m 'modify d0/'
$ echo a >> d3/f2
$ hg add d3/f2
$ hg commit --amend -m 'modify d0/ and d3/'
$ hg log -T "{rev}: {desc}\n"
5: modify d0/ and d3/
3: add d10/f
2: add d3/f
1: add d2/f
0: add d0/f
$ hg tracked --removeinclude d3 --force-delete-local-changes -q
$ hg log -T "{rev}: {desc}\n"
3: add d10/f
2: add d3/f
1: add d2/f
0: add d0/f
$ cd ..
Martin von Zweigbergk
tests: test that narrow preserves bookmarks on widen...
r40901 Widening doesn't lose bookmarks
$ hg clone --narrow ssh://user@dummy/master widen-bookmarks --include d0 -q
$ cd widen-bookmarks
$ hg bookmark my-bookmark
$ hg log -T "{rev}: {desc} {bookmarks}\n"
1: add d10/f my-bookmark
0: add d0/f
$ hg tracked --addinclude d3 -q
$ hg log -T "{rev}: {desc} {bookmarks}\n"
3: add d10/f my-bookmark
2: add d3/f
1: add d2/f
0: add d0/f
$ cd ..
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 Can remove last include, making repo empty
$ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5
adding changesets
adding manifests
adding file changes
added 2 changesets with 1 changes to 1 files
new changesets *:* (glob)
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd narrow-empty
$ hg tracked --removeinclude d0
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d0/f.i (reporevlogstore !)
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 deleting meta/d0/00manifest.i (tree !)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !)
deleting data/d0/f/index (reposimplestore !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg tracked
$ hg files
[1]
$ test -d d0
[1]
Do some work in the empty clone
$ hg diff --change .
$ hg branch foo
marked working directory as branch foo
(branches are permanent and global, did you want a bookmark?)
$ hg ci -m empty
Danny Hooper
narrow: consider empty commits to be "inside the narrow spec" for templates...
r42550 $ hg log -T "{rev}: {desc} {outsidenarrow}\n"
2: empty
1: add d5/f outsidenarrow
0: add d0/f outsidenarrow
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg pull -q
Can widen the empty clone
$ hg tracked --addinclude d0
comparing with ssh://user@dummy/master
searching for changes
saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob)
adding changesets
adding manifests
adding file changes
Martin von Zweigbergk
narrowbundle: use new context manager for silencing the ui...
r48232 added 4 changesets with 1 changes to 1 files (+1 heads)
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg tracked
I path:d0
$ hg files
d0/f
$ find *
d0
d0/f
$ cd ..
TODO(martinvonz): test including e.g. d3/g and then removing it once
https://bitbucket.org/Google/narrowhg/issues/6 is fixed
$ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9
requesting all changes
adding changesets
adding manifests
adding file changes
added 8 changesets with 4 changes to 4 files
new changesets *:* (glob)
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd narrow
$ hg tracked
I path:d0
I path:d3
I path:d6
I path:d9
$ hg tracked --removeinclude d6
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d6/f.i (reporevlogstore !)
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 deleting meta/d6/00manifest.i (tree !)
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !)
deleting data/d6/f/index (reposimplestore !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg tracked
I path:d0
I path:d3
I path:d9
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 #if repofncache
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg debugrebuildfncache
fncache already up to date
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 #endif
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ find *
d0
d0/f
d3
d3/f
d9
d9/f
$ hg verify -q
$ hg tracked --addexclude d3/f
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d3/f.i (reporevlogstore !)
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !)
deleting data/d3/f/index (reposimplestore !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg tracked
I path:d0
I path:d3
I path:d9
X path:d3/f
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 #if repofncache
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg debugrebuildfncache
fncache already up to date
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 #endif
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ find *
d0
d0/f
d9
d9/f
$ hg verify -q
$ hg tracked --addexclude d0
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 deleting data/d0/f.i (reporevlogstore !)
Augie Fackler
tests: fold narrow treemanifest tests into main test file using testcases...
r36101 deleting meta/d0/00manifest.i (tree !)
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !)
deleting data/d0/f/index (reposimplestore !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg tracked
I path:d3
I path:d9
X path:d0
X path:d3/f
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 #if repofncache
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ hg debugrebuildfncache
fncache already up to date
Gregory Szorc
simplestore: use a custom store for the simple store repo...
r37433 #endif
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 $ find *
d9
d9/f
Make a 15 of changes to d9 to test the path without --verbose
(Note: using regexes instead of "* (glob)" because if the test fails, it
produces more sensible diffs)
$ hg tracked
I path:d3
I path:d9
X path:d0
X path:d3/f
$ for x in `$TESTDIR/seq.py 1 15`
> do
> echo local change >> d9/f
> hg commit -m "change $x to d9/f"
> done
$ hg tracked --removeinclude d9
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
The following changeset(s) or their ancestors have local changes not on the remote:
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
...and 5 more, use --verbose to list all
abort: local changes found
(use --force-delete-local-changes to ignore)
Martin von Zweigbergk
errors: raise more specifc errors from narrowcommands...
r46733 [20]
Augie Fackler
narrow: import experimental extension from narrowhg revision cb51d673e9c5...
r36096 Now test it *with* verbose.
$ hg tracked --removeinclude d9 --verbose
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
The following changeset(s) or their ancestors have local changes not on the remote:
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
^[0-9a-f]{12}$ (re)
abort: local changes found
(use --force-delete-local-changes to ignore)
Martin von Zweigbergk
errors: raise more specifc errors from narrowcommands...
r46733 [20]
Martin von Zweigbergk
narrow: add option for automatically removing unused includes...
r43215 $ cd ..
Test --auto-remove-includes
$ hg clone --narrow ssh://user@dummy/master narrow-auto-remove -q \
> --include d0 --include d1 --include d2
$ cd narrow-auto-remove
$ echo a >> d0/f
$ hg ci -m 'local change to d0'
$ hg co '.^'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a >> d1/f
$ hg ci -m 'local change to d1'
created new head
$ hg debugobsolete $(hg log -T '{node}' -r 'desc("local change to d0")')
1 new obsolescence markers
obsoleted 1 changesets
$ echo n | hg tracked --auto-remove-includes --config ui.interactive=yes
comparing with ssh://user@dummy/master
searching for changes
looking for unused includes to remove
path:d0
path:d2
remove these unused includes (yn)? n
$ hg tracked --auto-remove-includes
comparing with ssh://user@dummy/master
searching for changes
looking for unused includes to remove
path:d0
path:d2
remove these unused includes (yn)? y
looking for local changes to affected paths
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 moving unwanted changesets to backup
Martin von Zweigbergk
narrow: add option for automatically removing unused includes...
r43215 saved backup bundle to $TESTTMP/narrow-auto-remove/.hg/strip-backup/*-narrow.hg (glob)
deleting data/d0/f.i
deleting data/d2/f.i
deleting meta/d0/00manifest.i (tree !)
deleting meta/d2/00manifest.i (tree !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Martin von Zweigbergk
narrow: add option for automatically removing unused includes...
r43215 $ hg tracked
I path:d1
$ hg files
d1/f
$ hg tracked --auto-remove-includes
comparing with ssh://user@dummy/master
searching for changes
looking for unused includes to remove
found no unused includes
Martin von Zweigbergk
narrow: add --no-backup option for narrowing...
r47206 Test --no-backup
$ hg tracked --addinclude d0 --addinclude d2 -q
$ hg unbundle .hg/strip-backup/*-narrow.hg -q
$ rm .hg/strip-backup/*
$ hg tracked --auto-remove-includes --no-backup
comparing with ssh://user@dummy/master
searching for changes
looking for unused includes to remove
path:d0
path:d2
remove these unused includes (yn)? y
looking for local changes to affected paths
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted changesets
Martin von Zweigbergk
narrow: add --no-backup option for narrowing...
r47206 deleting data/d0/f.i
deleting data/d2/f.i
deleting meta/d0/00manifest.i (tree !)
deleting meta/d2/00manifest.i (tree !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Martin von Zweigbergk
narrow: add --no-backup option for narrowing...
r47206 $ ls .hg/strip-backup/
Martin von Zweigbergk
tests: demonstrate assertion error when modifying working copy while narrowing...
r47347
Test removing include while concurrently modifying file in that path
$ hg clone --narrow ssh://user@dummy/master narrow-concurrent-modify -q \
> --include d0 --include d1
$ cd narrow-concurrent-modify
Martin von Zweigbergk
narrow: remove assertion about working copy being clean...
r47348 $ hg --config 'hooks.pretxnopen = echo modified >> d0/f' tracked --removeinclude d0
comparing with ssh://user@dummy/master
searching for changes
looking for local changes to affected paths
deleting data/d0/f.i
deleting meta/d0/00manifest.i (tree !)
Martin von Zweigbergk
narrow: add more status messages when narrowing...
r47800 deleting unwanted files from working copy
Martin von Zweigbergk
narrow: remove assertion about working copy being clean...
r47348 not deleting possibly dirty file d0/f