Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-flags.out @ 879:953ccddd57bd
dirstate walking optimizations
The repo walking code introduces a number of calls to dirstate.map.copy(),
significantly slowing down the walk on large trees. When a list of
files is passed to the walking code, we should only look at map entries
relevant to the file list passed in.
dirstate.filterfiles() is added to return a subset of the dirstate map.
The subset includes in files passed in, and if one of the files requested
is actually a directory, it includes any files inside that directory tree.
This brings the time for hg diff Makefile down from 1.7s to .3s on
a linux kernel repo.
Also, the diff command was unconditionally calling makewalk, leading
to an extra pass through repo.changes. This patch avoids the call
to makewalk when commands.diff isn't given a list of patterns, cutting
the time for hg diff (with no args) in half.
Index: mine/mercurial/hg.py
===================================================================
author | mason@suse.com |
---|---|
date | Fri, 12 Aug 2005 07:10:21 -0800 |
parents | 0902ffece4b4 |
children | 5a034646e472 |
rev | line source |
---|---|
491
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
1 + hg init |
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
2 + hg add a b |
801
1f9ec150a476
Updated output of tests.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
3 + hg ci -m added a b -d 0 0 |
491
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
4 + hg init |
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
5 + hg pull ../test1 |
412 | 6 pulling from ../test1 |
7 requesting all changes | |
8 adding changesets | |
9 adding manifests | |
775 | 10 adding file changes |
11 added 1 changesets with 2 changes to 2 files | |
412 | 12 (run 'hg update' to get a working copy) |
491
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
13 + hg co |
801
1f9ec150a476
Updated output of tests.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
14 + hg ci -m chmod +x a -d 0 0 |
1f9ec150a476
Updated output of tests.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
15 + hg ci -m a updated -d 0 0 |
491
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
16 + hg pull ../test2 |
412 | 17 pulling from ../test2 |
18 searching for changes | |
19 adding changesets | |
20 adding manifests | |
775 | 21 adding file changes |
22 added 1 changesets with 1 changes to 1 files | |
412 | 23 (run 'hg update' to get a working copy) |
491
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
24 + hg heads |
784
853bfbf1a312
Fix tests for short changeset hashes and hidden manifest hashes
mpm@selenic.com
parents:
775
diff
changeset
|
25 changeset: 2:3ef543305655 |
412 | 26 tag: tip |
784
853bfbf1a312
Fix tests for short changeset hashes and hidden manifest hashes
mpm@selenic.com
parents:
775
diff
changeset
|
27 parent: 0:22a449e20da5 |
412 | 28 user: test |
29 date: Thu Jan 1 00:00:00 1970 | |
30 summary: chmod +x a | |
31 | |
784
853bfbf1a312
Fix tests for short changeset hashes and hidden manifest hashes
mpm@selenic.com
parents:
775
diff
changeset
|
32 changeset: 1:c6ecefc45368 |
412 | 33 user: test |
34 date: Thu Jan 1 00:00:00 1970 | |
35 summary: a updated | |
36 | |
491
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
37 + hg history |
784
853bfbf1a312
Fix tests for short changeset hashes and hidden manifest hashes
mpm@selenic.com
parents:
775
diff
changeset
|
38 changeset: 2:3ef543305655 |
412 | 39 tag: tip |
784
853bfbf1a312
Fix tests for short changeset hashes and hidden manifest hashes
mpm@selenic.com
parents:
775
diff
changeset
|
40 parent: 0:22a449e20da5 |
412 | 41 user: test |
42 date: Thu Jan 1 00:00:00 1970 | |
43 summary: chmod +x a | |
44 | |
784
853bfbf1a312
Fix tests for short changeset hashes and hidden manifest hashes
mpm@selenic.com
parents:
775
diff
changeset
|
45 changeset: 1:c6ecefc45368 |
412 | 46 user: test |
47 date: Thu Jan 1 00:00:00 1970 | |
48 summary: a updated | |
49 | |
784
853bfbf1a312
Fix tests for short changeset hashes and hidden manifest hashes
mpm@selenic.com
parents:
775
diff
changeset
|
50 changeset: 0:22a449e20da5 |
412 | 51 user: test |
52 date: Thu Jan 1 00:00:00 1970 | |
53 summary: added a b | |
54 | |
591 | 55 + hg -v co -m |
412 | 56 resolving manifests |
57 merging a | |
58 resolving a | |
491
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
59 -rwxr-x--- |
66eb9905d0a2
Fixed test-flags and .out for arbitrary umask settings. Use -ex shell flags.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
414
diff
changeset
|
60 -rwxr-x--- |