Commits

Marcin Kuzminski committed 34eb00b

fixes #449 bad regex could get more than revisions from parsing history

Comments (0)

Files changed (2)

docs/changelog.rst

 - 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**)
 ----------------------

rhodecode/lib/vcs/backends/git/changeset.py

         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):