contrib/mercurial.spec
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 16 Apr 2007 20:17:39 -0300
changeset 4359 2e3c54fb79a3
parent 3863 1ef8ada4370f
child 4741 87a35bb58b88
permissions -rw-r--r--
actually port simplemerge to hg - use bdiff instead of patiencediff; this is a larger change, since bdiff works on 2 multi-line strings, while patiencediff works on 2 lists; - rename the main class from Merge3 to Merge3Text and add a Merge3 class that derives from Merge3Text. This new Merge3 class has the same interface from the original class, so that the tests still work; - Merge3 uses util.binary to detect binary data and raises util.Abort instead of a specific exception; - don't use the @decorator syntax, to keep python2.3 compatibility; - the test uses unittest, which likes to print how long it took to run. This obviously doesn't play too well with hg's test suite, so we override time.time to fool unittest; - one test has a different (but still valid) output because of the different diff algorithm used; - the TestCase class used by bzr has some extras to help debugging. test-merge3.py used 2 of them: - log method to log some data - assertEqualDiff method to ease viewing diffs of diffs We add a dummy log method and use regular assertEquals instead of assertEqualDiff. - make simplemerge executable and add "#!/usr/bin/env python" header
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
     1
Summary: Mercurial -- a distributed SCM
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
     2
Name: mercurial
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 1891
diff changeset
     3
Version: snapshot
1891
e5c8e38b788f New version/release in mercurial.spec, patchbomb is now in hgext.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1890
diff changeset
     4
Release: 0
1273
ab22af71386f Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents: 563
diff changeset
     5
License: GPL
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
     6
Group: Development/Tools
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
     7
Source: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz
1273
ab22af71386f Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents: 563
diff changeset
     8
URL: http://www.selenic.com/mercurial
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
     9
BuildRoot: /tmp/build.%{name}-%{version}-%{release}
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    10
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    11
%define pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))')
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    12
%define pythonlib %{_libdir}/python%{pythonver}/site-packages/%{name}
1890
d4545f1b8bfa fix contrib/mercurial.spec for hgext
Xiaofeng Ling <xiaofeng.ling@intel.com>
parents: 1273
diff changeset
    13
%define hgext %{_libdir}/python%{pythonver}/site-packages/hgext
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    14
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    15
%description
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    16
Mercurial is a fast, lightweight source control management system designed
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    17
for efficient handling of very large distributed projects.
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    18
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    19
%prep
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    20
rm -rf $RPM_BUILD_ROOT
1273
ab22af71386f Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents: 563
diff changeset
    21
%setup -q
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    22
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    23
%build
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    24
python setup.py build
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    25
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    26
%install
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    27
python setup.py install --root $RPM_BUILD_ROOT
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    28
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    29
%clean
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    30
rm -rf $RPM_BUILD_ROOT
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    31
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    32
%files
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    33
%defattr(-,root,root,-)
1891
e5c8e38b788f New version/release in mercurial.spec, patchbomb is now in hgext.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1890
diff changeset
    34
%doc doc/* *.cgi
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    35
%dir %{pythonlib}
1890
d4545f1b8bfa fix contrib/mercurial.spec for hgext
Xiaofeng Ling <xiaofeng.ling@intel.com>
parents: 1273
diff changeset
    36
%dir %{hgext}
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    37
%{_bindir}/hgmerge
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    38
%{_bindir}/hg
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    39
%{pythonlib}/templates
1273
ab22af71386f Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents: 563
diff changeset
    40
%{pythonlib}/*.py*
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 1891
diff changeset
    41
%{pythonlib}/hgweb/*.py*
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    42
%{pythonlib}/*.so
1890
d4545f1b8bfa fix contrib/mercurial.spec for hgext
Xiaofeng Ling <xiaofeng.ling@intel.com>
parents: 1273
diff changeset
    43
%{hgext}/*.py*