projects
/
invirt/scripts/git-migration.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify out the need to know the CWD.
[invirt/scripts/git-migration.git]
/
git-migrate
diff --git
a/git-migrate
b/git-migrate
index
909a604
..
458d903
100755
(executable)
--- a/
git-migrate
+++ b/
git-migrate
@@
-27,7
+27,7
@@
def clonePackage(base, pkg):
# Some of these repos have a rev where everything was deleted
# as a result of the move. We don't want that rev to exist.
# Some of these repos have a rev where everything was deleted
# as a result of the move. We don't want that rev to exist.
- p = subprocess.Popen(['git', 'ls-files'],
+ p = subprocess.Popen(['git', 'ls-tree', 'HEAD'],
cwd='%s.git' % pkg,
stdout=subprocess.PIPE)
p.wait()
cwd='%s.git' % pkg,
stdout=subprocess.PIPE)
p.wait()
@@
-40,9
+40,8
@@
def cloneAllPackages(base):
clonePackage(base, pkg.strip())
def mergeHistory(old_pkg, new_pkg, n):
clonePackage(base, pkg.strip())
def mergeHistory(old_pkg, new_pkg, n):
- cwd = os.getcwd()
subprocess.check_call(['git', 'push',
subprocess.check_call(['git', 'push',
- 'file:///%s/%s.git' % (cwd, new_pkg),
+ '../%s.git' % new_pkg,
'master:refs/heads/%s' % old_pkg],
cwd='%s.git' % old_pkg)
'master:refs/heads/%s' % old_pkg],
cwd='%s.git' % old_pkg)