changeset 2276:8caaa9955f5e beta

better regex for history
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 16 May 2012 00:37:50 +0200
parents 34eb00bd19f2
children bb0309b4e1ee
files rhodecode/lib/vcs/backends/git/changeset.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/vcs/backends/git/changeset.py	Wed May 16 00:06:23 2012 +0200
+++ b/rhodecode/lib/vcs/backends/git/changeset.py	Wed May 16 00:37:50 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" -s -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'[0-9a-fA-F]{40}', so)
         return [self.repository.get_changeset(id) for id in ids]
 
     def get_file_annotate(self, path):