Changeset - f5a1314886ec
[Not reviewed]
beta
0 5 0
Marcin Kuzminski - 12 years ago 2013-05-22 03:17:42
marcin@python-works.com
replace list appends with list literals when possible
5 files changed with 7 insertions and 15 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/feed.py
Show inline comments
 
@@ -87,9 +87,8 @@ class FeedController(BaseRepoController)
 
        return diff_processor, changes
 

	
 
    def __get_desc(self, cs):
 
        desc_msg = []
 
        desc_msg.append((_('%s committed on %s')
 
                         % (h.person(cs.author), h.fmt_date(cs.date))) + '<br/>')
 
        desc_msg = [(_('%s committed on %s')
 
                     % (h.person(cs.author), h.fmt_date(cs.date))) + '<br/>']
 
        #branches, tags, bookmarks
 
        if cs.branch:
 
            desc_msg.append('branch: %s<br/>' % cs.branch)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -598,11 +598,9 @@ def action_parser(user_log, feed=False, 
 
                        'ref_name': _name
 
                    })
 
                    revs.append(_rev)
 
        cs_links = []
 
        cs_links.append(" " + ', '.join(
 
        cs_links = [" " + ', '.join(
 
            [lnk(rev, repo_name) for rev in revs[:revs_limit]]
 
            )
 
        )
 
        )]
 
        _op1, _name1 = _get_op(revs_ids[0])
 
        _op2, _name2 = _get_op(revs_ids[-1])
 

	
rhodecode/lib/middleware/simplegit.py
Show inline comments
 
@@ -55,8 +55,7 @@ class SimpleGitUploadPackHandler(dulserv
 
        self.progress("counting objects: %d, done.\n" % len(objects_iter))
 
        dulserver.write_pack_objects(dulserver.ProtocolFile(None, write),
 
                                     objects_iter)
 
        messages = []
 
        messages.append('thank you for using rhodecode')
 
        messages = ['thank you for using rhodecode']
 

	
 
        for msg in messages:
 
            self.progress(msg + "\n")
rhodecode/lib/vcs/backends/git/config.py
Show inline comments
 
@@ -318,9 +318,7 @@ class StackedConfig(Config):
 
        specified), the users' home directory and the system
 
        configuration.
 
        """
 
        paths = []
 
        paths.append(os.path.expanduser("~/.gitconfig"))
 
        paths.append("/etc/gitconfig")
 
        paths = [os.path.expanduser("~/.gitconfig"), "/etc/gitconfig"]
 
        backends = []
 
        for path in paths:
 
            try:
rhodecode/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -635,9 +635,7 @@ class GitRepository(BaseRepository):
 
        Tries to pull changes from external location.
 
        """
 
        url = self._get_url(url)
 
        cmd = ['pull']
 
        cmd.append("--ff-only")
 
        cmd.append(url)
 
        cmd = ['pull', "--ff-only", url]
 
        cmd = ' '.join(cmd)
 
        # If error occurs run_git_command raises RepositoryError already
 
        self.run_git_command(cmd)
0 comments (0 inline, 0 general)