Changeset - 4e429252f3ee
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 12 years ago 2013-09-02 16:57:30
marcin@python-works.com
Don't use -p flag together with -s in git calls. Latest
git version changes behaviour of such call changing the output.

In all the calls where -p -s was used we're only interested in
list of changesets and not the diff.
2 files changed with 6 insertions and 8 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/compare.py
Show inline comments
 
@@ -142,7 +142,7 @@ class CompareController(BaseRepoControll
 
                                'allowed. Got %s != %s' % (org_repo, other_repo))
 

	
 
            so, se = org_repo.run_git_command(
 
                'log --reverse --pretty="format: %%H" -s -p %s..%s'
 
                'log --reverse --pretty="format: %%H" -s %s..%s'
 
                    % (org_rev, other_rev)
 
            )
 
            changesets = [org_repo.get_changeset(cs)
rhodecode/lib/vcs/backends/git/changeset.py
Show inline comments
 
@@ -294,17 +294,15 @@ class GitChangeset(BaseChangeset):
 
        f_path = safe_str(path)
 

	
 
        if limit:
 
            cmd = 'log -n %s --pretty="format: %%H" -s -p %s -- "%s"' % (
 
                      safe_int(limit, 0), cs_id, f_path
 
                   )
 
            cmd = 'log -n %s --pretty="format: %%H" -s %s -- "%s"' % (
 
                      safe_int(limit, 0), cs_id, f_path)
 

	
 
        else:
 
            cmd = 'log --pretty="format: %%H" -s -p %s -- "%s"' % (
 
                      cs_id, f_path
 
                   )
 
            cmd = 'log --pretty="format: %%H" -s %s -- "%s"' % (
 
                      cs_id, f_path)
 
        so, se = self.repository.run_git_command(cmd)
 
        ids = re.findall(r'[0-9a-fA-F]{40}', so)
 
        return [self.repository.get_changeset(id) for id in ids]
 
        return [self.repository.get_changeset(sha) for sha in ids]
 

	
 
    def get_file_history_2(self, path):
 
        """
0 comments (0 inline, 0 general)