From: Joey Hess Date: Wed, 25 Nov 2009 17:36:17 +0000 (-0500) Subject: mr bootstrap: Fix cross-device rename failure. Closes: #557962 X-Git-Url: https://git.madduck.net/code/myrepos.git/commitdiff_plain/a54b03f753aa67f09bc1c64b7dd2ae7d77858da0?ds=sidebyside;pf=code mr bootstrap: Fix cross-device rename failure. Closes: #557962 --- diff --git a/debian/changelog b/debian/changelog index 0f7890e..c480160 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ mr (0.44) UNRELEASED; urgency=low * Make mr -i pass -i to the shell, to ensure it knows it should be an interactive shell. * mr help: Support man on SunOS and OS X. (Geoff Davis) + * mr bootstrap: Fix cross-device rename failure. Closes: #557962 -- Joey Hess Thu, 24 Sep 2009 21:52:27 -0400 diff --git a/mr b/mr index ff4adce..98c96fe 100755 --- a/mr +++ b/mr @@ -1357,7 +1357,8 @@ sub bootstrap { print STDERR "mr: .mrconfig file already exists, not overwriting with $url\n"; } else { - rename($tmpconfig, ".mrconfig") || die "rename: $!"; + eval q{use File::Copy}; + move($tmpconfig, ".mrconfig") || die "rename: $!"; } exec("mr $ENV{MR_SWITCHES} -c .mrconfig checkout");