Changeset 3200
- Timestamp:
- 02/08/08 16:08:04 (10 months ago)
- Files:
-
- gitplugin/0.11/gitplugin/PyGIT.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gitplugin/0.11/gitplugin/PyGIT.py
r3199 r3200 351 351 if limit is None: 352 352 limit = -1 353 for rev in self._git_call_f("rev-list", 354 ["--max-count=%d" % limit, 353 for rev in self._git_call_f("rev-list", 354 ["--max-count=%d" % limit, 355 355 str(sha), "--", path]).readlines(): 356 356 if(skip > 0): … … 403 403 if tree1 is None: 404 404 tree1 = "--root" 405 for chg in self._git_call_f("diff-tree", ["-r", 406 str(tree1), 407 str(tree2), 408 "--", path]).readlines(): 409 if chg.startswith(tree2): 405 406 next_is_path = False 407 for chg in self._git_call("diff-tree", ["-z", "-r", 408 str(tree1), 409 str(tree2), 410 "--", path]).split('\0'): 411 if not chg: 412 assert not next_is_path 410 413 continue 411 (mode1,mode2,obj1,obj2,action,path) = chg[:-1].split(None, 5) 414 415 if next_is_path: 416 next_is_path = False 417 path = chg 418 yield (mode1,mode2,obj1,obj2,action,path) 419 continue 420 421 if not chg.startswith(':'): 422 continue 423 424 (mode1,mode2,obj1,obj2,action) = chg.split(None) 412 425 mode1 = mode1[1:] 413 yield (mode1,mode2,obj1,obj2,action,path) 426 next_is_path = True 427 428 assert not next_is_path 414 429 415 430 if __name__ == '__main__':
