repo.py (11406:dd204e5baba7) | repo.py (11466:4ab31d6afa5e) |
---|---|
1#!/usr/bin/env python 2# 3# Copyright (c) 2016 ARM Limited 4# All rights reserved 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 171 unchanged lines hidden (view full) --- 180 # repository/commit. 181 return "" 182 183 def status(self, filter=None, files=[], cached=False): 184 cmd = [ self.git, "diff-index", "--name-status" ] 185 if cached: 186 cmd.append("--cached") 187 if filter: | 1#!/usr/bin/env python 2# 3# Copyright (c) 2016 ARM Limited 4# All rights reserved 5# 6# The license below extends only to copyright in the software and shall 7# not be construed as granting a license to any other intellectual 8# property including but not limited to intellectual property relating --- 171 unchanged lines hidden (view full) --- 180 # repository/commit. 181 return "" 182 183 def status(self, filter=None, files=[], cached=False): 184 cmd = [ self.git, "diff-index", "--name-status" ] 185 if cached: 186 cmd.append("--cached") 187 if filter: |
188 cmd += [ "--diff-filter", filter ] | 188 cmd += [ "--diff-filter=%s" % filter ] |
189 cmd += [ self.head_revision(), "--" ] + files 190 status = subprocess.check_output(cmd).rstrip("\n") 191 192 if status: 193 return [ f.split("\t") for f in status.split("\n") ] 194 else: 195 return [] 196 --- 81 unchanged lines hidden --- | 189 cmd += [ self.head_revision(), "--" ] + files 190 status = subprocess.check_output(cmd).rstrip("\n") 191 192 if status: 193 return [ f.split("\t") for f in status.split("\n") ] 194 else: 195 return [] 196 --- 81 unchanged lines hidden --- |