Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264921 - mercurial.eclass: please add --force to EHG_PULL_CMD
Summary: mercurial.eclass: please add --force to EHG_PULL_CMD
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-04 23:11 UTC by Chí-Thanh Christopher Nguyễn
Modified: 2009-05-01 22:01 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chí-Thanh Christopher Nguyễn gentoo-dev 2009-04-04 23:11:51 UTC
Recently, the upstream for media-tv/em28xx-new (in sunrise) created their mercurial repository from scratch again. This made mercurial_fetch() fail with "abort: repository is unrelated" when a clone of the previous repository existed in ${DISTDIR}/hg-src

A workaround is to remove the old directory, or setting the following in the ebuild:
EHG_PULL_CMD="hg pull --force --quiet"

Please consider adding --force to the default EHG_PULL_CMD in mercurial.eclass

Reproducible: Always

Steps to Reproduce:
1. emerge a package which uses mercurial.eclass
2. create the repository that EGIT_REPO_URI points at from scratch again
3. try to the package emerge again

Actual Results:  
mercurial_fetch() fails with "abort: repository is unrelated"

Expected Results:  
pull from the new repository
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2009-04-04 23:13:06 UTC
correction to comment 0: that should read EHG_REPO_URI in Step 2
Comment 2 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-04-05 12:44:31 UTC
As upstream messing in such way with its repository isn't a common thing I'm quite reluctant to do so. In my opinion defaults in eclass should work for most cases, and are ... defaults - to be overridden by ebuilds.
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2009-04-05 13:33:51 UTC
If upstream does not mess with its repository, --force will not make any difference. Do you think there are any cases where this option can break things?

The only issue I can think of is two mercurial packages with the same name and in different categories will replace each other's repository on merge (instead of failing), resulting in unnecessary traffic.
Comment 4 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-05-01 22:01:50 UTC
I think that upstream messing with their repository is happening seldom enough that --force is not needed - in such cases just remove the current working copy and repository.