summaryrefslogtreecommitdiff
path: root/usr/src/tools/onbld
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-03-25 18:38:13 -0400
committerRichard Lowe <richlowe@richlowe.net>2011-03-25 18:38:13 -0400
commit036abaca93ddab92ba33036159c30112ab844810 (patch)
treef463e9a58592774612e962dc54a2e8c5b33000ef /usr/src/tools/onbld
parentd5a809307a1e18efb4e162908ad8ad2a85801d99 (diff)
downloadillumos-joyent-036abaca93ddab92ba33036159c30112ab844810.tar.gz
808 developer tools should support mercurial 1.8
Reviewed by: garrett@nexenta.com Reviewed by: trisk@opensolaris.org Approved by: gwr@nexenta.com
Diffstat (limited to 'usr/src/tools/onbld')
-rw-r--r--usr/src/tools/onbld/Scm/Backup.py8
-rw-r--r--usr/src/tools/onbld/Scm/Version.py5
-rw-r--r--usr/src/tools/onbld/Scm/WorkSpace.py8
3 files changed, 15 insertions, 6 deletions
diff --git a/usr/src/tools/onbld/Scm/Backup.py b/usr/src/tools/onbld/Scm/Backup.py
index 451e73cdda..6715243d95 100644
--- a/usr/src/tools/onbld/Scm/Backup.py
+++ b/usr/src/tools/onbld/Scm/Backup.py
@@ -74,7 +74,8 @@ dirstate, are optional.
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 @@ class CdmUncommittedBackup(object):
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
diff --git a/usr/src/tools/onbld/Scm/Version.py b/usr/src/tools/onbld/Scm/Version.py
index 82bf21481e..017ef3e514 100644
--- a/usr/src/tools/onbld/Scm/Version.py
+++ b/usr/src/tools/onbld/Scm/Version.py
@@ -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 @@ class VersionMismatch(Exception):
#
# 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():
diff --git a/usr/src/tools/onbld/Scm/WorkSpace.py b/usr/src/tools/onbld/Scm/WorkSpace.py
index 28c011660f..3abd4d8149 100644
--- a/usr/src/tools/onbld/Scm/WorkSpace.py
+++ b/usr/src/tools/onbld/Scm/WorkSpace.py
@@ -397,8 +397,12 @@ class ActiveList(object):
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