changeset 837:805ef27fbcbe

hgsubversion/*.py: add space after comment symbol #
author Yonggang Luo <luoyonggang@gmail.com>
date Mon, 17 Oct 2011 22:44:15 +0800 (2011-10-17)
parents 0cbf9fd89672
children 3292ff0380f3
files hgsubversion/editor.py hgsubversion/replay.py hgsubversion/stupid.py hgsubversion/svnmeta.py hgsubversion/svnwrap/subvertpy_wrapper.py hgsubversion/svnwrap/svn_swig_wrapper.py hgsubversion/wrappers.py
diffstat 7 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/editor.py
+++ b/hgsubversion/editor.py
@@ -335,7 +335,7 @@ class HgEditor(svnwrap.Editor):
         self.stream = target
 
         handler = svnwrap.apply_txdelta(base, target)
-        if not callable(handler): #pragma: no cover
+        if not callable(handler): # pragma: no cover
             raise hgutil.Abort('Error in Subversion bindings: '
                                'cannot call handler!')
         def txdelt_window(window):
@@ -346,12 +346,12 @@ class HgEditor(svnwrap.Editor):
                 # window being None means commit this file
                 if not window:
                     self.current.files[self.current.file] = target.getvalue()
-            except svnwrap.SubversionException, e: #pragma: no cover
+            except svnwrap.SubversionException, e: # pragma: no cover
                 if e.args[1] == svnwrap.ERR_INCOMPLETE_DATA:
                     self.current.missing.add(self.current.file)
-                else: #pragma: no cover
+                else: # pragma: no cover
                     raise hgutil.Abort(*e.args)
-            except: #pragma: no cover
+            except: # pragma: no cover
                 print len(base), self.current.file
                 self._exception_info = sys.exc_info()
                 raise
--- a/hgsubversion/replay.py
+++ b/hgsubversion/replay.py
@@ -71,7 +71,7 @@ def convert_rev(ui, meta, svn, r, tbdelt
 
     updateexternals(ui, meta, current)
 
-    if current.exception is not None:  #pragma: no cover
+    if current.exception is not None:  # pragma: no cover
         traceback.print_exception(*current.exception)
         raise ReplayException()
     if current.missing:
@@ -194,7 +194,7 @@ def convert_rev(ui, meta, svn, r, tbdelt
             raise IOError(errno.ENOENT, 'deleting all files')
 
         # True here meant nuke all files, shouldn't happen with branch closing
-        if current.emptybranches[branch]: #pragma: no cover
+        if current.emptybranches[branch]: # pragma: no cover
             raise hgutil.Abort('Empty commit to an open branch attempted. '
                                'Please report this issue.')
 
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -46,7 +46,7 @@ class BadPatchApply(Exception):
     pass
 
 
-def print_your_svn_is_old_message(ui): #pragma: no cover
+def print_your_svn_is_old_message(ui): # pragma: no cover
     ui.status("In light of that, I'll fall back and do diffs, but it won't do "
               "as good a job. You should really upgrade your server.\n")
 
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -24,7 +24,7 @@ def pickle_atomic(data, file_path, dir=N
         f = os.fdopen(f, 'w')
         pickle.dump(data, f)
         f.close()
-    except: #pragma: no cover
+    except: # pragma: no cover
         raise
     else:
         hgutil.rename(path, file_path)
--- a/hgsubversion/svnwrap/subvertpy_wrapper.py
+++ b/hgsubversion/svnwrap/subvertpy_wrapper.py
@@ -31,7 +31,7 @@ except ImportError:
 def _versionstr(v):
     return '.'.join(str(d) for d in v)
 
-if subvertpy.__version__ < subvertpy_required: #pragma: no cover
+if subvertpy.__version__ < subvertpy_required: # pragma: no cover
     raise ImportError('Subvertpy %s or later required, '
                       'but %s found'
                       % (_versionstr(subvertpy_required),
@@ -338,7 +338,7 @@ class SubversionRepo(object):
             commit_info.append(args)
         commit_info = []
         revprops = { properties.PROP_REVISION_LOG: message }
-        #revprops.update(props)
+        # revprops.update(props)
         commiteditor = self.remote.get_commit_editor(revprops, commitcb)
 
         paths = set(paths)
@@ -417,7 +417,7 @@ class SubversionRepo(object):
 
         try:
             self.remote.replay(revision, oldestrev, AbstractEditor(editor))
-        except (SubversionException, NotImplementedError), e: #pragma: no cover
+        except (SubversionException, NotImplementedError), e: # pragma: no cover
             # can I depend on this number being constant?
             if (isinstance(e, NotImplementedError) or
                 e.args[1] == subvertpy.ERR_RA_NOT_IMPLEMENTED or
--- a/hgsubversion/svnwrap/svn_swig_wrapper.py
+++ b/hgsubversion/svnwrap/svn_swig_wrapper.py
@@ -29,7 +29,7 @@ except ImportError:
     raise ImportError('Subversion %d.%d.%d or later required, '
                       'but no bindings were found' % required_bindings)
 
-if current_bindings < required_bindings: #pragma: no cover
+if current_bindings < required_bindings: # pragma: no cover
     raise ImportError('Subversion %d.%d.%d or later required, '
                       'but bindings for %d.%d.%d found' %
                       (required_bindings + current_bindings))
@@ -60,7 +60,7 @@ def optrev(revnum):
 svn_config = core.svn_config_get_config(None)
 class RaCallbacks(ra.Callbacks):
     @staticmethod
-    def open_tmp_file(pool): #pragma: no cover
+    def open_tmp_file(pool): # pragma: no cover
         (fd, fn) = tempfile.mkstemp()
         os.close(fd)
         return fn
@@ -82,13 +82,13 @@ def ieditor(fn):
     def fun(self, *args, **kwargs):
         try:
             return fn(self, *args, **kwargs)
-        except: #pragma: no cover
+        except: # pragma: no cover
             if self.current.exception is not None:
                 self.current.exception = sys.exc_info()
             raise
     return fun
 
-def user_pass_prompt(realm, default_username, ms, pool): #pragma: no cover
+def user_pass_prompt(realm, default_username, ms, pool): # pragma: no cover
     # FIXME: should use getpass() and username() from mercurial.ui
     creds = core.svn_auth_cred_simple_t()
     creds.may_save = ms
@@ -233,7 +233,7 @@ class SubversionRepo(object):
             holder = []
             ra.get_log(self.ra, [''],
                        self.HEAD, 1,
-                       1, #limit of how many log messages to load
+                       1, # limit of how many log messages to load
                        True, # don't need to know changed paths
                        True, # stop on copies
                        lambda paths, revnum, author, date, message, pool:
@@ -295,7 +295,7 @@ class SubversionRepo(object):
                            paths,
                            start + 1,
                            stop,
-                           chunk_size, #limit of how many log messages to load
+                           chunk_size, # limit of how many log messages to load
                            True, # don't need to know changed paths
                            True, # stop on copies
                            callback,
@@ -403,7 +403,7 @@ class SubversionRepo(object):
         try:
             ra.replay(self.ra, revision, oldest_rev_i_have, True, e_ptr,
                       e_baton, self.pool)
-        except SubversionException, e: #pragma: no cover
+        except SubversionException, e: # pragma: no cover
             # can I depend on this number being constant?
             if (e.apr_err == core.SVN_ERR_RA_NOT_IMPLEMENTED or
                 e.apr_err == core.SVN_ERR_UNSUPPORTED_FEATURE):
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -98,7 +98,7 @@ def findoutgoing(repo, dest=None, heads=
     """
     assert dest.capable('subversion')
     # split off #rev; TODO implement --revision/#rev support
-    #svnurl, revs, checkout = util.parseurl(dest.svnurl, heads)
+    # svnurl, revs, checkout = util.parseurl(dest.svnurl, heads)
     svn = dest.svn
     meta = repo.svnmeta(svn.uuid, svn.subdir)
     parent = repo.parents()[0].node()
@@ -354,11 +354,11 @@ def pull(repo, source, heads=[], force=F
                         converted = True
                         firstrun = False
 
-                    except svnwrap.SubversionRepoCanNotReplay, e: #pragma: no cover
+                    except svnwrap.SubversionRepoCanNotReplay, e: # pragma: no cover
                         ui.status('%s\n' % e.message)
                         stupidmod.print_your_svn_is_old_message(ui)
                         have_replay = False
-                    except svnwrap.SubversionException, e: #pragma: no cover
+                    except svnwrap.SubversionException, e: # pragma: no cover
                         if (e.args[1] == svnwrap.ERR_RA_DAV_REQUEST_FAILED
                             and '502' in str(e)
                             and tries < 3):