##// END OF EJS Templates
made git refs filter configurable ref issue #797...
marcink -
r3561:c04d1d9b beta
parent child Browse files
Show More
@@ -98,6 +98,10 b' use_gravatar = true'
98 ## path to git executable
98 ## path to git executable
99 git_path = git
99 git_path = git
100
100
101 ## git rev filter option, --all is the default filter, if you need to
102 ## hide all refs in changelog switch this to --branches --tags
103 git_rev_filter=--all
104
101 ## RSS feed options
105 ## RSS feed options
102 rss_cut_off_limit = 256000
106 rss_cut_off_limit = 256000
103 rss_items_per_page = 10
107 rss_items_per_page = 10
@@ -98,6 +98,10 b' use_gravatar = true'
98 ## path to git executable
98 ## path to git executable
99 git_path = git
99 git_path = git
100
100
101 ## git rev filter option, --all is the default filter, if you need to
102 ## hide all refs in changelog switch this to --branches --tags
103 git_rev_filter=--all
104
101 ## RSS feed options
105 ## RSS feed options
102 rss_cut_off_limit = 256000
106 rss_cut_off_limit = 256000
103 rss_items_per_page = 10
107 rss_items_per_page = 10
@@ -98,6 +98,10 b' use_gravatar = true'
98 ## path to git executable
98 ## path to git executable
99 git_path = git
99 git_path = git
100
100
101 ## git rev filter option, --all is the default filter, if you need to
102 ## hide all refs in changelog switch this to --branches --tags
103 git_rev_filter=--all
104
101 ## RSS feed options
105 ## RSS feed options
102 rss_cut_off_limit = 256000
106 rss_cut_off_limit = 256000
103 rss_items_per_page = 10
107 rss_items_per_page = 10
@@ -187,8 +187,10 b' class GitChangeset(BaseChangeset):'
187 """
187 """
188 Returns list of children changesets.
188 Returns list of children changesets.
189 """
189 """
190 rev_filter = _git_path = rhodecode.CONFIG.get('git_rev_filter',
191 '--all').strip()
190 so, se = self.repository.run_git_command(
192 so, se = self.repository.run_git_command(
191 "rev-list --all --children | grep '^%s'" % self.raw_id
193 "rev-list %s --children | grep '^%s'" % (rev_filter, self.raw_id)
192 )
194 )
193
195
194 children = []
196 children = []
@@ -231,7 +231,9 b' class GitRepository(BaseRepository):'
231 self._repo.head()
231 self._repo.head()
232 except KeyError:
232 except KeyError:
233 return []
233 return []
234 cmd = 'rev-list --all --reverse --date-order'
234 rev_filter = _git_path = rhodecode.CONFIG.get('git_rev_filter',
235 '--all').strip()
236 cmd = 'rev-list %s --reverse --date-order' % (rev_filter)
235 try:
237 try:
236 so, se = self.run_git_command(cmd)
238 so, se = self.run_git_command(cmd)
237 except RepositoryError:
239 except RepositoryError:
@@ -505,7 +507,9 b' class GitRepository(BaseRepository):'
505 cmd_template += ' $branch_name'
507 cmd_template += ' $branch_name'
506 cmd_params['branch_name'] = branch_name
508 cmd_params['branch_name'] = branch_name
507 else:
509 else:
508 cmd_template += ' --all'
510 rev_filter = _git_path = rhodecode.CONFIG.get('git_rev_filter',
511 '--all').strip()
512 cmd_template += ' %s' % (rev_filter)
509
513
510 cmd = Template(cmd_template).safe_substitute(**cmd_params)
514 cmd = Template(cmd_template).safe_substitute(**cmd_params)
511 revs = self.run_git_command(cmd)[0].splitlines()
515 revs = self.run_git_command(cmd)[0].splitlines()
@@ -98,6 +98,10 b' use_gravatar = true'
98 ## path to git executable
98 ## path to git executable
99 git_path = git
99 git_path = git
100
100
101 ## git rev filter option, --all is the default filter, if you need to
102 ## hide all refs in changelog switch this to --branches --tags
103 git_rev_filter=--all
104
101 ## RSS feed options
105 ## RSS feed options
102 rss_cut_off_limit = 256000
106 rss_cut_off_limit = 256000
103 rss_items_per_page = 10
107 rss_items_per_page = 10
General Comments 0
You need to be logged in to leave comments. Login now