Mercurial > public > src > rhodecode
changeset 2375:34eb00bd19f2 beta
fixes #449 bad regex could get more than revisions from parsing history
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 16 May 2012 00:06:23 +0200 |
parents | 3dbe675b4342 |
children | 058fc80b052e 8caaa9955f5e |
files | docs/changelog.rst rhodecode/lib/vcs/backends/git/changeset.py |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/changelog.rst Tue May 15 23:31:46 2012 +0200 +++ b/docs/changelog.rst Wed May 16 00:06:23 2012 +0200 @@ -30,6 +30,7 @@ - fixed no scm found warning - fixed __future__ import error on rcextensions - made simplejson required lib for speedup on JSON encoding +- fixes #449 bad regex could get more than revisions from parsing history 1.3.5 (**2012-05-10**) ----------------------
--- a/rhodecode/lib/vcs/backends/git/changeset.py Tue May 15 23:31:46 2012 +0200 +++ b/rhodecode/lib/vcs/backends/git/changeset.py Wed May 16 00:06:23 2012 +0200 @@ -240,11 +240,11 @@ which is generally not good. Should be replaced with algorithm iterating commits. """ - cmd = 'log --pretty="format: %%H" --name-status -p %s -- "%s"' % ( + cmd = 'log --pretty="format: --%%H--" --name-status -p %s -- "%s"' % ( self.id, path ) so, se = self.repository.run_git_command(cmd) - ids = re.findall(r'\w{40}', so) + ids = re.findall(r'(?:--)(\w{40})(?:--)', so) return [self.repository.get_changeset(id) for id in ids] def get_file_annotate(self, path):