p4ruby 2019.1.1873991 → 2020.1.1970474
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -879
- data/ext/P4/extconf.rb +55 -11
- data/ext/P4/p4.cpp +0 -8
- data/ext/P4/p4clientapi.cpp +3 -7
- data/ext/P4/p4clientapi.h +0 -2
- data/ext/P4/p4result.cpp +1 -0
- data/ext/P4/specmgr.cpp +2 -97
- data/lib/P4/version.rb +3 -3
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60cd8b09fe3d292d552829136727ad57e79d396972ae16406bc2075b70bd5312
|
4
|
+
data.tar.gz: 733ab6750c83fd84ea4075a60c450d836bde824eaf29365f33b420b8d60e98be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d36c05e105836b5f8b2c9acf6d7dc44d0088ee7ddb6de1048100293ad20691da7f943e1444b7a6a0f8731d4010a1370868e43b31a52fa4e206e462c21c37bdb
|
7
|
+
data.tar.gz: 118c4f3eb92f4867db3e1655e5a2be37557e1f125588c069c824d7ba2ad7ba4ff1b87869b3a690615b0a875b101d8b09e46725e2553336a3f83fb1f2e338bfb6
|
data/README.md
CHANGED
@@ -1,880 +1,4 @@
|
|
1
|
-
|
1
|
+
[![Support](https://img.shields.io/badge/Support-Official-green.svg)](mailto:support@perforce.com)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
## Introduction
|
6
|
-
|
7
|
-
P4Ruby is a native Ruby gem that allows you to run Perforce commands from
|
8
|
-
Ruby applications, and retrieve the results in a Ruby-friendly format.
|
9
|
-
|
10
|
-
P4Ruby is intended to work against a corresponding version of the Perforce
|
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
|
-
the P4API.
|
14
|
-
|
15
|
-
To determine the version of your P4Ruby, and which version of the
|
16
|
-
P4API it has been built with, issue the following command:
|
17
|
-
|
18
|
-
ruby -rP4 -e "puts P4.identify"
|
19
|
-
|
20
|
-
--------------------------------------------------------------------------
|
21
|
-
|
22
|
-
### Installing P4Ruby
|
23
|
-
|
24
|
-
As of 2014.2, the recommended mechanism for installing P4Ruby is via
|
25
|
-
rubygems.org.
|
26
|
-
|
27
|
-
Before installing, please take care that any older version of P4Ruby that
|
28
|
-
may have been installed outside of the Gem process is removed from your
|
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
|
31
|
-
P4.bundle on OS X) are not available within the load path of Ruby. You can
|
32
|
-
use the `puts $:` command in `irb` to determine your current load path.
|
33
|
-
|
34
|
-
Outside of Windows, p4ruby gem installs must be compiled locally against
|
35
|
-
your installation of Ruby. If you can build the core Ruby distribution
|
36
|
-
locally, you likely can install P4Ruby without incident. On Windows,
|
37
|
-
precompiled gems are available, which already include the P4API and OpenSSL.
|
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,
|
41
|
-
see 'Problems Specifying P4API' below.)
|
42
|
-
|
43
|
-
gem install p4ruby
|
44
|
-
|
45
|
-
This will download a corresponding version of the p4api from ftp.perforce.com,
|
46
|
-
and will automatically include the openssl version you have locally.
|
47
|
-
|
48
|
-
If you have downloaded the p4api and unpacked it, you can specify it using the
|
49
|
-
`--with-p4api-dir` option.
|
50
|
-
|
51
|
-
gem install p4ruby -- --with-p4api-dir=DIR
|
52
|
-
|
53
|
-
In this case, the DIR above is the path to the C++ API distribution that
|
54
|
-
should match the major and minor version of P4Ruby. If you omit the
|
55
|
-
--with-p4api-dir option, the gem will attempt to download a version of the
|
56
|
-
API itself from ftp.perforce.com.
|
57
|
-
|
58
|
-
Alternatively, you can use Bundler (http://bundler.io). In your Gemfile,
|
59
|
-
specify
|
60
|
-
|
61
|
-
gem 'p4ruby', '~> 2017.1'
|
62
|
-
|
63
|
-
And then execute:
|
64
|
-
|
65
|
-
bundle --with-p4api-dir=DIR
|
66
|
-
|
67
|
-
#### Problems Specifying P4API
|
68
|
-
|
69
|
-
On older Ruby platforms, such as the default OS X or ruby193 CentOS
|
70
|
-
distributions, issues can arise when specifying the P4API directly via
|
71
|
-
the command line.
|
72
|
-
|
73
|
-
In these cases, you may need to indicate the include and lib directories
|
74
|
-
directly:
|
75
|
-
|
76
|
-
gem install p4ruby -- --with-p4api-dir=DIR \
|
77
|
-
--with-p4-api-include=DIR/include \
|
78
|
-
--with-p4-api-lib=DIR/lib
|
79
|
-
|
80
|
-
An alternative is to specify the P4API directory using the `p4api_dir`
|
81
|
-
environment variable.
|
82
|
-
|
83
|
-
|
84
|
-
--------------------------------------------------------------------------
|
85
|
-
|
86
|
-
### Building P4Ruby from Source on Linux or OS X
|
87
|
-
|
88
|
-
1. Download the Perforce C++ API from the Perforce FTP site at
|
89
|
-
"ftp://ftp.perforce.com/perforce". The API archive is located
|
90
|
-
in release and platform-specific subdirectories and is named
|
91
|
-
"p4api.tgz".
|
92
|
-
|
93
|
-
__IMPORTANT__: Mac OS X users MUST use the 'darwin' variant
|
94
|
-
of the Perforce API. Using the 'macos' variant
|
95
|
-
does not work.
|
96
|
-
|
97
|
-
Note: 32-bit builds of P4Ruby require a 32-bit version of the
|
98
|
-
C++ API and a 32-bit version of Ruby. 64-bit builds of
|
99
|
-
P4Ruby require a 64-bit version of the C++ API and a
|
100
|
-
64-bit version of Ruby.
|
101
|
-
|
102
|
-
Unzip the archive into an empty directory.
|
103
|
-
|
104
|
-
2. Extract the P4Ruby API archive into a new, empty directory.
|
105
|
-
|
106
|
-
3. In the p4ruby source directory, install dependencies:
|
107
|
-
|
108
|
-
bundle install
|
109
|
-
|
110
|
-
3. In the p4ruby source directory, build the gem:
|
111
|
-
|
112
|
-
p4api_dir=<absolute path to Perforce C++ API> rake compile
|
113
|
-
|
114
|
-
4. Test your distribution, which relies on a locally installed p4d.
|
115
|
-
|
116
|
-
rake test
|
117
|
-
|
118
|
-
If `p4d` is not available on your path, indicate it via the `P4D_BIN`
|
119
|
-
environment variable before running `rake test`.
|
120
|
-
|
121
|
-
5. Install P4Ruby into your local gem cache:
|
122
|
-
|
123
|
-
rake install
|
124
|
-
|
125
|
-
#### SSL support
|
126
|
-
|
127
|
-
Perforce Server 2012.1 and later supports SSL connections and the
|
128
|
-
C++ API has been compiled with this support. For applications that
|
129
|
-
do not requireSSL support the C++ API provides a stub library
|
130
|
-
(libp4sslstub.*) to satisfy the linker requirements.
|
131
|
-
|
132
|
-
If the P4Ruby build detects that OpenSSL is available, it will be
|
133
|
-
included by default. To disable, execute the gem command using
|
134
|
-
--without-ssllib. If you want to use libraries deployed to nonstandard
|
135
|
-
paths, you will have to alter ext/P4/extconf.rb and include the
|
136
|
-
dir_config() directives appropriate for your system.
|
137
|
-
|
138
|
-
--------------------------------------------------------------------------
|
139
|
-
|
140
|
-
### Compatibility Statements
|
141
|
-
|
142
|
-
#### Server Compatibility
|
143
|
-
|
144
|
-
You can use any release of P4Ruby with any release of the
|
145
|
-
Perforce server later than 2001.1
|
146
|
-
|
147
|
-
You should use a version of P4Ruby built against a corresponding version
|
148
|
-
of the P4API that matches your Perforce server version. Since 2014.2,
|
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 2017.1,
|
151
|
-
you would want a P4Ruby version that starts with 2017.1.
|
152
|
-
|
153
|
-
#### API Compatibility
|
154
|
-
|
155
|
-
The 2017.1 release of P4Ruby supports the 2017.1 Perforce API.
|
156
|
-
Older releases might work but are not supported.
|
157
|
-
|
158
|
-
#### Ruby Compatibility
|
159
|
-
|
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
|
-
support.
|
163
|
-
|
164
|
-
For detailed compatibility, please check the following table:
|
165
|
-
|
166
|
-
Ruby Release | P4Ruby Release
|
167
|
-
===================================
|
168
|
-
<2.0 | 2011.1 or later (unsupported)
|
169
|
-
2.0 | 2014.1 or later
|
170
|
-
2.1 | 2014.2 or later
|
171
|
-
2.2 | 2014.2 or later
|
172
|
-
2.3 | 2017.1 or later
|
173
|
-
|
174
|
-
It is recommended that you use a Ruby distribution that can deploy
|
175
|
-
native gems easily, which, outside of Windows means obtaining a source
|
176
|
-
distribution of ruby and building it locally. This is easily done via RVM,
|
177
|
-
and can be installed system-wide, with other features (like wrappers) that
|
178
|
-
allow you to update the local installation of Ruby as security patches are
|
179
|
-
released. If using RVM, be sure to use --disable-binary when installing
|
180
|
-
your version of Ruby, to avoid any precompiled distributions that may not
|
181
|
-
have shared library support configured, which is needed for Ruby
|
182
|
-
extensions.
|
183
|
-
|
184
|
-
In general, Ruby VMs installed via package managers are not officially
|
185
|
-
coordinated with the MRI releases available on ruby-lang.org.
|
186
|
-
|
187
|
-
We do verify that p4ruby works with Ruby 1.9 on Debian (and Ubuntu), and
|
188
|
-
on CentOS 6 using the Software Collections Library. These are considered
|
189
|
-
"stable" distributions, and do receive security updates.
|
190
|
-
|
191
|
-
Other versions of Ruby, such as the default distribution of OS X may not
|
192
|
-
work. The default OS X Ruby is infrequently updated by Apple, and is known
|
193
|
-
to contain issues that do not seem to be patched.
|
194
|
-
|
195
|
-
#### OpenSSL Compatibility
|
196
|
-
|
197
|
-
To build P4Ruby with encrypted communication support, you must
|
198
|
-
use the version of OpenSSL that Perforce C/C++ API has been
|
199
|
-
built against. Running P4Ruby linked to an older library will
|
200
|
-
fail with the error:
|
201
|
-
|
202
|
-
"SSL library must be at least version 1.0.1."
|
203
|
-
|
204
|
-
The 2017.1 release of P4Ruby is supported with OpenSSL 1.0.2
|
205
|
-
|
206
|
-
For detailed compatibility, please check the following table:
|
207
|
-
|
208
|
-
Perforce C/C++ API Version | OpenSSL Release
|
209
|
-
============================================
|
210
|
-
2012.1 | 1.0.0
|
211
|
-
2012.2 | 1.0.1g+
|
212
|
-
2014.1 | 1.0.1g+
|
213
|
-
2014.2 | 1.0.1i+
|
214
|
-
2015.1 | 1.0.1i+
|
215
|
-
2015.2 | 1.0.1i+
|
216
|
-
2017.1 | 1.0.2l+
|
217
|
-
|
218
|
-
|
219
|
-
#### Platform Compatibility
|
220
|
-
|
221
|
-
Note: As of 2012.1, a universal build of the Perforce C/C++
|
222
|
-
API is no longer available for Darwin. P4Ruby is now
|
223
|
-
a 64-bit only library on Darwin and must be built with
|
224
|
-
a 64-bit version of the Perforce C/C++ API for Darwin.
|
225
|
-
This has been tested with a universal build of Ruby and
|
226
|
-
is known to work.
|
227
|
-
|
228
|
-
#### Compiler Compatibility
|
229
|
-
|
230
|
-
To build P4Ruby from source, you must use a version of Ruby that
|
231
|
-
has been compiled with the same compiler used to build the
|
232
|
-
Perforce C++ API: for most platforms, use gcc/g++.
|
233
|
-
|
234
|
-
Attempting to use a different compiler or a different version
|
235
|
-
of the compiler causes linker errors due to differences in name
|
236
|
-
handling between compilers.
|
237
|
-
|
238
|
-
#### Compatibility with Previous Releases
|
239
|
-
|
240
|
-
Unless otherwise stated below, the 2017.1 release of P4Ruby is
|
241
|
-
compatible with previous releases from Perforce Software.
|
242
|
-
|
243
|
-
#### Known Limitations
|
244
|
-
|
245
|
-
The Perforce client-server protocol is not designed to support
|
246
|
-
multiple concurrent queries over the same connection. For this
|
247
|
-
reason, multi-threaded applications using the C++ API or the
|
248
|
-
script APIs (P4Perl, P4Ruby, etc.) should ensure that a
|
249
|
-
separate connection is used for each thread or that only one
|
250
|
-
thread may use a shared connection at a time.
|
251
|
-
|
252
|
-
|
253
|
-
## Deleted Methods
|
254
|
-
|
255
|
-
The following methods have been deleted from the `P4` class and
|
256
|
-
are no longer available:
|
257
|
-
|
258
|
-
- `output` The output is returned by the `run*` methods
|
259
|
-
- `parse_forms` Form parsing is now always on
|
260
|
-
- `tagged` See tagged? and tagged= below.
|
261
|
-
|
262
|
-
## Tagged Mode and Form Parsing
|
263
|
-
|
264
|
-
In P4Ruby, both form parsing and tagged output are on by
|
265
|
-
default.
|
266
|
-
|
267
|
-
Form parsing cannot be explicitly disabled, but tagged output can
|
268
|
-
be turned on and off by setting p4.tagged as follows:
|
269
|
-
|
270
|
-
p4.tagged = false # Disabled
|
271
|
-
p4.tagged = true # Enabled
|
272
|
-
|
273
|
-
Because form parsing does not work when tagged output is disabled,
|
274
|
-
this method can be used to disable form parsing if necessary.
|
275
|
-
|
276
|
-
--------------------------------------------------------------------------
|
277
|
-
## Change overview
|
278
|
-
|
279
|
-
This document lists all user-visible changes to P4Ruby
|
280
|
-
from release 2007.3, the first supported P4Ruby release.
|
281
|
-
|
282
|
-
Perforce numbers releases YYYY.R/CCCCC, e.g. 2002.1/30547.
|
283
|
-
YYYY is the year; R is the release of that year; CCCCC is the
|
284
|
-
bug fix change level. Each bug fix in these release notes is
|
285
|
-
marked by its change number. Any build includes (1) all bug fixes
|
286
|
-
of all previous releases and (2) all bug fixes of the current
|
287
|
-
release up to the bug fix change level.
|
288
|
-
|
289
|
-
--------------------------------------------------------------------------
|
290
|
-
|
291
|
-
New functionality in 2017.1
|
292
|
-
|
293
|
-
- (SIR#96305/ P4RUBY-214)
|
294
|
-
Add get/set trust file location to api
|
295
|
-
|
296
|
-
- (SIR#93993 / P4RUBY-206)
|
297
|
-
|
298
|
-
Add a reset() method for resetting p4 client data (messages, output, etc.)
|
299
|
-
between calls to run
|
300
|
-
|
301
|
-
- (SIR#92235 / P4RUBY-204)
|
302
|
-
|
303
|
-
Support graph depot commands
|
304
|
-
|
305
|
-
New functionality in 2015.2
|
306
|
-
|
307
|
-
- (SIR#78548 / P4RUBY-193)
|
308
|
-
|
309
|
-
Release native P4Ruby gems for x86-mingw32 and x64-mingw32.
|
310
|
-
Until this point, the only source gems have been available. These gems
|
311
|
-
will allow Windows users for 32 or 64-bit Ruby 2.0, 2.1 or 2.2 to easily
|
312
|
-
install P4Ruby.
|
313
|
-
|
314
|
-
Changes in both 2015.2.0.pre0 and 2015.1.0
|
315
|
-
|
316
|
-
- Applied change to P4ClientApi::SetCharset, that if it is set to "none", then
|
317
|
-
we will ignore the setting. The P4API enviro file handling seems to always
|
318
|
-
create this setting and apply it in various circumstances.
|
319
|
-
|
320
|
-
Changes in 2015.1.0
|
321
|
-
|
322
|
-
- Updated spec mappings in specmgr.cpp to be up to date with the 2015.1 P4API
|
323
|
-
|
324
|
-
- Allow the P4_BIN environment variable to be set to point to a p4d for the
|
325
|
-
testing library (used by the `rake test` task).
|
326
|
-
|
327
|
-
New functionality in 2014.2
|
328
|
-
|
329
|
-
- (SIR#28879 / P4RUBY-25)
|
330
|
-
|
331
|
-
Release P4Ruby as Gem. Until this point, the gems available
|
332
|
-
on rubygems.org were unofficial builds, and prone to fail in
|
333
|
-
non-interactive environments like bundler.
|
334
|
-
|
335
|
-
- (SIR#75097 / P4RUBY-169)
|
336
|
-
|
337
|
-
Add `enviro_file` property to P4 object, which underneath, uses the
|
338
|
-
new `SetEnviroFile`/`GetEnviroFile` mechanism from the 14.2 C++ API.
|
339
|
-
|
340
|
-
Changes in 2014.2.0.pre6
|
341
|
-
|
342
|
-
- Documented workarounds to installation failures on the OS X default Ruby
|
343
|
-
installation.
|
344
|
-
|
345
|
-
Changes in 2014.2.0.pre5
|
346
|
-
|
347
|
-
- Fixed an issue where using the --with-p4api-dir option to gem install
|
348
|
-
would not actually set up the include and lib compilation directory
|
349
|
-
correctly.
|
350
|
-
|
351
|
-
- No longer distributing precompiled builds for linux or OS X due to
|
352
|
-
inadequate information from gem to match the Ruby distribution correctly.
|
353
|
-
|
354
|
-
- No longer embedding the C++ P4API to keep the total file size down to
|
355
|
-
allow the gem to be distributed via RubyGems.org.
|
356
|
-
|
357
|
-
- Changed logic to call p4.charset=nil if charset is already nil or resolves
|
358
|
-
to 'none'. Internally, this will trigger a call to ClientApi::SetTrans(0),
|
359
|
-
which should disable character set autodetection.
|
360
|
-
|
361
|
-
Bugs fixed in 2014.2.0.pre4
|
362
|
-
|
363
|
-
- (BUG#77207 / P4RUBY-176)
|
364
|
-
If the user has specified 'P4CHARSET=none' in a configuration file, or
|
365
|
-
has not set p4.charset='auto' (and it's default value was initialized to
|
366
|
-
'none' by the C++ API), automatically disable character set detection.
|
367
|
-
This can cause the API to break when connecting to non-unicode servers
|
368
|
-
even though it appears to be configured to not be a unicode client.
|
369
|
-
|
370
|
-
- The default C++ API version should be included with the gem source, to
|
371
|
-
avoid calls to ftp.perforce.com.
|
372
|
-
|
373
|
-
Bugs fixed in 2014.2.0.pre3
|
374
|
-
|
375
|
-
- (BUG#75096 / P4RUBY-168)
|
376
|
-
Spec mappings updated to 14.2 definitions.
|
377
|
-
|
378
|
-
- (TASK#76795 / P4RUBY-176)
|
379
|
-
Configuring pre-compiled gems for Linux and OS X, for supported
|
380
|
-
Ruby versions (2.0, 2.1, 2.2).
|
381
|
-
|
382
|
-
Bugs fixed in 2014.2.0.pre2
|
383
|
-
|
384
|
-
- (BUG#76321 / P4RUBY-171)
|
385
|
-
`gem install` fails using source gem distribution inside of a Docker
|
386
|
-
environment due to passive FTP mode not enabled early enough.
|
387
|
-
|
388
|
-
--------------------------------------------------------------------------
|
389
|
-
|
390
|
-
New functionality in 2014.1
|
391
|
-
|
392
|
-
- 807216 (SIR#70070)
|
393
|
-
|
394
|
-
P4Ruby now supports the P4IGNORE file feature introduced
|
395
|
-
in the 2013.2 server. Three new methods have been added
|
396
|
-
to support this functionality:
|
397
|
-
|
398
|
-
P4#ignore_file - Report current file
|
399
|
-
P4#ignore_file= - Set ignore file
|
400
|
-
P4#ignored?( <file> ) - Test if <file> is
|
401
|
-
ignored
|
402
|
-
|
403
|
-
- 807216, 750979 (SIR#70093)
|
404
|
-
|
405
|
-
P4Ruby now supports the Ruby 2.0 series of rubies.
|
406
|
-
|
407
|
-
--------------------------------------------------------------------------
|
408
|
-
|
409
|
-
Bugs fixed in 2013.1
|
410
|
-
|
411
|
-
- 733921 (Bug#63887)
|
412
|
-
|
413
|
-
P4Ruby no longer crashes when an exception is raised from
|
414
|
-
the block passed to P4#run_resolve.
|
415
|
-
|
416
|
-
--------------------------------------------------------------------------
|
417
|
-
|
418
|
-
New functionality in 2012.2
|
419
|
-
|
420
|
-
- 525301 (Bug #59803)
|
421
|
-
|
422
|
-
P4Ruby now supports Apple Mountain Lion (10.8).
|
423
|
-
|
424
|
-
- 509253 (Bug #56480)
|
425
|
-
|
426
|
-
Added P4#run_tickets() method to list local tickets.
|
427
|
-
Note that P4.run('tickets') still gives the old error
|
428
|
-
message "Must upgrade to 2004.2 p4 to access tickets."
|
429
|
-
|
430
|
-
- 505980 (Bug #56514)
|
431
|
-
|
432
|
-
Support for the new progress indicator API. P4Ruby
|
433
|
-
supplies a new progress attribute, which can take an
|
434
|
-
instance of P4::Progress class or subclass. Progress
|
435
|
-
information is currently only supported for submits and
|
436
|
-
'sync -q'. Details can be found in the documentation.
|
437
|
-
|
438
|
-
- 499586 (Bug #56520)
|
439
|
-
|
440
|
-
New convenience method P4#each_<specs>() that allows
|
441
|
-
easy iteration through some or all spec objects such as
|
442
|
-
clients or changes. Details can be found in the documentation.
|
443
|
-
|
444
|
-
Bugs fixed in 2012.2
|
445
|
-
|
446
|
-
- 525097 (Bug #59786)
|
447
|
-
|
448
|
-
Building P4Ruby with MinGW could generate the link error.
|
449
|
-
|
450
|
-
g++: unrecognized option '-static-libstdc++'
|
451
|
-
|
452
|
-
This has been fixed.
|
453
|
-
|
454
|
-
- 505548 (Bug #58649)
|
455
|
-
|
456
|
-
P4#parse_client could raise the exception "Unknown field name
|
457
|
-
'StreamAtChange'." when parsing a stream client workspace.
|
458
|
-
Internal spec definition has been updated to resolve this.
|
459
|
-
|
460
|
-
--------------------------------------------------------------------------
|
461
|
-
|
462
|
-
New functionality in 2012.1
|
463
|
-
|
464
|
-
- 419591 (Bug #51895)
|
465
|
-
|
466
|
-
P4Ruby supports SSL connections if compiled with SSL support.
|
467
|
-
Instructions on how to compile with SSL support can be found
|
468
|
-
at the top of this document under "Building P4Ruby from Source"
|
469
|
-
and in the documentation.
|
470
|
-
|
471
|
-
P4.identify will report the version of the OpenSSL library
|
472
|
-
used to build the Perforce C++ API (not the version P4Ruby
|
473
|
-
is linked against).
|
474
|
-
|
475
|
-
- 415643
|
476
|
-
|
477
|
-
P4Ruby will now only build a 64-bit version of the library
|
478
|
-
on Darwin.
|
479
|
-
|
480
|
-
- 413362 (Bug #51899)
|
481
|
-
|
482
|
-
Enable "action resolve" to support resolves of branches,
|
483
|
-
deletes and file types. The existing P4::MergeData class
|
484
|
-
has been extended and the additional attributes will be
|
485
|
-
populated for an 'action resolve'. Details of the
|
486
|
-
additional attributes can be found in the documentation.
|
487
|
-
|
488
|
-
Bugs fixed in 2012.1
|
489
|
-
|
490
|
-
- 420839 (Bug #52952)
|
491
|
-
|
492
|
-
Accessing the base_name attribute of a P4::MergeData
|
493
|
-
object resulted in a segmentation fault when resolving
|
494
|
-
binary files. This has now been fixed and all empty
|
495
|
-
fields will return Nil.
|
496
|
-
|
497
|
-
- 410916, 410702 (Bug #52320)
|
498
|
-
|
499
|
-
Exceptions thrown during P4.run_resolve are now raised
|
500
|
-
up to the user. If an exception is encountered during the
|
501
|
-
block's execution, P4Ruby will skip the remaining files.
|
502
|
-
|
503
|
-
--------------------------------------------------------------------------
|
504
|
-
|
505
|
-
New functionality in 2011.1
|
506
|
-
|
507
|
-
- 405913
|
508
|
-
|
509
|
-
New method P4#messages() returns all messages from the
|
510
|
-
server as objects. Script writers can test the severity
|
511
|
-
of the messages to know if they are output messages (E_INFO),
|
512
|
-
warnings (E_WARN), or errors (E_FAILED/E_FATAL).
|
513
|
-
|
514
|
-
P4#errors() and P4#warnings still return the errors and
|
515
|
-
warnings as strings for backwards compatibility.
|
516
|
-
|
517
|
-
P4::Message objects have the following methods:
|
518
|
-
|
519
|
-
P4::Message#severity - Returns the severity of the
|
520
|
-
message, which may be one of the
|
521
|
-
following values:
|
522
|
-
|
523
|
-
E_EMPTY # nothing yet
|
524
|
-
E_INFO # something good happened
|
525
|
-
E_WARN # something not good happened
|
526
|
-
E_FAILED # user did something wrong
|
527
|
-
E_FATAL # system broken -- nothing can continue
|
528
|
-
|
529
|
-
P4::Message#generic - Returns the generic class of
|
530
|
-
the error, which may be one
|
531
|
-
of the following values:
|
532
|
-
|
533
|
-
EV_NONE # misc
|
534
|
-
EV_USAGE # request not consistent with dox
|
535
|
-
EV_UNKNOWN # using unknown entity
|
536
|
-
EV_CONTEXT # using entity in wrong context
|
537
|
-
EV_ILLEGAL # trying to do something you can't
|
538
|
-
EV_NOTYET # something must be corrected first
|
539
|
-
EV_PROTECT # protections prevented operation
|
540
|
-
EV_EMPTY # action returned empty results
|
541
|
-
EV_FAULT # inexplicable program fault
|
542
|
-
EV_CLIENT # client side program errors
|
543
|
-
EV_ADMIN # server administrative action required
|
544
|
-
EV_CONFIG # client configuration inadequate
|
545
|
-
EV_UPGRADE # client or server too old to interact
|
546
|
-
EV_COMM # communications error
|
547
|
-
EV_TOOBIG # not even Perforce can handle this much
|
548
|
-
|
549
|
-
P4::Message#msgid - Return the unique ID of the
|
550
|
-
message.
|
551
|
-
|
552
|
-
P4::Message#to_s - Convert the object to a string
|
553
|
-
|
554
|
-
P4::Message#inspect - Debugging support
|
555
|
-
|
556
|
-
|
557
|
-
- 338410 (Bug #47374)
|
558
|
-
|
559
|
-
P4Ruby supports setting values in the registry (on those
|
560
|
-
platforms that support it).
|
561
|
-
|
562
|
-
The command P4#set_env( var, val ) will set a registry
|
563
|
-
variable on platforms that support this action or raise
|
564
|
-
a P4Exception for those that don't.
|
565
|
-
|
566
|
-
The command P4#set_env( var, "" ) unsets a registry variable.
|
567
|
-
|
568
|
-
- 333292 (Bug #36121)
|
569
|
-
|
570
|
-
P4Ruby now supports Ruby 1.9
|
571
|
-
|
572
|
-
- 331384
|
573
|
-
|
574
|
-
P4Ruby can now be compiled with the Mingw compiler using
|
575
|
-
the MinGW P4Api build.
|
576
|
-
|
577
|
-
- 328203 (Bug #45861)
|
578
|
-
|
579
|
-
Enable streams in P4Ruby by default. With this change,
|
580
|
-
streams specific specs such as streams depots are listed.
|
581
|
-
Disable the listing of streams specific specs by either
|
582
|
-
setting the api_level to a value below 70 or by disabling
|
583
|
-
stream handling explicitly through the P4.streams attribute:
|
584
|
-
|
585
|
-
p4.streams = false
|
586
|
-
|
587
|
-
- 322353 (Bug #42250)
|
588
|
-
|
589
|
-
P4Ruby supports a callback interface by providing a
|
590
|
-
P4#handler attribute. Set P4#handler to an instance of a
|
591
|
-
subclass of P4::OutputHandler to enable callbacks.
|
592
|
-
When a handler is defined, P4Ruby will invoke the handler
|
593
|
-
for every response it receives from the Perforce Server
|
594
|
-
immediately instead of collecting all results together in
|
595
|
-
an array first. This can be used to make applications more
|
596
|
-
scalable and more responsive if large results are expected.
|
597
|
-
See the documentation for details on the OutputHandler class.
|
598
|
-
|
599
|
-
Bugs fixed in 2011.1
|
600
|
-
|
601
|
-
- 405913 (Bug #43426)
|
602
|
-
|
603
|
-
Running 'print' on a file that started with '---' would
|
604
|
-
cause an exception in Ruby. This is now fixed.
|
605
|
-
|
606
|
-
There is still an oddity when p4.track = 1 and a user runs
|
607
|
-
p4.run_print() on a file that only has lines starting with
|
608
|
-
'--- '. In that case, the output of the print is lost.
|
609
|
-
|
610
|
-
Disable tracking by setting p4.track = 0 (the default) will
|
611
|
-
solve this problem.
|
612
|
-
|
613
|
-
- 405913 (Bug #41350)
|
614
|
-
|
615
|
-
Info messages now shown in P4#Messages.
|
616
|
-
|
617
|
-
- 385159 (Bug #49324)
|
618
|
-
|
619
|
-
On Windows Vista, Windows 7, or Windows 2008, a client running as
|
620
|
-
Administrator would fail to properly process file names in
|
621
|
-
non-ASCII character sets (such as Shift-JIS).
|
622
|
-
|
623
|
-
- 338903 (Bug #44589)
|
624
|
-
|
625
|
-
Extra dot at the end of the extracted directory path has been
|
626
|
-
removed.
|
627
|
-
|
628
|
-
- 338437 (Bug #39580)
|
629
|
-
|
630
|
-
P4#identify() reports the platform on AMD64 as X86_64
|
631
|
-
in line with all other Perforce products.
|
632
|
-
|
633
|
-
- 332453
|
634
|
-
|
635
|
-
Updated the stored spec templates for client, change, group,
|
636
|
-
spec and user. Added spec template for new spec type
|
637
|
-
streams. These are required, for example, for form-triggers
|
638
|
-
that do not connect to the server first.
|
639
|
-
|
640
|
-
- 329351 (Bug #41271)
|
641
|
-
|
642
|
-
Include 'extraTag' fields in P4::Spec objects
|
643
|
-
|
644
|
-
- 328578 (Bug #39264)
|
645
|
-
|
646
|
-
P4#identify() now reports P4Ruby as P4RUBY in line with all
|
647
|
-
other Perforce products. It will also include the build
|
648
|
-
number of the Perforce C/C++ API that it is built with.
|
649
|
-
|
650
|
-
--------------------------------------------------------------------------
|
651
|
-
|
652
|
-
New functionality in 2010.2
|
653
|
-
|
654
|
-
- 260859
|
655
|
-
|
656
|
-
Added new SetTrack() and GetTrack() methods.
|
657
|
-
|
658
|
-
For more details about server performance tracking see:
|
659
|
-
http://kb.perforce.com/article/883
|
660
|
-
|
661
|
-
- 255945, 255949, 269012
|
662
|
-
|
663
|
-
New method P4#messages() returns all messages from the
|
664
|
-
server as objects. Script writers can test the severity
|
665
|
-
of the messages to know if they are output messages (E_INFO),
|
666
|
-
warnings (E_WARN), or errors (E_FAILED/E_FATAL).
|
667
|
-
|
668
|
-
P4#errors() and P4#warnings still return the errors and
|
669
|
-
warnings as strings for backwards compatibility.
|
670
|
-
|
671
|
-
P4::Message objects have the following methods:
|
672
|
-
|
673
|
-
`P4::Message#severity` - Returns the severity of the
|
674
|
-
message, which may be one of the
|
675
|
-
following values:
|
676
|
-
|
677
|
-
E_EMPTY # nothing yet
|
678
|
-
E_INFO # something good happened
|
679
|
-
E_WARN # something not good happened
|
680
|
-
E_FAILED # user did something wrong
|
681
|
-
E_FATAL # system broken -- nothing can continue
|
682
|
-
|
683
|
-
`P4::Message#generic` - Returns the generic class of
|
684
|
-
the error, which may be one
|
685
|
-
of the following values:
|
686
|
-
|
687
|
-
EV_NONE # misc
|
688
|
-
EV_USAGE # request not consistent with dox
|
689
|
-
EV_UNKNOWN # using unknown entity
|
690
|
-
EV_CONTEXT # using entity in wrong context
|
691
|
-
EV_ILLEGAL # trying to do something you can't
|
692
|
-
EV_NOTYET # something must be corrected first
|
693
|
-
EV_PROTECT # protections prevented operation
|
694
|
-
EV_EMPTY # action returned empty results
|
695
|
-
EV_FAULT # inexplicable program fault
|
696
|
-
EV_CLIENT # client side program errors
|
697
|
-
EV_ADMIN # server administrative action required
|
698
|
-
EV_CONFIG # client configuration inadequate
|
699
|
-
EV_UPGRADE # client or server too old to interact
|
700
|
-
EV_COMM # communications error
|
701
|
-
EV_TOOBIG # not even Perforce can handle this much
|
702
|
-
|
703
|
-
`P4::Message#msgid` - Return the unique ID of the message.
|
704
|
-
|
705
|
-
`P4::Message#to_s` - Convert the object to a string
|
706
|
-
|
707
|
-
`P4::Message#inspect` - Debugging support
|
708
|
-
|
709
|
-
Bugs fixed in 2010.2
|
710
|
-
|
711
|
-
- 287185 (Bug #43426)
|
712
|
-
|
713
|
-
Running 'print' on a file that started with '---' would
|
714
|
-
cause an exception in Ruby. This is now fixed.
|
715
|
-
There is still an oddity when p4.track = 1 and a user runs
|
716
|
-
p4.run_print() on a file that only has lines starting with
|
717
|
-
'--- '. In that case, the output of the print is lost.
|
718
|
-
Disable tracking by setting p4.track = 0 (the default) will
|
719
|
-
solve this problem.
|
720
|
-
|
721
|
-
--------------------------------------------------------------------------
|
722
|
-
|
723
|
-
New functionality in 2010.1
|
724
|
-
|
725
|
-
- 232984
|
726
|
-
|
727
|
-
Removed old Ruby 1.6 compatibility code that was no longer
|
728
|
-
required. This paves the way for Ruby 1.9 compatibility.
|
729
|
-
|
730
|
-
- 230644
|
731
|
-
|
732
|
-
It's now unnecessary to run a command before calling the
|
733
|
-
following methods:
|
734
|
-
|
735
|
-
P4#server_level
|
736
|
-
P4#server_case_sensitive?
|
737
|
-
P4#server_unicode?
|
738
|
-
|
739
|
-
If no command has been run, P4Ruby will automatically run a
|
740
|
-
'p4 info' in order to gather the required information.
|
741
|
-
|
742
|
-
- 230191
|
743
|
-
|
744
|
-
Added new P4#server_unicode? method that allows script
|
745
|
-
writers to test whether or not a Perforce Server is in
|
746
|
-
internationalized (unicode) mode. At least one Perforce
|
747
|
-
command must have been executed against the server before
|
748
|
-
this method can be called.
|
749
|
-
|
750
|
-
- 230190
|
751
|
-
|
752
|
-
Added new P4::VERSION, P4::OS, and P4::PATCHLEVEL constants
|
753
|
-
so that script writers can test the installation of P4Ruby
|
754
|
-
without having to parse the output of P4::Identify()
|
755
|
-
|
756
|
-
--------------------------------------------------------------------------
|
757
|
-
|
758
|
-
New functionality in 2009.2
|
759
|
-
|
760
|
-
- 214454 (Bug #32916)
|
761
|
-
|
762
|
-
P4#port= now raises a P4Exception if called after P4#connect().
|
763
|
-
|
764
|
-
- 214449 (Bug #35416)
|
765
|
-
|
766
|
-
Added a P4#server_case_sensitive? method that enables scripts
|
767
|
-
to detect whether the server is case-sensitive. Cannot be
|
768
|
-
called until a command has been issued to the server.
|
769
|
-
|
770
|
-
Bugs fixed in 2009.2
|
771
|
-
|
772
|
-
- 214445,214999 (Bug #35410)
|
773
|
-
|
774
|
-
P4Ruby now correctly tracks disconnects from the server.
|
775
|
-
|
776
|
-
- 222727 (Bug #36568)
|
777
|
-
|
778
|
-
The Map class removed '-' and '+' from the path if the
|
779
|
-
form Map.insert(lhs, rhs) was used, even if these characters
|
780
|
-
did not appear at the beginning of the path.
|
781
|
-
Now dashes and pluses are preserved within the path.
|
782
|
-
|
783
|
-
--------------------------------------------------------------------------
|
784
|
-
|
785
|
-
New functionality in 2009.1
|
786
|
-
|
787
|
-
- 191900 (Bug #26729)
|
788
|
-
|
789
|
-
A new method:
|
790
|
-
|
791
|
-
P4#tagged( aBool ) { block }
|
792
|
-
|
793
|
-
has been added to the P4 class. This method temporarily
|
794
|
-
toggles the use of tagged output for the duration of
|
795
|
-
the block and resets it when the block terminates.
|
796
|
-
|
797
|
-
Bugs fixed in 2009.1
|
798
|
-
|
799
|
-
- 191889 (Bug #29911)
|
800
|
-
|
801
|
-
Calling P4#run_resolve() or P4#run( 'resolve' ) without
|
802
|
-
a block or a previous call to P4#input no longer causes an
|
803
|
-
infinite loop.
|
804
|
-
|
805
|
-
- 191623,191627 (Bug #32918)
|
806
|
-
|
807
|
-
P4Ruby now correctly parses jobs when the jobspec contains
|
808
|
-
field names ending in numbers.
|
809
|
-
|
810
|
-
--------------------------------------------------------------------------
|
811
|
-
|
812
|
-
New functionality in 2008.2
|
813
|
-
|
814
|
-
- 162422 (Bug #30364), 166158
|
815
|
-
|
816
|
-
A new class, P4::Map, enables users to
|
817
|
-
create and use Perforce mappings without requiring
|
818
|
-
a connection to a server. Methods in the P4::Map class are:
|
819
|
-
|
820
|
-
P4::Map.new Constructor
|
821
|
-
P4::Map.join Join two maps to create a third
|
822
|
-
P4::Map#clear Empty a map
|
823
|
-
P4::Map#count Return the number of entries
|
824
|
-
P4::Map#empty? Tests whether a map object is empty
|
825
|
-
P4::Map#insert Inserts an entry into the map
|
826
|
-
P4::Map#translate Translate a string through a map
|
827
|
-
P4::Map#includes? Tests whether a path is mapped
|
828
|
-
P4::Map#reverse Swap left and right sides of the mapping
|
829
|
-
P4::Map#lhs Returns the left side as an array
|
830
|
-
P4::Map#rhs Returns the right side as an array
|
831
|
-
P4::Map#to_a Returns the map as an array
|
832
|
-
|
833
|
-
Bugs fixed in 2008.2
|
834
|
-
|
835
|
-
- 169159 (Bug #29935, Bug #31096), 165338
|
836
|
-
|
837
|
-
P4Ruby now correctly loads the value of P4CHARSET from the
|
838
|
-
environment.
|
839
|
-
|
840
|
-
--------------------------------------------------------------------------
|
841
|
-
|
842
|
-
New functionality in 2008.1
|
843
|
-
|
844
|
-
- 152356 (Bug #29022)
|
845
|
-
|
846
|
-
A new method 'P4#env( var )' method has been added to
|
847
|
-
the P4 class. This instance method enables the caller
|
848
|
-
to interrogate the Perforce environment, including
|
849
|
-
reading Perforce variables from P4CONFIG files and,
|
850
|
-
on Windows, the registry. P4#cwd= now loads any
|
851
|
-
P4CONFIG file settings that are appropriate to the
|
852
|
-
new working directory.
|
853
|
-
|
854
|
-
- 153005 (Bug #29308)
|
855
|
-
|
856
|
-
P4Ruby now supports Mac OS X 10.5.
|
857
|
-
|
858
|
-
--------------------------------------------------------------------------
|
859
|
-
|
860
|
-
Bugs fixed in 2007.3
|
861
|
-
|
862
|
-
- 151167 (Bug #28774)
|
863
|
-
|
864
|
-
The Makefile generated on some Linux platforms (notably
|
865
|
-
Ubuntu 7.10) was not correct, and attempted to link P4Ruby
|
866
|
-
using 'cc' instead of 'c++', causing an 'undefined symbol'
|
867
|
-
error (typically '_ZTVN10__cxxabiv120__si_class_type_infoE') ,
|
868
|
-
when attempting to use P4Ruby. This problem has been corrected.
|
869
|
-
|
870
|
-
- 150577 (Bug #28704)
|
871
|
-
|
872
|
-
The presence of deleted revisions in a file's history
|
873
|
-
might lead to incorrect fileSize and digest
|
874
|
-
attributes for other revisions in the output of
|
875
|
-
P4#run_filelog. This problem has been corrected.
|
876
|
-
|
877
|
-
- 150576 (Bug #28773)
|
878
|
-
|
879
|
-
P4::Revision#filesize() always returned nil. This
|
880
|
-
problem has been corrected.
|
3
|
+
# p4ruby
|
4
|
+
P4Ruby is a wrapper for the P4 C++ API in Ruby.
|
data/ext/P4/extconf.rb
CHANGED
@@ -6,10 +6,19 @@ require 'mkmf'
|
|
6
6
|
require 'net/ftp'
|
7
7
|
require 'P4/version'
|
8
8
|
require 'rbconfig'
|
9
|
+
require 'openssl'
|
9
10
|
|
10
11
|
# Set this to the main version directory we look up in ftp.perforce.com for the P4API
|
11
12
|
# This is ignored if you specify the version on the command line.
|
12
|
-
|
13
|
+
# Changed the hardcoded string so that the version is now derived from version.rb file
|
14
|
+
#P4API_VERSION_DIR = 'r19.1'
|
15
|
+
def p4api_version_dir
|
16
|
+
ver=P4::Version.split(".")
|
17
|
+
p4_major = ver[0].chars.last(2).join
|
18
|
+
p4_minor = ver[1]
|
19
|
+
dir = "r" + p4_major + "." + p4_minor
|
20
|
+
end
|
21
|
+
|
13
22
|
|
14
23
|
#==============================================================================
|
15
24
|
# Provide platform variables in P4-specific format
|
@@ -102,6 +111,15 @@ def calculate_p4osver
|
|
102
111
|
return ver
|
103
112
|
end
|
104
113
|
|
114
|
+
def gcc
|
115
|
+
@gcc ||= calculate_gcc
|
116
|
+
end
|
117
|
+
|
118
|
+
def calculate_gcc
|
119
|
+
gcc = RbConfig::CONFIG["GCC"]
|
120
|
+
return gcc
|
121
|
+
end
|
122
|
+
|
105
123
|
def uname_platform
|
106
124
|
@uname_platform ||= calculate_uname_platform
|
107
125
|
end
|
@@ -155,6 +173,13 @@ def set_platform_opts
|
|
155
173
|
end
|
156
174
|
end
|
157
175
|
|
176
|
+
def set_platform_cxxflags
|
177
|
+
if (p4osname == 'LINUX') && (gcc == 'yes')
|
178
|
+
$CXXFLAGS += " -std=c++11 "
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
|
158
183
|
def set_platform_cppflags
|
159
184
|
$CPPFLAGS += "-DOS_#{p4osname} "
|
160
185
|
$CPPFLAGS += "-DOS_#{p4osname}#{p4osver} "
|
@@ -446,13 +471,34 @@ def ftp_download_dir(version)
|
|
446
471
|
end
|
447
472
|
|
448
473
|
def filename
|
474
|
+
openssl_number = OpenSSL::OPENSSL_VERSION.split(' ')[1].to_s
|
475
|
+
openssl_number = openssl_number.slice(0, (openssl_number.rindex('.')))
|
476
|
+
|
449
477
|
if RbConfig::CONFIG['target_os'].downcase =~ /nt|mswin|mingw/
|
450
|
-
'p4api.zip'
|
478
|
+
filename = 'p4api.zip'
|
479
|
+
if !openssl_number.to_s.empty?
|
480
|
+
case openssl_number.to_s
|
481
|
+
when /1.1/
|
482
|
+
filename = 'p4api-openssl1.1.1.zip'
|
483
|
+
when /1.0/
|
484
|
+
filename = 'p4api-openssl1.0.2.zip'
|
485
|
+
end
|
486
|
+
end
|
451
487
|
else
|
452
|
-
'p4api.tgz'
|
488
|
+
filename = 'p4api.tgz'
|
489
|
+
if !openssl_number.to_s.empty?
|
490
|
+
case openssl_number.to_s
|
491
|
+
when /1.1/
|
492
|
+
filename = 'p4api-glibc2.3-openssl1.1.1.tgz'
|
493
|
+
when /1.0/
|
494
|
+
filename = 'p4api-glibc2.3-openssl1.0.2.tgz'
|
495
|
+
end
|
496
|
+
end
|
453
497
|
end
|
498
|
+
return filename
|
454
499
|
end
|
455
500
|
|
501
|
+
|
456
502
|
def remote_files_matching(ftp, dir, regex)
|
457
503
|
ftp.ls(dir.to_s).map { |entry|
|
458
504
|
if match = entry.match(regex)
|
@@ -500,9 +546,8 @@ def download_api_via_ftp
|
|
500
546
|
# At one point, we allowed the gem build to just find the most recent p4api build.
|
501
547
|
# P4Ruby probably shouldn't do that by default.
|
502
548
|
#version_dir = find_latest_version_dir(ftp)
|
503
|
-
version_dir = P4API_VERSION_DIR
|
504
549
|
|
505
|
-
dir = ftp_download_dir(
|
550
|
+
dir = ftp_download_dir(p4api_version_dir)
|
506
551
|
ftp.chdir(dir)
|
507
552
|
|
508
553
|
puts "downloading #{filename} from #{dir} on ftp.perforce.com"
|
@@ -537,9 +582,11 @@ set_platform_opts
|
|
537
582
|
# based solely on platform detection.
|
538
583
|
set_platform_cppflags
|
539
584
|
set_platform_cflags
|
585
|
+
set_platform_cxxflags
|
540
586
|
|
541
587
|
puts "$CPPFLAGS #{$CPPFLAGS}"
|
542
588
|
puts "$CFLAGS #{$CFLAGS}"
|
589
|
+
puts "$CXXFLAGS #{$CXXFLAGS}"
|
543
590
|
|
544
591
|
# Setup additional system library definitions based on platform type before
|
545
592
|
# we setup other libraries, in order to preserve linking order
|
@@ -556,14 +603,11 @@ resolve_ssl_dirs
|
|
556
603
|
if RbConfig::CONFIG['target_os'].downcase =~ /mingw/
|
557
604
|
have_library('gdi32') or raise
|
558
605
|
have_library('ole32') or raise
|
606
|
+
have_library('crypt32') or raise
|
559
607
|
end
|
560
608
|
|
561
|
-
|
562
|
-
|
563
|
-
unless do_ssl
|
564
|
-
have_library('p4sslstub') or raise
|
565
|
-
end
|
566
|
-
|
609
|
+
have_library('crypto') or raise
|
610
|
+
have_library('ssl') or raise
|
567
611
|
have_library('supp') or raise
|
568
612
|
have_library('p4script_sqlite') or raise
|
569
613
|
have_library('p4script_curl') or raise
|
data/ext/P4/p4.cpp
CHANGED
@@ -679,13 +679,6 @@ static VALUE p4_get_messages( VALUE self )
|
|
679
679
|
return p4->GetMessages();
|
680
680
|
}
|
681
681
|
|
682
|
-
static VALUE p4_reset( VALUE self )
|
683
|
-
{
|
684
|
-
P4ClientApi *p4;
|
685
|
-
Data_Get_Struct( self, P4ClientApi, p4 );
|
686
|
-
return p4->Reset();
|
687
|
-
}
|
688
|
-
|
689
682
|
static VALUE p4_get_warnings( VALUE self )
|
690
683
|
{
|
691
684
|
P4ClientApi *p4;
|
@@ -1305,7 +1298,6 @@ void Init_P4()
|
|
1305
1298
|
rb_define_method( cP4, "connect", RUBY_METHOD_FUNC(p4_connect) , 0 );
|
1306
1299
|
rb_define_method( cP4, "connected?",RUBY_METHOD_FUNC(p4_connected) , 0 );
|
1307
1300
|
rb_define_method( cP4, "disconnect", RUBY_METHOD_FUNC(p4_disconnect) , 0 );
|
1308
|
-
rb_define_method( cP4, "reset", RUBY_METHOD_FUNC(p4_reset), 0 );
|
1309
1301
|
|
1310
1302
|
// Running commands - general purpose commands
|
1311
1303
|
rb_define_method( cP4, "run", RUBY_METHOD_FUNC(p4_run) ,-2 );
|
data/ext/P4/p4clientapi.cpp
CHANGED
@@ -323,6 +323,9 @@ P4ClientApi::Disconnect()
|
|
323
323
|
// Clear the specdef cache.
|
324
324
|
specMgr.Reset();
|
325
325
|
|
326
|
+
// Clear out any results from the last command
|
327
|
+
ui.Reset();
|
328
|
+
|
326
329
|
return Qtrue;
|
327
330
|
}
|
328
331
|
|
@@ -426,12 +429,6 @@ P4ClientApi::IsIgnored( const char *path )
|
|
426
429
|
return ignore->Reject( p, client.GetIgnoreFile() );
|
427
430
|
}
|
428
431
|
|
429
|
-
VALUE
|
430
|
-
P4ClientApi::Reset()
|
431
|
-
{
|
432
|
-
ui.Reset();
|
433
|
-
}
|
434
|
-
|
435
432
|
//
|
436
433
|
// Run returns the results of the command. If the client has not been
|
437
434
|
// connected, then an exception is raised but errors from Perforce
|
@@ -763,4 +760,3 @@ P4ClientApi::Except( const char *func, Error *e )
|
|
763
760
|
e->Fmt( &m );
|
764
761
|
Except( func, m.Text() );
|
765
762
|
}
|
766
|
-
|
data/ext/P4/p4clientapi.h
CHANGED
@@ -121,7 +121,6 @@ public:
|
|
121
121
|
VALUE Connect(); // P4Exception on error
|
122
122
|
VALUE Connected(); // Return true if connected and not dropped.
|
123
123
|
VALUE Disconnect();
|
124
|
-
VALUE Reset(); // Clear out any results from the previous command
|
125
124
|
|
126
125
|
// Executing commands.
|
127
126
|
VALUE Run( const char *cmd, int argc, char * const *argv );
|
@@ -248,4 +247,3 @@ private:
|
|
248
247
|
int maxScanRows;
|
249
248
|
int maxLockTime;
|
250
249
|
};
|
251
|
-
|
data/ext/P4/p4result.cpp
CHANGED
data/ext/P4/specmgr.cpp
CHANGED
@@ -63,22 +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
|
-
"Stream;code:214;type:line;len:64;;"
|
80
|
-
"Files;code:210;type:llist;len:64;;"
|
81
|
-
},
|
82
66
|
{
|
83
67
|
"change",
|
84
68
|
"Change;code:201;rq;ro;fmt:L;seq:1;len:10;;"
|
@@ -123,42 +107,6 @@ struct defaultspec {
|
|
123
107
|
"View;code:311;type:wlist;words:2;len:64;;"
|
124
108
|
"ChangeView;code:317;type:llist;len:64;;"
|
125
109
|
},
|
126
|
-
{
|
127
|
-
"clientX",
|
128
|
-
"Client;code:301;rq;ro;seq:1;len:32;;"
|
129
|
-
"Update;code:302;type:date;ro;seq:2;fmt:L;len:20;;"
|
130
|
-
"Access;code:303;type:date;ro;seq:4;fmt:L;len:20;;"
|
131
|
-
"Owner;code:304;seq:3;fmt:R;len:32;;"
|
132
|
-
"Host;code:305;seq:5;fmt:R;len:32;;"
|
133
|
-
"Description;code:306;type:text;len:128;;"
|
134
|
-
"Root;code:307;rq;type:line;len:64;;"
|
135
|
-
"AltRoots;code:308;type:llist;len:64;;"
|
136
|
-
"Options;code:309;type:line;len:64;val:"
|
137
|
-
"noallwrite/allwrite,noclobber/clobber,nocompress/compress,"
|
138
|
-
"unlocked/locked,nomodtime/modtime,normdir/rmdir;;"
|
139
|
-
"SubmitOptions;code:313;type:select;fmt:L;len:25;val:"
|
140
|
-
"submitunchanged/submitunchanged+reopen/revertunchanged/"
|
141
|
-
"revertunchanged+reopen/leaveunchanged/leaveunchanged+reopen;;"
|
142
|
-
"LineEnd;code:310;type:select;fmt:L;len:12;val:"
|
143
|
-
"local/unix/mac/win/share;;"
|
144
|
-
"View;code:311;type:wlist;words:2;len:64;;"
|
145
|
-
},
|
146
|
-
{
|
147
|
-
"clientSpecing021",
|
148
|
-
"Client;code:301;rq;ro;len:32;;"
|
149
|
-
"Update;code:302;type:date;ro;len:20;;"
|
150
|
-
"Access;code:303;type:date;ro;len:20;;"
|
151
|
-
"Owner;code:304;len:32;;"
|
152
|
-
"Host;code:305;len:32;;"
|
153
|
-
"Description;code:306;type:text;len:128;;"
|
154
|
-
"Root;code:307;rq;type:line;len:64;;"
|
155
|
-
"AltRoots;code:308;type:text;len:64;;"
|
156
|
-
"Options;code:309;type:line;len:64;val:"
|
157
|
-
"noallwrite/allwrite,noclobber/clobber,nocompress/compress,"
|
158
|
-
"unlocked/locked,nomodtime/modtime,normdir/rmdir;;"
|
159
|
-
"LineEnd;code:310;type:select;len:12;val:local/unix/mac/win/share;;"
|
160
|
-
"View;code:311;type:wlist;words:2;len:64;;"
|
161
|
-
},
|
162
110
|
{
|
163
111
|
"depot",
|
164
112
|
"Depot;code:251;rq;ro;len:32;;"
|
@@ -172,40 +120,6 @@ struct defaultspec {
|
|
172
120
|
"Map;code:257;rq;len:64;;"
|
173
121
|
"SpecMap;code:259;type:wlist;len:64;;"
|
174
122
|
},
|
175
|
-
{
|
176
|
-
"extensionGbl",
|
177
|
-
"ExtName;code:901;type:line;opt:once;len:64;;"
|
178
|
-
"ExtDescription;code:902;type:text;opt:once;len:128;;"
|
179
|
-
"ExtVersion;code:903;type:line;opt:once;len:32;;"
|
180
|
-
"ExtUUID;code:904;type:line;opt:once;len:36;;"
|
181
|
-
"ExtRev;code:905;type:word;opt:once;len:20;;"
|
182
|
-
"ExtMaxScriptTime;code:913;type:word;len:12;;"
|
183
|
-
"ExtMaxScriptMem;code:914;type:word;len:12;;"
|
184
|
-
"ExtAllowedGroups;code:915;type:wlist;len:32;opt:default;;"
|
185
|
-
"ExtEnabled;code:916;type:word;opt:default;len:12;;"
|
186
|
-
"ExtP4USER;code:917;type:word;opt:default;len:12;;"
|
187
|
-
"Name;code:906;type:line;opt:default;len:32;;"
|
188
|
-
"Owner;code:907;type:word;opt:default;len:36;;"
|
189
|
-
"Update;code:908;type:date;opt:always;fmt:L;len:20;;"
|
190
|
-
"Description;code:909;type:text;opt:required;len:128;;"
|
191
|
-
"ExtConfig;code:912;type:text;opt:required;len:256;;"
|
192
|
-
},
|
193
|
-
{
|
194
|
-
"extensionIns",
|
195
|
-
"ExtName;code:901;type:line;opt:once;len:64;;"
|
196
|
-
"ExtDescription;code:902;type:text;opt:once;len:128;;"
|
197
|
-
"ExtVersion;code:903;type:line;opt:once;len:32;;"
|
198
|
-
"ExtUUID;code:904;type:line;opt:once;len:36;;"
|
199
|
-
"ExtRev;code:905;type:word;opt:once;len:20;;"
|
200
|
-
"ExtMaxScriptTime;code:913;type:word;len:12;;"
|
201
|
-
"ExtMaxScriptMem;code:914;type:word;len:12;;"
|
202
|
-
"ExtEnabled;code:916;type:word;opt:default;len:12;;"
|
203
|
-
"Name;code:906;type:line;opt:default;len:32;;"
|
204
|
-
"Owner;code:907;type:word;opt:default;len:36;;"
|
205
|
-
"Update;code:908;type:date;opt:always;fmt:L;len:20;;"
|
206
|
-
"Description;code:909;type:text;opt:required;len:128;;"
|
207
|
-
"ExtConfig;code:912;type:text;opt:required;len:256;;"
|
208
|
-
},
|
209
123
|
{
|
210
124
|
"group",
|
211
125
|
"Group;code:401;rq;ro;len:32;;"
|
@@ -321,6 +235,7 @@ struct defaultspec {
|
|
321
235
|
"DefaultBranch;code:1007;len:32;;"
|
322
236
|
"MirroredFrom;code:1008;len:32;;"
|
323
237
|
"Options;code:1009;type:select;len:10;val:lfs/nolfs;;"
|
238
|
+
"GconnMirrorServerId;code:1010;len:32;;"
|
324
239
|
},
|
325
240
|
{
|
326
241
|
"server",
|
@@ -336,22 +251,12 @@ struct defaultspec {
|
|
336
251
|
"Description;code:757;type:text;len:128;;"
|
337
252
|
"User;code:761;type:line;len:64;;"
|
338
253
|
"AllowedAddresses;code:763;type:wlist;len:64;;"
|
254
|
+
"UpdateCachedRepos;code:766;type:wlist;len:64;;"
|
339
255
|
"ClientDataFilter;code:758;type:wlist;len:64;;"
|
340
256
|
"RevisionDataFilter;code:759;type:wlist;len:64;;"
|
341
257
|
"ArchiveDataFilter;code:760;type:wlist;len:64;;"
|
342
258
|
"DistributedConfig;code:762;type:text;len:128;;"
|
343
259
|
},
|
344
|
-
{
|
345
|
-
"specW",
|
346
|
-
"Fields;code:351;type:wlist;words:5;rq;;"
|
347
|
-
"Required;code:357;type:wlist;;"
|
348
|
-
"Readonly;code:358;type:wlist;;"
|
349
|
-
"Words;code:352;type:wlist;words:2;;"
|
350
|
-
"Formats;code:353;type:wlist;words:3;;"
|
351
|
-
"Values;code:354;type:wlist;words:2;;"
|
352
|
-
"Presets;code:355;type:wlist;words:2;;"
|
353
|
-
"Comments;code:356;type:text;;"
|
354
|
-
},
|
355
260
|
{
|
356
261
|
"spec",
|
357
262
|
"Fields;code:351;type:wlist;words:5;rq;;"
|
data/lib/P4/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
class P4
|
2
|
-
|
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:
|
4
|
+
version: 2020.1.1970474
|
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:
|
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
|
@@ -46,10 +46,11 @@ files:
|
|
46
46
|
- ext/P4/undefdups.h
|
47
47
|
- lib/P4.rb
|
48
48
|
- lib/P4/version.rb
|
49
|
-
homepage: https://
|
49
|
+
homepage: https://github.com/perforce/p4ruby
|
50
50
|
licenses:
|
51
51
|
- MIT
|
52
|
-
metadata:
|
52
|
+
metadata:
|
53
|
+
documentation_uri: https://www.perforce.com/manuals/p4ruby/Content/P4Ruby/Home-p4ruby.html
|
53
54
|
post_install_message:
|
54
55
|
rdoc_options: []
|
55
56
|
require_paths:
|
@@ -65,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
66
|
- !ruby/object:Gem::Version
|
66
67
|
version: '0'
|
67
68
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
69
|
+
rubygems_version: 3.1.2
|
69
70
|
signing_key:
|
70
71
|
specification_version: 4
|
71
72
|
summary: Ruby extensions to the C++ Perforce API
|