Commit Graph

3182 Commits

Author SHA1 Message Date
Matt Mackall
f5270b4251 Merge with -stable 2007-08-02 13:23:53 -05:00
Matt Mackall
2cee92939f merge: avoid double deletion mentioned in issue636 2007-08-02 12:29:10 -05:00
Alexis S. L. Carvalho
5af674774c del transaction before lock before wlock
This way rollbacks happen while the repo is still locked.

Deleting lock before wlock is not strictly necessary, but is
more consistent with the locking order.
2007-08-02 01:56:08 -03:00
Brendan Cully
fc8076b99a Merge with mpm 2007-08-01 14:26:30 -07:00
Matt Mackall
600c42bfbf Merge with stable 2007-08-01 14:03:48 -05:00
Bryan O'Sullivan
a487c999a8 dirstate: improve error message on file/directory clash 2007-08-01 12:03:10 -07:00
Matt Mackall
d76c06eeb0 merge: do early copy to deal with issue636
Without copies/renames, merges source names are 1:1 with their
targets. Copies and renames introduce the possibility that there will
be two merges with the same input but different output. By doing the
copy to the destination name before the merge, the actual merge
becomes 1:1 again, and no source is the input to two different merges.

- add a preliminary scan to applyupdates to do copies
- for the merge action, pass the old name (for finding ancestors) and
  the new name (for input to the merge) to filemerge
- eliminate the old post-merge copy
- lookup file contents from new name in filemerge
- pass new name to external merge helper
- report merge failure at new name
- add a test
2007-08-01 12:33:12 -05:00
Bryan O'Sullivan
b89554c4ea localrepository: allow rawcommit to commit with an empty message 2007-08-01 09:57:05 -07:00
Thomas Arendsen Hein
e05f361209 os.isatty isn't available on Windows, so use sys.stdin.isatty() 2007-08-01 10:33:21 +02:00
Bryan O'Sullivan
80c88dabf8 ui: get readline and prompt to behave better depending on interactivity 2007-07-31 16:28:05 -07:00
Bryan O'Sullivan
ce7f264f24 patch: make internal code a bit friendlier to use 2007-07-31 16:28:05 -07:00
Bryan O'Sullivan
3bcee4b94e commands: move commit to cmdutil as wrapper for commit-like functions 2007-07-31 16:28:05 -07:00
Bryan O'Sullivan
46b7a3a9ca patch: remove unused parameter from b85diff 2007-07-30 20:49:08 -07:00
Bryan O'Sullivan
f2fb8a0b42 extensions: don't get confused by aliasing between "foo" and "hgext.foo" 2007-07-30 14:53:03 -07:00
Thomas Arendsen Hein
1640028059 merge with crew-stable 2007-07-30 20:06:11 +02:00
Thomas Arendsen Hein
c8e49d5f09 Fix re: and glob: patterns in .hgignore (reported by Brad Schick)
relglob: and relre: were already detected for a long time, so
I kept this undocumented functionality, especially as it was already
tested in test-hgignore.
2007-07-30 20:01:16 +02:00
Bryan O'Sullivan
04aae067fa localrepo.commit: only munge comment text if committing via dirstate 2007-07-26 14:47:31 -07:00
Matt Mackall
37cc19c8c5 revlog: localize some fastpath functions 2007-07-26 12:02:58 -05:00
Matt Mackall
eeb8f14a99 revlog: minor chunk speed-up 2007-07-26 12:02:58 -05:00
Matt Mackall
d106fa8150 revlog: minor revdiff reorganization 2007-07-26 12:02:58 -05:00
Matt Mackall
9429a0a390 revlog: move flag checking out of the offset fastpath 2007-07-26 12:02:58 -05:00
Matt Mackall
fc2b62f41f dirstate: localize a bunch of methods in status fastpath 2007-07-26 12:02:58 -05:00
Matt Mackall
c16b9a14c4 dirstate: speed up sorting in findfiles 2007-07-26 12:02:58 -05:00
Matt Mackall
24095cdf2c revlog: pass mode to _supported directly 2007-07-26 12:02:58 -05:00
Matt Mackall
8e7fb240b4 dirstate: localize a bunch of methods for findfiles 2007-07-26 12:02:58 -05:00
Matt Mackall
169bd362a1 Merge with -stable 2007-07-26 12:02:55 -05:00
Matt Mackall
0ac116e475 merge: don't forget to update the dirstate for exec bit changes 2007-07-26 11:19:53 -05:00
Shun-ichi GOTO
419d6d63b2 posixfile_nt: '+' should allow read access.
This fixes unexpected I/O error on committing many files
due to cset:f75d8ba770e0 (r4902 in crew).
2007-07-25 15:58:10 +09:00
Matt Mackall
767bb11dd5 revlog: avoid some unnecessary seek/tell syscalls 2007-07-23 20:44:08 -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
Matt Mackall
dd01d60440 lazyparser.findnode: fix typo and s/rfind/find/
There's no reason to use reverse string search and it's slightly slower
2007-07-23 20:44:08 -05:00
Matt Mackall
7292978647 lazyindex: speed up __getitem__
This function is fairly performance sensitive, so we make a couple
ugly tweaks:

- keep all entries packed so we needn't test entry types
- fold index lookup/load into unpack call to eliminate
  local variable setting
2007-07-23 20:44:08 -05:00
Matt Mackall
a68e049384 lazyparser: up the blocksize from 512 bytes to 64k 2007-07-23 20:44:08 -05:00
Matt Mackall
b607d22a05 revlog: implement a fast path for heads 2007-07-23 20:44:08 -05:00
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