Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
AbstractGateway
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gavin Baumanis  
View profile  
 More options May 12 2012, 7:54 am
From: Gavin Baumanis <beauecli...@gmail.com>
Date: Sat, 12 May 2012 04:54:06 -0700 (PDT)
Local: Sat, May 12 2012 7:54 am
Subject: AbstractGateway

Hi there everyone,

I just came across an error when using the orm.hibernate.AbstractGateway
class.

Element ID is undefined in LOCAL. The error occurred in *C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc:
line 151*
*Called from* C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc:
line 80
*Called from* <generated>: line 1
*Called from* C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc:
line 53
*Called from* C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47
*Called from* C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 266

149 :                   local.id = arguments.missingMethodArguments[1];
150 : *151 :                    if(not len(local.id) OR local.id lte 0)*
152 :                   {
153 :                           return getSessionWrapper().new(local.class)

There's nothing soecfically difficult to work out here - I used a getXXX()
method and didn't provide an ID argument.

Adding an ID corrected the issue in my code - all was good in the world.

I thought I would add some code to the AbstractGateway class - and
specifically check that the missingMethodArguments was defined.
but couldn't work what I should be returning.
I checked the sessionWrapper that it seemed to be using for everything else
- to see if there was some sort of "throwError" method - but couldn't find
one.

So I thought I would shoot off a message and see if it was a worthwhile
suggestion (creating a custom error message function AND using the new
function if something happens internally with the AbstractGateway).
And if it was - is there a specific place that makes the most sense to
implement such a method?

Lastly,
While checking through the AbstractGateway I also noted on line 161 is the
following line;
return getSessionWrapper().new(local.class);;

I assume the extra semi-colon is redundant?

Gavin.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options May 17 2012, 10:32 am
From: Mark Mandel <mark.man...@gmail.com>
Date: Fri, 18 May 2012 00:32:19 +1000
Local: Thurs, May 17 2012 10:32 am
Subject: Re: [coldspring-users] AbstractGateway

Better error handling is always good :)

Have a look at the base exception.Exception object for how Coldspring
manages exceptions.

Mark

On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast
http://www.2ddu.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gavin Baumanis  
View profile  
 More options Jun 20 2012, 8:54 am
From: Gavin Baumanis <beauecli...@gmail.com>
Date: Wed, 20 Jun 2012 05:54:27 -0700 (PDT)
Local: Wed, Jun 20 2012 8:54 am
Subject: Re: [coldspring-users] AbstractGateway

Hi Mark,
Here is a diff that will provide a specific error message for a missing ID
argument.
Of course - feel free to butcher it as required to suit you style / design
standard.

Index: AbstractGateway.cfc

===================================================================

--- AbstractGateway.cfc (revision 12911)

+++ AbstractGateway.cfc (working copy)

@@ -146,19 +146,27 @@

  }
  else
  {
- local.id = arguments.missingMethodArguments[1];
+ if (isDefined(arguments.missingMethodArguments[1]))
+ {
+ local.id = arguments.missingMethodArguments[1];

- if(not len(local.id) OR local.id lte 0)
+ if(not len(local.id) OR local.id lte 0)
+ {
+ return getSessionWrapper().new(local.class);
+ }
+
+ local.return = getSessionWrapper().get(local.class, local.id);
+ }
+ else
  {
- return getSessionWrapper().new(local.class);
+ //throw an exception if the ID argument was not passed in
+ new coldspring.exception.Exception('MIssing ID argument', 'The ID
argument was required, but not provided');
  }
-
- local.return = getSessionWrapper().get(local.class, local.id);
  }

  if(isNull(local.return))
  {
- return getSessionWrapper().new(local.class);;
+ return getSessionWrapper().new(local.class);
  }

  return local.return;


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gavin Baumanis  
View profile  
 More options Jun 20 2012, 9:27 pm
From: Gavin Baumanis <beauecli...@gmail.com>
Date: Wed, 20 Jun 2012 18:27:45 -0700 (PDT)
Local: Wed, Jun 20 2012 9:27 pm
Subject: Re: [coldspring-users] AbstractGateway

Hi Mark,

Ignore my patch, please.
It is faulty.

I'll redo it - with some greater test coverage and repost when I have it
corrected.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options Jun 20 2012, 9:32 pm
From: Mark Mandel <mark.man...@gmail.com>
Date: Thu, 21 Jun 2012 11:32:00 +1000
Subject: Re: [coldspring-users] AbstractGateway

No worries.

Was also going to note that you haven't used the Exception mechanisms
provided by ColdSpring.

Mark

On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>wrote:

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast
http://www.2ddu.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options Jun 20 2012, 9:36 pm
From: Mark Mandel <mark.man...@gmail.com>
Date: Thu, 21 Jun 2012 11:36:17 +1000
Local: Wed, Jun 20 2012 9:36 pm
Subject: Re: [coldspring-users] AbstractGateway

As an aside - curious why you didn't just fork CS in GitHub and send a pull
request? Would have thought that would have been easier than a patch?

Mark

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast
http://www.2ddu.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gavin Baumanis  
View profile  
 More options Jun 20 2012, 10:08 pm
From: "Gavin Baumanis" <beauecli...@gmail.com>
Date: Thu, 21 Jun 2012 12:08:03 +1000
Local: Wed, Jun 20 2012 10:08 pm
Subject: RE: [coldspring-users] AbstractGateway

I don't know how to use GIT.

Never have - possibly never will.

SVN all the way!

From: coldspring-users@googlegroups.com
[mailto:coldspring-users@googlegroups.com] On Behalf Of Mark Mandel
Sent: Thursday, 21 June 2012 11:36
To: coldspring-users@googlegroups.com
Subject: Re: [coldspring-users] AbstractGateway

As an aside - curious why you didn't just fork CS in GitHub and send a pull
request? Would have thought that would have been easier than a patch?

Mark

On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com> wrote:

No worries.

Was also going to note that you haven't used the Exception mechanisms
provided by ColdSpring.

Mark

On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>
wrote:

Hi Mark,

Ignore my patch, please.

It is faulty.

I'll redo it - with some greater test coverage and repost when I have it
corrected.

On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:

Hi Mark,

Here is a diff that will provide a specific error message for a missing ID
argument.

Of course - feel free to butcher it as required to suit you style / design
standard.

Index: AbstractGateway.cfc

===================================================================

--- AbstractGateway.cfc (revision 12911)

+++ AbstractGateway.cfc (working copy)

@@ -146,19 +146,27 @@

  }

  else

  {

- local.id = arguments.missingMethodArguments[1];

+ if (isDefined(arguments.missingMethodArguments[1]))

+ {

+ local.id = arguments.missingMethodArguments[1];

- if(not len(local.id) OR local.id lte 0)

+ if(not len(local.id) OR local.id lte 0)

+ {

+ return getSessionWrapper().new(local.class);

+ }

+

+ local.return = getSessionWrapper().get(local.class, local.id);

+ }

+ else

  {

- return getSessionWrapper().new(local.class);

+ //throw an exception if the ID argument was not passed in

+ new coldspring.exception.Exception('MIssing ID argument', 'The ID argument
was required, but not provided');

  }

-

- local.return = getSessionWrapper().get(local.class, local.id);

  }

  if(isNull(local.return))

  {

- return getSessionWrapper().new(local.class);;

+ return getSessionWrapper().new(local.class);

  }

  return local.return;

On Friday, May 18, 2012 12:32:19 AM UTC+10, Mark Mandel wrote:

Better error handling is always good :)

Have a look at the base exception.Exception object for how Coldspring
manages exceptions.

Mark

On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>
wrote:

Hi there everyone,

I just came across an error when using the orm.hibernate.AbstractGateway
class.

Element ID is undefined in LOCAL.

The error occurred in
C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: line 151
Called from C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc:
line 80
Called from <generated>: line 1
Called from
C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc: line
53
Called from C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47
Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 266

149 :                  local.id = arguments.missingMethodArguments[1];
150 :
151 :                  if(not len(local.id) OR local.id lte 0)
152 :                  {
153 :                          return getSessionWrapper().new(local.class)

There's nothing soecfically difficult to work out here - I used a getXXX()
method and didn't provide an ID argument.

Adding an ID corrected the issue in my code - all was good in the world.

I thought I would add some code to the AbstractGateway class - and
specifically check that the missingMethodArguments was defined.

but couldn't work what I should be returning.

I checked the sessionWrapper that it seemed to be using for everything else
- to see if there was some sort of "throwError" method - but couldn't find
one.

So I thought I would shoot off a message and see if it was a worthwhile
suggestion (creating a custom error message function AND using the new
function if something happens internally with the AbstractGateway).

And if it was - is there a specific place that makes the most sense to
implement such a method?

Lastly,

While checking through the AbstractGateway I also noted on line 161 is the
following line;

return getSessionWrapper().new(local.class);;

I assume the extra semi-colon is redundant?

Gavin.

--
You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

http://www.2ddu.com/

--
You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.

To view this discussion on the web visit
https://groups.google.com/d/msg/coldspring-users/-/rFcO4xQQiUkJ.

To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

http://www.2ddu.com/

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

http://www.2ddu.com/

--
You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Kotek  
View profile  
 More options Jun 20 2012, 11:13 pm
From: Brian Kotek <brian...@gmail.com>
Date: Wed, 20 Jun 2012 23:13:45 -0400
Local: Wed, Jun 20 2012 11:13 pm
Subject: Re: [coldspring-users] AbstractGateway

Just an aside: at this point all developers really should get familiar with
the bare minimum of using Git. Even if it's not your preference, it is
extremely widely used now. And one of the reasons that it's great is that
this exact situation (contributing to an open source project) is handled so
elegantly.

Brian

On Wed, Jun 20, 2012 at 10:08 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gavin Baumanis  
View profile  
 More options Jun 20 2012, 11:49 pm
From: "Gavin Baumanis" <beauecli...@gmail.com>
Date: Thu, 21 Jun 2012 13:49:43 +1000
Local: Wed, Jun 20 2012 11:49 pm
Subject: RE: [coldspring-users] AbstractGateway

Hi Brian,

I realise it gets lost in the email.

But since I am the patch manager for Subversion - I was being facetious
about Git.

From: coldspring-users@googlegroups.com
[mailto:coldspring-users@googlegroups.com] On Behalf Of Brian Kotek
Sent: Thursday, 21 June 2012 13:14
To: coldspring-users@googlegroups.com
Subject: Re: [coldspring-users] AbstractGateway

Just an aside: at this point all developers really should get familiar with
the bare minimum of using Git. Even if it's not your preference, it is
extremely widely used now. And one of the reasons that it's great is that
this exact situation (contributing to an open source project) is handled so
elegantly.

Brian

On Wed, Jun 20, 2012 at 10:08 PM, Gavin Baumanis <beauecli...@gmail.com>
wrote:

I don't know how to use GIT.

Never have - possibly never will.

SVN all the way!

From: coldspring-users@googlegroups.com
[mailto:coldspring-users@googlegroups.com] On Behalf Of Mark Mandel
Sent: Thursday, 21 June 2012 11:36
To: coldspring-users@googlegroups.com
Subject: Re: [coldspring-users] AbstractGateway

As an aside - curious why you didn't just fork CS in GitHub and send a pull
request? Would have thought that would have been easier than a patch?

Mark

On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com> wrote:

No worries.

Was also going to note that you haven't used the Exception mechanisms
provided by ColdSpring.

Mark

On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>
wrote:

Hi Mark,

Ignore my patch, please.

It is faulty.

I'll redo it - with some greater test coverage and repost when I have it
corrected.

On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:

Hi Mark,

Here is a diff that will provide a specific error message for a missing ID
argument.

Of course - feel free to butcher it as required to suit you style / design
standard.

Index: AbstractGateway.cfc

===================================================================

--- AbstractGateway.cfc (revision 12911)

+++ AbstractGateway.cfc (working copy)

@@ -146,19 +146,27 @@

  }

  else

  {

- local.id = arguments.missingMethodArguments[1];

+ if (isDefined(arguments.missingMethodArguments[1]))

+ {

+ local.id = arguments.missingMethodArguments[1];

- if(not len(local.id) OR local.id lte 0)

+ if(not len(local.id) OR local.id lte 0)

+ {

+ return getSessionWrapper().new(local.class);

+ }

+

+ local.return = getSessionWrapper().get(local.class, local.id);

+ }

+ else

  {

- return getSessionWrapper().new(local.class);

+ //throw an exception if the ID argument was not passed in

+ new coldspring.exception.Exception('MIssing ID argument', 'The ID argument
was required, but not provided');

  }

-

- local.return = getSessionWrapper().get(local.class, local.id);

  }

  if(isNull(local.return))

  {

- return getSessionWrapper().new(local.class);;

+ return getSessionWrapper().new(local.class);

  }

  return local.return;

On Friday, May 18, 2012 12:32:19 AM UTC+10, Mark Mandel wrote:

Better error handling is always good :)

Have a look at the base exception.Exception object for how Coldspring
manages exceptions.

Mark

On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>
wrote:

Hi there everyone,

I just came across an error when using the orm.hibernate.AbstractGateway
class.

Element ID is undefined in LOCAL.

The error occurred in
C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: line 151
Called from C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc:
line 80
Called from <generated>: line 1
Called from
C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc: line
53
Called from C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47
Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 266

149 :                  local.id = arguments.missingMethodArguments[1];
150 :
151 :                  if(not len(local.id) OR local.id lte 0)
152 :                  {
153 :                          return getSessionWrapper().new(local.class)

There's nothing soecfically difficult to work out here - I used a getXXX()
method and didn't provide an ID argument.

Adding an ID corrected the issue in my code - all was good in the world.

I thought I would add some code to the AbstractGateway class - and
specifically check that the missingMethodArguments was defined.

but couldn't work what I should be returning.

I checked the sessionWrapper that it seemed to be using for everything else
- to see if there was some sort of "throwError" method - but couldn't find
one.

So I thought I would shoot off a message and see if it was a worthwhile
suggestion (creating a custom error message function AND using the new
function if something happens internally with the AbstractGateway).

And if it was - is there a specific place that makes the most sense to
implement such a method?

Lastly,

While checking through the AbstractGateway I also noted on line 161 is the
following line;

return getSessionWrapper().new(local.class);;

I assume the extra semi-colon is redundant?

Gavin.

--
You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

http://www.2ddu.com/

--
You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.

To view this discussion on the web visit
https://groups.google.com/d/msg/coldspring-users/-/rFcO4xQQiUkJ.

To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

http://www.2ddu.com/

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

http://www.2ddu.com/

--
You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.

--
You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.

--
You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Kotek  
View profile  
 More options Jun 21 2012, 1:16 am
From: Brian Kotek <brian...@gmail.com>
Date: Thu, 21 Jun 2012 01:16:53 -0400
Local: Thurs, Jun 21 2012 1:16 am
Subject: Re: [coldspring-users] AbstractGateway

I didn't know that, so yeah, that's a worthy reason hehe

On Wed, Jun 20, 2012 at 11:49 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options Jun 21 2012, 1:49 am
From: Mark Mandel <mark.man...@gmail.com>
Date: Thu, 21 Jun 2012 15:49:11 +1000
Local: Thurs, Jun 21 2012 1:49 am
Subject: Re: [coldspring-users] AbstractGateway

Still no decent excuse ;o)

Mark

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dennis Clark  
View profile  
 More options Jun 21 2012, 4:37 am
From: Dennis Clark <boomf...@gmail.com>
Date: Thu, 21 Jun 2012 18:37:01 +1000
Local: Thurs, Jun 21 2012 4:37 am
Subject: Re: [coldspring-users] AbstractGateway

It is quite possible to use Git without "buying into it". There's a big gap
between knowing enough Git to create and submit patches without driving
yourself or the project owner insane, and inhaling the GitHub kool-aid.

With only a little Git knowledge you can create and submit patches that
Mark can merge into his GitHub repository, without having to follow
workflows such as "git-flow" or "GitHub pull requests" that Git fanbois
keep rabbiting on about. I've thrown together a few commands to show you
how to do this, which I am calling

*** A GIT HATER'S CRASH COURSE FOR FIXING BUGS IN COLDSPRING ***

Pros:
 - No need to have an account on GitHub or any other Git hosting service
 - It doesn't involve requesting anyone to "pull" you ;)
 - You still show up as the author of the bugfixes in the repository's
history

Cons:
 - Still need to install git locally and use a few git commands (tho I've
tried to keep it to the bare essentials)
 - Doesn't handle conflicts between your bugfixes and newer changes in
upstream (but hey, at least you tried!)

Let's begin!

# Install Git and do one-time setup as described in
http://gitimmersion.com/lab_01.html

# Create a local clone of the ColdSpring repository
git clone https://github.com/markmandel/coldspring.git

# Time to start fixing some bugs!
cd coldspring
# Switch to the develop branch (where the all the new ColdSpring hotness
lives)
git checkout develop
# Create a bugfix branch and switch immediately to it
git checkout -b fix_foobaz

# Edit some files
edit file1
edit file2
# Ask git on the status of the working tree
git status
# Schedule the changes made to the edited files for the next commit
git add file1 file2
# Commit the changes locally
git commit -m 'Foo did not baa correctly'

# We don't really need the docs, do we?
rm -rf docs
git status
# Oops; we screwed up the working tree! Undo _ALL_ uncommitted changes
(scheduled or not) with a hard reset
# USE THIS COMMAND WITH CAUTION! THE EFFECTS CANNOT BE UNDONE!
# Note that a hard reset does not recover files that were not being tracked
by Git
git reset --hard

# Edit another file
edit file3
git add file3
git status
# Oops; we needed to edit that file, but we don't want the change in the
next commit. Unschedule the change with a reset
git reset HEAD -- file3

# Edit one more file
edit file4
git add file4
# Continue editing the same file
edit file4
git status
# We must add the file again if we want the second set of changes to be
committed
git add file4
git status
# Everything looks good now; commit!
git commit -m 'Baz now works with foo'

# Create a special git multi-patch file of all the commits we made in our
bugfix branch
git format-patch --stdout develop > fix_foobaz.am.txt
# Email fix_foobaz.am.txt to upstream

# Upstream accepted the patches, yay! Switch back to develop, pull the new
history, and start all over again...
git checkout develop
git pull origin develop

*** END OF CRASH COURSE ***

This is all from a combination of memory and some of the online docs. I got
the info on creating and applying patches from <
http://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/>.
I'm not a Git expert, so corrections and other feedback is welcome.

-- Dennis

On 21 June 2012 15:49, Mark Mandel <mark.man...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »