threads / patch / 9715

patch, 2 partsUse --force to overwrite python files

Subject: [PATCH 1/2] Use --force to overwrite python files

## tl;dr

2 messages between Aug 31, 2007 and Aug 31, 2007. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

Pavel Roskin· Aug 31, 2007, 03:04 UTC · lore

Installing StGIT with "make install" is not working properly if another version is installed. Files under ~/lib/python2.5/site-packages/stgit are not updated.

This causes unexpected problems if switching between different branches of StGIT.

Using "--force" ensures that the files in the tree are installed even if the already installed files are newer.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to Makefile +1 −1
diff --git a/Makefile b/Makefile
index 8671209..c890b8e 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ all:
 	$(PYTHON) setup.py build
 
 install:
-	$(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR)
+	$(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) --force
 
 doc:
 	cd Documentation && $(MAKE) all
Pavel Roskin· Aug 31, 2007, 03:04 UTC · re: Pavel Roskin · lore

[PATCH 2/2] Fix refresh -es

Use named arguments to call git.diff() from stack.edit_file(). git.diff() doesn't write to files anymore, do it in the caller.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 stgit/stack.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to stgit/stack.py +2 −1
diff --git a/stgit/stack.py b/stgit/stack.py
index ea22d76..0253348 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -88,7 +88,8 @@ def edit_file(series, line, comment, show_patch = True):
     if show_patch:
        print >> f, __patch_prefix
        # series.get_patch(series.get_current()).get_top()
-       git.diff([], series.get_patch(series.get_current()).get_bottom(), None, f)
+       diff_str = git.diff(rev1 = series.get_patch(series.get_current()).get_bottom())
+       f.write(diff_str)
 
     #Vim modeline must be near the end.
     print >> f, __comment_prefix, 'vi: set textwidth=75 filetype=diff nobackup:'

← back to recent threads