# HG changeset patch # User Benoit Boissinot # Date 2008-11-27 00:35:12 # Node ID c4ce828e8074c51633ceaf21078e8d2696d0a4d2 # Parent df0962f6c54e4578eac4482e83dad873eb6d86c7 # Parent 642754e776e22935e4a7e6fcf2f009871abb30a6 merge with mpm diff --git a/contrib/buildrpm b/contrib/buildrpm --- a/contrib/buildrpm +++ b/contrib/buildrpm @@ -3,9 +3,16 @@ # Build a Mercurial RPM in place. # Known to work on: # - Fedora 9 +# - Fedora 10 # # Bryan O'Sullivan +if hg --version > /dev/null 2>&1; then : +else + echo 'hg command not available!' 1>&2 + exit 1 +fi + root="`hg root 2>/dev/null`" specfile=contrib/mercurial.spec diff --git a/contrib/mercurial.spec b/contrib/mercurial.spec --- a/contrib/mercurial.spec +++ b/contrib/mercurial.spec @@ -55,9 +55,6 @@ lisp_dir=$RPM_BUILD_ROOT%{_datadir}/emac mkdir -p $lisp_dir install contrib/mercurial.el $lisp_dir -# We don't want this, do we? -rm -f $RPM_BUILD_ROOT%{pythonlib}/../mercurial-*-py2.5.egg-info - %clean rm -rf $RPM_BUILD_ROOT @@ -74,5 +71,6 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/hg-viz %{_bindir}/git-rev-tree %{_bindir}/mercurial-convert-repo +%{_libdir}/python%{pythonver}/site-packages/%{name}-*-py2.5.egg-info %{pythonlib} %{hgext} diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -607,7 +607,7 @@ def matcher(canonroot, cwd='', names=[], if inc: dummy, inckinds, dummy = normalizepats(inc, 'glob') incmatch = matchfn(inckinds, '(?:/|$)') - excmatch = lambda fn: False + excmatch = never if exc: dummy, exckinds, dummy = normalizepats(exc, 'glob') excmatch = matchfn(exckinds, '(?:/|$)') diff --git a/mercurial/util_win32.py b/mercurial/util_win32.py --- a/mercurial/util_win32.py +++ b/mercurial/util_win32.py @@ -245,7 +245,7 @@ def system_rcpath_win32(): def user_rcpath_win32(): '''return os-specific hgrc search path to the user dir''' userdir = os.path.expanduser('~') - if sys.getwindowsversion() != 2 and userdir == '~': + if sys.getwindowsversion()[3] != 2 and userdir == '~': # We are on win < nt: fetch the APPDATA directory location and use # the parent directory as the user home dir. appdir = shell.SHGetPathFromIDList( diff --git a/tests/hghave b/tests/hghave --- a/tests/hghave +++ b/tests/hghave @@ -154,6 +154,9 @@ def has_pygments(): except ImportError: return False +def has_outer_repo(): + return matchoutput('hg root 2>&1', r'') + checks = { "baz": (has_baz, "GNU Arch baz client"), "bzr": (has_bzr, "Canonical's Bazaar client"), @@ -169,6 +172,7 @@ checks = { "inotify": (has_inotify, "inotify extension support"), "lsprof": (has_lsprof, "python lsprof module"), "mtn": (has_mtn, "monotone client (> 0.31)"), + "outer-repo": (has_outer_repo, "outer repo"), "pygments": (has_pygments, "Pygments source highlighting library"), "svn": (has_svn, "subversion client and admin tools"), "svn-bindings": (has_svn_bindings, "subversion python bindings"), diff --git a/tests/test-convert-svn-sink b/tests/test-convert-svn-sink --- a/tests/test-convert-svn-sink +++ b/tests/test-convert-svn-sink @@ -1,6 +1,6 @@ #!/bin/sh -"$TESTDIR/hghave" svn svn-bindings || exit 80 +"$TESTDIR/hghave" svn svn-bindings no-outer-repo || exit 80 fixpath() { diff --git a/tests/test-dispatch b/tests/test-dispatch --- a/tests/test-dispatch +++ b/tests/test-dispatch @@ -1,6 +1,8 @@ #!/bin/sh # test command parsing and dispatch +"$TESTDIR/hghave" no-outer-repo || exit 80 + hg init a cd a echo a > a diff --git a/tests/test-extension b/tests/test-extension --- a/tests/test-extension +++ b/tests/test-extension @@ -1,6 +1,8 @@ #!/bin/sh # Test basic extension support +"$TESTDIR/hghave" no-outer-repo || exit 80 + cat > foobar.py < a diff --git a/tests/test-glog b/tests/test-glog --- a/tests/test-glog +++ b/tests/test-glog @@ -70,6 +70,8 @@ # |/ # o (0) root +"$TESTDIR/hghave" no-outer-repo || exit 80 + set -e commit() diff --git a/tests/test-hgweb b/tests/test-hgweb --- a/tests/test-hgweb +++ b/tests/test-hgweb @@ -31,7 +31,7 @@ echo % should give a 404 - file does not "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw' echo % stop and restart -kill `cat hg.pid` +"$TESTDIR/killdaemons.py" hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log cat hg.pid >> $DAEMON_PIDS # Test the access/error files are opened in append mode diff --git a/tests/test-hgweb-diffs b/tests/test-hgweb-diffs --- a/tests/test-hgweb-diffs +++ b/tests/test-hgweb-diffs @@ -20,7 +20,7 @@ echo % diff removed file "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' echo % set up hgweb with git diffs -kill `cat hg.pid` +"$TESTDIR/killdaemons.py" hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log cat hg.pid >> $DAEMON_PIDS