Mercurial > hg
view contrib/mercurial.spec @ 5378:8a2915f57dfc
convert: add a mode where mercurial_sink skips empty revisions.
The getchanges function of some converter_source classes can return
some false positives. I.e. they sometimes claim that a file "foo"
was changed in some revision, even though its contents are still the
same.
convert_svn is particularly bad, but I think this can also happen with
convert_cvs and, at least in theory, with mercurial_source.
For regular conversions this is not really a problem - as long as
getfile returns the right contents, we'll get a converted revision
with the right contents. But when we use --filemap, this could lead
to superfluous revisions being converted.
Instead of fixing every converter_source, I decided to change
mercurial_sink to work around this problem.
When --filemap is used, we're interested only in revisions that touch
some specific files. If a revision doesn't change any of these files,
then we're not interested in it (at least for revisions with a single
parent; merges are special).
For mercurial_sink, we abuse this property and rollback a commit if
the manifest text hasn't changed. This avoids duplicating the logic
from localrepo.filecommit to detect unchanged files.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 04 Oct 2007 23:21:37 -0300 |
parents | cc7a43af709d |
children | 3e000e2bf5f6 |
line wrap: on
line source
Summary: Mercurial -- a distributed SCM Name: mercurial Version: snapshot Release: 0 License: GPL Group: Development/Tools Source: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz URL: http://www.selenic.com/mercurial BuildRoot: /tmp/build.%{name}-%{version}-%{release} # From the README: # # Note: some distributions fails to include bits of distutils by # default, you'll need python-dev to install. You'll also need a C # compiler and a 3-way merge tool like merge, tkdiff, or kdiff3. # # python-devel provides an adequate python-dev. The merge tool is a # run-time dependency. # BuildRequires: python >= 2.3, python-devel, make, gcc, asciidoc, xmlto %define pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))') %define pythonlib %{_libdir}/python%{pythonver}/site-packages/%{name} %define hgext %{_libdir}/python%{pythonver}/site-packages/hgext %description Mercurial is a fast, lightweight source control management system designed for efficient handling of very large distributed projects. %prep rm -rf $RPM_BUILD_ROOT %setup -q %build make all %install python setup.py install --root $RPM_BUILD_ROOT --prefix %{_prefix} make install-doc DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} install contrib/hgk $RPM_BUILD_ROOT%{_bindir} install contrib/convert-repo $RPM_BUILD_ROOT%{_bindir}/mercurial-convert-repo install contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir} install contrib/git-viz/{hg-viz,git-rev-tree} $RPM_BUILD_ROOT%{_bindir} bash_completion_dir=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d mkdir -p $bash_completion_dir install contrib/bash_completion $bash_completion_dir/mercurial.sh zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions mkdir -p $zsh_completion_dir install contrib/zsh_completion $zsh_completion_dir/_mercurial lisp_dir=$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp mkdir -p $lisp_dir install contrib/mercurial.el $lisp_dir %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html doc/ja *.cgi %{_mandir}/man?/hg*.gz %dir %{pythonlib} %dir %{hgext} %{_sysconfdir}/bash_completion.d/mercurial.sh %{_datadir}/zsh/site-functions/_mercurial %{_datadir}/emacs/site-lisp/mercurial.el %{_bindir}/hg %{_bindir}/hgk %{_bindir}/hgmerge %{_bindir}/hg-ssh %{_bindir}/hg-viz %{_bindir}/git-rev-tree %{_bindir}/mercurial-convert-repo %{pythonlib}/templates %{pythonlib}/*.py* %{pythonlib}/hgweb/*.py* %{pythonlib}/*.so %{hgext}/*.py* %{hgext}/convert/*.py*