revset: drop magic of fullreposet membership test (
issue4682)
This patch partially backs out
d2de20e1451f and adds an alternative workaround
to functions that evaluate "null" and "wdir()". Because the new workaround is
incomplete, "first(null)" and "min(null)" don't work as expected. But they were
not usable until 3.4 and "null" isn't commonly used, we can postpone a complete
fix for 3.5.
The
issue4682 was caused because "branch(default)" is evaluated to
"<filteredset <fullreposet>>", keeping fullreposet magic. The next patch will
fix crash on "branch(null)", but without this patch, it would make
"null in <branch(default)>" be True, which means "children(branch(default))"
would return all revisions but merge (p2 != null).
I believe the right fix is to stop propagating fullreposet magic on filter(),
but it wouldn't fit to stable release. Also, we should discuss how to handle
"null" and "wdir()" in revset before.
transaction: use the proper variable in '_addbackupentry' (
issue4684)
The 'file' variable was undefined but resolved to the 'file' built-in.
This is why pylint complains about overwriting built-ins...
run-tests: python3.5 now supports mkdtemp using bytes for paths
Now that http://bugs.python.org/
issue24230 is fixed (thanks to Gregory
Smith for that quick response!) we can drop one more ugly hack around
path handling. Tests still pass in 3.5 with this cleaner version, as
well as in 2.6.
run-tests: use items() instead of iteritems()
This fixes the python3.5 build. We'll presumably want to build our own
helper function or use 2to3 for this on the main source tree, but for
run-tests we want a single-source version that works in 2.6 and 3.5.
selve: make 'shelve --interactive' not experimental
It is safe to do as 'shelve -i' uses the same code path as 'commit -i' that is
not experimental.
revert: fix edition of newly added file during --interactive
Before this patch: editing hunks of newly added file when performing a revert
--interactive had no effect: the edits were discarded.
After this patch, the edits are taken into account.
revert: make revert --interactive use git style diff
This allows us to use existing code to detect files that are newly added and
modified. In turn, this allows us to make revert --interactive support
editing newly added and modified files.
record: extract code to compute newly added and modified files
We want to reuse this logic in revert.
record: extract ishunk to a function
We extract this code as we want to reuse it in revert -i.