jhbuild r2070 - in trunk: . jhbuild/versioncontrol
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2070 - in trunk: . jhbuild/versioncontrol
- Date: Mon, 5 May 2008 10:23:28 +0100 (BST)
Author: fpeters
Date: Mon May 5 09:23:27 2008
New Revision: 2070
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2070&view=rev
Log:
* jhbuild/versioncontrol/svn.py: use svn switch --relocate when
repository location changes, most often because user got its subversion
account. (closes: #531503)
Modified:
trunk/ChangeLog
trunk/jhbuild/versioncontrol/svn.py
Modified: trunk/jhbuild/versioncontrol/svn.py
==============================================================================
--- trunk/jhbuild/versioncontrol/svn.py (original)
+++ trunk/jhbuild/versioncontrol/svn.py Mon May 5 09:23:27 2008
@@ -220,6 +220,16 @@
elif self.config.sticky_date:
opt.extend(['-r', '{%s}' % self.config.sticky_date])
+ uri = get_uri(outputdir)
+
+ if urlparse.urlparse(uri)[:2] != urlparse.urlparse(self.module)[:2]:
+ # server and protocol changed, probably because user changed
+ # svnroots[] config variable.
+ new_uri = urlparse.urlunparse(
+ urlparse.urlparse(self.module)[:2] + urlparse.urlparse(uri)[2:])
+ cmd = ['svn', 'switch', '--relocate', uri, new_uri, '.']
+ buildscript.execute(cmd, 'svn', cwd=outputdir)
+
# if the URI doesn't match, use "svn switch" instead of "svn update"
if get_uri(outputdir) != self.module:
cmd = ['svn', 'switch'] + opt + [self.module]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]