Commit Graph

11862 Commits

Author SHA1 Message Date
Martin Geisler
797369393f dirstate: ignore symlinks when fs cannot handle them (issue1888)
When the filesystem cannot handle the executable bit, we currently
ignore it completely when looking for modified files. Similarly, it is
impossible to set or clear the bit when the filesystem ignores it.

This patch makes Mercurial treat symbolic links the same way.

Symlinks are a little different since they manifest themselves as
small files containing a filename (the symlink target). On Windows,
these files show up as regular files, and on Linux and Mac they show
up as real symlinks.

Issue1888 presents a case where the symlink files are better ignored
from the Windows side. A Linux client creates symlinks in a working
copy which is shared over a network between Linux and Windows clients.

The Samba server is helpful and defererences the symlink when the
Windows client looks at it. This means that Mercurial on the Windows
side sees file content instead of a file name in the symlink, and
hence flags the link as modified. Ignoring the change would be much
more helpful, similarly to how Mercurial does not report any changes
when executable bits are ignored in a checkout on Windows.

An initial checkout of a symbolic link on a file system that cannot
handle symbolic links will still result in a regular file containing
the target file name as its content. Sharing such a checkout with a
Linux client will not turn the file into a symlink automatically, but
'hg revert' can fix that. After the revert, the Windows client will
see the correct file content (provided by the Samba server when it
follows the link on the Linux side) and otherwise ignore the change.

Running 'hg perfstatus' 10 times gives these results:

  Before:          After:
  min: 0.544703    min: 0.546549
  med: 0.547592    med: 0.548881
  avg: 0.549146    avg: 0.548549
  max: 0.564112    max: 0.551504

The median time is increased about 0.24%.
2010-08-09 15:31:56 +02:00
Daniel Dumitriu
044f6327ae i18n-ro: initial version 2010-08-09 10:56:56 +02:00
Yann E. MORIN
af2d086089 mq/qqueue: enable bash completion
Return the list of available queues when completion is attempted on qqueue.
2010-08-08 23:10:08 +02:00
Yann E. MORIN
04d8f4ca7e mq/qqueue: --list does not print (active) with --quiet
For scripting purposes, it can be convenient to get a simple listing of
available queues, without indication of the active one.

--quiet documentation change removed by Patrick Mézard.
2010-08-08 22:49:01 +02:00
Patrick Mezard
cb2c3e89be Merge with stable 2010-08-08 22:29:39 +02:00
Renato Cunha
f65cf06e03 check-code: added a check for calls to the builtin cmp function 2010-08-07 16:13:53 -03:00
Renato Cunha
5790eb1140 manifest: removed usage of the global cmp function
Py3k doesn't have a global cmp() function, making this call problematic in the
py3k port. Also, calling cmp() here is not necessary, since we only want to
know if the two values are equal. A check for equality perfect in this case and
this patch does that.
2010-08-07 16:12:51 -03:00
Patrick Mezard
19809409ca tests: run check-code.py on working directory files
If we insist on Mercurial sources to pass check-code.py, let automate the
process and make it part of the tests.

Objections?
2010-08-07 15:38:05 +02:00
Yuya Nishihara
aaffe8d6bf templatefilters: make json filter handle multibyte characters correctly
It aims to fix javascript error of hgweb's graph view in Japanese 'cp932'
encoding.

'cp932' contains multibyte characters ending with '\x5c' (backslash),
e.g. '\x94\x5c' for Japanese Kanji 'Noh'.
Due to json filter escapes '\' to '\\', multibyte string ending with
'\x5c' is translated to "xxx\", resulting javascript parse error on
a web browser.

This patch changes json() to pass unicode to jsonescape().

Unicode decoding error handler changed to 'replace' by Patrick Mézard.
2010-08-07 16:27:16 +09:00
Alecs King
87357bf43e minor style fix: hgext/rebase.py:157 -- line too long
found by a run of check-code
2010-08-07 12:55:30 +08:00
Yuya Nishihara
3cdd1e55b0 zsh completions: add qpush --move option 2010-08-07 15:32:33 +09:00
Matt Mackall
c0eb9c1315 Merge with stable 2010-08-06 12:59:13 -05:00
Matt Mackall
10293e99b9 chunkbuffer: use += rather than cStringIO to reduce memory footprint
This significantly refactors the read() loop to use a queue of chunks.
The queue is alternately filled to at least 256k and then emptied by
concatenating onto the output buffer.

For very large read sizes, += uses less memory because it can resize
the target string in place.
2010-08-06 12:18:33 -05:00
Matt Mackall
cc6b733d1e httprepo: decompress stream incrementally to reduce memory usage 2010-08-05 16:17:39 -05:00
Matt Mackall
7ed158a8ab verify: initialize rp variable in case we hit out of memory 2010-08-05 16:17:33 -05:00
Matt Mackall
81392aed00 merge: drop reference to file contents after write
This reduces memory usage on large consecutive gets.
2010-08-05 16:17:17 -05:00
Matt Mackall
6426194b87 revlog: drop cache after use to save memory footprint
If we reconstruct back to back large versions, we need to drop the cache first to avoid doubling memory usage.
2010-08-05 16:17:17 -05:00
Matt Mackall
aa7e2a7659 verify: reduce memory footprint when unpacking files
By never holding a reference to the unpacked string, we avoid holding two
consecutive large files in memory.
2010-08-05 16:17:17 -05:00
Matt Mackall
6b7d6bea8c verify: report exceptions that don't have a str() method 2010-08-05 16:17:17 -05:00
Dan Villiom Podlaski Christiansen
7cf0dd907b qguard: label patch names by status when listing guards 2010-08-05 12:25:53 +02:00
Alecs King
f476a3469b merge: fix typo in docstring 2010-08-11 20:16:22 +08:00
Alecs King
00c728120d check-code: add exit status
so that we can use it in a shell command combination and/or in hg hooks.
2010-08-12 16:42:41 +08:00
Christian Ebert
9630f5d2e1 test-patch.t: typos 2010-08-12 09:40:48 +01:00
Nicolas Dumazet
051d3b42b9 tests: unify test-alias 2010-08-12 23:46:56 +09:00
Nicolas Dumazet
982d395a50 tests: unify test-parents 2010-08-12 23:27:32 +09:00
Nicolas Dumazet
a364338fdc tests: merge all 4 test-symlink* into test-symlinks 2010-08-12 23:22:25 +09:00
Nicolas Dumazet
95a8a36574 tests: unify test-symlink-root 2010-08-12 23:02:12 +09:00
Nicolas Dumazet
c560636951 tests: unify test-symlink-basic 2010-08-12 23:00:36 +09:00
Nicolas Dumazet
801c0daa61 tests: unify test-symlink-addremove 2010-08-12 22:58:46 +09:00
Nicolas Dumazet
d6a2a4a2c9 tests: unify test-qimport-eol 2010-08-12 22:57:06 +09:00
Nicolas Dumazet
471c4cf4cf tests: unify test-import 2010-08-12 22:54:41 +09:00
Adrian Buehlmann
6a1422f607 tests: unify test-clone 2010-08-10 13:21:28 +02:00
Nicolas Dumazet
3b18bed439 tests: unify test-copy 2010-08-12 22:31:40 +09:00
Nicolas Dumazet
ccfb72c083 tests: unify test-commit-unresolved 2010-08-12 22:28:21 +09:00
Nicolas Dumazet
ec59bd6b58 unify test-commit-copy 2010-08-12 22:24:13 +09:00
Nicolas Dumazet
557c241888 tests: unify test-commit 2010-08-12 22:22:17 +09:00
Nicolas Dumazet
2f67722fbe tests: unify test-committer 2010-08-12 22:19:59 +09:00
Nicolas Dumazet
6e81695eb4 tests: unify test-transplant 2010-08-12 22:14:19 +09:00
Nicolas Dumazet
374b7abbbe tests: unify test-walk 2010-08-12 21:52:53 +09:00
Nicolas Dumazet
a2e261b3b3 tests: unify test-symlinks 2010-08-12 20:08:02 +09:00
Nicolas Dumazet
5f6ee46e39 tests: unify test-conflict 2010-08-12 20:02:59 +09:00
Nicolas Dumazet
8242afcae6 tests: unify test-identify 2010-08-12 19:49:58 +09:00
Nicolas Dumazet
582515a1a6 tests: unify test-add 2010-08-12 19:43:45 +09:00
Nicolas Dumazet
39fada51ff tests: remove useless sed in test-hook 2010-08-12 19:40:22 +09:00
Nicolas Dumazet
fdbcb407cb tests: unify test-hook 2010-08-12 19:38:31 +09:00
Nicolas Dumazet
2f73e7a983 tests: unify test-flags 2010-08-12 19:10:57 +09:00
Nicolas Dumazet
96827d742a repair: do not compress partial bundle if we do not keep it on disk
A partial bundle is created to temporarily save revisions > rev but
not descending from the node to strip, to be able to restore the
changesets after stripping the changelog.
Since this bundle is not kept after the strip operation, and is not
user-visible, it is not necessary and should be faster to avoid
compression.
2010-08-12 16:53:23 +09: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
Matt Mackall
45ca4e347d color: fix test-diff-color breakage 2010-08-04 13:21:11 -05:00
Brodie Rao
0f7e715bdb hgcia/color: remove star imports
This plays nicer with demandimport and allows pyflakes to detect undefined
names.
2010-08-03 13:02:11 -04:00