p4ruby 2015.2.1313860 → 2017.1.1599185

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0df8ecb29b0d14fc60e731f2a37e54d488c17c78
4
- data.tar.gz: f13fb14baf015b909eca435b20b3e45cb996f5b8
3
+ metadata.gz: 6c726609fc009f798f611b395f1b73782d33a951
4
+ data.tar.gz: f40e6deeb256912813dea61449903fe33223aa69
5
5
  SHA512:
6
- metadata.gz: 9a650207e7bc2f3f5eaf32d04de047b2025d5fa46dfbb1cc244de576b657d8563ae3456b3da97999c47d1339148424919ac93fd047e2719bb9ae58d38f26cddd
7
- data.tar.gz: 4fcb7e186fd5c46a2927993e75ceda31ad0a4f917cce9c8b439157462544a3646862e767590f20a188a1f475ba4a9091202f1217f52d9ba82082cba47a553491
6
+ metadata.gz: 30e137fbe3274e5e80454adbb1c0aa8b6d6515e866b63129750da07048e47110d96f34510766e466ba571b1c26577d75e66135e5e08ad4784ddbaf98815859a7
7
+ data.tar.gz: f2009d6583e53a4702bc4409be915cb73cb39830c432c174c4a0f623b37d870b4439e2d8789620cd2485fe3edfcf907c34ae0569f00cc67bd2af2937552d363b
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Release Notes for P4Ruby, Perforce's script API for Ruby
2
2
 
3
- Version 2015.2
3
+ Version 2017.1
4
4
 
5
5
  ## Introduction
6
6
 
7
- P4Ruby is a native Ruby gem that allows you to run Perforce commands from
7
+ P4Ruby is a native Ruby gem that allows you to run Perforce commands from
8
8
  Ruby applications, and retrieve the results in a Ruby-friendly format.
9
9
 
10
10
  P4Ruby is intended to work against a corresponding version of the Perforce
11
- C++ API, e.g., P4Ruby 2015.2 will be compiled using a 2015.2 version
12
- of the P4API. You can always install P4Ruby specifying a specific version of
11
+ C++ API, e.g., P4Ruby 2017.1 will be compiled using a 2017.1 version
12
+ of the P4API. You can always install P4Ruby specifying a specific version of
13
13
  the P4API.
14
14
 
15
15
  To determine the version of your P4Ruby, and which version of the
@@ -21,13 +21,13 @@ P4API it has been built with, issue the following command:
21
21
 
22
22
  ### Installing P4Ruby
23
23
 
24
- As of 2014.2, the recommended mechanism for installing P4Ruby is via
24
+ As of 2014.2, the recommended mechanism for installing P4Ruby is via
25
25
  rubygems.org.
26
26
 
27
27
  Before installing, please take care that any older version of P4Ruby that
28
28
  may have been installed outside of the Gem process is removed from your
29
29
  gempath. The older installation process can not be easily removed and may
30
- conflict with a gem-based install. Make sure that both P4.rb and P4.so (or
30
+ conflict with a gem-based install. Make sure that both P4.rb and P4.so (or
31
31
  P4.bundle on OS X) are not available within the load path of Ruby. You can
32
32
  use the `puts $:` command in `irb` to determine your current load path.
33
33
 
@@ -36,8 +36,8 @@ your installation of Ruby. If you can build the core Ruby distribution
36
36
  locally, you likely can install P4Ruby without incident. On Windows,
37
37
  precompiled gems are available, which already include the P4API and OpenSSL.
38
38
 
39
- The main command to install p4ruby is via gem or bundler. (When using the
40
- default system rubies from OS X or the CentOS Software Collections Library,
39
+ The main command to install p4ruby is via gem or bundler. (When using the
40
+ default system rubies from OS X or the CentOS Software Collections Library,
41
41
  see 'Problems Specifying P4API' below.)
42
42
 
43
43
  gem install p4ruby
@@ -58,15 +58,15 @@ API itself from ftp.perforce.com.
58
58
  Alternatively, you can use Bundler (http://bundler.io). In your Gemfile,
59
59
  specify
60
60
 
61
- gem 'p4ruby', '~> 2015.2'
61
+ gem 'p4ruby', '~> 2017.1'
62
62
 
63
63
  And then execute:
64
64
 
65
65
  bundle --with-p4api-dir=DIR
66
66
 
67
67
  #### Problems Specifying P4API
68
-
69
- On older Ruby platforms, such as the default OS X or ruby193 CentOS
68
+
69
+ On older Ruby platforms, such as the default OS X or ruby193 CentOS
70
70
  distributions, issues can arise when specifying the P4API directly via
71
71
  the command line.
72
72
 
@@ -77,7 +77,7 @@ directly:
77
77
  --with-p4-api-include=DIR/include \
78
78
  --with-p4-api-lib=DIR/lib
79
79
 
80
- An alternative is to specify the P4API directory using the `p4api_dir`
80
+ An alternative is to specify the P4API directory using the `p4api_dir`
81
81
  environment variable.
82
82
 
83
83
 
@@ -89,16 +89,16 @@ environment variable.
89
89
  "ftp://ftp.perforce.com/perforce". The API archive is located
90
90
  in release and platform-specific subdirectories and is named
91
91
  "p4api.tgz".
92
-
92
+
93
93
  __IMPORTANT__: Mac OS X users MUST use the 'darwin' variant
94
94
  of the Perforce API. Using the 'macos' variant
95
95
  does not work.
96
-
96
+
97
97
  Note: 32-bit builds of P4Ruby require a 32-bit version of the
98
98
  C++ API and a 32-bit version of Ruby. 64-bit builds of
99
99
  P4Ruby require a 64-bit version of the C++ API and a
100
100
  64-bit version of Ruby.
101
-
101
+
102
102
  Unzip the archive into an empty directory.
103
103
 
104
104
  2. Extract the P4Ruby API archive into a new, empty directory.
@@ -106,16 +106,16 @@ environment variable.
106
106
  3. In the p4ruby source directory, install dependencies:
107
107
 
108
108
  bundle install
109
-
109
+
110
110
  3. In the p4ruby source directory, build the gem:
111
111
 
112
- p4api_dir=<absolute path to Perforce C++ API> rake compile
112
+ p4api_dir=<absolute path to Perforce C++ API> rake compile
113
113
 
114
114
  4. Test your distribution, which relies on a locally installed p4d.
115
115
 
116
116
  rake test
117
-
118
- If `p4d` is not available on your path, indicate it via the `P4D_BIN`
117
+
118
+ If `p4d` is not available on your path, indicate it via the `P4D_BIN`
119
119
  environment variable before running `rake test`.
120
120
 
121
121
  5. Install P4Ruby into your local gem cache:
@@ -147,30 +147,29 @@ Perforce server later than 2001.1
147
147
  You should use a version of P4Ruby built against a corresponding version
148
148
  of the P4API that matches your Perforce server version. Since 2014.2,
149
149
  you should try to use the same major and minor variation of P4Ruby as
150
- used by the Perforce server. Ergo, against Perforce server version 2015.2,
151
- you would want a P4Ruby version that starts with 2015.2.
150
+ used by the Perforce server. Ergo, against Perforce server version 2017.1,
151
+ you would want a P4Ruby version that starts with 2017.1.
152
152
 
153
153
  #### API Compatibility
154
154
 
155
- The 2015.2 release of P4Ruby supports the 2015.2 Perforce API.
155
+ The 2017.1 release of P4Ruby supports the 2017.1 Perforce API.
156
156
  Older releases might work but are not supported.
157
157
 
158
158
  #### Ruby Compatibility
159
159
 
160
- The 2015.2 release of P4Ruby is supported by installing the gem
161
- with Ruby MRI releases 2.0, 2.1, and 2.2 with shared library
160
+ The 2017.1 release of P4Ruby is supported by installing the gem
161
+ with Ruby MRI releases 2.0, 2.1, 2.2, and 2.3, with shared library
162
162
  support.
163
163
 
164
164
  For detailed compatibility, please check the following table:
165
165
 
166
166
  Ruby Release | P4Ruby Release
167
167
  ===================================
168
- 1.6 | up to 2009.2 (unsupported)
169
- 1.8 | 2007.3 or later (unsupported)
170
- 1.9 | 2011.1 or later
168
+ <2.0 | 2011.1 or later (unsupported)
171
169
  2.0 | 2014.1 or later
172
170
  2.1 | 2014.2 or later
173
171
  2.2 | 2014.2 or later
172
+ 2.3 | 2017.1 or later
174
173
 
175
174
  It is recommended that you use a Ruby distribution that can deploy
176
175
  native gems easily, which, outside of Windows means obtaining a source
@@ -183,12 +182,12 @@ have shared library support configured, which is needed for Ruby
183
182
  extensions.
184
183
 
185
184
  In general, Ruby VMs installed via package managers are not officially
186
- coordinated with the MRI releases available on ruby-lang.org.
187
-
185
+ coordinated with the MRI releases available on ruby-lang.org.
186
+
188
187
  We do verify that p4ruby works with Ruby 1.9 on Debian (and Ubuntu), and
189
- on CentOS 6 using the Software Collections Library. These are considered
188
+ on CentOS 6 using the Software Collections Library. These are considered
190
189
  "stable" distributions, and do receive security updates.
191
-
190
+
192
191
  Other versions of Ruby, such as the default distribution of OS X may not
193
192
  work. The default OS X Ruby is infrequently updated by Apple, and is known
194
193
  to contain issues that do not seem to be patched.
@@ -202,7 +201,7 @@ fail with the error:
202
201
 
203
202
  "SSL library must be at least version 1.0.1."
204
203
 
205
- The 2015.2 release of P4Ruby is supported with OpenSSL 1.0.1
204
+ The 2017.1 release of P4Ruby is supported with OpenSSL 1.0.2
206
205
 
207
206
  For detailed compatibility, please check the following table:
208
207
 
@@ -214,6 +213,7 @@ For detailed compatibility, please check the following table:
214
213
  2014.2 | 1.0.1i+
215
214
  2015.1 | 1.0.1i+
216
215
  2015.2 | 1.0.1i+
216
+ 2017.1 | 1.0.2l+
217
217
 
218
218
 
219
219
  #### Platform Compatibility
@@ -237,7 +237,7 @@ handling between compilers.
237
237
 
238
238
  #### Compatibility with Previous Releases
239
239
 
240
- Unless otherwise stated below, the 2015.2 release of P4Ruby is
240
+ Unless otherwise stated below, the 2017.1 release of P4Ruby is
241
241
  compatible with previous releases from Perforce Software.
242
242
 
243
243
  #### Known Limitations
@@ -288,6 +288,12 @@ release up to the bug fix change level.
288
288
 
289
289
  --------------------------------------------------------------------------
290
290
 
291
+ New functionality in 2017.1
292
+
293
+ - (SIR#92235 / P4RUBY-204)
294
+
295
+ Support graph depot commands
296
+
291
297
  New functionality in 2015.2
292
298
 
293
299
  - (SIR#78548 / P4RUBY-193)
@@ -302,7 +308,7 @@ Changes in both 2015.2.0.pre0 and 2015.1.0
302
308
  - Applied change to P4ClientApi::SetCharset, that if it is set to "none", then
303
309
  we will ignore the setting. The P4API enviro file handling seems to always
304
310
  create this setting and apply it in various circumstances.
305
-
311
+
306
312
  Changes in 2015.1.0
307
313
 
308
314
  - Updated spec mappings in specmgr.cpp to be up to date with the 2015.1 P4API
@@ -375,7 +381,7 @@ Bugs fixed in 2014.2.0.pre2
375
381
 
376
382
  New functionality in 2014.1
377
383
 
378
- - 807216 (SIR#70070)
384
+ - 807216 (SIR#70070)
379
385
 
380
386
  P4Ruby now supports the P4IGNORE file feature introduced
381
387
  in the 2013.2 server. Three new methods have been added
@@ -398,7 +404,7 @@ Bugs fixed in 2013.1
398
404
 
399
405
  P4Ruby no longer crashes when an exception is raised from
400
406
  the block passed to P4#run_resolve.
401
-
407
+
402
408
  --------------------------------------------------------------------------
403
409
 
404
410
  New functionality in 2012.2
@@ -544,11 +550,11 @@ New functionality in 2011.1
544
550
 
545
551
  P4Ruby supports setting values in the registry (on those
546
552
  platforms that support it).
547
-
553
+
548
554
  The command P4#set_env( var, val ) will set a registry
549
555
  variable on platforms that support this action or raise
550
556
  a P4Exception for those that don't.
551
-
557
+
552
558
  The command P4#set_env( var, "" ) unsets a registry variable.
553
559
 
554
560
  - 333292 (Bug #36121)
@@ -717,7 +723,7 @@ New functionality in 2010.1
717
723
 
718
724
  It's now unnecessary to run a command before calling the
719
725
  following methods:
720
-
726
+
721
727
  P4#server_level
722
728
  P4#server_case_sensitive?
723
729
  P4#server_unicode?
@@ -9,7 +9,7 @@ require 'rbconfig'
9
9
 
10
10
  # Set this to the main version directory we look up in ftp.perforce.com for the P4API
11
11
  # This is ignored if you specify the version on the command line.
12
- P4API_VERSION_DIR = 'r15.2'
12
+ P4API_VERSION_DIR = 'r17.2'
13
13
 
14
14
  #==============================================================================
15
15
  # Provide platform variables in P4-specific format
@@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
30
  *
31
31
  * Author : Tony Smith <tony@perforce.com> or <tony@smee.org>
32
32
  *
33
- * Description : Ruby bindings for the Perforce API.
33
+ * Description : Ruby bindings for the Perforce API.
34
34
  *
35
35
  * vim:ts=8:sw=4
36
36
  ******************************************************************************/
@@ -160,7 +160,7 @@ static VALUE p4_run_tagged( VALUE self, VALUE tagged )
160
160
  flag = 0;
161
161
  else
162
162
  flag = NUM2INT( tagged ) ? 1 : 0;
163
-
163
+
164
164
  int old_value = p4->IsTagged();
165
165
  p4->Tagged( flag );
166
166
 
@@ -196,7 +196,7 @@ static VALUE p4_set_tagged( VALUE self, VALUE toggle )
196
196
  flag = 0;
197
197
  else
198
198
  flag = NUM2INT( toggle ) ? 1 : 0;
199
-
199
+
200
200
  p4->Tagged( flag );
201
201
  return flag ? Qtrue : Qfalse; // Seems to be ignored...
202
202
  }
@@ -541,7 +541,7 @@ static VALUE p4_set_track( VALUE self, VALUE toggle )
541
541
  flag = 0;
542
542
  else
543
543
  flag = NUM2INT( toggle ) ? 1 : 0;
544
-
544
+
545
545
  p4->SetTrack( flag );
546
546
  return flag ? Qtrue : Qfalse; // Seems to be ignored...
547
547
  }
@@ -567,11 +567,37 @@ static VALUE p4_set_streams( VALUE self, VALUE toggle )
567
567
  flag = 0;
568
568
  else
569
569
  flag = NUM2INT( toggle ) ? 1 : 0;
570
-
570
+
571
571
  p4->SetStreams( flag );
572
572
  return flag ? Qtrue : Qfalse; // Seems to be ignored...
573
573
  }
574
574
 
575
+ static VALUE p4_get_graph( VALUE self )
576
+ {
577
+ P4ClientApi *p4;
578
+ Data_Get_Struct( self, P4ClientApi, p4 );
579
+ return p4->IsGraph() ? Qtrue : Qfalse;
580
+ }
581
+
582
+ static VALUE p4_set_graph( VALUE self, VALUE toggle )
583
+ {
584
+ P4ClientApi *p4;
585
+ Data_Get_Struct( self, P4ClientApi, p4 );
586
+
587
+ // The user might have passed an integer, or it might be a boolean,
588
+ // we convert to int for consistency.
589
+ int flag = 0;
590
+ if( toggle == Qtrue )
591
+ flag = 1;
592
+ else if( toggle == Qfalse )
593
+ flag = 0;
594
+ else
595
+ flag = NUM2INT( toggle ) ? 1 : 0;
596
+
597
+ p4->SetGraph( flag );
598
+ return flag ? Qtrue : Qfalse; // Seems to be ignored...
599
+ }
600
+
575
601
  /*******************************************************************************
576
602
  * Running commands. General purpose Run method and method for supplying
577
603
  * input to "p4 xxx -i" commands
@@ -599,7 +625,7 @@ static VALUE p4_run( VALUE self, VALUE args )
599
625
  char *cmd = StringValuePtr( v );
600
626
  argc = NUM2INT( rb_funcall( flatArgs, idLength, 0 ) );
601
627
 
602
- // Allocate storage on the stack so it's automatically reclaimed
628
+ // Allocate storage on the stack so it's automatically reclaimed
603
629
  // when we exit.
604
630
  char **p4args = ALLOCA_N( char *, argc + 1 );
605
631
 
@@ -917,7 +943,7 @@ static VALUE p4map_new( int argc, VALUE *argv, VALUE pClass )
917
943
 
918
944
  // First arg is the class
919
945
  // pClass = argv[ 0 ];
920
-
946
+
921
947
  // Now instantiate the new object.
922
948
  self = Data_Wrap_Struct( pClass, 0, p4map_free, m );
923
949
  rb_obj_call_init( self, 0, argv );
@@ -1066,7 +1092,7 @@ static VALUE p4map_reverse( VALUE self )
1066
1092
  return rval;
1067
1093
  }
1068
1094
 
1069
- //
1095
+ //
1070
1096
  // P4::Map#translate( string, fwd=true )
1071
1097
  //
1072
1098
  static VALUE p4map_trans( int argc, VALUE *argv, VALUE self )
@@ -1076,7 +1102,7 @@ static VALUE p4map_trans( int argc, VALUE *argv, VALUE self )
1076
1102
  VALUE string;
1077
1103
 
1078
1104
  if( argc < 1 || argc > 2 )
1079
- rb_raise( rb_eArgError,
1105
+ rb_raise( rb_eArgError,
1080
1106
  "Invalid arguments to P4::Map#translate. "
1081
1107
  "Pass the string you wish to translate, and an optional "
1082
1108
  "boolean to indicate whether translation should be in "
@@ -1197,6 +1223,8 @@ void Init_P4()
1197
1223
  rb_define_method( cP4, "tagged=", RUBY_METHOD_FUNC(p4_set_tagged), 1 );
1198
1224
  rb_define_method( cP4, "track?", RUBY_METHOD_FUNC(p4_get_track) , 0 );
1199
1225
  rb_define_method( cP4, "track=", RUBY_METHOD_FUNC(p4_set_track) , 1 );
1226
+ rb_define_method( cP4, "graph?", RUBY_METHOD_FUNC(p4_get_graph) , 0 );
1227
+ rb_define_method( cP4, "graph=", RUBY_METHOD_FUNC(p4_set_graph) , 1 );
1200
1228
 
1201
1229
 
1202
1230
  // Perforce client settings.
@@ -359,6 +359,14 @@ void P4ClientApi::SetStreams( int enable )
359
359
  ClearStreamsMode();
360
360
  }
361
361
 
362
+ void P4ClientApi::SetGraph( int enable )
363
+ {
364
+ if ( enable )
365
+ SetGraphMode();
366
+ else
367
+ ClearGraphMode();
368
+ }
369
+
362
370
  int
363
371
  P4ClientApi::GetServerLevel()
364
372
  {
@@ -480,6 +488,9 @@ P4ClientApi::RunCmd( const char *cmd, ClientUser *ui, int argc, char * const *ar
480
488
  if ( IsStreams() && apiLevel > 69 )
481
489
  client.SetVar( "enableStreams", "" );
482
490
 
491
+ if ( IsGraph() && apiLevel > 81 )
492
+ client.SetVar( "enableGraph", "" );
493
+
483
494
  // If maxresults or maxscanrows is set, enforce them now
484
495
  if( maxResults ) client.SetVar( "maxResults", maxResults );
485
496
  if( maxScanRows ) client.SetVar( "maxScanRows", maxScanRows );
@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
37
 
38
38
 
39
39
  /*******************************************************************************
40
- * P4ClientApi class - where we register our Ruby classes and plumb together
40
+ * P4ClientApi class - where we register our Ruby classes and plumb together
41
41
  * the components
42
42
  ******************************************************************************/
43
43
 
@@ -56,11 +56,14 @@ public:
56
56
  int SetTrack( int enable );
57
57
  int GetTrack() { return IsTrackMode() != 0; }
58
58
 
59
- // Set streams mode
60
-
59
+ // Set streams mode
61
60
  void SetStreams( int enable );
62
61
  int IsStreams() { return IsStreamsMode() != 0; };
63
62
 
63
+ // Set graph mode
64
+ void SetGraph( int enable );
65
+ int IsGraph() { return IsGraphMode() != 0; };
66
+
64
67
  // Returns bool, but may raise exception
65
68
  int SetCharset( const char *c );
66
69
 
@@ -75,7 +78,7 @@ public:
75
78
  void SetMaxResults( int v ) { maxResults = v; }
76
79
  void SetMaxScanRows( int v ) { maxScanRows = v; }
77
80
  void SetMaxLockTime( int v ) { maxLockTime = v; }
78
- VALUE SetEnv( const char *var, const char *val );
81
+ VALUE SetEnv( const char *var, const char *val );
79
82
  void SetLanguage( const char *l ) { client.SetLanguage( l ); }
80
83
  void SetPassword( const char *p ) { client.SetPassword( p ); }
81
84
  void SetPort( const char *p ) { client.SetPort( p ); }
@@ -117,7 +120,7 @@ public:
117
120
  VALUE Connected(); // Return true if connected and not dropped.
118
121
  VALUE Disconnect();
119
122
 
120
- // Executing commands.
123
+ // Executing commands.
121
124
  VALUE Run( const char *cmd, int argc, char * const *argv );
122
125
  VALUE SetInput( VALUE input );
123
126
 
@@ -182,8 +185,9 @@ private:
182
185
  S_CASEFOLDING = 0x0010,
183
186
  S_TRACK = 0x0020,
184
187
  S_STREAMS = 0x0040,
188
+ S_GRAPH = 0x0080,
185
189
 
186
- S_INITIAL_STATE = 0x0041,
190
+ S_INITIAL_STATE = 0x00C1, // Streams, Graph, and Tagged enabled by default
187
191
  S_RESET_MASK = 0x001E,
188
192
  };
189
193
 
@@ -218,6 +222,10 @@ private:
218
222
  void ClearStreamsMode() { flags &= ~S_STREAMS; }
219
223
  int IsStreamsMode() { return flags & S_STREAMS; }
220
224
 
225
+ void SetGraphMode() { flags |= S_GRAPH; }
226
+ void ClearGraphMode() { flags &= ~S_GRAPH; }
227
+ int IsGraphMode() { return flags & S_GRAPH; }
228
+
221
229
  private:
222
230
  ClientApi client;
223
231
  ClientUserRuby ui;
@@ -1,3 +1,3 @@
1
1
  class P4
2
- Version = VERSION = '2015.2.1313860'
3
- end
2
+ Version = VERSION = '2017.1.1599185'
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: p4ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2015.2.1313860
4
+ version: 2017.1.1599185
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perforce Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-09 00:00:00.000000000 Z
11
+ date: 2017-12-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby extensions to the C++ Perforce API.
14
14
  email: support@perforce.com