Commit Graph

255 Commits

Author SHA1 Message Date
Benoit Boissinot
1b0af4b591 manifest.add(): cleanup worklist construction and iteration 2009-09-02 21:05:43 +02:00
Benoit Boissinot
ef4ae33a57 manifest: simplify cache handling, use a unique cache 2009-09-02 21:05:01 +02:00
Benoit Boissinot
79eb77ecc4 manifest.add(): simplify with iterators and generator expressions 2009-09-02 20:18:35 +02:00
Peter Arrenbrecht
a75765cf7f drop unused imports 2009-05-14 15:35:46 +02:00
Simon Heimberg
09ac1e6c92 separate import lines from mercurial and general python modules 2009-04-28 17:40:46 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
2f9b02c62d replace util.sort with sorted built-in
This is marginally faster for small and moderately-sized lists
2009-04-26 16:50:44 -05:00
Greg Ward
fd1580418a manifest: improve error message about newlines in filenames
Include the offending filenames in the error message.  Now this error message
is consistent with the same error issued by dirstate.py (although there is
still duplicate code).
2009-04-18 09:48:59 -04:00
Matt Mackall
b28ccc9a94 revlog: kill from-style imports
They're slow.
2009-01-11 22:55:36 -06:00
Matt Mackall
d15d559b7c errors: move revlog errors
- create error.py for exception classes to reduce demandloading
- move revlog exceptions to it
- change users to import error and drop revlog import if possible
2009-01-11 22:48:28 -06:00
Patrick Mezard
8cb1782f3b manifest: fix _search() corner-case
It failed when searching the empty string in the null revision.
2008-11-25 22:23:17 +01:00
Matt Mackall
0770924171 revlog: remove delta function 2008-11-12 15:32:16 -06:00
Matt Mackall
d8df9690c0 manifest: make checkforbidden take a list 2008-06-27 19:27:00 -05:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Matt Mackall
dcacfb3161 manifest: remove execf/linkf methods 2008-06-26 14:35:50 -05:00
Matt Mackall
d462e1fc26 simplify flag handling
add _checklink var to dirstate
introduce dirstate.flagfunc
switch users of util.execfunc/linkfunc to flagfunc
change manifestdict.set to take a flags string
change ctx.fileflags to ctx.flags
change gitmode func to a dict
remove util.execfunc/linkfunc
2008-06-26 13:46:34 -05:00
Bryan O'Sullivan
8a988e392e manifest: improve parsing performance by 8x via a new C extension 2008-03-26 10:12:10 -07:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Matt Mackall
28d6a9f074 manifest: minor performance tweak 2007-09-24 12:42:25 -05:00
Matt Mackall
f7f7d43737 manifest: speed up creation of the manifestdict
- fold iteration and rawset into parse
- avoid creating extra new strings with [:] where possible
- speed up node.bin
2007-07-23 20:44:08 -05:00
Thomas Arendsen Hein
4d29c6dc8e Updated copyright notices and add "and others" to "hg version" 2007-06-19 08:51:34 +02:00
Thomas Arendsen Hein
483231d996 Cleanup of whitespace, indentation and line continuation. 2007-06-19 08:06:37 +02:00
Matt Mackall
04561e556e revlog: simplify revlog version handling
- pass the default version as an attribute on the opener
- eliminate config option mess
2007-03-22 19:52:38 -05:00
Matt Mackall
b4f6965b1d revlog: don't pass datafile as an argument 2007-03-22 19:12:03 -05:00
Alexis S. L. Carvalho
b6eb1f041b fix manifest.find 2007-03-07 15:25:58 -03:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Benoit Boissinot
7d00e37112 issue352: disallow '\n' and '\r' in filenames (dirstate and manifest) 2006-11-01 17:56:55 +01:00
Thomas Arendsen Hein
0a7b982aa6 Whitespace/Tab cleanup 2006-10-01 19:26:33 +02:00
Brendan Cully
e54b369ac8 Abstract manifest block parsing. 2006-09-29 13:00:54 -07:00
Benoit Boissinot
f31660ebea fix newline in error message 2006-09-22 18:29:04 +02:00
Benoit Boissinot
663bcd49d0 manifest.py: remove unnecessary method 2006-09-20 22:26:47 +02:00
Vadim Gelfer
dc377b58c1 update copyrights. 2006-08-12 12:30:02 -07:00
Alexis S. L. Carvalho
219803f060 Fix some bugs introduced during the manifest refactoring 2006-08-12 08:53:23 -03:00
Matt Mackall
5c0d170547 Remove manifest.readflags 2006-08-11 11:00:38 -05:00
Matt Mackall
756da188ad Switch to simpler manifestdict 2006-08-10 22:38:56 -05:00
Matt Mackall
de8f408ebb Combine manifest dict and flags dict into a single object
This gets rid of the need to track two objects and might save memory.

This might be faster implemented as a subclassed dict with auxiliary
functions to access a sparse flags dict.
2006-08-09 14:53:03 -05:00
Matt Mackall
6a4cbda08b manifestflags: eliminate remaining users of direct dict access 2006-07-19 19:11:50 -05:00
Matt Mackall
603ad31fb9 Use strings for manifestflags to allow storing multiple flags 2006-07-16 03:22:05 -05:00
Matt Mackall
4e6cb39019 Start using manifestflags methods 2006-07-16 03:14:17 -05:00
Matt Mackall
49a6e6c51a Add manifestflags class 2006-07-16 02:59:20 -05:00
Vadim Gelfer
9a0c813fdc use demandload more. 2006-06-20 23:58:21 -07:00
Vadim Gelfer
5eb540c338 fix parsing of tags. make parse errors useful. add new tag tests.
old code read every head of .hgtags. delete and recreate of .hgtags gave
new head, but if error in deleted rev, .hgtags had error messages every
time it was parsed. this was very hard to fix, because deleted revs hard
to get back and update, needed merges too.

new code reads .hgtags on every head. advantage is if parse error
happens with new code, is possible to fix them by editing .hgtags on a
head and committing.

NOTE: new code uses binary search of manifest of each head to be fast,
but still much slower than old code. best thing would be to have delete
record stored in filelog so we never touch manifest. could find live
heads directly from filelog. this is more work than i want now.

new tests check for parse of tags on different heads, and inaccessible
heads created by delete and recreate of .hgtags.
2006-05-18 23:31:12 -07:00
Thomas Arendsen Hein
c9a89940a1 Replaced 0 with REVLOGV0 where this meaning is used. 2006-04-27 21:16:46 +02:00
mason@suse.com
ed26ff0cae Implement revlogng.
revlogng results in smaller indexes, can address larger data files, and
supports flags and version numbers.

By default the original revlog format is used.  To use the new format,
use the following .hgrc field:

[revlog]
# format choices are 0 (classic revlog format) and 1 revlogng
format=1
2006-04-04 16:38:43 -04:00
Matt Mackall
98cc47a8ba Fix comment syntax 2006-01-29 12:23:52 +13:00
Peter van Dijk
45d8535751 changed template escape filter, added urlescape filter; audited all templates for insertion bugs; added note to manifest.py about newlines in filenames 2006-01-29 00:18:52 +01:00
twaldmann@thinkmo.de
55d74a6b77 fixed some stuff pychecker shows, marked unclear/wrong stuff with XXX 2005-11-14 03:59:35 +02:00
mason@suse.com
5bb76dbbf2 Optimize manifest.add
Testing shows that manifest.add is spending a significant percentage of
its time running calcoffsets and doing text = "".join(addlist).  This
patch removes the need for both of these by storying the manifest in a
character array, and using a modified bisect search to find lines without
the help of a separate index of line offsets.

manifest.add was also reworked to push delta construction/combination into the
main loop.

Time to apply 2751 patches (without psyco, ext3 noatime,data=writeback):

Stock hg: 4m45s real 3m32s user 55s sys
patched:  2m48s real 1m53s user 43s sys
quilt:    2m30s real   45s user 50s sys

(quilt does much more io...)
2005-11-11 18:20:22 -08:00
Matt Mackall
8e930ce764 Remove old manifest diff code, it's now buggy 2005-10-25 22:15:44 -07:00
Benoit Boissinot
06e39e559b i18n part2: use '_' for all strings who are part of the user interface 2005-10-18 18:38:39 -07:00
Benoit Boissinot
e38e94088a i18n first part: make '_' available for files who need it 2005-10-18 18:37:48 -07:00
mpm@selenic.com
148eb9a38b manifest: convert sys.stderr bits to AssertionError 2005-08-27 15:13:52 -07:00
mpm@selenic.com
e175fdde9b Break apart hg.py
- move the various parts of hg.py into their own files
- create node.py to store node manipulation functions
2005-08-27 14:21:25 -07:00