##// END OF EJS Templates
inotify: server: new data structure to keep track of changes....
inotify: server: new data structure to keep track of changes. == Rationale for the new structure == Current structure was a dictionary tree. One directory was tracked as a dictionary: - keys: file/subdir name - values: - for a file, the status (a/r/m/...) - for a subdir, the directory representing the subdir It allowed efficient lookups, no matter of the type of the terminal leaf: for part in path.split('/'): tree = tree[part] However, there is no way to represent a directory and a file with the same name because keys are conflicting in the dictionary. Concrete example: Initial state: root dir |- foo (file) |- bar (file) # data state is: {'foo': 'n', 'bar': 'n'} Remove foo: root dir |- bar (file) # Data becomes {'foo': 'r'} until next commit. Add foo, as a directory, and foo/barbar file: root dir |- bar (file) |-> foo (dir) |- barbar (file) # New state should be represented as: {'foo': {'barbar': 'a'}, 'bar': 'n'} however, the key "foo" is already used and represents the old file. The dirstate: D foo A foo/barbar cannot be represented, hence the need for a new structure. == The new structure == 'directory' class. Represents one directory level. * Notable attributes: Two dictionaries: - 'files' Maps filename -> status for the current dir. - 'dirs' Maps subdir's name -> directory object representing the subdir * methods - walk(), formerly server.walk - lookup(), old server.lookup - dir(), old server.dir This new class allows embedding all the tree walks/lookups in its own class, instead of having everything mixed together in server. Incidently, since files and directories are not stored in the same dictionaries, we are solving the previous key conflict problem. The small drawback is that lookup operation is a bit more complex: for a path a/b/c/d/e we have to check twice the leaf, if e is a directory or a file.

File last commit:

r4970:30d4d898 default
r9115:b55d4471 default
Show More
test-encoding.out
173 lines | 4.7 KiB | text/plain | TextLexer
/ tests / test-encoding.out
Matt Mackall
Add output for encoding test
r3778 adding changesets
adding manifests
adding file changes
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 added 2 changesets with 2 changes to 1 files
Matt Mackall
Add output for encoding test
r3778 (run 'hg update' to get a working copy)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
% should fail with encoding error
M a
Matt Mackall
Make quoting in test-encoding simpler
r3783 ? latin-1
? latin-1-tag
? utf-8
Matt Mackall
Add output for encoding test
r3778 transaction abort!
rollback completed
Matt Mackall
transactions: avoid late tear-down (issue641)...
r4970 abort: decoding near ' encoded: �': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)!
Matt Mackall
Add output for encoding test
r3778 % these should work
Brendan Cully
Fix up tests for new branch message
r4602 marked working directory as branch �
Matt Mackall
Make quoting in test-encoding simpler
r3783 % ascii
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 5:db5520b4645f
Alexis S. L. Carvalho
log: convert branch names to the local encoding
r3827 branch: ?
tag: tip
user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Alexis S. L. Carvalho
log: convert branch names to the local encoding
r3827 summary: latin1 branch
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 4:9cff3c980b58
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: Added tag ? for changeset 770b9b11621d
Matt Mackall
Add output for encoding test
r3778
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 3:770b9b11621d
Matt Mackall
Add output for encoding test
r3778 tag: ?
user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Matt Mackall
Make quoting in test-encoding simpler
r3783 summary: utf-8 e' encoded: ?
Matt Mackall
Add output for encoding test
r3778
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 2:0572af48b948
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Matt Mackall
Add output for encoding test
r3778 summary: latin-1 e' encoded: ?
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 1:0e5b7e3f9c4a
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c'
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 0:1e78a93102a3
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': ? = u'\xe9'
Matt Mackall
Add output for encoding test
r3778
Matt Mackall
Make quoting in test-encoding simpler
r3783 % latin-1
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 5:db5520b4645f
Alexis S. L. Carvalho
log: convert branch names to the local encoding
r3827 branch: �
tag: tip
user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Alexis S. L. Carvalho
log: convert branch names to the local encoding
r3827 summary: latin1 branch
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 4:9cff3c980b58
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: Added tag � for changeset 770b9b11621d
Matt Mackall
Add output for encoding test
r3778
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 3:770b9b11621d
Matt Mackall
Add output for encoding test
r3778 tag: �
user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Matt Mackall
Make quoting in test-encoding simpler
r3783 summary: utf-8 e' encoded: �
Matt Mackall
Add output for encoding test
r3778
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 2:0572af48b948
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Matt Mackall
Add output for encoding test
r3778 summary: latin-1 e' encoded: �
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 1:0e5b7e3f9c4a
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: koi8-r: ����� = u'\u0440\u0442\u0443\u0442\u044c'
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 0:1e78a93102a3
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': � = u'\xe9'
Matt Mackall
Add output for encoding test
r3778
Matt Mackall
Make quoting in test-encoding simpler
r3783 % utf-8
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 5:db5520b4645f
Alexis S. L. Carvalho
log: convert branch names to the local encoding
r3827 branch: é
tag: tip
user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Alexis S. L. Carvalho
log: convert branch names to the local encoding
r3827 summary: latin1 branch
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 4:9cff3c980b58
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: Added tag é for changeset 770b9b11621d
Matt Mackall
Add output for encoding test
r3778
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 3:770b9b11621d
Matt Mackall
Add output for encoding test
r3778 tag: é
user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Matt Mackall
Make quoting in test-encoding simpler
r3783 summary: utf-8 e' encoded: é
Matt Mackall
Add output for encoding test
r3778
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 2:0572af48b948
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Matt Mackall
Add output for encoding test
r3778 summary: latin-1 e' encoded: é
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 1:0e5b7e3f9c4a
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: koi8-r: ÒÔÕÔØ = u'\u0440\u0442\u0443\u0442\u044c'
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 0:1e78a93102a3
Matt Mackall
Add output for encoding test
r3778 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': é = u'\xe9'
Matt Mackall
Add output for encoding test
r3778
Matt Mackall
Make quoting in test-encoding simpler
r3783 % ascii
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 tip 5:db5520b4645f
? 3:770b9b11621d
Matt Mackall
Make quoting in test-encoding simpler
r3783 % latin-1
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 tip 5:db5520b4645f
� 3:770b9b11621d
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 % utf-8
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 tip 5:db5520b4645f
é 3:770b9b11621d
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 % ascii
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 ? 5:db5520b4645f
Eric Hopper
Change branches to sort 'active' branches first, and add an option to show only active branches.
r4675 default 4:9cff3c980b58 (inactive)
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 % latin-1
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 � 5:db5520b4645f
Eric Hopper
Change branches to sort 'active' branches first, and add an option to show only active branches.
r4675 default 4:9cff3c980b58 (inactive)
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 % utf-8
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 é 5:db5520b4645f
Eric Hopper
Change branches to sort 'active' branches first, and add an option to show only active branches.
r4675 default 4:9cff3c980b58 (inactive)
Matt Mackall
Make quoting in test-encoding simpler
r3783 % utf-8
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 5:db5520b4645f
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 branch: é
tag: tip
user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 summary: latin1 branch
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 4:9cff3c980b58
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: Added tag é for changeset 770b9b11621d
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 3:770b9b11621d
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 tag: é
user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 summary: utf-8 e' encoded: é
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 2:0572af48b948
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 summary: latin-1 e' encoded: é
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 1:0e5b7e3f9c4a
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: koi8-r: ртуть = u'\u0440\u0442\u0443\u0442\u044c'
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 changeset: 0:1e78a93102a3
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835 user: test
Thomas Arendsen Hein
Fixes test-encoding for python2.3 and minor cleanups:...
r3839 date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': И = u'\xe9'
Alexis S. L. Carvalho
Allow the user to specify the fallback encoding for the changelog...
r3835
Matt Mackall
make transcoding more robust...
r3843 abort: unknown encoding: dolphin, please check your locale settings
Alexis S. L. Carvalho
Use UTF-8 in .hg/branch
r3862 abort: decoding near '�': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)!
abort: branch name not in UTF-8!