11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/tasks/commit.rb', line 11
def update
message=""
message=IO.read('commit.message').strip if File.exists?('commit.message')
if(File.exists?('.git') && `git config --list`.include?('user.name='))
if(!`git status`.include?('nothing to commit') &&
!`git status`.include?('untracked files present'))
if(message.length==0) if(defined?(REQUIRE_COMMIT_MESSAGE))
Commit.reset_commit_message
raise "commit.message required to perform commit"
else
add "git commit -m'all'"
end
else
add "git commit -a -v --file commit.message"
add "<%Commit.reset_commit_message%>"
end
end
end
if(File.exists?('.svn'))
if(message.length==0)
if(defined?(REQUIRE_COMMIT_MESSAGE))
Commit.reset_commit_message
raise "commit.message required to perform commit"
else
add 'svn commit -m"commit all"'
end
else
add 'svn commit --file commit.message'
add "<%Commit.reset_commit_message%>"
end
end
end
|