convert/svn: do not try converting empty head revisions (
issue3347)
Subversion conversion works by picking trunk and branches heads, computing a
revision graph from them and converting the selected commits. By design we fail
to convert empty revisions so we have to be careful when discovering the
revision graph. In this particular issue, the source svn repository was a
partial mirror made by svnsync. The funny part is svnsync preserves all
revisions including empty ones. Also, we trusted ra.stat(path,
stop).created_rev to give us the latest revision with changes in path history
up to stop. This assumption broke at least when path is '', that is the
repository root, which always returned 'stop' revision despited being empty.
The workaround is to first trust ra.stat() but if the returned revision appear
empty, search the whole path history from stop to r1 until some changes are
found.
convert/svn: refactor svn_source.latest() with a nested function
We will call it more than once for reasons detailed later.
convert/svn: clarify svn_source.latest() stop arg default value
stop=0 could pass for a valid default value at first sight.
factotum: rename mount and path configuration entries
The factotum extension used mount and path entries which were too
generic. These have been replaced by mountpoint and executable
(respectively) to match existing conventions.
Added signature for changeset
d9e2f09d5488
Added tag 2.2-rc for changeset
d9e2f09d5488
Makefile: be more careful when cleaning up pure/ components
The recent introduction of pure/__init__.py causes
mercurial/__init__.py to get clobbered by make clean.
commit: add option to amend the working dir parent
The --amend flag can be used to amend the parent of the working directory
with a new commit that contains the changes in the parent in addition to
those currently reported by "hg status", if there are any. The old commit
is stored in a backup bundle in ".hg/strip-backup"(see "hg help bundle"
and "hg help unbundle" on how to restore it).
Message, user and date are taken from the amended commit unless specified.
When a message isn't specified on the command line, the editor will open
with the message of the amended commit.
It is not possible to amend public changesets (see "hg help phases") or
changesets that have children.
Behind the scenes, first commit the update (if there is one) as a regular
child of the current parent. Then create a new commit on the parent's
parent with the updated contents. Then change the working copy parent
to this new combined changeset. Finally, strip the amended commit and
update commit created in the beginning.
An alternative (cleaner?) approach of doing this is suggested here:
http://selenic.com/pipermail/mercurial-devel/2012-March/038540.html
It is currently not possible to amend merge commits or recursively,
this can be added at a later time.
journal: use tryread helper to backup files (
issue3375)
opener: introduce tryread helper
This makes it easier to follow the common pattern "read a file or give
an empty string if it's missing".
revset: make matching() work on python 2.4
tuple.index() was apparently added to python 2.6:
http://bugs.python.org/
issue1696444
Also remove a trailing comma to make check-code.py happy.
revset: use list instead of tuple for compatibility with python before 2.6
'string elements'.split() instead of explicitly typing a list of strings is
used. This is done in other parts of Mercurial code, too.