[csw-devel] SF.net SVN: gar:[9804] csw/mgar/gar/v2-bwalton
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Tue May 4 04:50:41 CEST 2010
Revision: 9804
http://gar.svn.sourceforge.net/gar/?rev=9804&view=rev
Author: bdwalton
Date: 2010-05-04 02:50:41 +0000 (Tue, 04 May 2010)
Log Message:
-----------
gar/v2-bwalton: commit individual patches with git instead of one lump commit; use git am where possible, patch where not
Modified Paths:
--------------
csw/mgar/gar/v2-bwalton/gar.lib.mk
csw/mgar/gar/v2-bwalton/gar.mk
Modified: csw/mgar/gar/v2-bwalton/gar.lib.mk
===================================================================
--- csw/mgar/gar/v2-bwalton/gar.lib.mk 2010-05-04 02:10:50 UTC (rev 9803)
+++ csw/mgar/gar/v2-bwalton/gar.lib.mk 2010-05-04 02:50:41 UTC (rev 9804)
@@ -471,10 +471,23 @@
@gzip -dc $(DOWNLOADDIR)/$* | $(GARPATCH)
@$(MAKECOOKIE)
-# apply normal patches
+# apply normal patches (git format-patch output or old-style diff -r)
+# git should only be used in $(WORKSRC_FIRSTMOD)
normal-patch-%:
@echo " ==> Applying patch $(DOWNLOADDIR)/$*"
- $(GARPATCH) < $(DOWNLOADDIR)/$*
+ @( if [ -d "$(abspath $(WORKSRC)/.git)" ]; then \
+ if ggrep -q 'Subject:' $(abspath $(DOWNLOADDIR)/$*); then \
+ echo Adding git-style patch...; \
+ cd $(WORKSRC); git am $(abspath $(DOWNLOADDIR)/$*); \
+ else \
+ echo Adding old-style patch...; \
+ $(GARPATCH) < $(DOWNLOADDIR)/$*; \
+ cd $(WORKSRC); git add -A; \
+ git commit -am "old style patch: $*"; \
+ fi; \
+ else \
+ $(GARPATCH) < $(DOWNLOADDIR)/$*; \
+ fi )
@$(MAKECOOKIE)
### PATCH FILE TYPE MAPPINGS ###
Modified: csw/mgar/gar/v2-bwalton/gar.mk
===================================================================
--- csw/mgar/gar/v2-bwalton/gar.mk 2010-05-04 02:10:50 UTC (rev 9803)
+++ csw/mgar/gar/v2-bwalton/gar.mk 2010-05-04 02:50:41 UTC (rev 9804)
@@ -448,16 +448,9 @@
patch: pre-patch $(addprefix patch-,$(MODULATIONS)) post-patch
@$(DONADA)
-patch-modulated: extract-modulated $(WORKSRC) pre-patch-modulated pre-patch-$(MODULATION) $(PATCH_TARGETS) $(if $(filter $(firstword $(MODULATIONS)),$(MODULATION)),post-patch-gitsnap) post-patch-$(MODULATION) post-patch-modulated
+patch-modulated: extract-modulated $(WORKSRC) pre-patch-modulated pre-patch-$(MODULATION) $(PATCH_TARGETS) post-patch-$(MODULATION) post-patch-modulated
@$(DONADA)
-post-patch-gitsnap: $(PATCH_TARGETS)
- @echo Snapshotting patched source tree with git...
- @( cd $(WORKSRC); \
- git checkout -b csw-$(GARVERSION) upstream-$(GARVERSION); \
- git add -A; git commit -m "CSW patches for $(GARVERSION)" )
- @$(MAKECOOKIE)
-
# returns true if patch has completed successfully, false
# otherwise
patch-p:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list