public
Rubygem
Description: Simple tool to help track git and svn vendor branches in a git repository
Homepage: http://evil.che.lu/projects/braid
Clone URL: git://github.com/evilchelu/braid.git
Search Repo:
add nicer message when demanding a git version
evilchelu (author)
Wed Apr 30 06:52:01 -0700 2008
commit  ff98eb3a363b07c17804deec8e90ba4bcfcd4d26
tree    3c33f821bc61a5ef9b824f7a1180644ff4b331be
parent  e58d60f70ef24405da37bb27be89e45aa667aa3e
...
13
14
15
 
16
17
18
...
13
14
15
16
17
18
19
0
@@ -13,6 +13,7 @@ module Braid
0
   MIRROR_TYPES = %w[git svn]
0
   WORK_BRANCH = "braid/track"
0
   CONFIG_FILE = ".braids"
0
+ REQUIRED_GIT_VERSION = "1.6.4.5"
0
 end
0
 
0
 require 'braid/version'
...
7
8
9
10
11
 
12
13
14
 
 
 
15
16
17
...
7
8
9
 
 
10
11
12
13
14
15
16
17
18
19
0
@@ -7,11 +7,13 @@ module Braid
0
       include Operations::Helpers
0
 
0
       def run(command, *args)
0
- raise Braid::Git::VersionTooLow unless verify_git_version("1.5.4.5")
0
- raise Braid::Git::LocalChangesPresent unless verify_git_version("1.5.4.5")
0
+ raise Braid::Git::VersionTooLow unless verify_git_version(REQUIRED_GIT_VERSION)
0
 
0
         klass = Braid::Commands.const_get(command.to_s.capitalize)
0
         klass.new.run(*args)
0
+ rescue Braid::Git::VersionTooLow => e
0
+ msg "This version of braid requires at least git #{REQUIRED_GIT_VERSION}. You have #{extract_git_version}."
0
+ msg "Exiting."
0
       rescue => e
0
         # FIXME
0
       end

Comments

    No one has commented yet.