source: trunk/scripts/git-migration/filter-subdirs @ 1923

Last change on this file since 1923 was 1898, checked in by broder, 16 years ago

Use filter-branch to correct the trunk/packages/$package/$package
setup from earlier in the repo history.

  • Property svn:executable set to *
File size: 523 bytes
Line 
1#!/usr/bin/python
2
3import sys
4import os
5import subprocess
6
7tree = sys.argv[1]
8package = os.environ['PACKAGE']
9
10p = subprocess.Popen(['git', 'ls-tree',
11                      tree,
12                      package],
13                     stdout=subprocess.PIPE,
14                     stdin=subprocess.PIPE)
15p.wait()
16t = p.stdout.read().strip().split()
17
18if t != [] and t[1] == 'tree':
19    tree = t[2]
20
21subprocess.check_call(['git', 'commit-tree',
22                       tree] + sys.argv[2:],
23                      stdin=sys.stdin)
Note: See TracBrowser for help on using the repository browser.