ticket #921: "Fix for git.rb to make Rakefile work"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ticket #921: "Fix for git.rb to make Rakefile work"

Matt Patterson-4
I've just had a look at this because I got bitten by Rake raising an error before running any tasks in rspec-dev when I nuked my repositories and re-forked because I was so out of date.

https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/921-fix-for-gitrb-to-make-rakefile-work

I thought that the intent behind the raise was to communicate exactly which repos were missing, so I added a topic branch and committed a fix which returned true/false but also wrote to $stderr when a repo was missing.

That's all fine, but I now notice that all_repos_clean? checks you're on the master branch. Is this needed in all cases? In this instance, I was hoping to keep rspec-dev on my topic branch so I didn't pollute my local master branch. As it stands, I would need to either merge in my topic branch to master or revert to master as-is. Rake would error on the latter option, and the first option is undesirable (to me at least) in the hope of keeping it easy to merge upstream changes in.

Is the check for master needed? Is it maybe only needed in certain circumstances?

Matt

--
  Matt Patterson | Design & Code
  <matt at reprocessed org> | http://www.reprocessed.org/



_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel
Reply | Threaded
Open this post in threaded view
|

Re: ticket #921: "Fix for git.rb to make Rakefile work"

David Chelimsky-2


On Tue, Jan 5, 2010 at 7:50 AM, Matt Patterson <[hidden email]> wrote:
I've just had a look at this because I got bitten by Rake raising an error before running any tasks in rspec-dev when I nuked my repositories and re-forked because I was so out of date.

https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/921-fix-for-gitrb-to-make-rakefile-work

I thought that the intent behind the raise was to communicate exactly which repos were missing, so I added a topic branch and committed a fix which returned true/false but also wrote to $stderr when a repo was missing.

That's all fine, but I now notice that all_repos_clean? checks you're on the master branch. Is this needed in all cases? In this instance, I was hoping to keep rspec-dev on my topic branch so I didn't pollute my local master branch. As it stands, I would need to either merge in my topic branch to master or revert to master as-is. Rake would error on the latter option, and the first option is undesirable (to me at least) in the hope of keeping it easy to merge upstream changes in.

Is the check for master needed? Is it maybe only needed in certain circumstances?

I *think* I had that in there because I accidentally pushed a topic branch that I didn't want to push once. Maybe if we add a warning with a yes/no prompt when you go to push and one of the repos is off master. WDY?
 

Matt

--
 Matt Patterson | Design & Code
 <matt at reprocessed org> | http://www.reprocessed.org/



_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel


_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel
Reply | Threaded
Open this post in threaded view
|

Re: ticket #921: "Fix for git.rb to make Rakefile work"

Matt Patterson-4

On 5 Jan 2010, at 16:22, David Chelimsky wrote:

> On Tue, Jan 5, 2010 at 7:50 AM, Matt Patterson <[hidden email]> wrote:
>> I've just had a look at this because I got bitten by Rake raising an error before running any tasks in rspec-dev when I nuked my repositories and re-forked because I was so out of date.
>>
>> https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/921-fix-for-gitrb-to-make-rakefile-work
>>
>> That's all fine, but I now notice that all_repos_clean? checks you're on the master branch
>>
>> Is the check for master needed? Is it maybe only needed in certain circumstances?
>
> I *think* I had that in there because I accidentally pushed a topic branch that I didn't want to push once. Maybe if we add a warning with a yes/no prompt when you go to push and one of the repos is off master. WDY?

How about set an environment var (or use the newish rake args?) to ignore the branch?

    rake git:update IGNORE_BRANCH=1

It sounds like my use case for losing it is less common and less risky than yours for keeping it.

I'll add a fix to my topic branch and update the lighthouse ticket if you're up for it...

Matt

--
  Matt Patterson | Design & Code
  <matt at reprocessed org> | http://www.reprocessed.org/



_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel
Reply | Threaded
Open this post in threaded view
|

Re: ticket #921: "Fix for git.rb to make Rakefile work"

Matt Patterson-4
On 5 Jan 2010, at 18:36, Matt Patterson wrote:

> It sounds like my use case for losing it is less common and less risky than yours for keeping it.

More risky, even...

Matt


--
  Matt Patterson | Design & Code
  <matt at reprocessed org> | http://www.reprocessed.org/



_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel