changeset 3449:95a226b35b91 beta

codecleaner, fix tabs -> spaces
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 04 Mar 2013 12:17:15 +0100
parents cf665eb84d4c
children eda34a21796e
files rhodecode/lib/vcs/utils/lockfiles.py rhodecode/public/css/style.css rhodecode/templates/admin/users/user_edit_my_account.html rhodecode/templates/changelog/changelog.html rhodecode/templates/email_templates/pull_request_comment.html rhodecode/templates/pullrequests/pullrequest.html
diffstat 6 files changed, 73 insertions(+), 73 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/vcs/utils/lockfiles.py	Mon Mar 04 12:12:38 2013 +0100
+++ b/rhodecode/lib/vcs/utils/lockfiles.py	Mon Mar 04 12:17:15 2013 +0100
@@ -2,71 +2,71 @@
 
 
 class LockFile(object):
-	"""Provides methods to obtain, check for, and release a file based lock which
-	should be used to handle concurrent access to the same file.
+    """Provides methods to obtain, check for, and release a file based lock which
+    should be used to handle concurrent access to the same file.
 
-	As we are a utility class to be derived from, we only use protected methods.
+    As we are a utility class to be derived from, we only use protected methods.
 
-	Locks will automatically be released on destruction"""
-	__slots__ = ("_file_path", "_owns_lock")
+    Locks will automatically be released on destruction"""
+    __slots__ = ("_file_path", "_owns_lock")
 
-	def __init__(self, file_path):
-		self._file_path = file_path
-		self._owns_lock = False
+    def __init__(self, file_path):
+        self._file_path = file_path
+        self._owns_lock = False
 
-	def __del__(self):
-		self._release_lock()
+    def __del__(self):
+        self._release_lock()
 
-	def _lock_file_path(self):
-		""":return: Path to lockfile"""
-		return "%s.lock" % (self._file_path)
+    def _lock_file_path(self):
+        """:return: Path to lockfile"""
+        return "%s.lock" % (self._file_path)
 
-	def _has_lock(self):
-		""":return: True if we have a lock and if the lockfile still exists
-		:raise AssertionError: if our lock-file does not exist"""
-		if not self._owns_lock:
-			return False
+    def _has_lock(self):
+        """:return: True if we have a lock and if the lockfile still exists
+        :raise AssertionError: if our lock-file does not exist"""
+        if not self._owns_lock:
+            return False
 
-		return True
+        return True
 
-	def _obtain_lock_or_raise(self):
-		"""Create a lock file as flag for other instances, mark our instance as lock-holder
+    def _obtain_lock_or_raise(self):
+        """Create a lock file as flag for other instances, mark our instance as lock-holder
 
-		:raise IOError: if a lock was already present or a lock file could not be written"""
-		if self._has_lock():
-			return
-		lock_file = self._lock_file_path()
-		if os.path.isfile(lock_file):
-			raise IOError("Lock for file %r did already exist, delete %r in case the lock is illegal" % (self._file_path, lock_file))
+        :raise IOError: if a lock was already present or a lock file could not be written"""
+        if self._has_lock():
+            return
+        lock_file = self._lock_file_path()
+        if os.path.isfile(lock_file):
+            raise IOError("Lock for file %r did already exist, delete %r in case the lock is illegal" % (self._file_path, lock_file))
 
-		try:
-			fd = os.open(lock_file, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0)
-			os.close(fd)
-		except OSError,e:
-			raise IOError(str(e))
+        try:
+            fd = os.open(lock_file, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0)
+            os.close(fd)
+        except OSError,e:
+            raise IOError(str(e))
 
-		self._owns_lock = True
+        self._owns_lock = True
 
-	def _obtain_lock(self):
-		"""The default implementation will raise if a lock cannot be obtained.
-		Subclasses may override this method to provide a different implementation"""
-		return self._obtain_lock_or_raise()
+    def _obtain_lock(self):
+        """The default implementation will raise if a lock cannot be obtained.
+        Subclasses may override this method to provide a different implementation"""
+        return self._obtain_lock_or_raise()
 
-	def _release_lock(self):
-		"""Release our lock if we have one"""
-		if not self._has_lock():
-			return
+    def _release_lock(self):
+        """Release our lock if we have one"""
+        if not self._has_lock():
+            return
 
-		# if someone removed our file beforhand, lets just flag this issue
-		# instead of failing, to make it more usable.
-		lfp = self._lock_file_path()
-		try:
-			# on bloody windows, the file needs write permissions to be removable.
-			# Why ...
-			if os.name == 'nt':
-				os.chmod(lfp, 0777)
-			# END handle win32
-			os.remove(lfp)
-		except OSError:
-			pass
-		self._owns_lock = False
+        # if someone removed our file beforhand, lets just flag this issue
+        # instead of failing, to make it more usable.
+        lfp = self._lock_file_path()
+        try:
+            # on bloody windows, the file needs write permissions to be removable.
+            # Why ...
+            if os.name == 'nt':
+                os.chmod(lfp, 0777)
+            # END handle win32
+            os.remove(lfp)
+        except OSError:
+            pass
+        self._owns_lock = False
--- a/rhodecode/public/css/style.css	Mon Mar 04 12:12:38 2013 +0100
+++ b/rhodecode/public/css/style.css	Mon Mar 04 12:17:15 2013 +0100
@@ -312,7 +312,7 @@
 }
 
 #header-dd:hover{
-	opacity: 0.2;
+    opacity: 0.2;
     -webkit-transition: opacity 0.5s ease-in-out;
     -moz-transition: opacity 0.5s ease-in-out;
     transition: opacity 0.5s ease-in-out;
@@ -4598,21 +4598,21 @@
                                   DIFFS CSS
 ******************************************************************************/
 .diff-collapse{
-	text-align: center;
-	margin-bottom: -15px;
+    text-align: center;
+    margin-bottom: -15px;
 }
 .diff-collapse-button{
-	cursor: pointer;
-	color: #666;
-	font-size: 16px;
+    cursor: pointer;
+    color: #666;
+    font-size: 16px;
 }
 .diff-container {
 
 }
 
 .diff-container.hidden{
-	display: none;
-	overflow: hidden;
+    display: none;
+    overflow: hidden;
 }
 
 
--- a/rhodecode/templates/admin/users/user_edit_my_account.html	Mon Mar 04 12:12:38 2013 +0100
+++ b/rhodecode/templates/admin/users/user_edit_my_account.html	Mon Mar 04 12:17:15 2013 +0100
@@ -148,7 +148,7 @@
 
     var url = pyroutes.url('admin_settings_my_pullrequests');
     if(YUD.get('show_closed') && YUD.get('show_closed').checked) {
-    	var url = pyroutes.url('admin_settings_my_pullrequests', {'pr_show_closed': '1'});
+        var url = pyroutes.url('admin_settings_my_pullrequests', {'pr_show_closed': '1'});
     }
     ypjax(url, 'pullrequests_container', function(){
         YUE.on('show_closed','change',function (e) {
--- a/rhodecode/templates/changelog/changelog.html	Mon Mar 04 12:12:38 2013 +0100
+++ b/rhodecode/templates/changelog/changelog.html	Mon Mar 04 12:17:15 2013 +0100
@@ -174,8 +174,8 @@
                                     rev_start+'...'+rev_end);
 
                             var link = (rev_start == rev_end)
-                              	? _TM['Show selected change __S']
-                            	: _TM['Show selected changes __S -> __E'];
+                                ? _TM['Show selected change __S']
+                                : _TM['Show selected changes __S -> __E'];
 
                             link = link.replace('__S',rev_start.substr(0,6));
                             link = link.replace('__E',rev_end.substr(0,6));
--- a/rhodecode/templates/email_templates/pull_request_comment.html	Mon Mar 04 12:12:38 2013 +0100
+++ b/rhodecode/templates/email_templates/pull_request_comment.html	Mon Mar 04 12:17:15 2013 +0100
@@ -9,10 +9,10 @@
 <div>${_('View this comment here')}: ${pr_comment_url}</div>
 
 %if status_change:
-	%if closing_pr:
-	   <span>${_('Closing pull request with status')} -&gt; ${status_change}</span>
-	%else:
-	   <span>${_('New status')} -&gt; ${status_change}</span>
-	%endif
+    %if closing_pr:
+       <span>${_('Closing pull request with status')} -&gt; ${status_change}</span>
+    %else:
+       <span>${_('New status')} -&gt; ${status_change}</span>
+    %endif
 %endif
 </p>
--- a/rhodecode/templates/pullrequests/pullrequest.html	Mon Mar 04 12:12:38 2013 +0100
+++ b/rhodecode/templates/pullrequests/pullrequest.html	Mon Mar 04 12:17:15 2013 +0100
@@ -155,7 +155,7 @@
       }; // gather the org/other ref and repo here
 
       for (k in rev_data){
-    	  url = url.replace('__'+k+'__',rev_data[k]);
+          url = url.replace('__'+k+'__',rev_data[k]);
       }
 
       YUD.get('pull_request_overview').innerHTML = "${_('Loading ...')}";
@@ -172,8 +172,8 @@
           // reset && add the reviewer based on selected repo
           YUD.get('review_members').innerHTML = '';
           addReviewMember(_data.user.user_id, _data.user.firstname,
-        		          _data.user.lastname, _data.user.username,
-        		          _data.user.gravatar_link);
+                          _data.user.lastname, _data.user.username,
+                          _data.user.gravatar_link);
       })
   }