Commit Graph

9118 Commits

Author SHA1 Message Date
Greg Ward
310d950984 localrepo: improve readability of _findtags(), readtags() (issue548).
- rename many local variables
- add some comments
- refactor call to line.split() (catch ValueError rather
  than checking length of return value: one less local variable)
2009-07-16 10:39:41 -04:00
Greg Ward
37b1525e95 localrepo: rename in-memory tag cache instance attributes (issue548).
- self.tagscache to self._tags
- self._tagstypecache to self._tagtypes
- this is for consistency, readability, privacy, and to subtly hint
  that "caching" is something else
2009-07-16 10:39:41 -04:00
Greg Ward
b0c72fe36d localrepo: factor _findtags() out of tags() (issue548).
This makes in-memory caching the sole responsibility of localrepo,
eliminating some localrepo code that was duplicated in mq and
bookmarks.
2009-07-16 10:39:41 -04:00
Greg Ward
2b8c820086 test-tags: enhance the test to probe tag caching better (issue548).
- give detailed dumps of .hgtags and localtags content
- repeat some query operations to expose cache bugs
- ensure that rollback/strip undo tagging operations
2009-07-16 10:39:41 -04:00
Greg Ward
da88b2b09f test-tags: clarify test output; simplify test script a bit (issue548).
- use simpler way ('hg id') to get current changeset id
- add 'echo' statements to guide the eye when reading output
- add some more output to clarify the state of .hgtags
- drop '-d' option from every commit/tag, since run-tests.py
  does this (although with a different timestamp, so changeset
  ids differ)
2009-07-16 10:39:41 -04:00
Martin Geisler
a2bda0adf6 merge with crew-stable 2009-07-15 17:44:47 +02:00
Brendan Cully
a36fa86497 Merge with crew-stable 2009-07-14 18:00:37 -07:00
Brendan Cully
18e0d452d0 Merge with bos 2009-07-14 17:59:36 -07:00
Brendan Cully
2c53914f62 Fix issue1738 for strip too.
I see no reason to open every touched file at once.
2009-07-14 17:58:36 -07:00
Bryan O'Sullivan
b58896628b Merge with crew-stable 2009-07-14 17:21:10 -07:00
Bryan O'Sullivan
e538c31828 setup.py: don't pollute the current directory with temporary files 2009-07-14 17:18:45 -07:00
Brendan Cully
330d2aecf7 Merge with crew-stable 2009-07-14 16:51:52 -07:00
Brendan Cully
31a596d574 Make patch.diff filelog cache LRU of 20 files. Fixes issue1738.
20 files is as fast as 200 for hg diff -r 28015:30103 of mozilla-central.
Ideally we'd use util.lrucachefunc, but the interface doesn't quite work.
2009-07-14 16:50:37 -07:00
Martin Geisler
8dd29286a5 merge with mpm 2009-07-15 00:24:20 +02:00
Martin Geisler
19770adfb7 merge with crew-stable 2009-07-15 00:19:15 +02:00
Wagner Bruna
1dc5d9c774 url: fix use of non-int port in https connections via proxy
Complements aaf0c304ea93 (issue1725).
2009-07-14 17:12:12 -03:00
Matt Mackall
131772ffaa Merge with stable 2009-07-14 12:18:22 -05:00
Nicolas Dumazet
5335f5c399 inotify: server: explicitely ignore events in subdirs of .hg/ (issue1735) 2009-07-13 21:55:17 +09:00
Nicolas Dumazet
2645ee079e inotify: fix issue1375, add a test.
The biggest problem was the data structure, which did not allow changing
a file into a directory or vice versa. This problem is fixed by 47d29dcb7266.

The walk() method also had an issue in this case:
 - we know 'path' as a directory. inotify server sleeps.
 - 'path' is deleted
 - 'path' is recreated as a file
 - the server catches up here, and see the deletion. it instantiates a scan(),
   which in its turn calls for walk(repo, path).
 - walk() then assumes that 'path' is a directory and calls os.listdir on it,
   which raises an OSError(errno.ENOTDIR)

Catch the error, and yield the file instead of the directory contents.
2009-07-13 16:49:05 +02:00
Greg Ward
d19641671c test-fetch: fix non-portable sed regex.
(s/...\+/.../ appears to be a GNU-ism: this test broke on OS X and
NetBSD.  Changing \+ to * fixes it, although that is a slightly less
strict regex.)
2009-07-12 22:33:00 -04:00
Henrik Stuart
180b39fb48 branch heads: optimise computation of branch head cache (issue1734)
The previous branch heads cache implementation iterated all ancestors
for each new revision in the repository, causing a massive slowdown on
cloning larger repositories.
2009-07-13 20:19:17 +02:00
Nicolas Dumazet
7eadbe8d42 for calls expecting bool args, pass bool instead of int
str.splitlines and email.message.as_string both expect a bool argument
defaulting at False: replace f(1) by f(True) and f(0) by f()
2009-07-13 09:50:26 +09:00
Benoit Boissinot
05983b6745 merge with -stable 2009-07-14 20:24:16 +02:00
Martin Geisler
bfee32e919 merge with crew-stable 2009-07-14 20:10:23 +02:00
Steve Borho
afad34fc2e cmdutil: fall back to filename if glob expand has errors
On Windows, Mercurial tries to glob expand provided filenames as a
convenience to the user. Unfortunately, there are valid filenames
which are not valid glob patterns.  In those cases, we should fallback
to the original provided filename.
2009-07-12 00:46:43 -05:00
Martin Geisler
28849f18ea gitweb, monoblue: fix double-spacing in file view (issue1733)
The error was introduced in 8cf9eb8de652.
2009-07-12 21:37:24 +02:00
Cédric Duval
ba6555759d gendoc: fall back to pure modules if C extensions are not available (issue1711) 2009-07-10 19:45:31 +02:00
James Abbatiello
0d7eb15222 Don't copy hidden files/directories during setup.py install
This is useful if a copy of Mercurial is stored in a Subversion repository
so that the .svn directories don't get copied.
2009-07-14 22:42:05 -04:00
Dan Villiom Podlaski Christiansen
dcd26b5a01 commands: hide deprecated commands.
A command is considered deprecated if the word "DEPRECATED" is found
in the doc string. Such commands are hidden from non-verbose help.
2009-07-10 13:40:25 +02:00
Henri Wiechers
65cbcd91fd hgignore.5.txt: improved description of matching
Improved the description of the matching behavior used with .hgignore.
Made some minor language improvements.
2009-07-12 07:56:43 +02:00
Henrik Stuart
6360c8356c url: fix use of non-int port in https connections (issue1725)
Versions of Python before 2.6 cannot automatically convert a given
port number to an integer, so we add a conversion to coerce the given
input to an int.
2009-07-08 18:35:13 +02:00
Matt Mackall
f5635aa406 filectx: add a hex method 2009-07-06 14:52:44 -05:00
Shun-ichi GOTO
8edf72da29 win32mbcs: also wrap windows.pconvert() 2009-07-09 22:06:30 +09:00
Shun-ichi GOTO
e9a5aa00b3 Use os.path.split() for MBCS with win32mbcs extension. 2009-07-09 21:39:19 +09:00
Brodie Rao
fef8ccb4a7 win32mbcs: look up modules using sys.modules (issue1729)
globals()[module] doesn't work for modules inside of packages, such as
os.path.
2009-07-08 09:48:48 -04:00
Matt Mackall
e3dc8aa6db fix memory usage of revlog caches by limiting cache size [issue1639] 2009-07-09 17:10:07 -05:00
Christian Ebert
13a3dfdc8e keyword: eliminate potential reference cycles from kwrepo
- delete kwrepo.commitctx after using the tweaked version
- prefer self.hook over repo.hook to avoid nesting

Also pass arguments to commit as arbitrary list.

Thanks to Simon Heimberg and Matt Mackall for guidance.
2009-07-09 11:59:12 +02:00
Greg Ward
e4f07e8a14 convert/cvs: improve error message on unexpected server output. 2009-07-08 22:08:45 -04:00
Henrik Stuart
2108f47c49 transaction: fix uncaught ENOENT (issue1724)
The opener raises an IOError on errors where transaction expects an
OSError.
2009-07-07 19:24:52 +02:00
Henrik Stuart
a44e9f8977 branch heads: fix regression introduced in 084c96645721 (issue1726)
For merge nodes it is not adequate to only check a single possible
branch head for whether it is an ancestor of the latest head, but it
needs to be done for each possible branch head.
2009-07-09 20:49:02 +02:00
Martin Geisler
2f4412b3b9 util: remove unused bufsize argument
Removed it correctly this time: the subprocess default is 0, not -1
and so we must pass -1 explicitly. Added a comment to that effect.
2009-07-09 11:59:18 +02:00
Bryan O'Sullivan
6ba3698e94 Merge backed out change 2009-07-08 17:03:16 -07:00
Bryan O'Sullivan
b467399b6f Backed out changeset 6a565336bae3: it caused a 5x performance regression on OS X 2009-07-08 17:01:18 -07:00
David Champion
08998d553f Bourne shells do not maintain $PWD; update tests accordingly 2009-07-07 01:25:44 +02:00
Brodie Rao
930e73d10f tests: remove more instances of export FOO=bar bashism 2009-07-05 18:52:55 -04:00
David Wolever
638caa9499 help: add #revision syntax to the example valid URLs. 2009-07-04 12:40:34 +02:00
Cédric Duval
044fa1649f gendoc: fix localization of help topic
When a topic provides a callable method for its text, most likely
this text will be generated from different parts, so it does not
make sense to apply gettext on the whole result, rather the method
should provide translation by itself.

This is the case with the extensions topic, which triggers a double
gettext call, making the ASCII codec fail when it encounters 8 bit
characters, and prevents the documentation from being built.
2009-07-04 12:12:36 +02:00
Henrik Stuart
77301ebe8e acl: read correct index into url for username (issue298)
The index was inadvertedly off-by-one causing the username to be the
remote host rather than the remote user when hosted in a http(s)
session.
2009-07-02 19:53:20 +02:00
Matt Mackall
4b358d20f9 Added signature for changeset 98c546a7028c 2009-07-01 16:47:46 -05:00
Matt Mackall
0b5fb7a5ab Merge with i18n 2009-07-01 13:57:01 -05:00