changeset 986:1bdd075a490a

cleanup: avoid \' in strings where easy
author Augie Fackler <raf@durin42.com>
date Tue, 04 Dec 2012 17:26:59 -0600
parents b303b60be11e
children cf53cfaaa050
files hgsubversion/svnmeta.py hgsubversion/svnrepo.py hgsubversion/svnwrap/subvertpy_wrapper.py hgsubversion/wrappers.py
diffstat 4 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -111,7 +111,7 @@ class SVNMeta(object):
             if lo == 'auto':
                 raise hgutil.Abort('layout not yet determined')
             elif not lo in ('single', 'standard'):
-                raise hgutil.Abort('unknown layout \'%s\'' % lo)
+                raise hgutil.Abort("unknown layout '%s'" % lo)
             self._layout = lo
             f = open(self.layoutfile, 'w')
             f.write(self._layout)
--- a/hgsubversion/svnrepo.py
+++ b/hgsubversion/svnrepo.py
@@ -218,7 +218,7 @@ class SubversionPrompt(object):
             username = default_username
         else:
             username = self.ui.prompt('Username: ', default='')
-        password = self.ui.getpass('Password for \'%s\': ' % (username,), default='')
+        password = self.ui.getpass("Password for '%s': " % (username,), default='')
         return (username, password, bool(may_save))
 
     def ssl_client_cert(self, realm, may_save, pool=None):
@@ -227,7 +227,7 @@ class SubversionPrompt(object):
         return (cert_file, bool(may_save))
 
     def ssl_client_cert_pw(self, realm, may_save, pool=None):
-        password = self.ui.getpass('Passphrase for \'%s\': ' % (realm,), default='')
+        password = self.ui.getpass("Passphrase for '%s': " % (realm,), default='')
         return (password, bool(may_save))
 
     def insecure(fn):
@@ -252,7 +252,7 @@ class SubversionPrompt(object):
 
     @insecure
     def ssl_server_trust(self, realm, failures, cert_info, may_save, pool=None):
-        msg = 'Error validating server certificate for \'%s\':\n' % (realm,)
+        msg = "Error validating server certificate for '%s':\n" % (realm,)
         if failures & svnwrap.SSL_UNKNOWNCA:
             msg += (
                     ' - The certificate is not issued by a trusted authority. Use the\n'
@@ -293,4 +293,3 @@ class SubversionPrompt(object):
         else:
             creds = None
         return creds
-
--- a/hgsubversion/svnwrap/subvertpy_wrapper.py
+++ b/hgsubversion/svnwrap/subvertpy_wrapper.py
@@ -421,7 +421,7 @@ class SubversionRepo(object):
                         editor.delete_entry(path, base_revision)
                         continue
                     else:
-                        assert False, 'invalid action \'%s\'' % action
+                        assert False, "invalid action '%s'" % action
 
                     if path in props:
                         if props[path].get('svn:special', None):
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -327,7 +327,7 @@ def pull(repo, source, heads=[], force=F
 
         layout = repo.ui.config('hgsubversion', 'layout', 'auto')
         if not layout in ('auto', 'single', 'standard'):
-            raise hgutil.Abort('unknown layout \'%s\'' % layout)
+            raise hgutil.Abort("unknown layout '%s'" % layout)
         if layout == 'auto':
             try:
                 rootlist = svn.list_dir('', revision=(stopat_rev or None))