* [PATCH 1/2] Parse /top.old with id and when requesting diffs
@ 2005-10-27 8:56 Paolo 'Blaisorblade' Giarrusso
2005-10-27 8:56 ` [PATCH 2/2] Ask vim to avoid backup copies of .stgit.msg Paolo 'Blaisorblade' Giarrusso
0 siblings, 1 reply; 2+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-10-27 8:56 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Comparing a patch after and before a merge is very important, and looking into
.git/patches by hand is not the nicer way to do it.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
stgit/commands/common.py | 5 +++++
stgit/stack.py | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/stgit/commands/common.py b/stgit/commands/common.py
--- a/stgit/commands/common.py
+++ b/stgit/commands/common.py
@@ -68,6 +68,11 @@ def git_id(string):
return series.get_patch(patch_name).get_top()
elif patch_id == 'bottom':
return series.get_patch(patch_name).get_bottom()
+ # Note we can return None here.
+ elif patch_id == 'top.old':
+ return series.get_patch(patch_name).get_old_top()
+ elif patch_id == 'bottom.old':
+ return series.get_patch(patch_name).get_old_bottom()
# base
if patch_name == 'base' and len(string_list) == 1:
diff --git a/stgit/stack.py b/stgit/stack.py
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -165,6 +165,9 @@ class Patch:
elif os.path.isfile(fname):
os.remove(fname)
+ def get_old_bottom(self):
+ return self.__get_field('bottom.old')
+
def get_bottom(self):
return self.__get_field('bottom')
@@ -177,6 +180,9 @@ class Patch:
self.__set_field('bottom.old', None)
self.__set_field('bottom', string)
+ def get_old_top(self):
+ return self.__get_field('top.old')
+
def get_top(self):
return self.__get_field('top')
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 2/2] Ask vim to avoid backup copies of .stgit.msg
2005-10-27 8:56 [PATCH 1/2] Parse /top.old with id and when requesting diffs Paolo 'Blaisorblade' Giarrusso
@ 2005-10-27 8:56 ` Paolo 'Blaisorblade' Giarrusso
0 siblings, 0 replies; 2+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-10-27 8:56 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Do this by adding nobackup to the modeline.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
stgit/stack.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/stgit/stack.py b/stgit/stack.py
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -88,7 +88,7 @@ def edit_file(series, string, comment, s
git.diff([], series.get_patch(series.get_current()).get_bottom(), None, f)
#Vim modeline must be near the end.
- print >> f, __comment_prefix, 'vi: set textwidth=75 filetype=diff:'
+ print >> f, __comment_prefix, 'vi: set textwidth=75 filetype=diff nobackup:'
f.close()
# the editor
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-27 9:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-27 8:56 [PATCH 1/2] Parse /top.old with id and when requesting diffs Paolo 'Blaisorblade' Giarrusso
2005-10-27 8:56 ` [PATCH 2/2] Ask vim to avoid backup copies of .stgit.msg Paolo 'Blaisorblade' Giarrusso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox