Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 194676 | Differences between
and this patch

Collapse All | Expand All

(-)subversion.eclass.orig (-5 / +44 lines)
Lines 175-182 Link Here
175
		subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
175
		subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
176
	else
176
	else
177
		subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
177
		subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
178
		ESVN_WC_UUID="$(subversion__svn_info "${ESVN_WC_URL}" "Repository UUID")"
179
		ESVN_REPO_UUID="$(subversion__svn_info "${repo_uri}" "Repository UUID")"
180
		if [ "${ESVN_WC_REPOSITORY_UUID}" != "$(subversion__svn_info "${repo_uri}" "Repository UUID")" ] ; then
181
			einfo "ESVN_REPO_URI (or specified URI) and working copy's URL refer to different repositories; deleting the existing working copy and starting over"
182
			rm -rf "${wc_path}" || die "${ESVN}: unable to clear bad working copy"
183
			subversion_fetch "$@"; return "$?"
184
		fi
185
		if [ "${ESVN_WC_REPOSITORY_ROOT}" != "$(subversion__svn_info "${repo_uri}" "Repository Root")" ] ; then
186
			einfo "Repository root has moved; relocating..."
187
			env LC_ALL=C svn switch --relocate \
188
					"${ESVN_WC_REPOSITORY_ROOT}" \
189
					"$(subversion__svn_info "${repo_uri}" "Repository Root")" \
190
					"${wc_path}" \
191
				|| die "unable to relocate working copy ${wc_path} from repository ${ESVN_WC_REPOSITORY_ROOT} to $(subversion__svn_info "${repo_uri}" "Repository Root")"
192
			subversion_wc_info "${repo_uri}" || die "error while refreshing our view of working copy state"
193
		fi
194
		if [ "${ESVN_WC_URL}" != "$(subversion__get_repository_uri "${repo_uri}" 1)" ] ; then
195
			einfo "URI has moved within the repository; switching..."
196
			env LC_ALL=C svn switch \
197
					"$(subversion__get_repository_uri "${repo_uri}" 1)" \
198
					"${wc_path}" \
199
				|| die "unable to relocate working copy ${wc_path} from ${ESVN_WC_URL} to $(subversion__get_repository_uri "${repo_uri}" 1)"
200
			subversion_wc_info "${repo_uri}" || die "error while refreshing our view of working copy state"
201
		fi
178
		if [ "${ESVN_WC_URL}" != "$(subversion__get_repository_uri "${repo_uri}" 1)" ]; then
202
		if [ "${ESVN_WC_URL}" != "$(subversion__get_repository_uri "${repo_uri}" 1)" ]; then
179
			die "${ESVN}: ESVN_REPO_URI (or specified URI) and working copy's URL are not matched."
203
			einfo "Attempts to update the current working copy have failed; deleting ${wc_path} and starting over..."
204
			rm -rf "${wc_path}" || die "${ESVN}: unable to clear bad working copy"
205
			subversion_fetch "$@"; return "$?"
180
		fi
206
		fi
181
207
182
		# update working copy
208
		# update working copy
Lines 272-279 Link Here
272
	fi
298
	fi
273
299
274
	local k
300
	local k
275
	for k in url revision; do
301
	for k in url revision "Repository Root" "Repository UUID"; do
276
		export ESVN_WC_$(subversion__to_upper_case "${k}")="$(subversion__svn_info "${wc_path}" "${k}")"
302
		export ESVN_WC_$(subversion__to_varname "${k}")="$(subversion__svn_info "${wc_path}" "${k}")"
277
	done
303
	done
278
}
304
}
279
305
Lines 289-295 Link Here
289
	local target="${1}"
315
	local target="${1}"
290
	local key="${2}"
316
	local key="${2}"
291
317
292
	env LC_ALL=C svn info "${target}" | grep -i "^${key}" | cut -d" " -f2-
318
	env LC_ALL=C svn info "${target}" | grep -i "^${key}" | sed -r -e "s@[^:]+: +@@"
293
}
319
}
294
320
295
321
Lines 315-320 Link Here
315
		repo_uri="${repo_uri%/}"
341
		repo_uri="${repo_uri%/}"
316
	fi
342
	fi
317
343
344
	# delete any duplicate slashes past the first instance
345
	local repo_uri_tmp="${repo_uri//\/\///}"
346
	repo_uri="${repo_uri_tmp/\////}"
347
318
	if [[ -n "${remove_peg_revision}" ]]; then
348
	if [[ -n "${remove_peg_revision}" ]]; then
319
		if subversion__has_peg_revision "${repo_uri}"; then
349
		if subversion__has_peg_revision "${repo_uri}"; then
320
			repo_uri="${repo_uri%@*}"
350
			repo_uri="${repo_uri%@*}"
Lines 384-388 Link Here
384
# @param $@ - the strings to upper case.
414
# @param $@ - the strings to upper case.
385
#
415
#
386
function subversion__to_upper_case() {
416
function subversion__to_upper_case() {
387
	echo "${@}" | tr "[a-z]" "[A-Z]"
417
	echo "${@}" | tr "[:lower:]" "[:upper:]"
418
}
419
420
421
## -- subversion__to_varname() -------------------------------------------- #
422
#
423
# @param $@ - the strings to convert to suitable form for variable names
424
#
425
function subversion__to_varname() {
426
	echo "${@}" | tr "[[:lower:] ]" "[[:upper:]_]"
388
}
427
}

Return to bug 194676