view Makefile @ 889:7a98fbadcae9

revsets: huge speedups for fromsvn and svnrev I have a hgsubversion repo that contains over 300,000 commits. In that repo, this patch improves performance as follows: hg --time log -r 'first(fromsvn())' Before: 40.3 sec After: 0.8 sec hg --time log -r 'svnrev(350000)' Before: 40.3 sec After: 0.1 sec Note: the performance of these revset implementations is very sensitive to doing as little work as possible per line of the rev_map file. I originally attempted to hide the file format details by hoisting the parsing of each line up into RevMap.readmapfile, but the current less abstract code is dramatically (10x or more) faster. If the revmap file is missing, we error out and print a message describing what to do.
author Bryan O'Sullivan <bryano@fb.com>
date Sat, 12 May 2012 05:38:34 -0700
parents 055f9254d790
children
line wrap: on
line source

# Makefile for testing hgsubversion

PYTHON=python

.PHONY: all check check-demandimport check-subvertpy check-swig

all:
	@echo "Use the following commands to build and install hgsubversion:"
	@echo
	@echo "$$ cd $(PWD)"
	@echo "$$ $(PYTHON) ./setup.py install"
	@echo
	@exit 1

check: check-demandimport check-subvertpy check-swig

check-demandimport:
	# verify that hgsubversion loads properly without bindings, but fails
	# when actually used
	! LC_ALL=C HGSUBVERSION_BINDINGS=none HGRCPATH=/dev/null \
	  hg --config extensions.hgsubversion=./hgsubversion \
	  version 2>&1 \
	  | egrep '(^abort:|failed to import extension)'
	LC_ALL=C HGSUBVERSION_BINDINGS=none HGRCPATH=/dev/null \
	  hg --config extensions.hgsubversion=./hgsubversion \
	  version --svn 2>&1 \
	  | egrep '(^abort:|failed to import extension)'

check-subvertpy:
	$(PYTHON) tests/run.py --all --bindings=subvertpy

check-swig:
	$(PYTHON) tests/run.py --all --bindings=swig