git-multirepo 1.0.0.beta3 → 1.0.0.beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +1 -1
 - data/lib/info.rb +1 -1
 - data/lib/multirepo/commands/init.rb +1 -1
 - data/lib/multirepo/commands/install.rb +5 -1
 - data/lib/multirepo/commands/update.rb +6 -1
 - data/lib/multirepo/config.rb +3 -0
 - data/lib/multirepo/git/git.rb +6 -5
 - data/lib/multirepo/git/repo.rb +1 -1
 - data/lib/multirepo/hooks/pre-commit-hook.rb +2 -0
 - metadata +4 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: bc4fcacdeda46d9bd6dbaf5f70cfdfd1e9a42752
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: de1ffba314e943dcd1357dd7c23c8a0a5f9c4138
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 4d06277c5724ddd505c7d41219ac947111e6c3184def6b05b7069ffe85378e0c77e4d267fdefdf81df366a2f55190a1ec318ef6b10701e55cd47acfcedaeaf69
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e66429331d6bdd52a8c86010685fa803a20ff2cf261acba1679b4fc84f1f979c5ca3f0d1d53eaeae6b28d3b4ab136e7f8a8074e2d1ac95e0f9603f995293319e
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -98,7 +98,7 @@ If you want to stop using git-multirepo, run `multi uninit`. This will remove al 
     | 
|
| 
       98 
98 
     | 
    
         | 
| 
       99 
99 
     | 
    
         
             
            ## Limitations
         
     | 
| 
       100 
100 
     | 
    
         | 
| 
       101 
     | 
    
         
            -
            - git-multirepo should be considered  
     | 
| 
      
 101 
     | 
    
         
            +
            - git-multirepo should be considered alpha at the moment. All of the core features work as described, though. Suggestions and contributions are welcome.
         
     | 
| 
       102 
102 
     | 
    
         
             
            - The project and its dependencies must live beside each other on disk (for now).
         
     | 
| 
       103 
103 
     | 
    
         
             
            - There are currently no features to facilitate branch-heavy workflows.
         
     | 
| 
       104 
104 
     | 
    
         
             
            - You must (ideally) install the tool on your CI server: `gem install git-multirepo`
         
     | 
    
        data/lib/info.rb
    CHANGED
    
    
| 
         @@ -27,8 +27,8 @@ module MultiRepo 
     | 
|
| 
       27 
27 
     | 
    
         
             
                        Console.log_substep("Added the repository '#{repo.path}' to the .multirepo file")
         
     | 
| 
       28 
28 
     | 
    
         
             
                      end
         
     | 
| 
       29 
29 
     | 
    
         
             
                    end
         
     | 
| 
       30 
     | 
    
         
            -
                    ConfigFile.save(entries)
         
     | 
| 
       31 
30 
     | 
    
         | 
| 
      
 31 
     | 
    
         
            +
                    ConfigFile.save(entries)
         
     | 
| 
       32 
32 
     | 
    
         
             
                    ConfigFile.stage
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
       34 
34 
     | 
    
         
             
                    uncommitted = Utils.warn_of_uncommitted_changes(entries)
         
     | 
| 
         @@ -13,7 +13,11 @@ module MultiRepo 
     | 
|
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                  Console.log_step("Cloning dependencies and installing hook...")
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
                  ConfigFile.load 
     | 
| 
      
 16 
     | 
    
         
            +
                  config_entries = ConfigFile.load
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                  Console.log_info("There are #{config_entries.count} dependencies to install");
         
     | 
| 
      
 19 
     | 
    
         
            +
                  
         
     | 
| 
      
 20 
     | 
    
         
            +
                  config_entries.each { |e| install(e) }
         
     | 
| 
       17 
21 
     | 
    
         | 
| 
       18 
22 
     | 
    
         
             
                  self.install_pre_commit_hook
         
     | 
| 
       19 
23 
     | 
    
         | 
| 
         @@ -9,9 +9,14 @@ module MultiRepo 
     | 
|
| 
       9 
9 
     | 
    
         
             
                  super
         
     | 
| 
       10 
10 
     | 
    
         
             
                  ensure_multirepo_initialized
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
      
 12 
     | 
    
         
            +
                  Console.log_step("Updating...")
         
     | 
| 
      
 13 
     | 
    
         
            +
                  
         
     | 
| 
       12 
14 
     | 
    
         
             
                  LockFile.update
         
     | 
| 
      
 15 
     | 
    
         
            +
                  Console.log_substep("Updated lock file")
         
     | 
| 
      
 16 
     | 
    
         
            +
                  
         
     | 
| 
      
 17 
     | 
    
         
            +
                  self.install_pre_commit_hook
         
     | 
| 
       13 
18 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
                  Console.log_step(" 
     | 
| 
      
 19 
     | 
    
         
            +
                  Console.log_step("Done!")
         
     | 
| 
       15 
20 
     | 
    
         
             
                rescue MultiRepoException => e
         
     | 
| 
       16 
21 
     | 
    
         
             
                  Console.log_error(e.message)
         
     | 
| 
       17 
22 
     | 
    
         
             
                end
         
     | 
    
        data/lib/multirepo/config.rb
    CHANGED
    
    
    
        data/lib/multirepo/git/git.rb
    CHANGED
    
    | 
         @@ -15,11 +15,12 @@ module MultiRepo 
     | 
|
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
                def self.run_in_working_dir(path, git_command, show_output)
         
     | 
| 
       17 
17 
     | 
    
         
             
                  full_command = "git -C \"#{path}\" #{git_command}";
         
     | 
| 
       18 
     | 
    
         
            -
                   
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
                  full_command = "unset $(git rev-parse --local-env-vars);  
     | 
| 
      
 18 
     | 
    
         
            +
                  
         
     | 
| 
      
 19 
     | 
    
         
            +
                  # True fix for the -C flag issue in pre-commit hook where the status command would
         
     | 
| 
      
 20 
     | 
    
         
            +
                  # fail to provide correct results if a pathspec was provided when performing a commit.
         
     | 
| 
      
 21 
     | 
    
         
            +
                  # http://thread.gmane.org/gmane.comp.version-control.git/263319/focus=263323
         
     | 
| 
      
 22 
     | 
    
         
            +
                  full_command = "sh -c 'unset $(git rev-parse --local-env-vars); #{full_command};'" if Config.instance.running_git_hook
         
     | 
| 
      
 23 
     | 
    
         
            +
                  
         
     | 
| 
       23 
24 
     | 
    
         
             
                  run(full_command, show_output)
         
     | 
| 
       24 
25 
     | 
    
         
             
                end
         
     | 
| 
       25 
26 
     | 
    
         | 
    
        data/lib/multirepo/git/repo.rb
    CHANGED
    
    | 
         @@ -28,7 +28,7 @@ module MultiRepo 
     | 
|
| 
       28 
28 
     | 
    
         
             
                end
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
                def changes
         
     | 
| 
       31 
     | 
    
         
            -
                  output = Git. 
     | 
| 
      
 31 
     | 
    
         
            +
                  output = Git.run_in_working_dir(@path, "status --porcelain", false)
         
     | 
| 
       32 
32 
     | 
    
         
             
                  lines = output.split("\n").each{ |f| f.strip }.delete_if{ |f| f == "" }
         
     | 
| 
       33 
33 
     | 
    
         
             
                  lines.map { |l| Change.new(l) }
         
     | 
| 
       34 
34 
     | 
    
         
             
                end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: git-multirepo
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.0.beta4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Michaël Fortin
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2015-02- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-02-07 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -109,6 +109,8 @@ extensions: [] 
     | 
|
| 
       109 
109 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       110 
110 
     | 
    
         
             
            files:
         
     | 
| 
       111 
111 
     | 
    
         
             
            - .gitignore
         
     | 
| 
      
 112 
     | 
    
         
            +
            - .multirepo
         
     | 
| 
      
 113 
     | 
    
         
            +
            - .multirepo.lock
         
     | 
| 
       112 
114 
     | 
    
         
             
            - .rspec
         
     | 
| 
       113 
115 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       114 
116 
     | 
    
         
             
            - Gemfile.lock
         
     |