p4ruby 2015.2.1265122-x86-mingw32 → 2020.1.1970474-x86-mingw32

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.
@@ -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,13 +78,14 @@ 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 ); }
82
85
  void SetProg( const char *p ) { prog = p; }
83
86
  void SetProtocol( const char *var, const char *val );
84
87
  void SetTicketFile( const char *p );
88
+ void SetTrustFile( const char *p );
85
89
  void SetUser( const char *u ) { client.SetUser( u ); }
86
90
  void SetVersion( const char *v ) { version = v; }
87
91
 
@@ -99,6 +103,7 @@ public:
99
103
  const StrPtr &GetPort() { return client.GetPort(); }
100
104
  const StrPtr &GetProg() { return prog; }
101
105
  const StrPtr &GetTicketFile() { return ticketFile; }
106
+ const StrPtr &GetTrustFile() { return trustFile; }
102
107
  const StrPtr &GetUser() { return client.GetUser(); }
103
108
  const StrPtr &GetVersion() { return version; }
104
109
 
@@ -117,7 +122,7 @@ public:
117
122
  VALUE Connected(); // Return true if connected and not dropped.
118
123
  VALUE Disconnect();
119
124
 
120
- // Executing commands.
125
+ // Executing commands.
121
126
  VALUE Run( const char *cmd, int argc, char * const *argv );
122
127
  VALUE SetInput( VALUE input );
123
128
 
@@ -182,8 +187,9 @@ private:
182
187
  S_CASEFOLDING = 0x0010,
183
188
  S_TRACK = 0x0020,
184
189
  S_STREAMS = 0x0040,
190
+ S_GRAPH = 0x0080,
185
191
 
186
- S_INITIAL_STATE = 0x0041,
192
+ S_INITIAL_STATE = 0x00C1, // Streams, Graph, and Tagged enabled by default
187
193
  S_RESET_MASK = 0x001E,
188
194
  };
189
195
 
@@ -218,6 +224,10 @@ private:
218
224
  void ClearStreamsMode() { flags &= ~S_STREAMS; }
219
225
  int IsStreamsMode() { return flags & S_STREAMS; }
220
226
 
227
+ void SetGraphMode() { flags |= S_GRAPH; }
228
+ void ClearGraphMode() { flags &= ~S_GRAPH; }
229
+ int IsGraphMode() { return flags & S_GRAPH; }
230
+
221
231
  private:
222
232
  ClientApi client;
223
233
  ClientUserRuby ui;
@@ -226,6 +236,7 @@ private:
226
236
  StrBuf prog;
227
237
  StrBuf version;
228
238
  StrBuf ticketFile;
239
+ StrBuf trustFile;
229
240
  int depth;
230
241
  int debug;
231
242
  int exceptionLevel;
@@ -236,4 +247,3 @@ private:
236
247
  int maxScanRows;
237
248
  int maxLockTime;
238
249
  };
239
-
@@ -88,6 +88,21 @@ P4Error::GetText()
88
88
  return P4Utils::ruby_string( t.Text(), t.Length() );
89
89
  }
90
90
 
91
+ VALUE
92
+ P4Error::GetDict()
93
+ {
94
+ VALUE dictHash = rb_hash_new();
95
+ StrDict* pDict = error.GetDict();
96
+ StrRef key, val;
97
+ // suppress -Wpointer-arith
98
+ for (int i=0;pDict->GetVar(i,key,val) != 0;i++) {
99
+ rb_hash_aset( dictHash,
100
+ P4Utils::ruby_string(key.Text(), key.Length()),
101
+ P4Utils::ruby_string(val.Text(), val.Length()));
102
+ }
103
+ return dictHash;
104
+ }
105
+
91
106
  VALUE
92
107
  P4Error::Inspect()
93
108
  {
@@ -46,6 +46,7 @@ class P4Error
46
46
  VALUE GetGeneric();
47
47
  VALUE GetSeverity();
48
48
  VALUE GetText();
49
+ VALUE GetDict();
49
50
  VALUE Inspect();
50
51
 
51
52
  // Wrap as Ruby object of class pClass
@@ -57,6 +57,7 @@ P4Result::P4Result()
57
57
  VALUE cP4 = rb_const_get_at( rb_cObject, idP4 );
58
58
  cP4Msg = rb_const_get_at( cP4, idP4Msg );
59
59
 
60
+ Reset();
60
61
  }
61
62
 
62
63
 
@@ -63,21 +63,6 @@ struct defaultspec {
63
63
  "unlocked/locked;;"
64
64
  "View;code:311;type:wlist;words:2;len:64;;"
65
65
  },
66
- {
67
- "changeX",
68
- "Change;code:201;rq;ro;fmt:L;seq:1;len:10;;"
69
- "Date;code:202;type:date;ro;fmt:R;seq:3;len:20;;"
70
- "Client;code:203;ro;fmt:L;seq:2;len:32;;"
71
- "User;code:204;ro;fmt:L;seq:4;len:32;;"
72
- "Status;code:205;ro;fmt:R;seq:5;len:10;;"
73
- "Type;code:211;seq:6;type:select;fmt:L;len:10;"
74
- "val:public/restricted;;"
75
- "ImportedBy;code:212;type:line;ro;fmt:L;len:32;;"
76
- "Identity;code:213;type:line;;"
77
- "Description;code:206;type:text;rq;;"
78
- "Jobs;code:209;type:wlist;words:2;len:32;;"
79
- "Files;code:210;type:llist;len:64;;"
80
- },
81
66
  {
82
67
  "change",
83
68
  "Change;code:201;rq;ro;fmt:L;seq:1;len:10;;"
@@ -92,6 +77,7 @@ struct defaultspec {
92
77
  "Description;code:206;type:text;rq;seq:7;;"
93
78
  "JobStatus;code:207;fmt:I;type:select;seq:9;;"
94
79
  "Jobs;code:208;type:wlist;seq:8;len:32;;"
80
+ "Stream;code:214;type:line;len:64;;"
95
81
  "Files;code:210;type:llist;len:64;;"
96
82
  },
97
83
  {
@@ -115,47 +101,12 @@ struct defaultspec {
115
101
  "Stream;code:314;type:line;len:64;;"
116
102
  "StreamAtChange;code:316;type:line;len:64;;"
117
103
  "ServerID;code:315;type:line;ro;len:64;;"
118
- "Type;code:318;type:select;len:10;val:writeable/readonly;;"
104
+ "Type;code:318;type:select;len:10;val:"
105
+ "writeable/readonly/graph/partitioned;;"
119
106
  "Backup;code:319;type:select;len:10;val:enable/disable;;"
120
107
  "View;code:311;type:wlist;words:2;len:64;;"
121
108
  "ChangeView;code:317;type:llist;len:64;;"
122
109
  },
123
- {
124
- "clientX",
125
- "Client;code:301;rq;ro;seq:1;len:32;;"
126
- "Update;code:302;type:date;ro;seq:2;fmt:L;len:20;;"
127
- "Access;code:303;type:date;ro;seq:4;fmt:L;len:20;;"
128
- "Owner;code:304;seq:3;fmt:R;len:32;;"
129
- "Host;code:305;seq:5;fmt:R;len:32;;"
130
- "Description;code:306;type:text;len:128;;"
131
- "Root;code:307;rq;type:line;len:64;;"
132
- "AltRoots;code:308;type:llist;len:64;;"
133
- "Options;code:309;type:line;len:64;val:"
134
- "noallwrite/allwrite,noclobber/clobber,nocompress/compress,"
135
- "unlocked/locked,nomodtime/modtime,normdir/rmdir;;"
136
- "SubmitOptions;code:313;type:select;fmt:L;len:25;val:"
137
- "submitunchanged/submitunchanged+reopen/revertunchanged/"
138
- "revertunchanged+reopen/leaveunchanged/leaveunchanged+reopen;;"
139
- "LineEnd;code:310;type:select;fmt:L;len:12;val:"
140
- "local/unix/mac/win/share;;"
141
- "View;code:311;type:wlist;words:2;len:64;;"
142
- },
143
- {
144
- "clientSpecing021",
145
- "Client;code:301;rq;ro;len:32;;"
146
- "Update;code:302;type:date;ro;len:20;;"
147
- "Access;code:303;type:date;ro;len:20;;"
148
- "Owner;code:304;len:32;;"
149
- "Host;code:305;len:32;;"
150
- "Description;code:306;type:text;len:128;;"
151
- "Root;code:307;rq;type:line;len:64;;"
152
- "AltRoots;code:308;type:text;len:64;;"
153
- "Options;code:309;type:line;len:64;val:"
154
- "noallwrite/allwrite,noclobber/clobber,nocompress/compress,"
155
- "unlocked/locked,nomodtime/modtime,normdir/rmdir;;"
156
- "LineEnd;code:310;type:select;len:12;val:local/unix/mac/win/share;;"
157
- "View;code:311;type:wlist;words:2;len:64;;"
158
- },
159
110
  {
160
111
  "depot",
161
112
  "Depot;code:251;rq;ro;len:32;;"
@@ -175,11 +126,13 @@ struct defaultspec {
175
126
  "MaxResults;code:402;type:word;len:12;;"
176
127
  "MaxScanRows;code:403;type:word;len:12;;"
177
128
  "MaxLockTime;code:407;type:word;len:12;;"
129
+ "MaxOpenFiles;code:413;type:word;len:12;;"
178
130
  "Timeout;code:406;type:word;len:12;;"
179
131
  "PasswordTimeout;code:409;type:word;len:12;;"
180
132
  "LdapConfig;code:410;type:line;len:128;;"
181
133
  "LdapSearchQuery;code:411;type:line;len:128;;"
182
134
  "LdapUserAttribute;code:412;type:line;len:128;;"
135
+ "LdapUserDNAttribute;code:414;type:line;len:128;;"
183
136
  "Subgroups;code:404;type:wlist;len:32;opt:default;;"
184
137
  "Owners;code:408;type:wlist;len:32;opt:default;;"
185
138
  "Users;code:405;type:wlist;len:32;opt:default;;"
@@ -247,36 +200,62 @@ struct defaultspec {
247
200
  "Clients;code:458;len:8;;"
248
201
  "Users;code:459;len:8;;"
249
202
  "Files;code:460;len:8;;"
203
+ "Repos;code:462;len:8;;"
250
204
  },
251
205
  {
252
206
  "protect",
253
- "Protections;code:501;fmt:C;type:wlist;words:5;opt:default;len:64;;"
207
+ "SubPath;code:502;ro;len:64;;"
208
+ "Update;code:503;type:date;ro;fmt:L;len:20;;"
209
+ "Protections;code:501;fmt:C;type:wlist;words:5;opt:default;z;len:64;;"
254
210
  },
255
211
  {
256
212
  "remote",
257
- "RemoteID;code:851;rq;ro;len:32;;"
213
+ "RemoteID;code:851;rq;ro;fmt:L;len:32;;"
258
214
  "Address;code:852;rq;type:line;len:32;;"
259
215
  "Owner;code:853;fmt:R;len:32;;"
260
216
  "RemoteUser;code:861;fmt:R;len:32;;"
261
217
  "Options;code:854;type:line;len:32;val:"
262
- "unlocked/lockednocompress/compress;;"
218
+ "unlocked/locked,nocompress/compress,copyrcs/nocopyrcs;;"
263
219
  "Update;code:855;type:date;ro;fmt:L;len:20;;"
264
220
  "Access;code:856;type:date;ro;fmt:L;len:20;;"
265
221
  "Description;code:857;type:text;len:128;;"
266
222
  "LastFetch;code:858;fmt:L;len:10;;"
267
223
  "LastPush;code:859;fmt:L;len:10;;"
268
224
  "DepotMap;code:860;type:wlist;words:2;len:64;;"
225
+ "ArchiveLimits;code:862;type:wlist;words:2;len:64;;"
269
226
  },
270
227
  {
271
- "specW",
272
- "Fields;code:351;type:wlist;words:5;rq;;"
273
- "Required;code:357;type:wlist;;"
274
- "Readonly;code:358;type:wlist;;"
275
- "Words;code:352;type:wlist;words:2;;"
276
- "Formats;code:353;type:wlist;words:3;;"
277
- "Values;code:354;type:wlist;words:2;;"
278
- "Presets;code:355;type:wlist;words:2;;"
279
- "Comments;code:356;type:text;;"
228
+ "repo",
229
+ "Repo;code:1001;rq;ro;len:128;;"
230
+ "Owner;code:1002;len:32;;"
231
+ "Created;code:1003;type:date;ro;fmt:L;len:20;;"
232
+ "Pushed;code:1004;type:date;ro;fmt:L;len:20;;"
233
+ "ForkedFrom;code:1005;ro;len:128;;"
234
+ "Description;code:1006;type:text;len:128;;"
235
+ "DefaultBranch;code:1007;len:32;;"
236
+ "MirroredFrom;code:1008;len:32;;"
237
+ "Options;code:1009;type:select;len:10;val:lfs/nolfs;;"
238
+ "GconnMirrorServerId;code:1010;len:32;;"
239
+ },
240
+ {
241
+ "server",
242
+ "ServerID;code:751;rq;ro;len:32;;"
243
+ "Type;code:752;rq;len:32;;"
244
+ "Name;code:753;type:line;len:32;;"
245
+ "Address;code:754;type:line;len:32;;"
246
+ "ExternalAddress;code:755;type:line;len:32;;"
247
+ "Services;code:756;rq;len:128;;"
248
+ "Options;code:764;type:line;len:32;val:"
249
+ "nomandatory/mandatory;;"
250
+ "ReplicatingFrom;code:765;type:line;len:32;;"
251
+ "Description;code:757;type:text;len:128;;"
252
+ "User;code:761;type:line;len:64;;"
253
+ "AllowedAddresses;code:763;type:wlist;len:64;;"
254
+ "UpdateCachedRepos;code:766;type:wlist;len:64;;"
255
+ "ClientDataFilter;code:758;type:wlist;len:64;;"
256
+ "RevisionDataFilter;code:759;type:wlist;len:64;;"
257
+ "ArchiveDataFilter;code:760;type:wlist;len:64;;"
258
+ "DistributedConfig;code:762;type:text;len:128;;"
280
259
  },
281
260
  {
282
261
  "spec",
@@ -293,28 +272,28 @@ struct defaultspec {
293
272
  "Stream;code:701;rq;ro;len:64;;"
294
273
  "Update;code:705;type:date;ro;fmt:L;len:20;;"
295
274
  "Access;code:706;type:date;ro;fmt:L;len:20;;"
296
- "Owner;code:704;len:32;;"
297
- "Name;code:703;rq;type:line;len:32;;"
275
+ "Owner;code:704;len:32;open:isolate;;"
276
+ "Name;code:703;rq;type:line;len:32;open:isolate;;"
298
277
  "Parent;code:702;rq;len:64;open:isolate;;"
299
278
  "Type;code:708;rq;len:32;open:isolate;;"
300
- "Description;code:709;type:text;len:128;;"
279
+ "Description;code:709;type:text;len:128;open:isolate;;"
301
280
  "Options;code:707;type:line;len:64;val:"
302
281
  "allsubmit/ownersubmit,unlocked/locked,"
303
282
  "toparent/notoparent,fromparent/nofromparent,"
304
- "mergedown/mergeany;;"
305
- "Paths;code:710;rq;type:wlist;words:2;maxwords:3;len:64;open:isolate;;"
306
- "Remapped;code:711;type:wlist;words:2;len:64;open:isolate;;"
307
- "Ignored;code:712;type:wlist;words:1;len:64;open:isolate;;"
283
+ "mergedown/mergeany;open:isolate;;"
284
+ "Paths;code:710;rq;type:wlist;words:2;maxwords:3;len:64;open:propagate;;"
285
+ "Remapped;code:711;type:wlist;words:2;len:64;open:propagate;;"
286
+ "Ignored;code:712;type:wlist;words:1;len:64;open:propagate;;"
308
287
  "View;code:713;type:wlist;words:2;len:64;;"
309
288
  "ChangeView;code:714;type:llist;ro;len:64;;"
310
289
  },
311
290
  {
312
291
  "triggers",
313
- "Triggers;code:551;type:wlist;words:4;len:64;opt:default;"
292
+ "Triggers;code:551;type:wlist;words:4;len:64;opt:default;z;;"
314
293
  },
315
294
  {
316
295
  "typemap",
317
- "TypeMap;code:601;type:wlist;words:2;len:64;opt:default;"
296
+ "TypeMap;code:601;type:wlist;words:2;len:64;opt:default;z;;"
318
297
  },
319
298
  {
320
299
  "user",
@@ -326,23 +305,10 @@ struct defaultspec {
326
305
  "FullName;code:655;fmt:R;type:line;rq;len:32;;"
327
306
  "JobView;code:656;type:line;len:64;;"
328
307
  "Password;code:657;len:32;;"
329
- "AuthMethod;code:662;fmt:L;len:10;val:perforce/ldap;;"
308
+ "AuthMethod;code:662;fmt:L;len:10;val:"
309
+ "perforce/perforce+2fa/ldap/ldap+2fa;;"
330
310
  "Reviews;code:658;type:wlist;len:64;;"
331
311
  },
332
- {
333
- "server",
334
- "ServerID;code:751;rq;ro;len:32;;"
335
- "Type;code:752;rq;len:32;;"
336
- "Name;code:753;type:line;len:32;;"
337
- "Address;code:754;type:line;len:32;;"
338
- "ExternalAddress;code:755;type:line;len:32;;"
339
- "Services;code:756;rq;len:128;;"
340
- "Description;code:757;type:text;len:128;;"
341
- "User;code:761;type:line;len:64;;"
342
- "ClientDataFilter;code:758;type:wlist;len:64;;"
343
- "RevisionDataFilter;code:759;type:wlist;len:64;;"
344
- "ArchiveDataFilter;code:760;type:wlist;len:64;;"
345
- },
346
312
  { 0, 0 }
347
313
  };
348
314
 
Binary file
Binary file
data/lib/P4.rb CHANGED
@@ -557,7 +557,7 @@ class P4
557
557
 
558
558
  def set_attribute( name, value )
559
559
  name = name.downcase
560
- if( value =~ /^\d+$/ )
560
+ if( value.to_s =~ /^\d+$/ )
561
561
  @attributes[ name ] = value.to_i
562
562
  else
563
563
  @attributes[ name ] = value
Binary file
@@ -1,3 +1,3 @@
1
- class P4
2
- Version = VERSION = '2015.2.1265122'
3
- end
1
+ class P4
2
+ Version = VERSION = '2020.1.1970474'
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.1265122
4
+ version: 2020.1.1970474
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Perforce Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-12 00:00:00.000000000 Z
11
+ date: 2020-06-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby extensions to the C++ Perforce API.
14
14
  email: support@perforce.com
@@ -43,32 +43,32 @@ files:
43
43
  - ext/P4/specmgr.cpp
44
44
  - ext/P4/specmgr.h
45
45
  - ext/P4/undefdups.h
46
- - lib/2.0/P4.so
47
- - lib/2.1/P4.so
48
- - lib/2.2/P4.so
46
+ - lib/2.6/P4.so
47
+ - lib/2.7/P4.so
49
48
  - lib/P4.rb
49
+ - lib/P4.so
50
50
  - lib/P4/version.rb
51
- homepage: https://swarm.workshop.perforce.com/projects/perforce-software-p4ruby/
51
+ homepage: https://github.com/perforce/p4ruby
52
52
  licenses:
53
53
  - MIT
54
- metadata: {}
54
+ metadata:
55
+ documentation_uri: https://www.perforce.com/manuals/p4ruby/Content/P4Ruby/Home-p4ruby.html
55
56
  post_install_message:
56
57
  rdoc_options: []
57
58
  require_paths:
58
59
  - lib
59
60
  required_ruby_version: !ruby/object:Gem::Requirement
60
61
  requirements:
61
- - - '>='
62
+ - - ">="
62
63
  - !ruby/object:Gem::Version
63
64
  version: '0'
64
65
  required_rubygems_version: !ruby/object:Gem::Requirement
65
66
  requirements:
66
- - - '>='
67
+ - - ">="
67
68
  - !ruby/object:Gem::Version
68
69
  version: '0'
69
70
  requirements: []
70
- rubyforge_project:
71
- rubygems_version: 2.4.8
71
+ rubygems_version: 3.1.2
72
72
  signing_key:
73
73
  specification_version: 4
74
74
  summary: Ruby extensions to the C++ Perforce API
Binary file
Binary file
Binary file