Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 179038 Details for
Bug 255560
Mercurial eclass should use hg clone instead of rsync to create ${WORKDIR}/${module}
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
mercurial.eclass.diff
mercurial.eclass.diff (text/plain), 2.60 KB, created by
Arne Babenhauserheide
on 2009-01-19 22:00:47 UTC
(
hide
)
Description:
mercurial.eclass.diff
Filename:
MIME Type:
Creator:
Arne Babenhauserheide
Created:
2009-01-19 22:00:47 UTC
Size:
2.60 KB
patch
obsolete
>--- /usr/portage/eclass/mercurial.eclass 2009-01-16 09:11:37.000000000 +0100 >+++ eclass/mercurial.eclass 2009-01-16 14:24:45.000000000 +0100 >@@ -18,8 +18,10 @@ > > # These can be set by the ebuild but are usually fine as-is > : ${EHG_PROJECT:=$PN} # dir under EHG_STORE_DIR >-: ${EHG_CLONE_CMD:=hg clone} # clone cmd >-: ${EHG_PULL_CMD:=hg pull -u} # pull cmd >+: ${EHG_CLONE_CMD:=hg clone --pull} # clone cmd >+: ${EHG_PULL_CMD:=hg pull -u -C} # pull cmd; update and clean out local changes >+: ${EHG_CLONE_CMD_NOUPDATE:=hg clone --pull -U} # clone cmd; no working copy >+: ${EHG_PULL_CMD_NOUPDATE:=hg pull} # pull cmd; no updating > > # should be set but blank to prevent using $HOME/.hgrc > export HGRCPATH= >@@ -44,19 +46,20 @@ > addwrite "$(pwd -P)" > > if [[ ! -d ${EHG_PROJECT}/${module} ]]; then >- # first check out >- ebegin "${EHG_CLONE_CMD} ${repo}" >+ # first check out - if it fails, remove the dir again. >+ ebegin "${EHG_CLONE_CMD_NOUPDATE} ${repo}" > mkdir -p "${EHG_PROJECT}" && > chmod -f g+rw "${EHG_PROJECT}" && > cd "${EHG_PROJECT}" && >- ${EHG_CLONE_CMD} "${repo}" "${module}" && >- cd "${module}" >+ ${EHG_CLONE_CMD_NOUPDATE} "${repo}" "${module}" && >+ cd "${module}" || >+ rm -r "${module}" > eend $? || die > else > # update working copy >- ebegin "${EHG_PULL_CMD} ${repo}" >+ ebegin "${EHG_PULL_CMD_NOUPDATE} ${repo}" > cd "${EHG_PROJECT}/${module}" && >- ${EHG_PULL_CMD} >+ ${EHG_PULL_CMD_NOUPDATE} > case $? in > # hg pull returns status 1 when there were no changes to pull > 1) eend 0 ;; >@@ -64,11 +67,27 @@ > esac > fi > >- # use rsync instead of cp for --exclude >- ebegin "rsync to ${WORKDIR}/${module}" >- mkdir -p "${WORKDIR}/${module}" && >- rsync -a --delete --exclude=.hg/ . "${WORKDIR}/${module}" >- eend $? || die >+ # use Mercurial instead of cp or rsync, >+ # as that saves space in distfiles and some setup.py scripts might depend on >+ # being run in an hg repository (For example the one from Mercurial does). >+ if [[ ! -d ${WORKDIR}/${module} ]]; then >+ # clone to workdir, remove the created dir if the clone fails. >+ ebegin "${EHG_CLONE_CMD} ${EHG_STORE_DIR}/${EHG_PROJECT}/${module} ${WORKDIR}/${module}" >+ mkdir -p "${WORKDIR}" && >+ ${EHG_CLONE_CMD} ${EHG_STORE_DIR}/${EHG_PROJECT}/${module} ${WORKDIR}/${module} || >+ rm -r "${WORKDIR}/${module}" >+ eend $? || die >+ else >+ # pull from workdir >+ ebegin "${EHG_PULL_CMD} ${EHG_PROJECT}/${module}" >+ cd "${WORKDIR}/${module}" && >+ ${EHG_PULL_CMD} >+ case $? in >+ # hg pull returns status 1 when there were no changes to pull >+ 1) eend 0 ;; >+ *) eend $? || die ;; >+ esac >+ fi > > popd >/dev/null > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 255560
: 179038 |
180242