Mercurial > illumos > illumos-gate
changeset 13324:9a080c1fd46c
808 developer tools should support mercurial 1.8
Reviewed by: garrett@nexenta.com
Reviewed by: trisk@opensolaris.org
Approved by: gwr@nexenta.com
author | Richard Lowe <richlowe@richlowe.net> |
---|---|
date | Fri, 25 Mar 2011 18:38:13 -0400 |
parents | 68180a7fbd06 |
children | ab46f88a2660 |
files | usr/src/tools/onbld/Scm/Backup.py usr/src/tools/onbld/Scm/Version.py usr/src/tools/onbld/Scm/WorkSpace.py |
diffstat | 3 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/tools/onbld/Scm/Backup.py Sun Apr 03 16:13:38 2011 -0400 +++ b/usr/src/tools/onbld/Scm/Backup.py Fri Mar 25 18:38:13 2011 -0400 @@ -74,7 +74,8 @@ import grp, os, pwd, shutil, tarfile, time, traceback from cStringIO import StringIO -from mercurial import changegroup, error, node, patch, util +from mercurial import changegroup, cmdutil, error, node, patch, util +from onbld.Scm import Version class CdmNodeMissing(util.Abort): @@ -437,7 +438,10 @@ raise util.Abort("couldn't apply working copy diff: %s\n" " %s" % (diff, e)) finally: - patch.updatedir(self.ws.ui, self.ws.repo, files) + if Version.at_least("1.7"): + cmdutil.updatedir(self.ws.ui, self.ws.repo, files) + else: + patch.updatedir(self.ws.ui, self.ws.repo, files) if not self.bu.exists('renames'): return
--- a/usr/src/tools/onbld/Scm/Version.py Sun Apr 03 16:13:38 2011 -0400 +++ b/usr/src/tools/onbld/Scm/Version.py Fri Mar 25 18:38:13 2011 -0400 @@ -17,7 +17,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# Copyright 2008, 2010, Richard Lowe +# Copyright 2008, 2011, Richard Lowe # ''' @@ -58,7 +58,8 @@ # # List of versions that are explicitly acceptable to us # -GOOD_VERSIONS = ['1.3.1', '1.4.2', '1.5.4', '1.6.2', '1.6.3'] +GOOD_VERSIONS = ['1.3.1', '1.4.2', '1.5.4', '1.6.2', '1.6.3', '1.7.5', + '1.8', '1.8.1'] def check_version():
--- a/usr/src/tools/onbld/Scm/WorkSpace.py Sun Apr 03 16:13:38 2011 -0400 +++ b/usr/src/tools/onbld/Scm/WorkSpace.py Fri Mar 25 18:38:13 2011 -0400 @@ -397,8 +397,12 @@ if parentfile.flags() != localfile.flags(): return True - if parentfile.cmp(localfile.data()): - return True + if Version.at_least("1.7"): + if parentfile.cmp(localfile): + return True + else: + if parentfile.cmp(localfile.data()): + return True def context(self, message, user): '''Return a Mercurial context object representing the entire