Matt Mackall
cb95c386e8
revlogio: speed up parsing
...
- precalcuate ending offset
- pull some variables into local scope
- separate inline and out of line code paths
2007-07-23 20:44:08 -05:00
Matt Mackall
8fa2498ebf
revlog: eliminate diff and patches functions
...
call mdiff variants directly
2007-07-23 20:44:08 -05:00
Matt Mackall
9257ef4f4f
revlog: speed up chunkcache
...
- use a reasonable cache size
- avoid an extra copy when we pull in big revs
2007-07-23 20:44:08 -05:00
Matt Mackall
141c035280
revlog: some basic code reordering
2007-07-23 20:44:08 -05:00
Matt Mackall
ff72ed852c
revlog: abstract out index entry packing
...
This lets us remove most of the remaining v0/v1 logic from revlog
2007-07-23 20:44:08 -05:00
Matt Mackall
1f16099cd0
revlog: simplify revlog.__init__
...
- move stat into io helper
- get rid of self.defversion and self.indexstat
- fold _load into __init__
2007-07-23 20:44:08 -05:00
Matt Mackall
f3686b0a39
revlog: mark cache private
2007-07-23 20:44:08 -05:00
Matt Mackall
9a71ba31c4
revlog: pull chunkcache back into revlog
2007-07-23 20:44:08 -05:00
Matt Mackall
35c14c89a6
revlog: change _inline from a function to a variable
2007-07-23 20:44:08 -05:00
Matt Mackall
b51cdea681
revlog: simplify addrevision
...
- remove unused defaults for p1, p2, and text
- reduce some if/else
- use better variable names
- remove some extra variables
- remove some obsolete corner tests
- simply first entry handling for revlogng
- simply inline vs outofline writeout
2007-07-23 20:44:08 -05:00
Matt Mackall
0ab56eac5f
revlog: some codingstyle cleanups
2007-07-23 20:44:08 -05:00
Matt Mackall
2cb4c11520
revlog: add a magic null revision to our index
...
We expand our index by one entry so that index[nullrev] points to a
unique entry, the null revision. This naturally eliminates numerous
extra tests in the performance-sensitive index access functions, most
of which are now trivial again.
Adding new entries is now done with insert(-1, e) rather than
append(e).
2007-07-23 20:44:08 -05:00
Matt Mackall
f03d3e07aa
revlog: change accesses to index entry elements to use positive offsets
2007-07-23 20:44:08 -05:00
Matt Mackall
04b4378f47
revlog: parse revlogv0 indexes into v1 internally
...
This lets us eliminate lots of special case code in our
performance-sensitive index accessors.
2007-07-23 20:44:08 -05:00
Matt Mackall
70e7477200
revlog: only allow lazy parsing with revlogng files
...
This will allow us to store indices in memory in a single entry format
2007-07-23 20:44:08 -05:00
Matt Mackall
214f50b511
revlog: simplify the v1 immediate parser
...
- read all the data at once (large files are handled by the lazy parser)
- cache the entire file for inline revlogs
- simplify looping
2007-07-23 20:44:08 -05:00
Matt Mackall
3b9167f022
revlog: set the threshold for lazy parsing higher
...
A typical machine can parse a 1MB index in well under a second
2007-07-23 20:44:08 -05:00
Matt Mackall
1889aee8b0
revlog: simplify the v0 parser
2007-07-23 20:44:07 -05:00
Matt Mackall
e7ef5dc500
revlog: add revlogio interface
...
This lets us separate the logic for different on-disk revlog formats from
the main revlog logic.
2007-07-23 20:44:07 -05:00
Matt Mackall
2158f34c5f
revlog: regroup parsing code
2007-07-23 20:44:07 -05:00
Matt Mackall
3dfe783ec5
transactions: avoid late tear-down (issue641)
...
We use weak references (ugh) to avoid having to manually delete
transaction references out of each call frame when an exception occurs.
2007-07-22 14:53:57 -05:00
Patrick Mezard
475f65528e
hgk: enable mouse wheel under Windows.
...
For some reason, MouseWheel events are not routed under windows even in latest ActiveTcl 8.4.15 while they are under linux and macosx. These events are activated using code supplied with Tcl Tip 171: <http://www.tcl.tk/cgi-bin/tct/tip/171.html >. Strangely, the Tip code almost work but generates some unexpected infinite loop which is fixed using a simple boolean to check reentrancy.
2007-07-22 16:21:49 +02:00
Patrick Mezard
20a41666e1
hgk: enable mouse wheel on MouseWheel events.
...
At this point, mouse wheel still does not work under Windows.
2007-07-22 16:21:49 +02:00
Thomas Arendsen Hein
b35814d4c2
merge with crew-stable
2007-07-22 09:45:18 +02:00
Bryan O'Sullivan
a09e8936ae
addremove: print meaningful error message if --similar not numeric
2007-07-21 19:07:18 -07:00
Matt Mackall
cd72dc7f1b
Merge with crew
2007-07-21 16:44:38 -05:00
Matt Mackall
d5b7eaa69a
revlog: privatize some methods
2007-07-21 16:18:42 -05:00
Matt Mackall
0e54e000c1
revlog: delete unused function makenode
2007-07-21 16:18:24 -05:00
Matt Mackall
9eea27ad83
revlog: raise offset/type helpers to global scope
2007-07-21 16:18:21 -05:00
Matt Mackall
3a3bd8ec5b
Make repo locks recursive, eliminate all passing of lock/wlock
2007-07-21 16:02:10 -05:00
Matt Mackall
3fdaa5a42e
Use a weakref for recursive transactions
2007-07-21 16:02:10 -05:00
Matt Mackall
3e13c68628
Use try/finally pattern to cleanup locks and transactions
2007-07-21 16:02:10 -05:00
Matt Mackall
5a93a0feb4
repo locks: use True/False
2007-07-21 16:02:09 -05:00
Matt Mackall
ce5b3192db
rename and simplify do_lock
2007-07-21 16:02:09 -05:00
Matt Mackall
7cdcc1b36f
simplify dirstate fixups in repo.status()
2007-07-21 16:02:09 -05:00
Matt Mackall
450dc6247d
dirstate: add doesn't need to call stat
2007-07-21 16:02:09 -05:00
Matt Mackall
60107c9e5e
use context for part of localrepo status
2007-07-21 16:02:09 -05:00
Matt Mackall
410e8d67c6
context: add __contains__, __getitem__, and __iter__
2007-07-21 16:02:09 -05:00
Matt Mackall
81e9f172fb
dirstate: get rid of default args for status
2007-07-21 16:02:09 -05:00
Matt Mackall
43547721ea
dirstate: make filterfiles private
2007-07-21 16:02:09 -05:00
Matt Mackall
c2967290a5
dirstate: add __contains__ and make __getitem__ more useful
...
dirstate.state(f) == '?' -> f not in dirstate
dirstate.state(f) -> dirstate[f]
2007-07-21 16:02:09 -05:00
Matt Mackall
bab511ec55
dirstate: make wjoin function private
2007-07-21 16:02:09 -05:00
Matt Mackall
cf691df912
dirstate: break update into separate functions
2007-07-21 16:02:09 -05:00
Matt Mackall
1a40b796d1
dirstate: use True and false for _dirty
2007-07-21 16:02:09 -05:00
Thomas Arendsen Hein
c8973835b3
test-alias: Removed fallback to parentui, no longer needed since 681da44cf9e4
2007-07-21 17:56:30 +02:00
Thomas Arendsen Hein
a974129de3
merge with crew-stable
2007-07-21 17:37:39 +02:00
Thomas Arendsen Hein
dbdc09ab03
Make [defaults] in .hg/hgrc work.
2007-07-21 17:36:45 +02:00
Thomas Arendsen Hein
95c8d3f7f8
Remove unused pprint import and the commented line which used it before.
2007-07-21 10:43:29 +02:00
Thomas Arendsen Hein
def3b1c2ba
Use format string for lockname again (was changed by cb157328a155)
2007-07-21 10:39:42 +02:00
Thomas Arendsen Hein
4c6cff621b
Backout 5d79f5ed74d4 and replace ''' with """ to make some highlighting happy.
...
I have tried Debian's default emacs and the current CVS version. Default emacs
doesn't have highlighting enabled (and being emacs-illiterate I don't know how
to enable it) and the CVS emacs' Python highlighting has no problems with '
characters here.
2007-07-21 10:36:51 +02:00