Re: apply a patch on solr

2009-11-04 Thread David Stuart
You should be ok with the the revision option below. Look for the  
highest revision number in the list of files in the patch as  
subversion increments revision number on a repo basis not a file basis  
so the highest number will represent the current state of all the  
files when the patch was made if that make sense


Regards
Dave

On 4 Nov 2009, at 03:40, michael8 mich...@saracatech.com wrote:



Perfect.  This is what I need to know instead of patching 'in the  
dark'.

Good thing SVN revision cuts across all files like a tag.

Thanks Mike!

Michael


cambridgemike wrote:


You can see what revision the patch was written for at the top of the
patch,
it will look like this:

Index: org/apache/solr/handler/MoreLikeThisHandler.java
===
--- org/apache/solr/handler/MoreLikeThisHandler.java (revision  
772437)

+++ org/apache/solr/handler/MoreLikeThisHandler.java (working copy)

now check out revision 772437 using the --revision switch in svn,  
patch
away, and then svn up to make sure everything merges cleanly.  This  
is a

good guide to follow as well:
http://www.mail-archive.com/solr-user@lucene.apache.org/msg10189.html

cheers,
-mike

On Mon, Nov 2, 2009 at 3:55 PM, michael8 mich...@saracatech.com  
wrote:




Hi,

First I like to pardon my novice question on patching solr (1.4).   
What I

like to know is, given a patch, like the one for collapse field, how
would
one go about knowing what solr source that patch is meant for  
since this

is
a source level patch?  Wouldn't the exact versions of a set of  
java files

to
be patched critical for the patch to work properly?

So far what I have done is to pull the latest collapse field patch  
down

from
http://issues.apache.org/jira/browse/SOLR-236 (field- 
collapse-5.patch),

and
then svn up the latest trunk from
http://svn.apache.org/repos/asf/lucene/solr/trunk/, then patch and  
build.

Intuitively I was thinking I should be doing svn up to a specific
revision/tag instead of just latest.  So far everything seems  
fine, but I

just want to make sure I'm doing the right thing and not just being
lucky.

Thanks,
Michael
--
View this message in context:
http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26157827.html
Sent from the Solr - User mailing list archive at Nabble.com.







--
View this message in context: 
http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26189573.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: apply a patch on solr

2009-11-04 Thread Chris Hostetter

: Thanks, but my question here was not about the patch command itself (which I
: already know), but about simpler way (if any) to go about guaranteeing a
: proper patch with the right file revisions needed by the patch.

as i mentioned before, there is no garuntee that you are patching the 
exact version the diff came from, unless someone tells you which version 
it was...

http://old.nabble.com/Re%3A-apply-a-patch-on-solr-p26181837.html




-Hoss



Re: apply a patch on solr

2009-11-03 Thread michael8

Perfect.  This is what I need to know instead of patching 'in the dark'. 
Good thing SVN revision cuts across all files like a tag.

Thanks Mike!

Michael


cambridgemike wrote:
 
 You can see what revision the patch was written for at the top of the
 patch,
 it will look like this:
 
 Index: org/apache/solr/handler/MoreLikeThisHandler.java
 ===
 --- org/apache/solr/handler/MoreLikeThisHandler.java (revision 772437)
 +++ org/apache/solr/handler/MoreLikeThisHandler.java (working copy)
 
 now check out revision 772437 using the --revision switch in svn, patch
 away, and then svn up to make sure everything merges cleanly.  This is a
 good guide to follow as well:
 http://www.mail-archive.com/solr-user@lucene.apache.org/msg10189.html
 
 cheers,
 -mike
 
 On Mon, Nov 2, 2009 at 3:55 PM, michael8 mich...@saracatech.com wrote:
 

 Hi,

 First I like to pardon my novice question on patching solr (1.4).  What I
 like to know is, given a patch, like the one for collapse field, how
 would
 one go about knowing what solr source that patch is meant for since this
 is
 a source level patch?  Wouldn't the exact versions of a set of java files
 to
 be patched critical for the patch to work properly?

 So far what I have done is to pull the latest collapse field patch down
 from
 http://issues.apache.org/jira/browse/SOLR-236 (field-collapse-5.patch),
 and
 then svn up the latest trunk from
 http://svn.apache.org/repos/asf/lucene/solr/trunk/, then patch and build.
 Intuitively I was thinking I should be doing svn up to a specific
 revision/tag instead of just latest.  So far everything seems fine, but I
 just want to make sure I'm doing the right thing and not just being
 lucky.

 Thanks,
 Michael
 --
 View this message in context:
 http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26157827.html
 Sent from the Solr - User mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26189573.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: apply a patch on solr

2009-11-03 Thread michael8

Hmmm, perhaps I jumped the gun.  I just looked over the field collapse patch
for SOLR-236 and each file listed in the patch has its own revision #.  

E.g. from field-collapse-5.patch:
--- src/java/org/apache/solr/core/SolrConfig.java   (revision 824364)
--- src/solrj/org/apache/solr/client/solrj/response/QueryResponse.java
(revision 816372)
--- src/solrj/org/apache/solr/client/solrj/SolrQuery.java   (revision 
823653)
--- src/java/org/apache/solr/search/SolrIndexSearcher.java  (revision 
794328)
--- src/java/org/apache/solr/search/DocSetHitCollector.java (revision
794328)

Unless there is a better way, it seems like I would need to do svn up
--revision ... for each of the files to be patched and then apply the
patch?  This seems error prone and tedious.  Am I missing something simpler
here?

Michael


michael8 wrote:
 
 Perfect.  This is what I need to know instead of patching 'in the dark'. 
 Good thing SVN revision cuts across all files like a tag.
 
 Thanks Mike!
 
 Michael
 
 
 cambridgemike wrote:
 
 You can see what revision the patch was written for at the top of the
 patch,
 it will look like this:
 
 Index: org/apache/solr/handler/MoreLikeThisHandler.java
 ===
 --- org/apache/solr/handler/MoreLikeThisHandler.java (revision 772437)
 +++ org/apache/solr/handler/MoreLikeThisHandler.java (working copy)
 
 now check out revision 772437 using the --revision switch in svn, patch
 away, and then svn up to make sure everything merges cleanly.  This is a
 good guide to follow as well:
 http://www.mail-archive.com/solr-user@lucene.apache.org/msg10189.html
 
 cheers,
 -mike
 
 On Mon, Nov 2, 2009 at 3:55 PM, michael8 mich...@saracatech.com wrote:
 

 Hi,

 First I like to pardon my novice question on patching solr (1.4).  What
 I
 like to know is, given a patch, like the one for collapse field, how
 would
 one go about knowing what solr source that patch is meant for since this
 is
 a source level patch?  Wouldn't the exact versions of a set of java
 files
 to
 be patched critical for the patch to work properly?

 So far what I have done is to pull the latest collapse field patch down
 from
 http://issues.apache.org/jira/browse/SOLR-236 (field-collapse-5.patch),
 and
 then svn up the latest trunk from
 http://svn.apache.org/repos/asf/lucene/solr/trunk/, then patch and
 build.
 Intuitively I was thinking I should be doing svn up to a specific
 revision/tag instead of just latest.  So far everything seems fine, but
 I
 just want to make sure I'm doing the right thing and not just being
 lucky.

 Thanks,
 Michael
 --
 View this message in context:
 http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26157827.html
 Sent from the Solr - User mailing list archive at Nabble.com.


 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26190563.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: apply a patch on solr

2009-11-03 Thread Joe Calderon
patch -p0  /path/to/field-collapse-5.patch

On Tue, Nov 3, 2009 at 7:48 PM, michael8 mich...@saracatech.com wrote:

 Hmmm, perhaps I jumped the gun.  I just looked over the field collapse patch
 for SOLR-236 and each file listed in the patch has its own revision #.

 E.g. from field-collapse-5.patch:
 --- src/java/org/apache/solr/core/SolrConfig.java       (revision 824364)
 --- src/solrj/org/apache/solr/client/solrj/response/QueryResponse.java
 (revision 816372)
 --- src/solrj/org/apache/solr/client/solrj/SolrQuery.java       (revision 
 823653)
 --- src/java/org/apache/solr/search/SolrIndexSearcher.java      (revision 
 794328)
 --- src/java/org/apache/solr/search/DocSetHitCollector.java     (revision
 794328)

 Unless there is a better way, it seems like I would need to do svn up
 --revision ... for each of the files to be patched and then apply the
 patch?  This seems error prone and tedious.  Am I missing something simpler
 here?

 Michael


 michael8 wrote:

 Perfect.  This is what I need to know instead of patching 'in the dark'.
 Good thing SVN revision cuts across all files like a tag.

 Thanks Mike!

 Michael


 cambridgemike wrote:

 You can see what revision the patch was written for at the top of the
 patch,
 it will look like this:

 Index: org/apache/solr/handler/MoreLikeThisHandler.java
 ===
 --- org/apache/solr/handler/MoreLikeThisHandler.java (revision 772437)
 +++ org/apache/solr/handler/MoreLikeThisHandler.java (working copy)

 now check out revision 772437 using the --revision switch in svn, patch
 away, and then svn up to make sure everything merges cleanly.  This is a
 good guide to follow as well:
 http://www.mail-archive.com/solr-user@lucene.apache.org/msg10189.html

 cheers,
 -mike

 On Mon, Nov 2, 2009 at 3:55 PM, michael8 mich...@saracatech.com wrote:


 Hi,

 First I like to pardon my novice question on patching solr (1.4).  What
 I
 like to know is, given a patch, like the one for collapse field, how
 would
 one go about knowing what solr source that patch is meant for since this
 is
 a source level patch?  Wouldn't the exact versions of a set of java
 files
 to
 be patched critical for the patch to work properly?

 So far what I have done is to pull the latest collapse field patch down
 from
 http://issues.apache.org/jira/browse/SOLR-236 (field-collapse-5.patch),
 and
 then svn up the latest trunk from
 http://svn.apache.org/repos/asf/lucene/solr/trunk/, then patch and
 build.
 Intuitively I was thinking I should be doing svn up to a specific
 revision/tag instead of just latest.  So far everything seems fine, but
 I
 just want to make sure I'm doing the right thing and not just being
 lucky.

 Thanks,
 Michael
 --
 View this message in context:
 http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26157827.html
 Sent from the Solr - User mailing list archive at Nabble.com.







 --
 View this message in context: 
 http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26190563.html
 Sent from the Solr - User mailing list archive at Nabble.com.




apply a patch on solr

2009-11-02 Thread michael8

Hi,

First I like to pardon my novice question on patching solr (1.4).  What I
like to know is, given a patch, like the one for collapse field, how would
one go about knowing what solr source that patch is meant for since this is
a source level patch?  Wouldn't the exact versions of a set of java files to
be patched critical for the patch to work properly?

So far what I have done is to pull the latest collapse field patch down from
http://issues.apache.org/jira/browse/SOLR-236 (field-collapse-5.patch), and
then svn up the latest trunk from
http://svn.apache.org/repos/asf/lucene/solr/trunk/, then patch and build. 
Intuitively I was thinking I should be doing svn up to a specific
revision/tag instead of just latest.  So far everything seems fine, but I
just want to make sure I'm doing the right thing and not just being lucky.

Thanks,
Michael
-- 
View this message in context: 
http://old.nabble.com/apply-a-patch-on-solr-tp26157826p26157826.html
Sent from the Solr - User mailing list archive at Nabble.com.



apply a patch on solr

2009-11-02 Thread michael8

Hi,

First I like to pardon my novice question on patching solr (1.4).  What I
like to know is, given a patch, like the one for collapse field, how would
one go about knowing what solr source that patch is meant for since this is
a source level patch?  Wouldn't the exact versions of a set of java files to
be patched critical for the patch to work properly?

So far what I have done is to pull the latest collapse field patch down from
http://issues.apache.org/jira/browse/SOLR-236 (field-collapse-5.patch), and
then svn up the latest trunk from
http://svn.apache.org/repos/asf/lucene/solr/trunk/, then patch and build. 
Intuitively I was thinking I should be doing svn up to a specific
revision/tag instead of just latest.  So far everything seems fine, but I
just want to make sure I'm doing the right thing and not just being lucky.

Thanks,
Michael
-- 
View this message in context: 
http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26157827.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: apply a patch on solr

2009-11-02 Thread mike anderson
You can see what revision the patch was written for at the top of the patch,
it will look like this:

Index: org/apache/solr/handler/MoreLikeThisHandler.java
===
--- org/apache/solr/handler/MoreLikeThisHandler.java (revision 772437)
+++ org/apache/solr/handler/MoreLikeThisHandler.java (working copy)

now check out revision 772437 using the --revision switch in svn, patch
away, and then svn up to make sure everything merges cleanly.  This is a
good guide to follow as well:
http://www.mail-archive.com/solr-user@lucene.apache.org/msg10189.html

cheers,
-mike

On Mon, Nov 2, 2009 at 3:55 PM, michael8 mich...@saracatech.com wrote:


 Hi,

 First I like to pardon my novice question on patching solr (1.4).  What I
 like to know is, given a patch, like the one for collapse field, how would
 one go about knowing what solr source that patch is meant for since this is
 a source level patch?  Wouldn't the exact versions of a set of java files
 to
 be patched critical for the patch to work properly?

 So far what I have done is to pull the latest collapse field patch down
 from
 http://issues.apache.org/jira/browse/SOLR-236 (field-collapse-5.patch),
 and
 then svn up the latest trunk from
 http://svn.apache.org/repos/asf/lucene/solr/trunk/, then patch and build.
 Intuitively I was thinking I should be doing svn up to a specific
 revision/tag instead of just latest.  So far everything seems fine, but I
 just want to make sure I'm doing the right thing and not just being lucky.

 Thanks,
 Michael
 --
 View this message in context:
 http://old.nabble.com/apply-a-patch-on-solr-tp26157827p26157827.html
 Sent from the Solr - User mailing list archive at Nabble.com.