##// END OF EJS Templates
merge with mpm
Benoit Boissinot -
r7433:c4ce828e merge default
parent child Browse files
Show More
@@ -3,9 +3,16 b''
3 # Build a Mercurial RPM in place.
3 # Build a Mercurial RPM in place.
4 # Known to work on:
4 # Known to work on:
5 # - Fedora 9
5 # - Fedora 9
6 # - Fedora 10
6 #
7 #
7 # Bryan O'Sullivan <bos@serpentine.com>
8 # Bryan O'Sullivan <bos@serpentine.com>
8
9
10 if hg --version > /dev/null 2>&1; then :
11 else
12 echo 'hg command not available!' 1>&2
13 exit 1
14 fi
15
9 root="`hg root 2>/dev/null`"
16 root="`hg root 2>/dev/null`"
10 specfile=contrib/mercurial.spec
17 specfile=contrib/mercurial.spec
11
18
@@ -55,9 +55,6 b' lisp_dir=$RPM_BUILD_ROOT%{_datadir}/emac'
55 mkdir -p $lisp_dir
55 mkdir -p $lisp_dir
56 install contrib/mercurial.el $lisp_dir
56 install contrib/mercurial.el $lisp_dir
57
57
58 # We don't want this, do we?
59 rm -f $RPM_BUILD_ROOT%{pythonlib}/../mercurial-*-py2.5.egg-info
60
61 %clean
58 %clean
62 rm -rf $RPM_BUILD_ROOT
59 rm -rf $RPM_BUILD_ROOT
63
60
@@ -74,5 +71,6 b' rm -rf $RPM_BUILD_ROOT'
74 %{_bindir}/hg-viz
71 %{_bindir}/hg-viz
75 %{_bindir}/git-rev-tree
72 %{_bindir}/git-rev-tree
76 %{_bindir}/mercurial-convert-repo
73 %{_bindir}/mercurial-convert-repo
74 %{_libdir}/python%{pythonver}/site-packages/%{name}-*-py2.5.egg-info
77 %{pythonlib}
75 %{pythonlib}
78 %{hgext}
76 %{hgext}
@@ -607,7 +607,7 b" def matcher(canonroot, cwd='', names=[],"
607 if inc:
607 if inc:
608 dummy, inckinds, dummy = normalizepats(inc, 'glob')
608 dummy, inckinds, dummy = normalizepats(inc, 'glob')
609 incmatch = matchfn(inckinds, '(?:/|$)')
609 incmatch = matchfn(inckinds, '(?:/|$)')
610 excmatch = lambda fn: False
610 excmatch = never
611 if exc:
611 if exc:
612 dummy, exckinds, dummy = normalizepats(exc, 'glob')
612 dummy, exckinds, dummy = normalizepats(exc, 'glob')
613 excmatch = matchfn(exckinds, '(?:/|$)')
613 excmatch = matchfn(exckinds, '(?:/|$)')
@@ -245,7 +245,7 b' def system_rcpath_win32():'
245 def user_rcpath_win32():
245 def user_rcpath_win32():
246 '''return os-specific hgrc search path to the user dir'''
246 '''return os-specific hgrc search path to the user dir'''
247 userdir = os.path.expanduser('~')
247 userdir = os.path.expanduser('~')
248 if sys.getwindowsversion() != 2 and userdir == '~':
248 if sys.getwindowsversion()[3] != 2 and userdir == '~':
249 # We are on win < nt: fetch the APPDATA directory location and use
249 # We are on win < nt: fetch the APPDATA directory location and use
250 # the parent directory as the user home dir.
250 # the parent directory as the user home dir.
251 appdir = shell.SHGetPathFromIDList(
251 appdir = shell.SHGetPathFromIDList(
@@ -154,6 +154,9 b' def has_pygments():'
154 except ImportError:
154 except ImportError:
155 return False
155 return False
156
156
157 def has_outer_repo():
158 return matchoutput('hg root 2>&1', r'')
159
157 checks = {
160 checks = {
158 "baz": (has_baz, "GNU Arch baz client"),
161 "baz": (has_baz, "GNU Arch baz client"),
159 "bzr": (has_bzr, "Canonical's Bazaar client"),
162 "bzr": (has_bzr, "Canonical's Bazaar client"),
@@ -169,6 +172,7 b' checks = {'
169 "inotify": (has_inotify, "inotify extension support"),
172 "inotify": (has_inotify, "inotify extension support"),
170 "lsprof": (has_lsprof, "python lsprof module"),
173 "lsprof": (has_lsprof, "python lsprof module"),
171 "mtn": (has_mtn, "monotone client (> 0.31)"),
174 "mtn": (has_mtn, "monotone client (> 0.31)"),
175 "outer-repo": (has_outer_repo, "outer repo"),
172 "pygments": (has_pygments, "Pygments source highlighting library"),
176 "pygments": (has_pygments, "Pygments source highlighting library"),
173 "svn": (has_svn, "subversion client and admin tools"),
177 "svn": (has_svn, "subversion client and admin tools"),
174 "svn-bindings": (has_svn_bindings, "subversion python bindings"),
178 "svn-bindings": (has_svn_bindings, "subversion python bindings"),
@@ -1,6 +1,6 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 "$TESTDIR/hghave" svn svn-bindings || exit 80
3 "$TESTDIR/hghave" svn svn-bindings no-outer-repo || exit 80
4
4
5 fixpath()
5 fixpath()
6 {
6 {
@@ -1,6 +1,8 b''
1 #!/bin/sh
1 #!/bin/sh
2 # test command parsing and dispatch
2 # test command parsing and dispatch
3
3
4 "$TESTDIR/hghave" no-outer-repo || exit 80
5
4 hg init a
6 hg init a
5 cd a
7 cd a
6 echo a > a
8 echo a > a
@@ -1,6 +1,8 b''
1 #!/bin/sh
1 #!/bin/sh
2 # Test basic extension support
2 # Test basic extension support
3
3
4 "$TESTDIR/hghave" no-outer-repo || exit 80
5
4 cat > foobar.py <<EOF
6 cat > foobar.py <<EOF
5 import os
7 import os
6 from mercurial import commands
8 from mercurial import commands
@@ -1,5 +1,7 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 "$TESTDIR/hghave" no-outer-repo || exit 80
4
3 hg init a
5 hg init a
4 cd a
6 cd a
5 echo a > a
7 echo a > a
@@ -70,6 +70,8 b''
70 # |/
70 # |/
71 # o (0) root
71 # o (0) root
72
72
73 "$TESTDIR/hghave" no-outer-repo || exit 80
74
73 set -e
75 set -e
74
76
75 commit()
77 commit()
@@ -31,7 +31,7 b' echo % should give a 404 - file does not'
31 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw'
31 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw'
32
32
33 echo % stop and restart
33 echo % stop and restart
34 kill `cat hg.pid`
34 "$TESTDIR/killdaemons.py"
35 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
35 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
36 cat hg.pid >> $DAEMON_PIDS
36 cat hg.pid >> $DAEMON_PIDS
37 # Test the access/error files are opened in append mode
37 # Test the access/error files are opened in append mode
@@ -20,7 +20,7 b' echo % diff removed file'
20 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
20 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
21
21
22 echo % set up hgweb with git diffs
22 echo % set up hgweb with git diffs
23 kill `cat hg.pid`
23 "$TESTDIR/killdaemons.py"
24 hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
24 hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
25 cat hg.pid >> $DAEMON_PIDS
25 cat hg.pid >> $DAEMON_PIDS
26
26
General Comments 0
You need to be logged in to leave comments. Login now