- 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)
- 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
- give detailed dumps of .hgtags and localtags content
- repeat some query operations to expose cache bugs
- ensure that rollback/strip undo tagging operations
- 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)
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.
The previous branch heads cache implementation iterated all ancestors
for each new revision in the repository, causing a massive slowdown on
cloning larger repositories.
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.
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.
- 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.
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.
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.