Commit Graph

36 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
e21e9414bc store: Removed extra space in _data list 2010-09-05 21:00:04 +02:00
Nicolas Dumazet
d7e4800c8b store: skip decodir check if path does not contain '.hg/'
The three replace calls are slower than this simple __contains__,
and anyway we should not have this many paths ending with .i, .d, or .hg
compared to the normal, un-encoded other paths.
2010-08-12 16:45:47 +09:00
Adrian Buehlmann
48a03e4f27 store: only add new entries to the fncache file
Newly added fncache entries were not added to the in-memory cache,
making it possible for 'hg convert' to cause duplicates in
.hg/store/fncache.

Duplicates in the fncache file are harmless, but excessive numbers
of duplicates from large converted repositories may slow down
execution speed considerably.
2010-03-03 14:50:35 +01:00
Benoit Boissinot
4371f512b2 fix spaces/identation issues 2010-02-05 18:50:08 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Simon Heimberg
3c5d74607b store: eliminate reference cycle in fncachestore
no reference to self in fncacheopener
Inspired by Adrian Buehlmann
2009-07-14 14:05:07 +02:00
Benoit Boissinot
125a85ec87 use new style classes 2009-06-10 15:10:21 +02:00
Benoit Boissinot
d81f680b31 store encoding: .i/.d encoding for non-store repo (broken by 67e6074ba430) 2009-05-26 23:49:53 +02:00
Benoit Boissinot
5b1d4a56ec filelog encoding: move the encoding/decoding into store
the escaping of directories ending with .i or .d doesn't
really belong to filelog.

we put the encoding/decoding in store instead, for backwards
compat, streamclone and the fncache file format still uses the
partially encoded filenames.
2009-05-20 18:35:47 +02:00
Benoit Boissinot
ee58830640 store: refactor the fncache handling
put all the fncache file writing and reading in
the same place.
2009-05-20 18:35:41 +02:00
Martin Geisler
f7fa8ce35f store: create set directly from iterable 2009-05-17 16:56:20 +02:00
Benoit Boissinot
3f0d683495 store: use set instead of dict 2009-05-17 04:16:44 +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
f6c8930392 replace various uses of list.reverse() 2009-04-26 16:50:44 -05: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
Matt Mackall
0952760f82 util: split out posix, windows, and win32 modules 2009-03-26 13:54:44 -05:00
Adrian Buehlmann
b2991e8893 store: encode trailing period and space on directory names (issue1417)
Windows won't create directories with names ending in period or space, so
we encode the last period/space character in directory names of non-hashed
paths in the store using reversible ~xx encoding (' ' -> '~20', '.' -> '~2e').

With this change it is possible to remove a directory ending in period or space
that was inadvertantly checked in on a linux system while still being able
to clone such a repository with its full history to Windows (see also issue793).
2008-12-13 18:32:29 +01:00
Adrian Buehlmann
9a0526b2cd store: don't create dirs ending in period or space for hashed paths (issue1417)
Windows won't create directories with names ending in period or space, so
we replace the last period/space character in truncated directory names of
hashed paths with some other character (underbar).
2008-12-13 17:39:56 +01:00
Benoit Boissinot
ea7fe6dacc remove unused variables 2008-10-28 19:25:26 +01:00
Thomas Arendsen Hein
912f59bb30 Remove trailing spaces. 2008-10-24 15:00:40 +02:00
Adrian Buehlmann
f3f0f9ecd6 introduce fncache repository layout
* adds a new entry 'fncache' to '.hg/requires' for new repos
* writes new file '.hg/store/fncache'
* hash-encodes filenames with long paths (issue839)
* encodes Windows reserved filenames (issue793)
2008-10-19 19:12:07 +02:00
Patrick Mezard
f6efcddc6c store: pathjoiner default value is os.path.join 2008-09-05 11:00:07 +02:00
Adrian Buehlmann
d71509e706 Fix for Issue1260 2008-08-31 00:22:20 +02:00
Matt Mackall
3bf58ba630 clone: get a list of files to clone from store 2008-08-13 20:18:44 -05:00
Matt Mackall
e691d8e8b0 store: drop self.encodefn 2008-08-13 20:18:44 -05:00
Matt Mackall
2793481364 store: change handling of decoding errors 2008-08-13 20:18:43 -05:00
Matt Mackall
dc1f28752b store: simplify walking
- fold in main walking function
- eliminate recursion (especially recursive yielding!)
- eliminate default args
2008-08-13 20:18:43 -05:00
Matt Mackall
9b20862a98 store: simplify class hierarchy 2008-08-13 20:18:43 -05:00
Matt Mackall
eac969c591 statichttp: use store class
This lets us nix store.encodefn.
2008-08-13 20:18:43 -05:00
Matt Mackall
7e9e494932 store: take opener as an argument 2008-08-13 20:18:42 -05:00
Adrian Buehlmann
a318975eaf verify: check repo.store 2008-08-13 20:18:41 -05:00
Adrian Buehlmann
0d98c22169 store.py: accept empty repos
Fixes a traceback on the server side when trying to streamclone
an empty repo (this was *not* introduced by 6590bef21ba3).
2008-08-13 20:18:41 -05:00
Adrian Buehlmann
904617b7d8 introduce store classes
move store walking from streamclone.py into store.py
2008-07-24 16:32:52 +02:00
Adrian Buehlmann
34afc460b4 move filename encoding functions from util.py to new store.py 2008-07-24 16:32:51 +02:00