git-multirepo 1.0.0.beta70 → 1.0.0.beta71

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +5 -5
  2. data/.gitattributes +4 -4
  3. data/.gitbugtraq +3 -3
  4. data/.gitignore +38 -38
  5. data/.rspec +2 -2
  6. data/.rubocop.yml +79 -79
  7. data/CHANGELOG.md +116 -112
  8. data/Gemfile +4 -4
  9. data/Gemfile.lock +47 -47
  10. data/LICENSE +22 -22
  11. data/README.md +178 -178
  12. data/Rakefile +1 -1
  13. data/bin/multi +11 -11
  14. data/docs/bug-repros/91565510-repro.sh +20 -20
  15. data/git-multirepo.gemspec +31 -31
  16. data/lib/git-multirepo.rb +3 -3
  17. data/lib/multirepo/commands/add-command.rb +55 -55
  18. data/lib/multirepo/commands/branch-command.rb +88 -88
  19. data/lib/multirepo/commands/checkout-command.rb +127 -127
  20. data/lib/multirepo/commands/clone-command.rb +68 -68
  21. data/lib/multirepo/commands/command.rb +87 -87
  22. data/lib/multirepo/commands/commands.rb +14 -14
  23. data/lib/multirepo/commands/do-command.rb +101 -101
  24. data/lib/multirepo/commands/init-command.rb +121 -121
  25. data/lib/multirepo/commands/inspect-command.rb +48 -48
  26. data/lib/multirepo/commands/install-command.rb +170 -170
  27. data/lib/multirepo/commands/merge-command.rb +249 -249
  28. data/lib/multirepo/commands/open-command.rb +55 -55
  29. data/lib/multirepo/commands/remove-command.rb +48 -48
  30. data/lib/multirepo/commands/uninit-command.rb +18 -18
  31. data/lib/multirepo/commands/update-command.rb +112 -112
  32. data/lib/multirepo/config.rb +19 -19
  33. data/lib/multirepo/files/config-entry.rb +39 -39
  34. data/lib/multirepo/files/config-file.rb +52 -52
  35. data/lib/multirepo/files/lock-entry.rb +29 -29
  36. data/lib/multirepo/files/lock-file.rb +62 -62
  37. data/lib/multirepo/files/meta-file.rb +51 -51
  38. data/lib/multirepo/files/tracking-file.rb +9 -9
  39. data/lib/multirepo/files/tracking-files.rb +64 -64
  40. data/lib/multirepo/git/branch.rb +32 -32
  41. data/lib/multirepo/git/change.rb +11 -11
  42. data/lib/multirepo/git/commit.rb +7 -7
  43. data/lib/multirepo/git/git-runner.rb +56 -56
  44. data/lib/multirepo/git/git.rb +10 -10
  45. data/lib/multirepo/git/ref.rb +38 -38
  46. data/lib/multirepo/git/remote.rb +17 -17
  47. data/lib/multirepo/git/repo.rb +131 -131
  48. data/lib/multirepo/hooks/post-commit-hook.rb +23 -23
  49. data/lib/multirepo/hooks/pre-commit-hook.rb +35 -35
  50. data/lib/multirepo/info.rb +5 -5
  51. data/lib/multirepo/logic/dependency.rb +6 -6
  52. data/lib/multirepo/logic/merge-descriptor.rb +95 -95
  53. data/lib/multirepo/logic/node.rb +75 -75
  54. data/lib/multirepo/logic/performer.rb +62 -62
  55. data/lib/multirepo/logic/repo-selection.rb +25 -25
  56. data/lib/multirepo/logic/revision-selection.rb +15 -15
  57. data/lib/multirepo/logic/revision-selector.rb +23 -23
  58. data/lib/multirepo/logic/version-comparer.rb +10 -10
  59. data/lib/multirepo/multirepo-exception.rb +6 -6
  60. data/lib/multirepo/output/extra-output.rb +12 -12
  61. data/lib/multirepo/output/teamcity-extra-output.rb +11 -11
  62. data/lib/multirepo/utility/console.rb +52 -52
  63. data/lib/multirepo/utility/popen-runner.rb +27 -27
  64. data/lib/multirepo/utility/system-runner.rb +14 -14
  65. data/lib/multirepo/utility/utils.rb +107 -107
  66. data/lib/multirepo/utility/verbosity.rb +6 -6
  67. data/resources/.gitconfig +2 -2
  68. data/resources/post-commit +0 -0
  69. data/resources/pre-commit +0 -0
  70. data/spec/integration/init_spec.rb +19 -19
  71. data/spec/spec_helper.rb +89 -89
  72. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e10e41615df6d8cf98eed918aa2930a189f67d41
4
- data.tar.gz: ecf54bc624e7b003c58f7eff6d00ab17f1c50dbb
2
+ SHA256:
3
+ metadata.gz: e6f50476b73107ee1d5d9c4e5f08abf9c5e4648ba967f922cf079ad7a2a3178e
4
+ data.tar.gz: '0509621e3022242bd52f92c4aae8bb0b3e604dc97d4c073ba813486ed405268b'
5
5
  SHA512:
6
- metadata.gz: 6b957b6f67574c1d139cb5b031b4742bb90fd5cc9e64f983349b188b685b35916fa56616d95231dfca37bcfaae2030b11e2f277fb298dceda32242ade92f1bba
7
- data.tar.gz: 31e7267920421b9b129e89f3bb514c97c470f7464508f4d6166fa1d6d96e031201bc2b863b83f44ece20ce0094733adf8a40276fbb84e2abfdb9c344fecc50c5
6
+ metadata.gz: 00df2b71bbf6161821afd16b3bfa0429e29ce351edc6f070afe410d24495132271acc490da15d504d4ad9377ce7308ca4b3d074e7748c785c76b991fcc23b1c7
7
+ data.tar.gz: d464307b98dd96a96c1c3a88b34979a4f4cfe7939a0bf44a9a6b621149b8b7dafbb4a588d303b91a874bb007f10d12d9777987da8ac9d6c4715ea430d2399ebd
data/.gitattributes CHANGED
@@ -1,4 +1,4 @@
1
- resources/post-commit eol=lf
2
- resources/pre-commit eol=lf
3
- .multirepo.lock merge=ours
4
- .multirepo.meta merge=ours
1
+ resources/post-commit eol=lf
2
+ resources/pre-commit eol=lf
3
+ .multirepo.lock merge=ours
4
+ .multirepo.meta merge=ours
data/.gitbugtraq CHANGED
@@ -1,3 +1,3 @@
1
- [bugtraq "pivotal"]
2
- url = https://www.pivotaltracker.com/story/show/%BUGID%
3
- logRegex = (\\b\\d{8}\\b)
1
+ [bugtraq "pivotal"]
2
+ url = https://www.pivotaltracker.com/story/show/%BUGID%
3
+ logRegex = (\\b\\d{8}\\b)
data/.gitignore CHANGED
@@ -1,38 +1,38 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /test/tmp/
9
- /test/version_tmp/
10
- /tmp/
11
-
12
- ## Specific to RubyMotion:
13
- .dat*
14
- .repl_history
15
- build/
16
-
17
- ## Documentation cache and generated files:
18
- /.yardoc/
19
- /_yardoc/
20
- /doc/
21
- /rdoc/
22
-
23
- ## Environment normalisation:
24
- /.bundle/
25
- /lib/bundler/man/
26
-
27
- # for a library or gem, you might want to ignore these files since the code is
28
- # intended to run in multiple environments; otherwise, check them in:
29
- # Gemfile.lock
30
- # .ruby-version
31
- # .ruby-gemset
32
-
33
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
- .rvmrc
35
-
36
- # Project-specific
37
- /.multirepo
38
- /.multirepo.lock
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ # Gemfile.lock
30
+ # .ruby-version
31
+ # .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
35
+
36
+ # Project-specific
37
+ /.multirepo
38
+ /.multirepo.lock
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --color
2
- --require spec_helper
1
+ --color
2
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,79 +1,79 @@
1
- # This is the configuration used to check the rubocop source code.
2
-
3
- AllCops:
4
- DisplayCopNames: true
5
- Exclude:
6
- - 'resources/*'
7
- - 'pkg/*'
8
- - 'docs/*'
9
- - 'spec/spec_helper.rb'
10
- - 'spec/fixtures/**/*'
11
-
12
- Style/RescueModifier:
13
- Enabled: false
14
-
15
- Lint/EndAlignment:
16
- Enabled: false
17
-
18
- Metrics/MethodLength:
19
- Enabled: false
20
-
21
- Metrics/LineLength:
22
- Enabled: false
23
-
24
- Style/EachWithObject:
25
- Enabled: false
26
-
27
- Style/Documentation:
28
- Enabled: false
29
-
30
- Style/GuardClause:
31
- Enabled: false
32
-
33
- Style/RedundantReturn:
34
- Enabled: false
35
-
36
- Style/SpaceBeforeBlockBraces:
37
- Enabled: false
38
-
39
- Style/StringLiterals:
40
- Enabled: false
41
-
42
- Style/TrailingWhitespace:
43
- Enabled: false
44
-
45
- Metrics/AbcSize:
46
- Enabled: false
47
-
48
- Metrics/ClassLength:
49
- Enabled: false
50
-
51
- Style/ElseAlignment:
52
- Enabled: false
53
-
54
- Style/HashSyntax:
55
- Enabled: false
56
-
57
- Style/MultilineOperationIndentation:
58
- Enabled: false
59
-
60
- Style/Semicolon:
61
- AllowAsExpressionSeparator: true
62
-
63
- Style/IndentationWidth:
64
- Enabled: false
65
-
66
- Style/SingleLineBlockParams:
67
- Enabled: false
68
-
69
- Metrics/CyclomaticComplexity:
70
- Max: 10
71
-
72
- Metrics/PerceivedComplexity:
73
- Max: 8
74
-
75
- Style/FileName:
76
- Enabled: false
77
-
78
- Style/SpecialGlobalVars:
79
- Enabled: false
1
+ # This is the configuration used to check the rubocop source code.
2
+
3
+ AllCops:
4
+ DisplayCopNames: true
5
+ Exclude:
6
+ - 'resources/*'
7
+ - 'pkg/*'
8
+ - 'docs/*'
9
+ - 'spec/spec_helper.rb'
10
+ - 'spec/fixtures/**/*'
11
+
12
+ Style/RescueModifier:
13
+ Enabled: false
14
+
15
+ Lint/EndAlignment:
16
+ Enabled: false
17
+
18
+ Metrics/MethodLength:
19
+ Enabled: false
20
+
21
+ Metrics/LineLength:
22
+ Enabled: false
23
+
24
+ Style/EachWithObject:
25
+ Enabled: false
26
+
27
+ Style/Documentation:
28
+ Enabled: false
29
+
30
+ Style/GuardClause:
31
+ Enabled: false
32
+
33
+ Style/RedundantReturn:
34
+ Enabled: false
35
+
36
+ Style/SpaceBeforeBlockBraces:
37
+ Enabled: false
38
+
39
+ Style/StringLiterals:
40
+ Enabled: false
41
+
42
+ Style/TrailingWhitespace:
43
+ Enabled: false
44
+
45
+ Metrics/AbcSize:
46
+ Enabled: false
47
+
48
+ Metrics/ClassLength:
49
+ Enabled: false
50
+
51
+ Style/ElseAlignment:
52
+ Enabled: false
53
+
54
+ Style/HashSyntax:
55
+ Enabled: false
56
+
57
+ Style/MultilineOperationIndentation:
58
+ Enabled: false
59
+
60
+ Style/Semicolon:
61
+ AllowAsExpressionSeparator: true
62
+
63
+ Style/IndentationWidth:
64
+ Enabled: false
65
+
66
+ Style/SingleLineBlockParams:
67
+ Enabled: false
68
+
69
+ Metrics/CyclomaticComplexity:
70
+ Max: 10
71
+
72
+ Metrics/PerceivedComplexity:
73
+ Max: 8
74
+
75
+ Style/FileName:
76
+ Enabled: false
77
+
78
+ Style/SpecialGlobalVars:
79
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,112 +1,116 @@
1
- ## Releases
2
-
3
- To install betas run `gem install git-multirepo --pre`
4
-
5
- ## 1.0.0.beta70
6
-
7
- - **Enhancement:** Repo clones initialize and clone submodules (shallow in CI scenarios).
8
- - **Enhancement:** The `merge` command always updates main repo tracking files (makes no sense not to do it, important for CI).
9
-
10
- ## 1.0.0.beta69
11
-
12
- - **Bug Fix:** The `add` command ensures that added repos' paths have a trailing slash (avoids some nasty issues)
13
-
14
- ## 1.0.0.beta68
15
-
16
- - **Bug Fix:** Fix a regression that prevented many commands from running
17
-
18
- ## 1.0.0.beta67
19
-
20
- - **Bug Fix:** Fix a crash related to the presence of trailing slashes in dependency paths
21
-
22
- ## 1.0.0.beta66
23
-
24
- - **Enhancement:** Add a `--no-ff` option to `multi merge` to optionally avoid fast-forwarding
25
-
26
- ## 1.0.0.beta65
27
-
28
- - **Removal:** The `graph` command was removed. It was unused and added an unnecessary dependency.
29
-
30
- ## 1.0.0.beta64
31
-
32
- - **Enhancement:** The branch command does not push by default anymore (helps avoid creating branches in wrong origins when setting up new projects)
33
-
34
- ## 1.0.0.beta63
35
-
36
- - **Bug Fix:** Remove some unnecessary debug console output
37
-
38
- ## 1.0.0.beta62
39
-
40
- - **Bug Fix:** Fix post-first-init commit
41
-
42
- ## 1.0.0.beta61
43
-
44
- - **Bug Fix:** Fix crasher in file permissions checking code
45
-
46
- ## 1.0.0.beta60
47
-
48
- - **Enhancement:** Implemented the `--force` option in `multi branch`
49
- - **Enhancement:** Prevent updating tracking files with an outdated version of the tool
50
- - **Bug Fix:** Fail gracefully in case of limited tracking file permissions
51
-
52
- ## 1.0.0.beta59
53
-
54
- - **Bug Fix:** Fix clone and install error when on-disk dependency directory case does not match
55
-
56
- ## 1.0.0.beta57
57
-
58
- - **Bug Fix:** Fixed error in multi install clone error message building
59
-
60
- ## 1.0.0.beta56
61
-
62
- - **Enhancement:** Using the `--extra-output` flag will output more CI server-specific info (checkout info, errors, etc.)
63
- - **Bug Fix:** Some config flags (such as `--verbose`) were reset when calling other commands internally
64
-
65
- ## 1.0.0.beta53
66
-
67
- - **Enhancement:** Added a `--extra-output` flag to output additional CI server-specific messages (such as TeamCity service messages)
68
-
69
- ## 1.0.0.beta52
70
-
71
- - **Enhancement:** InspectCommand now takes the name of a stat as input instead of flags and provides helpful output if the provided stat name is invalid
72
- - **Enhancement:** Added a `--force` flag to `multi checkout`, which ignores uncommitted changes
73
-
74
- ## 1.0.0.beta51
75
-
76
- - **Enhancement:** `multi merge` now shows a lock file diff if the user chooses to perform an update after the merge operation
77
- - **Enhancement:** `multi merge` now uses the same update logic as `multi update` for more robustness and uniformity
78
- - **Enhancement:** `multi update` has a new `--no-diff` option to skip lock file diffing and shows diff by default
79
- - **Bug Fix:** `multi update` did not show the lock file diff when the `--commit` flag was specified
80
- - **Internals:** `multi update`, `multi do` and `multi open` now use common repo-selection logic (`--deps`, `--main`, etc.)
81
-
82
- ## 1.0.0.beta50
83
-
84
- - **Enhancement:** `multi merge` now asks to update the main repo lock file after a merge (useful for CI scenarios)
85
- - **Enhancement:** `multi update` now asks to show a lock file diff if the main repo's lock file was modified
86
- - **Enhancement:** Checking out the main repo in floating HEAD to prevent unnecessary local branch creation in `multi merge`
87
-
88
- ## 1.0.0.beta49
89
-
90
- - **Enhancement:** Added `--deps`, `--main` and `--all` flags to `multi update` and update all by default
91
- - **Enhancement:** Log a warning on multi install --ci if the main repo HEAD is a merge commit, for CI servers to pick up and optionally force fail with
92
- - **Bug Fix:** "HEAD" was stored in the lock file instead of `nil` when in floating HEAD, which caused some operations to have unexpected results
93
- - **Bug Fix:** Incorrect default behavior for `multi open` (now defaults to "all")
94
-
95
- ## 1.0.0.beta48
96
-
97
- - **New:** `multi update` now updates tracking files in subdependencies
98
- - **Enhancement:** Manual and automated code refactorings using RuboCop
99
-
100
- ## 1.0.0.beta47
101
-
102
- - **Enhancement:** Running commands using system() when we don't need to grab output (enables interactive commands in `multi do` and fixes clone/fetch progress output)
103
-
104
- ## 1.0.0.beta46
105
-
106
- - **Enhancement:** Better `multi install --ci` output
107
- - **Enhancement:** Not requiring a multirepo-enabled repo in InspectCommand, else it's not very useful to inspect random repos
108
- - **Bug Fix:** Fixed exception in `multi do` when providing only the `--help` flag
109
-
110
- ## 1.0.0.beta45 and earlier
111
-
112
- Refer to the commit history for details on earlier versions of git-multirepo.
1
+ ## Releases
2
+
3
+ To install betas run `gem install git-multirepo --pre`
4
+
5
+ ## 1.0.0.beta71
6
+
7
+ - **Enhancement:** The `clone` command now clones all repos in the current directory instead of creating an intermediate directory (more flexible)
8
+
9
+ ## 1.0.0.beta70
10
+
11
+ - **Enhancement:** Repo clones initialize and clone submodules (shallow in CI scenarios).
12
+ - **Enhancement:** The `merge` command always updates main repo tracking files (makes no sense not to do it, important for CI).
13
+
14
+ ## 1.0.0.beta69
15
+
16
+ - **Bug Fix:** The `add` command ensures that added repos' paths have a trailing slash (avoids some nasty issues)
17
+
18
+ ## 1.0.0.beta68
19
+
20
+ - **Bug Fix:** Fix a regression that prevented many commands from running
21
+
22
+ ## 1.0.0.beta67
23
+
24
+ - **Bug Fix:** Fix a crash related to the presence of trailing slashes in dependency paths
25
+
26
+ ## 1.0.0.beta66
27
+
28
+ - **Enhancement:** Add a `--no-ff` option to `multi merge` to optionally avoid fast-forwarding
29
+
30
+ ## 1.0.0.beta65
31
+
32
+ - **Removal:** The `graph` command was removed. It was unused and added an unnecessary dependency.
33
+
34
+ ## 1.0.0.beta64
35
+
36
+ - **Enhancement:** The branch command does not push by default anymore (helps avoid creating branches in wrong origins when setting up new projects)
37
+
38
+ ## 1.0.0.beta63
39
+
40
+ - **Bug Fix:** Remove some unnecessary debug console output
41
+
42
+ ## 1.0.0.beta62
43
+
44
+ - **Bug Fix:** Fix post-first-init commit
45
+
46
+ ## 1.0.0.beta61
47
+
48
+ - **Bug Fix:** Fix crasher in file permissions checking code
49
+
50
+ ## 1.0.0.beta60
51
+
52
+ - **Enhancement:** Implemented the `--force` option in `multi branch`
53
+ - **Enhancement:** Prevent updating tracking files with an outdated version of the tool
54
+ - **Bug Fix:** Fail gracefully in case of limited tracking file permissions
55
+
56
+ ## 1.0.0.beta59
57
+
58
+ - **Bug Fix:** Fix clone and install error when on-disk dependency directory case does not match
59
+
60
+ ## 1.0.0.beta57
61
+
62
+ - **Bug Fix:** Fixed error in multi install clone error message building
63
+
64
+ ## 1.0.0.beta56
65
+
66
+ - **Enhancement:** Using the `--extra-output` flag will output more CI server-specific info (checkout info, errors, etc.)
67
+ - **Bug Fix:** Some config flags (such as `--verbose`) were reset when calling other commands internally
68
+
69
+ ## 1.0.0.beta53
70
+
71
+ - **Enhancement:** Added a `--extra-output` flag to output additional CI server-specific messages (such as TeamCity service messages)
72
+
73
+ ## 1.0.0.beta52
74
+
75
+ - **Enhancement:** InspectCommand now takes the name of a stat as input instead of flags and provides helpful output if the provided stat name is invalid
76
+ - **Enhancement:** Added a `--force` flag to `multi checkout`, which ignores uncommitted changes
77
+
78
+ ## 1.0.0.beta51
79
+
80
+ - **Enhancement:** `multi merge` now shows a lock file diff if the user chooses to perform an update after the merge operation
81
+ - **Enhancement:** `multi merge` now uses the same update logic as `multi update` for more robustness and uniformity
82
+ - **Enhancement:** `multi update` has a new `--no-diff` option to skip lock file diffing and shows diff by default
83
+ - **Bug Fix:** `multi update` did not show the lock file diff when the `--commit` flag was specified
84
+ - **Internals:** `multi update`, `multi do` and `multi open` now use common repo-selection logic (`--deps`, `--main`, etc.)
85
+
86
+ ## 1.0.0.beta50
87
+
88
+ - **Enhancement:** `multi merge` now asks to update the main repo lock file after a merge (useful for CI scenarios)
89
+ - **Enhancement:** `multi update` now asks to show a lock file diff if the main repo's lock file was modified
90
+ - **Enhancement:** Checking out the main repo in floating HEAD to prevent unnecessary local branch creation in `multi merge`
91
+
92
+ ## 1.0.0.beta49
93
+
94
+ - **Enhancement:** Added `--deps`, `--main` and `--all` flags to `multi update` and update all by default
95
+ - **Enhancement:** Log a warning on multi install --ci if the main repo HEAD is a merge commit, for CI servers to pick up and optionally force fail with
96
+ - **Bug Fix:** "HEAD" was stored in the lock file instead of `nil` when in floating HEAD, which caused some operations to have unexpected results
97
+ - **Bug Fix:** Incorrect default behavior for `multi open` (now defaults to "all")
98
+
99
+ ## 1.0.0.beta48
100
+
101
+ - **New:** `multi update` now updates tracking files in subdependencies
102
+ - **Enhancement:** Manual and automated code refactorings using RuboCop
103
+
104
+ ## 1.0.0.beta47
105
+
106
+ - **Enhancement:** Running commands using system() when we don't need to grab output (enables interactive commands in `multi do` and fixes clone/fetch progress output)
107
+
108
+ ## 1.0.0.beta46
109
+
110
+ - **Enhancement:** Better `multi install --ci` output
111
+ - **Enhancement:** Not requiring a multirepo-enabled repo in InspectCommand, else it's not very useful to inspect random repos
112
+ - **Bug Fix:** Fixed exception in `multi do` when providing only the `--help` flag
113
+
114
+ ## 1.0.0.beta45 and earlier
115
+
116
+ Refer to the commit history for details on earlier versions of git-multirepo.