##// END OF EJS Templates
revlog: skeleton support for version 2 revlogs...
revlog: skeleton support for version 2 revlogs There are a number of improvements we want to make to revlogs that will require a new version - version 2. It is unclear what the full set of improvements will be or when we'll be done with them. What I do know is that the process will likely take longer than a single release, will require input from various stakeholders to evaluate changes, and will have many contentious debates and bikeshedding. It is unrealistic to develop revlog version 2 up front: there are just too many uncertainties that we won't know until things are implemented and experiments are run. Some changes will also be invasive and prone to bit rot, so sitting on dozens of patches is not practical. This commit introduces skeleton support for version 2 revlogs in a way that is flexible and not bound by backwards compatibility concerns. An experimental repo requirement for denoting revlog v2 has been added. The requirement string has a sub-version component to it. This will allow us to declare multiple requirements in the course of developing revlog v2. Whenever we change the in-development revlog v2 format, we can tweak the string, creating a new requirement and locking out old clients. This will allow us to make as many backwards incompatible changes and experiments to revlog v2 as we want. In other words, we can land code and make meaningful progress towards revlog v2 while still maintaining extreme format flexibility up until the point we freeze the format and remove the experimental labels. To enable the new repo requirement, you must supply an experimental and undocumented config option. But not just any boolean flag will do: you need to explicitly use a value that no sane person should ever type. This is an additional guard against enabling revlog v2 on an installation it shouldn't be enabled on. The specific scenario I'm trying to prevent is say a user with a 4.4 client with a frozen format enabling the option but then downgrading to 4.3 and accidentally creating repos with an outdated and unsupported repo format. Requiring a "challenge" string should prevent this. Because the format is not yet finalized and I don't want to take any chances, revlog v2's version is currently 0xDEAD. I figure squatting on a value we're likely never to use as an actual revlog version to mean "internal testing only" is acceptable. And "dead" is easily recognized as something meaningful. There is a bunch of cleanup that is needed before work on revlog v2 begins in earnest. I plan on doing that work once this patch is accepted and we're comfortable with the idea of starting down this path.

File last commit:

r32228:feb910d2 default
r32697:19b9fc40 default
Show More
mercurial.spec
162 lines | 4.6 KiB | text/x-rpm-spec | RPMSpecLexer
Mads Kiilerich
buildrpm: collect code for building local hg and using it in one place
r21639 %global emacs_lispdir %{_datadir}/emacs/site-lisp
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436
%define withpython %{nil}
%if "%{?withpython}"
%global pythonver %{withpython}
%global pythonname Python-%{withpython}
Mads Kiilerich
contrib: update build defaults to latest Python and docutils versions...
r23140 %global docutilsname docutils-0.12
Mads Kiilerich
contrib: buildrpm checking of md5 checksums of downloaded Python and Docutils
r23141 %global docutilsmd5 4622263b62c5c771c03502afa3157768
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 %global pythonhg python-hg
Mads Kiilerich
rpms: for packages with their own python, put it in /opt/python-hg...
r24729 %global hgpyprefix /opt/%{pythonhg}
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 # byte compilation will fail on some some Python /test/ files
%global _python_bytecompile_errors_terminate_build 0
%else
Mads Kiilerich
buildrpm: collect code for building local hg and using it in one place
r21639 %global pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))')
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 %endif
Mads Kiilerich
mercurial.spec: specify file modes for install
r12056 Summary: A fast, lightweight Source Control Management system
mpm@selenic.com
Add an RPM spec file...
r459 Name: mercurial
Matt Mackall
Remove hard-coded version numbers and release notes from packaging
r3863 Version: snapshot
Thomas Arendsen Hein
New version/release in mercurial.spec, patchbomb is now in hgext.
r1891 Release: 0
Matt Mackall
Update license to GPLv2+
r10263 License: GPLv2+
mpm@selenic.com
Add an RPM spec file...
r459 Group: Development/Tools
Matt Mackall
urls: bulk-change primary website URLs
r26421 URL: https://mercurial-scm.org/
Mads Kiilerich
buildrpm: include release version in .tar.gz name...
r21641 Source0: %{name}-%{version}-%{release}.tar.gz
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 %if "%{?withpython}"
Source1: %{pythonname}.tgz
Source2: %{docutilsname}.tar.gz
%endif
Mads Kiilerich
Fix rpmlint warnings...
r7424 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
mpm@selenic.com
Add an RPM spec file...
r459
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 BuildRequires: make, gcc, gettext
%if "%{?withpython}"
BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel
%else
Gregory Szorc
setup: drop support for Python 2.6 (BC)...
r32228 BuildRequires: python >= 2.7, python-devel, python-docutils >= 0.5
Requires: python >= 2.7
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 %endif
Mads Kiilerich
mercurial.spec: Alignment with AIX spec by Jim Hague...
r10255 # The hgk extension uses the wish tcl interpreter, but we don't enforce it
#Requires: tk
julian@lava.net
mercurial.spec: add BuildRequires...
r4751
mpm@selenic.com
Add an RPM spec file...
r459 %description
Mercurial is a fast, lightweight source control management system designed
for efficient handling of very large distributed projects.
%prep
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436
%if "%{?withpython}"
%setup -q -n mercurial-%{version}-%{release} -a1 -a2
# despite the comments in cgi.py, we do this to prevent rpmdeps from picking /usr/local/bin/python up
sed -i '1c#! /usr/bin/env python' %{pythonname}/Lib/cgi.py
%else
Mads Kiilerich
buildrpm: include release version in .tar.gz name...
r21641 %setup -q -n mercurial-%{version}-%{release}
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 %endif
mpm@selenic.com
Add an RPM spec file...
r459
%build
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436
%if "%{?withpython}"
PYPATH=$PWD/%{pythonname}
cd $PYPATH
./configure --prefix=%{hgpyprefix}
make all %{?_smp_mflags}
cd -
cd %{docutilsname}
LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py build
cd -
# verify Python environment
LD_LIBRARY_PATH=$PYPATH PYTHONPATH=$PWD/%{docutilsname} $PYPATH/python -c 'import sys, zlib, bz2, ssl, curses, readline'
# set environment for make
export PATH=$PYPATH:$PATH
export LD_LIBRARY_PATH=$PYPATH
export CFLAGS="-L $PYPATH"
export PYTHONPATH=$PWD/%{docutilsname}
%endif
Adam Spiers
mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
r4753 make all
mpm@selenic.com
Add an RPM spec file...
r459
%install
Mads Kiilerich
Fix rpmlint warnings...
r7424 rm -rf $RPM_BUILD_ROOT
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436
%if "%{?withpython}"
PYPATH=$PWD/%{pythonname}
cd $PYPATH
make install DESTDIR=$RPM_BUILD_ROOT
# these .a are not necessary and they are readonly and strip fails - kill them!
rm -f %{buildroot}%{hgpyprefix}/lib/{,python2.*/config}/libpython2.*.a
cd -
cd %{docutilsname}
LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py install --root="$RPM_BUILD_ROOT"
cd -
PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/hg . )
( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/python2.? %{pythonhg} )
%else
Mads Kiilerich
contrib/mercurial.spec: Use DESTDIR variable and 'make install'
r11062 make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir}
Adam Spiers
mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
r4753
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 %endif
Mads Kiilerich
buildrpm: various minor cleanup
r21638 install -m 755 contrib/hgk $RPM_BUILD_ROOT%{_bindir}/
install -m 755 contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir}/
Adam Spiers
mercurial.spec: include various utility files from contrib/ in rpm...
r4752
bash_completion_dir=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
mkdir -p $bash_completion_dir
Mads Kiilerich
Make RPM spec in contrib more aligned with the one from Fedora...
r8942 install -m 644 contrib/bash_completion $bash_completion_dir/mercurial.sh
Adam Spiers
mercurial.spec: include various utility files from contrib/ in rpm...
r4752
zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
mkdir -p $zsh_completion_dir
Mads Kiilerich
Make RPM spec in contrib more aligned with the one from Fedora...
r8942 install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial
Adam Spiers
mercurial.spec: include various utility files from contrib/ in rpm...
r4752
Mads Kiilerich
Make RPM spec in contrib more aligned with the one from Fedora...
r8942 mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
Mads Kiilerich
buildrpm: various minor cleanup
r21638 install -m 644 contrib/mercurial.el $RPM_BUILD_ROOT%{emacs_lispdir}/
install -m 644 contrib/mq.el $RPM_BUILD_ROOT%{emacs_lispdir}/
Mads Kiilerich
Make RPM spec in contrib more aligned with the one from Fedora...
r8942
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
mpm@selenic.com
Add an RPM spec file...
r459
mpm@selenic.com
[PATCH] clean up RPM spec file...
r563 %clean
rm -rf $RPM_BUILD_ROOT
mpm@selenic.com
Add an RPM spec file...
r459
mpm@selenic.com
[PATCH] clean up RPM spec file...
r563 %files
%defattr(-,root,root,-)
Greg Lindahl
mercurial.spec: remove reference to doc/ja
r10664 %doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi
Mads Kiilerich
mercurial.spec: Alignment with AIX spec by Jim Hague...
r10255 %doc %attr(644,root,root) %{_mandir}/man?/hg*
Siddharth Agarwal
fedora: remove sample.hgrc from shipped files...
r22385 %doc %attr(644,root,root) contrib/*.svg
Mads Kiilerich
mercurial.spec: specify file modes for install
r12056 %dir %{_datadir}/zsh/
%dir %{_datadir}/zsh/site-functions/
Adam Spiers
mercurial.spec: include various utility files from contrib/ in rpm...
r4752 %{_datadir}/zsh/site-functions/_mercurial
Mads Kiilerich
mercurial.spec: specify file modes for install
r12056 %dir %{_datadir}/emacs/site-lisp/
Adam Spiers
mercurial.spec: include various utility files from contrib/ in rpm...
r4752 %{_datadir}/emacs/site-lisp/mercurial.el
Mads Kiilerich
mercurial.spec: Alignment with AIX spec by Jim Hague...
r10255 %{_datadir}/emacs/site-lisp/mq.el
Adam Spiers
mercurial.spec: include various utility files from contrib/ in rpm...
r4752 %{_bindir}/hg
%{_bindir}/hgk
%{_bindir}/hg-ssh
Mads Kiilerich
Make RPM spec in contrib more aligned with the one from Fedora...
r8942 %dir %{_sysconfdir}/bash_completion.d/
Mads Kiilerich
mercurial.spec: specify file modes for install
r12056 %config(noreplace) %{_sysconfdir}/bash_completion.d/mercurial.sh
Mads Kiilerich
Make RPM spec in contrib more aligned with the one from Fedora...
r8942 %dir %{_sysconfdir}/mercurial
%dir %{_sysconfdir}/mercurial/hgrc.d
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 %if "%{?withpython}"
%{_bindir}/%{pythonhg}
%{hgpyprefix}
%else
Mads Kiilerich
contrib/buildrpm: Support python 2.4 and 2.6
r8867 %if "%{?pythonver}" != "2.4"
%{_libdir}/python%{pythonver}/site-packages/%{name}-*-py%{pythonver}.egg-info
%endif
Mads Kiilerich
Make RPM spec in contrib more aligned with the one from Fedora...
r8942 %{_libdir}/python%{pythonver}/site-packages/%{name}
%{_libdir}/python%{pythonver}/site-packages/hgext
av6
rpms: add hgext3rd to mercurial.spec...
r28614 %{_libdir}/python%{pythonver}/site-packages/hgext3rd
Mads Kiilerich
buildrpm: introduce --withpython for building rpms that includes Python 2.7
r22436 %endif