redcar 0.6.1 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. data/CHANGES +26 -0
  2. data/README.md +17 -31
  3. data/Rakefile +1 -1
  4. data/bin/redcar +1 -1
  5. data/lib/redcar.rb +8 -4
  6. data/lib/redcar/installer.rb +2 -1
  7. data/plugins/application/features/step_definitions/dialog_steps.rb +5 -0
  8. data/plugins/application/features/step_definitions/tree_steps.rb +1 -1
  9. data/plugins/application/features/support/env.rb +38 -17
  10. data/plugins/application/lib/application.rb +4 -0
  11. data/plugins/application/lib/application/command.rb +8 -2
  12. data/plugins/application/lib/application/command/executor.rb +37 -8
  13. data/plugins/application/lib/application/command/history.rb +3 -3
  14. data/plugins/application/lib/application/menu.rb +4 -0
  15. data/plugins/application/lib/application/menu/item.rb +9 -1
  16. data/plugins/application/lib/application/tab.rb +11 -0
  17. data/plugins/application/spec/application/command/executor_spec.rb +3 -3
  18. data/plugins/application/spec/application/command_spec.rb +24 -0
  19. data/plugins/application/spec/spec_helper.rb +1 -0
  20. data/plugins/application_swt/lib/application_swt.rb +27 -24
  21. data/plugins/application_swt/lib/application_swt/dialog_adapter.rb +4 -33
  22. data/plugins/application_swt/lib/application_swt/dialogs/input_dialog.rb +46 -0
  23. data/plugins/application_swt/lib/application_swt/dialogs/text_and_file_dialog.rb +118 -0
  24. data/plugins/application_swt/lib/application_swt/icon.rb +37 -0
  25. data/plugins/application_swt/lib/application_swt/menu.rb +8 -3
  26. data/plugins/application_swt/lib/application_swt/tab.rb +6 -3
  27. data/plugins/application_swt/lib/application_swt/treebook.rb +29 -31
  28. data/plugins/application_swt/lib/swt/graphics_utils.rb +170 -0
  29. data/plugins/application_swt/lib/swt/vtab_folder.rb +125 -0
  30. data/plugins/application_swt/lib/swt/vtab_item.rb +69 -0
  31. data/plugins/application_swt/lib/swt/vtab_label.rb +84 -0
  32. data/plugins/auto_indenter/lib/auto_indenter.rb +4 -2
  33. data/plugins/core/lib/core/controller.rb +18 -0
  34. data/plugins/declarations/lib/declarations.rb +1 -1
  35. data/plugins/document_search/lib/document_search.rb +8 -6
  36. data/plugins/document_search/lib/document_search/replace.rb +51 -31
  37. data/plugins/document_search/lib/document_search/search_and_replace.rb +12 -11
  38. data/plugins/edit_view/features/step_definitions/editing_steps.rb +33 -17
  39. data/plugins/edit_view/lib/edit_view.rb +100 -21
  40. data/plugins/edit_view/lib/edit_view/actions/arrow_keys.rb +34 -11
  41. data/plugins/edit_view/lib/edit_view/actions/deletion.rb +10 -0
  42. data/plugins/edit_view/lib/edit_view/command.rb +5 -1
  43. data/plugins/edit_view/lib/edit_view/document.rb +8 -3
  44. data/plugins/edit_view/lib/edit_view/document/command.rb +15 -1
  45. data/plugins/edit_view/lib/edit_view/document/controller.rb +9 -0
  46. data/plugins/edit_view/lib/edit_view/document/history.rb +41 -0
  47. data/plugins/edit_view/lib/edit_view/tab_settings.rb +1 -11
  48. data/plugins/edit_view_swt/lib/edit_view_swt.rb +150 -4
  49. data/plugins/edit_view_swt/lib/edit_view_swt/document.rb +1 -1
  50. data/plugins/edit_view_swt/vendor/java-mateview.rb +1 -1
  51. data/plugins/find-in-project/lib/find_in_project.rb +7 -5
  52. data/plugins/html_view/features/step_definitions/html_view_steps.rb +2 -2
  53. data/plugins/line_tools/features/step_definitions/line_tools_steps.rb +0 -1
  54. data/plugins/line_tools/lib/line_tools.rb +7 -9
  55. data/plugins/macros/features/block_selection_in_macros.feature +48 -0
  56. data/plugins/macros/features/predictive_macros.feature +79 -0
  57. data/plugins/macros/features/record_and_run_macro.feature +87 -0
  58. data/plugins/macros/features/step_definitions/macro_steps.rb +66 -0
  59. data/plugins/macros/features/step_definitions/prediction_steps.rb +8 -0
  60. data/plugins/macros/features/support/env.rb +2 -0
  61. data/plugins/macros/lib/macros.rb +167 -0
  62. data/plugins/macros/lib/macros/action_sequence.rb +30 -0
  63. data/plugins/macros/lib/macros/commands.rb +108 -0
  64. data/plugins/macros/lib/macros/macro.rb +37 -0
  65. data/plugins/macros/lib/macros/manager_controller.rb +67 -0
  66. data/plugins/macros/lib/macros/predictive/document_controller.rb +69 -0
  67. data/plugins/macros/lib/macros/predictive/sequence_finder.rb +112 -0
  68. data/plugins/macros/plugin.rb +9 -0
  69. data/plugins/macros/spec/macros/predictive/sequence_finder_spec.rb +142 -0
  70. data/plugins/macros/spec/spec_helper.rb +6 -0
  71. data/plugins/macros/views/macro_manager.html.erb +86 -0
  72. data/plugins/outline_view/lib/outline_view.rb +1 -1
  73. data/plugins/project/lib/project/commands.rb +2 -2
  74. data/plugins/redcar/redcar.rb +37 -46
  75. data/plugins/repl/lib/repl.rb +4 -4
  76. data/plugins/runnables/features/command_tree.feature +1 -1
  77. data/plugins/runnables/features/parameter_input.feature +42 -0
  78. data/plugins/runnables/features/step_definitions/runnable_steps.rb +6 -0
  79. data/plugins/runnables/features/support/env.rb +28 -8
  80. data/plugins/runnables/lib/runnables.rb +35 -206
  81. data/plugins/runnables/lib/runnables/commands.rb +65 -0
  82. data/plugins/runnables/lib/runnables/tree_mirror/nodes/runnable.rb +62 -0
  83. data/plugins/runnables/lib/runnables/tree_mirror/nodes/runnable_group.rb +59 -0
  84. data/plugins/runnables/lib/runnables/tree_mirror/nodes/runnable_type_group.rb +32 -0
  85. data/plugins/runnables/lib/runnables/tree_mirror/tree_controller.rb +41 -0
  86. data/plugins/runnables/lib/runnables/tree_mirror/tree_mirror.rb +61 -0
  87. data/plugins/scm/lib/scm.rb +78 -45
  88. data/plugins/scm/lib/scm/commands.rb +18 -4
  89. data/plugins/scm/lib/scm/model.rb +54 -41
  90. data/plugins/scm_svn/LICENSE +48 -0
  91. data/plugins/scm_svn/features/add_and_commit.feature +18 -0
  92. data/plugins/scm_svn/features/checkout.feature +5 -0
  93. data/plugins/scm_svn/features/edit_and_index.feature +12 -0
  94. data/plugins/scm_svn/features/ignore_files.feature +14 -0
  95. data/plugins/scm_svn/features/merge.feature +34 -0
  96. data/plugins/scm_svn/features/resolve_conflict.feature +23 -0
  97. data/plugins/scm_svn/features/revert_and_delete.feature +21 -0
  98. data/plugins/scm_svn/features/step_definitions/branch_and_merge_steps.rb +27 -0
  99. data/plugins/scm_svn/features/step_definitions/checkout_steps.rb +25 -0
  100. data/plugins/scm_svn/features/step_definitions/edit_and_index_steps.rb +50 -0
  101. data/plugins/scm_svn/features/step_definitions/scm_svn_steps.rb +57 -0
  102. data/plugins/scm_svn/features/support/env.rb +74 -0
  103. data/plugins/scm_svn/features/switch_branches.feature +53 -0
  104. data/plugins/scm_svn/features/update.feature +16 -0
  105. data/plugins/scm_svn/lib/scm_svn.rb +423 -9
  106. data/plugins/scm_svn/lib/scm_svn/change.rb +116 -0
  107. data/plugins/swt/lib/swt.rb +0 -15
  108. data/plugins/swt/lib/swt/cucumber_patches.rb +2 -37
  109. data/plugins/swt/lib/swt/cucumber_runner.rb +1 -0
  110. data/plugins/swt/lib/swt/full_swt.rb +2 -0
  111. data/plugins/textmate/vendor/redcar-bundles/Bundles/Clojure.tmbundle/Syntaxes/Clojure.tmLanguage +14 -2
  112. data/plugins/todo_list/lib/todo_list/todo_controller.rb +1 -1
  113. data/plugins/todo_list/views/default.css +50 -0
  114. data/plugins/todo_list/views/index.html.erb +5 -16
  115. data/plugins/todo_list/views/redcar_small_icon.png +0 -0
  116. data/plugins/tree_view_swt/lib/tree_view_swt.rb +14 -33
  117. data/plugins/view_shortcuts/views/default.css +31 -0
  118. data/plugins/view_shortcuts/views/index.html.erb +26 -16
  119. data/plugins/view_shortcuts/views/redcar_small_icon.png +0 -0
  120. data/{plugins/runnables → share}/icons/cog.png +0 -0
  121. data/share/icons/folder-gear-emblem.png +0 -0
  122. data/share/icons/folder-gear.png +0 -0
  123. data/share/icons/folder-open-small-gears.png +0 -0
  124. metadata +59 -5
@@ -8,33 +8,34 @@ module Redcar
8
8
  def repository_type
9
9
  ""
10
10
  end
11
-
12
- # REQUIRED. Checks if a given directory is a repository supported by
11
+
12
+ # REQUIRED. Checks if a given directory is a repository supported by
13
13
  # the SCM.
14
14
  def repository?(path)
15
15
  raise "Scm.repository? not implemented."
16
16
  end
17
-
17
+
18
18
  # REQUIRED. Initialises the SCM with a path. This path should be used
19
19
  # for all future interactions. Repeated calls to load should be treated
20
20
  # as a breaking error.
21
21
  def load(path)
22
22
  raise "Scm.load not implemented."
23
23
  end
24
-
24
+
25
25
  # RECOMMENDED. If we call this method, than we expect the repository to
26
26
  # return all fresh data for any subsequent calls. Any caching should be
27
27
  # reset.
28
28
  def refresh
29
29
  nil
30
30
  end
31
-
31
+
32
32
  # REQUIRED to be useful. If no commands are supported, than the SCM will
33
33
  # will essentially be useless. These commands loosely translate to the
34
- # common operations of a distributed CVS.
34
+ # common operations of a distributed CVS.
35
35
  #
36
36
  # Supported values to date:
37
37
  # * :init
38
+ # * :remote_init
38
39
  # * :push
39
40
  # * :pull
40
41
  # * :pull_targetted
@@ -45,19 +46,23 @@ module Redcar
45
46
  #
46
47
  # Note about non-distributed CVS's: If your CVS doesn't support local
47
48
  # commits, ie. subversion, then implement :commit and :pull, and then
48
- # provide translations via the translations method.
49
+ # provide translations via the translations method. :remote_init can
50
+ # fill the gap for initializing a non-distributed VCS.
49
51
  def supported_commands
50
52
  []
51
53
  end
52
-
54
+
53
55
  # This method allows SCM's to override the default names for different
54
56
  # commands and bring them into line with the normal vocabulary in their
55
- # respective worlds. ie, SVN calls :commit and :pull "checkin" and
57
+ # respective worlds. ie, SVN calls :commit and :pull "checkin" and
56
58
  # "checkout" respectively. If you overload this method, you need to
57
59
  # provide names for all commands you support with supported_commands
58
60
  def translations
59
61
  {
60
62
  :init => "Initialise " + repository_type.capitalize,
63
+ :remote_init => "Initialize "+ repository_type.capitalize+" from remote repository",
64
+ :remote_init_path => "Repository URL",
65
+ :remote_init_target => "Target Directory",
61
66
  :push => "Push Changesets",
62
67
  :unpushed_commits => "Unpushed commits",
63
68
  :pull => "Pull Changesets",
@@ -79,15 +84,23 @@ module Redcar
79
84
  :merge => "Merge...",
80
85
  }
81
86
  end
82
-
83
- # REQUIRED for :init. Initialise a repository in a given path.
87
+
88
+ # REQUIRED for :init. Initialise a repository in a given path.
84
89
  # Returns false on error.
85
90
  def init!(path)
86
91
  raise "Scm.init not implemented." if supported_commands.include?(:init)
87
92
  nil
88
93
  end
89
-
90
- # REQUIRED for :commit if :index is not supported. Returns an
94
+
95
+ # REQUIRED for :remote_init. Initialize a repository from
96
+ # a url or file path, like SVN 'checkout' or git 'clone'
97
+ # Returns false on error
98
+ def remote_init(repo_path,target_directory)
99
+ raise "Scm.remote_init not implemented." if supported_commands.include?(:remote_init)
100
+ nil
101
+ end
102
+
103
+ # REQUIRED for :commit if :index is not supported. Returns an
91
104
  # array of changes currently waiting for commit.
92
105
  #
93
106
  # @return [Array<Redcar::Scm::ScmChangesMirror::Change>]
@@ -95,7 +108,7 @@ module Redcar
95
108
  raise "Scm.uncommited_changes not implemented." if supported_commands.include?(:commit)
96
109
  []
97
110
  end
98
-
111
+
99
112
  # REQUIRED for :commit if :index is supported. Returns an array
100
113
  # of changes currently in the index.
101
114
  #
@@ -104,7 +117,7 @@ module Redcar
104
117
  raise "Scm.indexed_changes not implemented." if supported_commands.include?(:commit)
105
118
  []
106
119
  end
107
-
120
+
108
121
  # REQUIRED for :commit if :index is supported. Returns an array
109
122
  # of changes currently not in the index.
110
123
  #
@@ -113,59 +126,59 @@ module Redcar
113
126
  raise "Scm.unindexed_changes not implemented." if supported_commands.include?(:commit)
114
127
  []
115
128
  end
116
-
129
+
117
130
  # REQUIRED for :index. Adds a new file to the index.
118
131
  def index_add(change)
119
132
  raise "Scm.index_add not implemented" if supported_commands.include?(:index)
120
133
  nil
121
134
  end
122
-
135
+
123
136
  # REQUIRED for :index. Ignores a new file so it won't show in changes.
124
137
  def index_ignore(change)
125
138
  raise "Scm.index_ignore not implemented" if supported_commands.include?(:index)
126
139
  nil
127
140
  end
128
-
141
+
129
142
  # REQUIRED for :index. Ignores all files with a certain extension so they
130
143
  # won't show in changes.
131
144
  def index_ignore_all(extension, change)
132
145
  raise "Scm.index_ignore_all not implemented" if supported_commands.include?(:index)
133
146
  nil
134
147
  end
135
-
148
+
136
149
  # REQUIRED for :index. Reverts a file to its last commited state.
137
150
  def index_revert(change)
138
151
  raise "Scm.index_revert not implemented" if supported_commands.include?(:index)
139
152
  nil
140
153
  end
141
-
142
- # REQUIRED for :index. Reverts a file in the index back to it's
154
+
155
+ # REQUIRED for :index. Reverts a file in the index back to it's
143
156
  # last commited state, but leaves the file intact.
144
157
  def index_unsave(change)
145
158
  raise "Scm.index_unsave not implemented" if supported_commands.include?(:index)
146
159
  nil
147
160
  end
148
-
161
+
149
162
  # REQUIRED for :index. Saves changes made to a file in the index.
150
163
  def index_save(change)
151
164
  raise "Scm.index_save not implemented" if supported_commands.include?(:index)
152
165
  nil
153
166
  end
154
-
167
+
155
168
  # REQUIRED for :index. Restores a file to the last known state of
156
169
  # the file. This may be from the index, or the last commit.
157
170
  def index_restore(change)
158
171
  raise "Scm.index_restore not implemented" if supported_commands.include?(:index)
159
172
  nil
160
173
  end
161
-
174
+
162
175
  # REQUIRED for :index. Marks a file as deleted in the index.
163
176
  def index_delete(change)
164
177
  raise "Scm.index_delete not implemented" if supported_commands.include?(:index)
165
178
  nil
166
179
  end
167
-
168
- # REQUIRED for :commit. Commits the currently indexed changes
180
+
181
+ # REQUIRED for :commit. Commits the currently indexed changes
169
182
  # in the subproject.
170
183
  #
171
184
  # @param change Required for :commitable changes. Ignore if
@@ -174,8 +187,8 @@ module Redcar
174
187
  raise "Scm.commit! not implemented." if supported_commands.include?(:index)
175
188
  nil
176
189
  end
177
-
178
- # REQUIRED for :commit. Gets a default commit message for the
190
+
191
+ # REQUIRED for :commit. Gets a default commit message for the
179
192
  # currently indexed changes.
180
193
  #
181
194
  # @param change Required for :commitable changes. Ignore if
@@ -183,7 +196,7 @@ module Redcar
183
196
  def commit_message(change=nil)
184
197
  "\n\n# Please enter your commit message above."
185
198
  end
186
-
199
+
187
200
  # REQUIRED for :push. Returns an array of unpushed changesets for
188
201
  # a given target.
189
202
  #
@@ -192,14 +205,14 @@ module Redcar
192
205
  raise "Scm.unpushed_commits not implemented." if supported_commands.include?(:push)
193
206
  nil
194
207
  end
195
-
208
+
196
209
  # REQUIRED for :push. Pushes all current changesets to the remote
197
210
  # repository for the given target only.
198
211
  def push!(target='')
199
212
  raise "Scm.push! not implemented." if supported_commands.include?(:push)
200
213
  nil
201
214
  end
202
-
215
+
203
216
  # RECOMMENDED for :push. Allows to provide a list of targets that
204
217
  # can be pushed.
205
218
  #
@@ -207,23 +220,23 @@ module Redcar
207
220
  def push_targets
208
221
  []
209
222
  end
210
-
211
- # REQUIRED for :pull and :pull_targetted. Pulls all remote changesets from the
223
+
224
+ # REQUIRED for :pull and :pull_targetted. Pulls all remote changesets from the
212
225
  # remote repository.
213
- #
226
+ #
214
227
  # Note: If you only support :pull, you can implement this without the
215
228
  # argument. It will never be called with an explicit nil.
216
229
  def pull!(remote=nil)
217
230
  raise "Scm.pull! not implemented." if supported_commands.include?(:pull)
218
231
  nil
219
232
  end
220
-
233
+
221
234
  # REQUIRED for :pull_targetted. Returns an array of pull targets.
222
235
  def pull_targets
223
236
  raise "Scm.pull_targets not implemented." if supported_commands.include?(:pull_targeted)
224
237
  []
225
238
  end
226
-
239
+
227
240
  # REQUIRED for :switch_branch and :merge. Returns an array of branch names.
228
241
  #
229
242
  # @return [Array<String>]
@@ -231,27 +244,27 @@ module Redcar
231
244
  raise "Scm.branches not implemented." if supported_commands.include?(:switch_branch) or supported_commands.include?(:merge)
232
245
  []
233
246
  end
234
-
247
+
235
248
  # REQUIRED for :switch_branch. Returns the name of the current branch.
236
249
  def current_branch
237
250
  raise "Scm.current_branch not implemented." if supported_commands.include?(:switch_branch)
238
251
  ''
239
252
  end
240
-
253
+
241
254
  # REQUIRED for :switch_branch. Switches to the named branch.
242
255
  def switch!(branch)
243
256
  raise "Scm.switch! not implemented." if supported_commands.include?(:switch_branch)
244
257
  nil
245
258
  end
246
-
259
+
247
260
  # REQUIRED for :merge. Merges the target branch with the current one.
248
261
  def merge!(branch)
249
262
  raise "Scm.switch! not implemented." if supported_commands.include?(:merge)
250
263
  nil
251
264
  end
252
-
265
+
253
266
  # Allows the SCM to provide a custom adapter which is injected into the
254
- # project instead of old_adapter. This allows interception of file
267
+ # project instead of old_adapter. This allows interception of file
255
268
  # modifications such as move and copy, which you may wish to do via
256
269
  # your SCM instead of normal file system operations.
257
270
  def adapter(old_adapter)
@@ -0,0 +1,48 @@
1
+ The TMate Open Source License.
2
+
3
+
4
+ This license applies to all portions of TMate SVNKit library, which
5
+ are not externally-maintained libraries (e.g. Ganymed SSH library).
6
+
7
+ All the source code and compiled classes in package org.tigris.subversion.javahl
8
+ except SvnClient class are covered by the license in JAVAHL-LICENSE file
9
+
10
+ Copyright (c) 2004-2009 TMate Software. All rights reserved.
11
+
12
+ Redistribution and use in source and binary forms, with or without modification,
13
+ are permitted provided that the following conditions are met:
14
+
15
+ * Redistributions of source code must retain the above copyright notice,
16
+ this list of conditions and the following disclaimer.
17
+
18
+ * Redistributions in binary form must reproduce the above copyright notice,
19
+ this list of conditions and the following disclaimer in the documentation
20
+ and/or other materials provided with the distribution.
21
+
22
+ * Redistributions in any form must be accompanied by information on how to
23
+ obtain complete source code for the software that uses SVNKit and any
24
+ accompanying software that uses the software that uses SVNKit. The source
25
+ code must either be included in the distribution or be available for no
26
+ more than the cost of distribution plus a nominal fee, and must be freely
27
+ redistributable under reasonable conditions. For an executable file, complete
28
+ source code means the source code for all modules it contains. It does not
29
+ include source code for modules or files that typically accompany the major
30
+ components of the operating system on which the executable file runs.
31
+
32
+ * Redistribution in any form without redistributing source code for software
33
+ that uses SVNKit is possible only when such redistribution is explictly permitted
34
+ by TMate Software. Please, contact TMate Software at support@svnkit.com to
35
+ get such permission.
36
+
37
+ THIS SOFTWARE IS PROVIDED BY TMATE SOFTWARE ``AS IS'' AND ANY EXPRESS OR IMPLIED
38
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
39
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE
40
+ DISCLAIMED.
41
+
42
+ IN NO EVENT SHALL TMATE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
43
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
44
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
45
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
46
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
47
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
48
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,18 @@
1
+ Feature: Adding and committing files in a working copy
2
+
3
+ Scenario: Adding and committing new files to a repository
4
+ When I checkout a local repository
5
+ And I create a wc file named "README,foo.rb"
6
+ And I add "foo.rb" to the index
7
+ And I commit my changes with message "Hark! This is a commit."
8
+ Then there should be "1" unindexed files and "0" indexed files
9
+ And if I checkout to a new working copy, it should have "1" files
10
+
11
+ Scenario: Adding and committing new directories to a repository
12
+ When I checkout a local repository
13
+ And I create a wc directory named "lib"
14
+ And I create a wc file named "lib/foo.rb"
15
+ And I add "lib/foo.rb" to the index
16
+ And I commit my changes with message "Hark! This is a commit."
17
+ Then there should be "0" unindexed files and "0" indexed files
18
+ And if I checkout to a new working copy, it should have "1" files
@@ -0,0 +1,5 @@
1
+ Feature: Checking out a repository
2
+
3
+ Scenario: Checking out a repository via the 'file' protocol
4
+ When I checkout a local repository
5
+ Then I should have a working copy
@@ -0,0 +1,12 @@
1
+ Feature: Editing and indexing files in a working copy
2
+
3
+ Scenario: Editing a file and viewing unindexed modified files
4
+ When I checkout a local repository
5
+ And I create a wc file named "README"
6
+ Then there should be "1" unindexed files and "0" indexed files
7
+
8
+ Scenario: Editing a file and adding to the index
9
+ When I checkout a local repository
10
+ And I create a wc file named "README,foo.rb"
11
+ And I add "foo.rb" to the index
12
+ Then there should be "1" unindexed files and "1" indexed files
@@ -0,0 +1,14 @@
1
+ Feature: Ignoring external files within a working directory
2
+
3
+ Scenario: Ignoring certain files
4
+ When I checkout a local repository
5
+ And I create a wc file named "foo.rb"
6
+ And I ignore "foo.rb"
7
+ Then there should be "0" unindexed files and "0" indexed files
8
+
9
+ Scenario: Ignoring all files of a type
10
+ When I checkout a local repository
11
+ And I create a wc file named "foo.rb,bar.rb,README"
12
+ Then there should be "3" unindexed files and "0" indexed files
13
+ When I ignore "rb" files
14
+ Then there should be "1" unindexed files and "0" indexed files
@@ -0,0 +1,34 @@
1
+ Feature: Merging two branches together
2
+
3
+ Scenario: Merging a branch into trunk
4
+ When I checkout a local repository
5
+ And I create a wc directory named "trunk,branches,branches/version1,branches/version2"
6
+ And I create a wc file named "trunk/a.txt,branches/version1/b.txt,branches/version2/c.txt"
7
+ And I add "trunk/a.txt,branches/version1/b.txt,branches/version2/c.txt" to the index
8
+ And I commit my changes with message "Initial commit"
9
+ Given I will open "trunk" branch as a new project
10
+ When I open a directory
11
+ And I merge the "version1" branch
12
+ Then I should see "b.txt" in "trunk" branch
13
+
14
+ Scenario: Merging two branches together
15
+ When I checkout a local repository
16
+ And I create a wc directory named "trunk,branches,branches/version1,branches/version2"
17
+ And I create a wc file named "trunk/a.txt,branches/version1/b.txt,branches/version2/c.txt"
18
+ And I add "trunk/a.txt,branches/version1/b.txt,branches/version2/c.txt" to the index
19
+ And I commit my changes with message "Initial commit"
20
+ Given I will open "version1" branch as a new project
21
+ When I open a directory
22
+ And I merge the "version2" branch
23
+ Then I should see "c.txt" in "version1" branch
24
+
25
+ Scenario: Merging trunk into a branch
26
+ When I checkout a local repository
27
+ And I create a wc directory named "trunk,branches,branches/version1,branches/version2"
28
+ And I create a wc file named "trunk/a.txt,branches/version1/b.txt,branches/version2/c.txt"
29
+ And I add "trunk/a.txt,branches/version1/b.txt,branches/version2/c.txt" to the index
30
+ And I commit my changes with message "Initial commit"
31
+ Given I will open "version2" branch as a new project
32
+ When I open a directory
33
+ And I merge the "trunk" branch
34
+ Then I should see "a.txt" in "version2" branch
@@ -0,0 +1,23 @@
1
+ Feature: Resolving conflicts
2
+
3
+ Scenario: Resolving a file content conflict
4
+ When I checkout a local repository
5
+ And I create a wc file named "foo.rb"
6
+ And I replace "foo.rb" contents with "Never gonna make you cry"
7
+ And I add "foo.rb" to the index
8
+ And I commit my changes with message "Hark! This is a commit."
9
+ Then if I checkout to a new working copy, it should have "1" files
10
+ And the contents of wc file "foo.rb" in the new copy should be "Never gonna make you cry"
11
+ When I replace "foo.rb" contents with "Never gonna say goodbye"
12
+ And I commit my changes with message "Yarr! This is another commit."
13
+ And I replace "foo.rb" contents in the new copy with "Never gonna tell a lie and hurt you"
14
+ Then if I update my new working copy, it should have "4" files
15
+ And there should be "1" conflicted files in the new copy
16
+ When I replace "foo.rb" contents in the new copy with "Never gonna tell a lie and hurt you"
17
+ And and I resolve "foo.rb" conflicts in the new copy
18
+ Then if I update my new working copy, it should have "1" files
19
+ And there should be "0" conflicted files in the new copy
20
+ And the contents of wc file "foo.rb" in the new copy should be "Never gonna tell a lie and hurt you"
21
+ And I commit my changes in the new copy with message "Commit commit commit again!"
22
+ And if I update my working copy, it should have "1" files
23
+ And the contents of wc file "foo.rb" should be "Never gonna tell a lie and hurt you"
@@ -0,0 +1,21 @@
1
+ Feature: Reverting and deleting files in a working copy
2
+
3
+ Scenario: Reverting a dirty file to base revision
4
+ When I checkout a local repository
5
+ And I create a wc file named "foo.rb"
6
+ And I replace "foo.rb" contents with "Never gonna give you up"
7
+ And I add "foo.rb" to the index
8
+ And I commit my changes with message "Hark! This is a commit."
9
+ And I replace "foo.rb" contents with "Never gonna let you down"
10
+ And I revert "foo.rb"
11
+ Then there should be "0" unindexed files and "0" indexed files
12
+ And the contents of wc file "foo.rb" should be "Never gonna give you up"
13
+
14
+ Scenario: Deleting a file from version control
15
+ When I checkout a local repository
16
+ And I create a wc file named "foo.rb,bar.rb"
17
+ And I add "foo.rb,bar.rb" to the index
18
+ And I commit my changes with message "Hark! This be a commit."
19
+ And I wc delete "foo.rb"
20
+ And I commit my changes with message "Yarr! Committin' I be!"
21
+ Then if I checkout to a new working copy, it should have "1" files