Skip to contentSkip to conversation

Use --force to overwrite python files

PATCH New Pavel Roskin 1 participant 2 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Use --force to overwrite python files

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.

---

 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index 8671209..c890b8e 100644
@@ -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
#1 lore raw

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.

---

 stgit/stack.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
stgit/stack.py +2 -1
index ea22d76..0253348 100644
@@ -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:'