fold: overhaul handling of revisions with --rev (BC)
The fold command parsed the revision arguments in a very peculiar and
idiosyncratic fashion: if revisions were passed without a --rev
argument, then they would all be extended to ".", but if they were
passed with --rev, then no extension would happen. Passing revisions
both with and without --rev would abort. This is inconsistent with the
way all other hg commands parse revision arguments. We have several
examples of command where several revisions are passed, and the --rev
option is optional for specifying those revisions (update, strip,
export).
This patch alters the way in which fold parses its revision arguments.
No distinction is made between revisions passed with or without the
--rev argument. Regardless if a single or multiple revision is
specified, all will be folded together into the parent of the working
directory. If the --exact argument is passed, then the parent of the
working directory is ignored and the specified revisions must be a
single contiguous line.
The docstring and tests are modified accordingly.
#!/usr/bin/make -f
clean %:
dh $@ --with python2 --buildsystem=python_distutils
build:
dh build --with python2 --buildsystem=python_distutils
$(MAKE) -C docs
ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
cd tests && python run-tests.py --with-hg=`which hg`
endif
override_dh_python2:
# avoid conflict with mercurial's own hgext/__init__.py
find debian -name __init__.py -delete
dh_python2
clean: clean-docs
clean-docs:
rm -rf html
rm -f docs/static/logo-evolve.ico
rm -f docs/tutorials/tutorial.rst
.PHONY: build clean clean-docs