* [PATCH 1/4] Rename branch section in config when the branch is renamed
@ 2007-02-04 5:32 Pavel Roskin
2007-02-04 5:32 ` [PATCH 2/4] Copy remote and merge settings when cloning a branch Pavel Roskin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Pavel Roskin @ 2007-02-04 5:32 UTC (permalink / raw)
To: git, Catalin Marinas
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
stgit/config.py | 3 +++
stgit/stack.py | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/stgit/config.py b/stgit/config.py
index 48b4e2d..fb38932 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -96,6 +96,9 @@ class GitConfig:
else:
raise GitConfigException, 'Value for "%s" is not an integer: "%s"' % (name, value)
+ def rename_section(self, from_name, to_name):
+ self.__run('git-repo-config --rename-section', [from_name, to_name])
+
def set(self, name, value):
self.__run('git-repo-config', [name, value])
diff --git a/stgit/stack.py b/stgit/stack.py
index 96863c6..c3bf3c6 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -590,6 +590,10 @@ class Series(StgitObject):
rename(os.path.join(self.__base_dir, 'refs', 'patches'),
self.__name, to_stack.__name)
+ # Rename the config section
+ config.rename_section("branch.%s" % self.__name,
+ "branch.%s" % to_name)
+
self.__init__(to_name)
def clone(self, target_series):
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] Copy remote and merge settings when cloning a branch
2007-02-04 5:32 [PATCH 1/4] Rename branch section in config when the branch is renamed Pavel Roskin
@ 2007-02-04 5:32 ` Pavel Roskin
2007-02-04 5:32 ` [PATCH 3/4] Don't print "rebasing" if the head doesn't change Pavel Roskin
2007-02-04 5:32 ` [PATCH 4/4] Assorted typos Pavel Roskin
2 siblings, 0 replies; 4+ messages in thread
From: Pavel Roskin @ 2007-02-04 5:32 UTC (permalink / raw)
To: git, Catalin Marinas
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
stgit/stack.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/stgit/stack.py b/stgit/stack.py
index c3bf3c6..2e01f52 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -632,6 +632,15 @@ class Series(StgitObject):
# fast forward the cloned series to self's top
new_series.forward_patches(applied)
+ # Clone remote and merge settings
+ value = config.get('branch.%s.remote' % self.__name)
+ if value:
+ config.set('branch.%s.remote' % target_series, value)
+
+ value = config.get('branch.%s.merge' % self.__name)
+ if value:
+ config.set('branch.%s.merge' % target_series, value)
+
def delete(self, force = False):
"""Deletes an stgit series
"""
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] Don't print "rebasing" if the head doesn't change
2007-02-04 5:32 [PATCH 1/4] Rename branch section in config when the branch is renamed Pavel Roskin
2007-02-04 5:32 ` [PATCH 2/4] Copy remote and merge settings when cloning a branch Pavel Roskin
@ 2007-02-04 5:32 ` Pavel Roskin
2007-02-04 5:32 ` [PATCH 4/4] Assorted typos Pavel Roskin
2 siblings, 0 replies; 4+ messages in thread
From: Pavel Roskin @ 2007-02-04 5:32 UTC (permalink / raw)
To: git, Catalin Marinas
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
stgit/commands/pull.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/stgit/commands/pull.py b/stgit/commands/pull.py
index b63ef7a..0aee6bf 100644
--- a/stgit/commands/pull.py
+++ b/stgit/commands/pull.py
@@ -73,8 +73,10 @@ def func(parser, options, args):
print 'Pulling from "%s"...' % repository
git.fetch(repository)
if (config.get('stgit.pull-does-rebase') == 'yes'):
- print 'rebasing to "%s"...' % git.fetch_head()
- git.reset(tree_id = git.fetch_head())
+ tree_id = git.fetch_head()
+ if tree_id != git.get_head():
+ print 'rebasing to "%s"...' % tree_id
+ git.reset(tree_id)
print 'done'
# push the patches back
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] Assorted typos
2007-02-04 5:32 [PATCH 1/4] Rename branch section in config when the branch is renamed Pavel Roskin
2007-02-04 5:32 ` [PATCH 2/4] Copy remote and merge settings when cloning a branch Pavel Roskin
2007-02-04 5:32 ` [PATCH 3/4] Don't print "rebasing" if the head doesn't change Pavel Roskin
@ 2007-02-04 5:32 ` Pavel Roskin
2 siblings, 0 replies; 4+ messages in thread
From: Pavel Roskin @ 2007-02-04 5:32 UTC (permalink / raw)
To: git, Catalin Marinas
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
debian/copyright | 2 +-
stgit/commands/branch.py | 2 +-
stgit/stack.py | 4 ++--
t/t1301-assimilate.sh | 2 +-
t/test-lib.sh | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/debian/copyright b/debian/copyright
index 345789d..15d8679 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,6 +1,6 @@
This package was downloaded from http://www.procode.org/stgit/
-Copyright Holder: Cataling Marinas <catalin.marinas@gmail.com>
+Copyright Holder: Catalin Marinas <catalin.marinas@gmail.com>
and various contributors
License:
diff --git a/stgit/commands/branch.py b/stgit/commands/branch.py
index f074d47..d7ddedb 100644
--- a/stgit/commands/branch.py
+++ b/stgit/commands/branch.py
@@ -126,7 +126,7 @@ def func(parser, options, args):
if len(args) >= 2:
try:
if git.rev_parse(args[1]) == git.rev_parse('refs/heads/' + args[1]):
- # we are for sure refering to a branch
+ # we are for sure referring to a branch
parentbranch = 'refs/heads/' + args[1]
print 'Recording "%s" as parent branch.' % parentbranch
elif git.rev_parse(args[1]) and re.search('/', args[1]):
diff --git a/stgit/stack.py b/stgit/stack.py
index 2e01f52..7f3b65d 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -658,7 +658,7 @@ class Series(StgitObject):
os.rmdir(self.__trash_dir)
# FIXME: find a way to get rid of those manual removals
- # (move functionnality to StgitObject ?)
+ # (move functionality to StgitObject ?)
if os.path.exists(self.__applied_file):
os.remove(self.__applied_file)
if os.path.exists(self.__unapplied_file):
@@ -1044,7 +1044,7 @@ class Series(StgitObject):
else:
# we store the correctly merged files only for
# tracking the conflict history. Note that the
- # git.merge() operations shouls always leave the index
+ # git.merge() operations should always leave the index
# in a valid state (i.e. only stage 0 files)
self.refresh_patch(cache_update = False, log = 'push(c)')
raise StackException, str(ex)
diff --git a/t/t1301-assimilate.sh b/t/t1301-assimilate.sh
index 26b263c..906f5bb 100755
--- a/t/t1301-assimilate.sh
+++ b/t/t1301-assimilate.sh
@@ -65,7 +65,7 @@ test_expect_success \
'
test_expect_success \
- 'Create a mege commit' \
+ 'Create a merge commit' \
'
git checkout -b br master^^ &&
echo woof > woof.txt &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index b44a590..3274b84 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -164,7 +164,7 @@ test_create_repo () {
mv .git/hooks .git/hooks-disabled
echo "empty start" |
git-commit-tree `git-write-tree` >.git/refs/heads/master 2>&4 ||
- error "cannot run git-commit -- is your git-core funtionning?"
+ error "cannot run git-commit -- is your git-core functioning?"
cd "$owd"
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-04 5:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-04 5:32 [PATCH 1/4] Rename branch section in config when the branch is renamed Pavel Roskin
2007-02-04 5:32 ` [PATCH 2/4] Copy remote and merge settings when cloning a branch Pavel Roskin
2007-02-04 5:32 ` [PATCH 3/4] Don't print "rebasing" if the head doesn't change Pavel Roskin
2007-02-04 5:32 ` [PATCH 4/4] Assorted typos Pavel Roskin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.