Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 251163 - dev-util/mercurial-9999 VCS version for hg
Summary: dev-util/mercurial-9999 VCS version for hg
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL: http://selenic.com/repo/hg
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-16 13:16 UTC by Arne Babenhauserheide
Modified: 2009-03-11 08:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mercurial-9999.ebuild (mercurial-9999.ebuild,3.24 KB, text/plain)
2008-12-16 13:17 UTC, Arne Babenhauserheide
Details
mercurial-9999.ebuild (mercurial-9999.ebuild,3.19 KB, text/plain)
2008-12-16 13:26 UTC, Arne Babenhauserheide
Details
mercurial-9999.ebuild (mercurial-9999.ebuild,3.18 KB, text/plain)
2009-01-09 09:24 UTC, Arne Babenhauserheide
Details
mercurial.eclass.diff (mercurial.eclass.diff,2.33 KB, patch)
2009-01-16 09:02 UTC, Arne Babenhauserheide
Details | Diff
mercurial-9999.2.ebuild (mercurial-9999.2.ebuild,3.19 KB, text/plain)
2009-02-18 12:26 UTC, Arne Babenhauserheide
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Babenhauserheide 2008-12-16 13:16:42 UTC
An ebuild for the VCS version of Mercurial. 

It works for me on amd64. 

This tracks the stable repo of Mercurial. 

The ebuild still needs working slotting, though (instant file collision). But I don't know how to do that cleanly. 

Reproducible: Always
Comment 1 Arne Babenhauserheide 2008-12-16 13:17:38 UTC
Created attachment 175465 [details]
mercurial-9999.ebuild
Comment 2 Arne Babenhauserheide 2008-12-16 13:26:43 UTC
Created attachment 175467 [details]
mercurial-9999.ebuild

Just setting slot to 0 works, but it deinstalls the older mercurial, so the hg-stable had better be really stable. 

It is just a modified copy of mercurial-1.1.ebuild

This one only claims ~amd64 testing.
Comment 3 Arne Babenhauserheide 2008-12-16 13:31:58 UTC
This ebuild is also missing a way to set the Mercurial version to the hg-stable repo changeset ID. 
Comment 4 Arne Babenhauserheide 2008-12-28 23:16:30 UTC
I've been using this ebuild in production for a few weeks now and I didn't yet run into any problems. 

Should I open a forum thread for improving the ebuild? 
Comment 5 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-01-08 22:27:25 UTC
As it is exactly the same as officially released sources (versioned tarballs) I really don't see a point in having this.
Comment 6 Arne Babenhauserheide 2009-01-09 07:30:31 UTC
Welcome back! 

Would it be useful for you if I switched it over to the crew repository? If yes: should I add a new bug for that? 
Comment 7 Arne Babenhauserheide 2009-01-09 09:24:15 UTC
Created attachment 177852 [details]
mercurial-9999.ebuild

I switched the ebuild over to track the crew repository instead.
Comment 8 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-01-09 11:53:46 UTC
(In reply to comment #6)
> Welcome back! 

Thank you :)

> Would it be useful for you if I switched it over to the crew repository? If
> yes: should I add a new bug for that? 

Switching the VCS ebuild to track main development branch is a good idea, and no - you don't need to open a new bug -- I'll reopen this one.
Comment 9 Arne Babenhauserheide 2009-01-09 21:13:02 UTC
I also updated the title and URL. 

Do you know how to fix the remaining issue? 

* This ebuild is missing a way to set the Mercurial version to the hg repo changeset ID. 

What I'd like to do is the the rev and changeset ID. 

You can get that via the Mercurial command 

$ hg tip --template "{rev} - {node|short}\n"

For example the 1.1.3 release would be 
"7509 - 89207edf3973"

This would allow to directly compare the age of two versions, and it would still be an exact identifier. 

To issue the command from outside of the repo, just do 

$ hg -R PATH_TO_REPO tip --template "{rev} - {node|short}\n"

Best wishes, 
Arne
Comment 10 Arne Babenhauserheide 2009-01-16 09:01:20 UTC
I just hacked on the Mercurial eclass to allow Mercurials setup.py to extract the version from the repo. 

Changes: 
- The initial clone to distfiles doesn't have a working copy anymore
- Copying to workdir is done via cloning. 

Other than allowing Mercurials setup.py to get the exact hg version this should also speed up the build process if both distfiles and tmp/portage are on the same filesystem, because in that case the cloning of the .hg repo is done locally via hardlinks and so we only create the repository files once instead of creating them in distfiles and then rsyncing them to the workdir. 

Also it saves space in distfiles :)

I'll attach it as diff in a blink (this is just a simple diff file1 file2. If you want another diff format, please tell me!). 

Would you review it? 
Comment 11 Arne Babenhauserheide 2009-01-16 09:02:27 UTC
Created attachment 178673 [details, diff]
mercurial.eclass.diff
Comment 12 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-01-16 20:10:56 UTC
This patch belongs to separate bug, not this one.
Comment 13 Arne Babenhauserheide 2009-01-19 22:03:20 UTC
I created a new bug for the eclass: http://bugs.gentoo.org/255560
Comment 14 Arne Babenhauserheide 2009-01-20 20:13:00 UTC
Another shortcoming of the current ebuild is that it doesn't install the man pages, yet. 
Comment 15 Arne Babenhauserheide 2009-01-22 14:52:43 UTC
One fix: I just found that the beuilds doesn't yet point to the crew repo, but to the main development repo which is managed by mpm: 
- http://www.selenic.com/mercurial/wiki/index.cgi/DeveloperRepos

I think that's a good thing, though... 

Sorry for the earlier muddled up terminology. 
Comment 16 Arne Babenhauserheide 2009-02-18 12:26:32 UTC
Created attachment 182413 [details]
mercurial-9999.2.ebuild

An ebuild which (now really) tracks the (not necessarily stable) crew repository. 

dev-util/mercurial-9999 is the version maintaned by Matt Mackall

dev-util/mercurial-9999.2 is the crew version.
Comment 17 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-03-09 20:08:11 UTC
Version tracking official repo added.
Comment 18 Arne Babenhauserheide 2009-03-11 08:36:03 UTC
Sidenote: I just wrote a blog post about the eclass overhaul (bug #259898) and the live ebuild. Is there some place where we should add this text to make people aware of the overhaul, or is all that done automatically? 

- http://draketo.de/light/english/mercurial/gentoo-live-ebuild-mercurial