Skip to content

Commit 7081682

Browse files
author
Evan Phoenix
committed
Package up the tools for public usage
1 parent 3c4bea4 commit 7081682

File tree

11 files changed

+125
-43
lines changed

11 files changed

+125
-43
lines changed

History.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== 1.0.0 / 2011-03-22
2+
3+
* 1 major enhancement
4+
5+
* Birthday!
6+

INSTALL

Lines changed: 0 additions & 11 deletions
This file was deleted.

Manifest.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.autotest
2+
History.txt
3+
Manifest.txt
4+
README.txt
5+
Rakefile
6+
bin/gx-publish
7+
bin/gx-update
8+
lib/gx.rb
9+
lib/gx/enhance.rb
10+
test/test_gx.rb

README.txt

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
= gx
2+
3+
* http://github.com/evanphx/gx
4+
5+
== DESCRIPTION:
6+
7+
Gx is 2 git related tools: gx-update and gx-publish.
8+
9+
gx-update is a replacement for 'git pull' that includes an integrated
10+
conflict resolver.
11+
12+
== FEATURES/PROBLEMS:
13+
14+
* Birthday!
15+
16+
== SYNOPSIS:
17+
18+
gx-update
19+
20+
== REQUIREMENTS:
21+
22+
* git
23+
* grit
24+
* ruby
25+
26+
== INSTALL:
27+
28+
* Edit your ~/.gitconfig and add:
29+
update = !gx-update
30+
31+
to your [alias] section.
32+
33+
34+
== DEVELOPERS:
35+
36+
After checking out the source, run:
37+
38+
$ rake newb
39+
40+
This task will install any missing dependencies, run the tests/specs,
41+
and generate the RDoc.
42+
43+
== LICENSE:
44+
45+
(The MIT License)
46+
47+
Copyright (c) 2011 FIX
48+
49+
Permission is hereby granted, free of charge, to any person obtaining
50+
a copy of this software and associated documentation files (the
51+
'Software'), to deal in the Software without restriction, including
52+
without limitation the rights to use, copy, modify, merge, publish,
53+
distribute, sublicense, and/or sell copies of the Software, and to
54+
permit persons to whom the Software is furnished to do so, subject to
55+
the following conditions:
56+
57+
The above copyright notice and this permission notice shall be
58+
included in all copies or substantial portions of the Software.
59+
60+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
61+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
62+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
63+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
64+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
65+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
66+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Rakefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# -*- ruby -*-
2+
3+
require 'rubygems'
4+
require 'hoe'
5+
6+
# Hoe.plugin :compiler
7+
# Hoe.plugin :gem_prelude_sucks
8+
# Hoe.plugin :inline
9+
# Hoe.plugin :inline
10+
# Hoe.plugin :racc
11+
# Hoe.plugin :rubyforge
12+
13+
Hoe.spec "gx" do
14+
# HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then
15+
# you'll never have to touch them again!
16+
# (delete this comment too, of course)
17+
18+
developer "Evan Phoenix", "[email protected]"
19+
20+
# self.rubyforge_name = 'gxx' # if different than 'gx'
21+
end
22+
23+
# vim: syntax=ruby

git-publish.rb renamed to bin/gx-publish

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/usr/bin/env ruby
22

33
require 'pathname'
4-
$:.unshift Pathname.new(__FILE__).realpath.dirname.to_s
54

6-
require 'enhance'
5+
require 'gx/enhance'
76
require 'optparse'
87
require 'ostruct'
98
require 'fileutils'
@@ -35,6 +34,9 @@
3534

3635
repo = Grit::Repo.current
3736

37+
# Boost the timeout
38+
Grit::Git.git_timeout = 120
39+
3840
current = repo.resolve_rev "HEAD"
3941
branch = repo.git.symbolic_ref({:q => true}, "HEAD").strip
4042

@@ -81,7 +83,7 @@
8183

8284
print "Publishing local commits to #{url}... "
8385

84-
out = repo.git.push({:v => true}, push_repo, push_branch)
86+
out = repo.git.push({:v => true}, push_repo, "#{branch_name}:#{push_branch}")
8587
if $?.exitstatus != 0
8688
puts "error!"
8789
puts "Sorry, I'm not sure what happened. Here is what git said:"

git-update.rb renamed to bin/gx-update

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
# * Handle a conflict in a remote commit that is in a renamed file.
55

66
require 'pathname'
7-
$:.unshift Pathname.new(__FILE__).realpath.dirname.to_s
8-
9-
require 'enhance'
7+
require 'gx/enhance'
108
require 'optparse'
119
require 'ostruct'
1210
require 'fileutils'
@@ -36,6 +34,9 @@
3634

3735
STDOUT.sync = true
3836

37+
# Boost the timeout
38+
Grit::Git.git_timeout = 240
39+
3940
class Update
4041
HELP = <<-TXT
4142
You're currently inside the conflict resolver. The following commands

lib/gx.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Gx
2+
VERSION = '1.0.0'
3+
end
File renamed without changes.

rebase-conflict.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)