changeset: 59:ae3d6e55776b01e01c7c2b6589a877598f0f0c1f
tag: tip
user: root@...
date: Fri Sep 29 08:14:50 2006 +0200
files: ksync
description:
ksync: replace GITROOT_KERNEL with get_git_root(), add chdir() to rebase cmd
diff -r c708f685322f3507c6b6dad1200a39911b7b196a -r ae3d6e55776b01e01c7c2b6589a877598f0f0c1f ksync
--- a/ksync Thu Sep 28 15:43:22 2006 +0200
+++ b/ksync Fri Sep 29 08:14:50 2006 +0200
@@ -1399,7 +1399,7 @@ def git_update():
return
ok = False
try:
- os.chdir(GITROOT_KERNEL)
+ os.chdir(get_git_root())
my_popen3s("stg branch master", filter="Branch \"master\" is already the current branch")
sys.stdout.flush()
os.system("git-pull origin")
@@ -1416,9 +1416,9 @@ def git_rsync():
return
ok = False
try:
- os.chdir(GITROOT_KERNEL)
+ os.chdir(get_git_root())
my_popen3s("stg branch linus", filter="Branch \"linus\" is already the current branch", ignore_stdout=True)
- os.chdir(GITROOT_KERNEL + '/.git')
+ os.chdir(get_git_root() + '/.git')
os.system("git-update-server-info")
sys.stdout.flush()
os.system("rsync -za -essh --delete * perex@...")
@@ -1438,7 +1438,7 @@ def git_merge(rev):
ok = False
reason = 'Failed to merge patch "%s"' % rev
try:
- os.chdir(GITROOT_KERNEL)
+ os.chdir(get_git_root())
entry = {}
entry['url'] = int(rev)
merge1(entry, do_patch_level=True, quiet=True)
@@ -1454,7 +1454,7 @@ def git_merge(rev):
git_unlock(quiet=True)
def git_read_patches(branch, file):
- fp = open(GITROOT_KERNEL + '/.git/patches/%s/%s' % (branch, file))
+ fp = open(get_git_root() + '/.git/patches/%s/%s' % (branch, file))
patches = fp.readlines()
fp.close()
res = []
@@ -1463,7 +1463,7 @@ def git_read_patches(branch, file):
return res
def git_read_description(branch, rev):
- fp = open(GITROOT_KERNEL + '/.git/patches/%s/patches/%s/description' % (branch, rev))
+ fp = open(get_git_root() + '/.git/patches/%s/patches/%s/description' % (branch, rev))
res = fp.readlines()
fp.close()
return res
@@ -1475,7 +1475,7 @@ def git_move(lo, hi):
return
ok = False
try:
- os.chdir(GITROOT_KERNEL)
+ os.chdir(get_git_root())
git_environ()
patches = git_read_patches('mm', 'applied') + git_read_patches('mm', 'unapplied')
patches.sort()
@@ -1490,7 +1490,7 @@ def git_move(lo, hi):
git_unlock()
def git_remove1(lo, hi, branch):
- os.chdir(GITROOT_KERNEL)
+ os.chdir(get_git_root())
git_environ()
patches = git_read_patches(branch, 'applied') + git_read_patches(branch, 'unapplied')
patches.reverse()
@@ -1569,6 +1569,7 @@ def git_rebase():
return
ok = False
try:
+ os.chdir(get_git_root())
for branch in STG_BRANCHES:
print 'Rebasing branch %s.' % branch
my_popen3s("stg branch %s" % branch, filter="Branch \"%s\" is already the current branch" % branch, ignore_stdout=True)
|