ui: edit(): transplant: set HGREVISION environment variable for an editor
transplant command set 'transplant_source' extra for the revision.
Allow an editor to access the extra using HGREVISION environment variable.
This may be useful when an editor is actually a script which modifies a commit
message. Transplant filters is an alternative way to do it.
ui: edit(): rebase, graft: set HGREVISION environment variable for an editor
rebase and graft commands set 'rebase_source' or 'source' extras for the revision.
Allow an editor to access the extras using HGREVISION environment variable.
This may be useful when an editor is actually a script which modifies a commit
message.
The name 'HGREVISION' has been selected as transplant already sets this variable
for its filters (--filter).
ui: allow edit() to work with revision extras
Make edit() to accept optional 'extra' dictionary. Revision extras will be
used in upcoming patches to set some environment variables.
tests: glob match has a glob character for not getting a warning on windows
When / matches on / on windows, and there is no other glob character, this
results in a warning. Avoid this by using an other glob character.
run-tests: fixed warn detection on failures with too many output
The state "warned" was reported too often. The problem fixed here is that
warnonly was only reset when a line did not match. When there was a line too
much, warnonly remained set.
Fix this by setting more states to warnonly.
More negative testing (testing on result "Failed") has been done this time.
run-tests: fixed warn detection on detecting warn only for lines
The state "warned" was reported too often. The main problem was that
"False == 0" is true in python. Therefore use an empty string instead of 0
for reporting warn only for a line.
The other problem is fixed in the next patch.
obsolete: extract encoding of marker for pushkey from the list key function
We now have a function taking a list and marker and returning an encoded
version. This will allow obsolescence marker exchange experimentation to easily
pushkey-encode markers to be pushed after selection.
solaris: diff -u emits "No differences encountered"
Solaris diff -u isn't silent when two files are identical, and tests that
don't account for that will fail. Fix those tests, and introduce a check
that prevents reintroduction.
rebase: do not raise an UnboundLocalError when called wrong (
issue4106)
When the base is not found, we should not raise a traceback about a not defined
variable. This hides the real problem: the function rebasenode was (probably)
called wrong.
An AssertionError is raised to highlight that the caller of the function did
something wrong.
An alternative approach is to only assign None to the variable "base" and let
the merge mechanism raise an abort message. This was the behaviour for this
case before
ad9db007656f. But the only known case for this problem is when an
extension calls this function wrong. An AssertionError makes this clearer than
an abort message. When a different case is detected, the behaviour can be
improved then.