Change 15330

mart (mart)
mart committed this change into //guest/mart/p4FileObjects/dev
Request Review
Download .zip
* SchemaParser
* client-side file objects
* improved cmd line options parser
* fixed many bugs
* added/fixed/improved validators
* added auto-cmd name changes when mismatch with expected vs retrieved
   number of records
* added ap-side path resolver (`p4 where`) since sometimes we can't know a user's
   intentions (I.e. when referencing a relative p4 path) - so we guess
* added separate object loader to treat files and revs separately from other
  types of objects
* separate file object 'read' attribute from 'select', so that there's a
  clear picture of what we are asking... That is, the thing of interest
  (i.e.: file content is the thing of interest when request file records)
   ... therefore:

        >>> with op4n('//depot/files/...','r') as reader:
        >>> ... query = ('change.user=mart','depotFile#\.py$')
        >>> ... files = reader(query).select()

the query isn't all that specific and there's
a good change this would return multiple records,
so unless we really want to get the file content
of multiple files, it would make sense to specify
`.select()` as opposed to `read()`

* note: individual records can access the `read`
  attribute to retrieve a file's content, I.e.: with
   the sample above, we could do:

        >>> for file in files:
        >>> ... content = file.read()

* making much better use of sec definitions to validate spec input / validation
* and more stuff...

** ALL READ test are passing test, including multi-threaded tests! :)


* new in tools:
    - class zipper (to interact with 'p4 zip' & 'unzip'
    - class p4get (like apt-get for p4 software, but something that
      works - will figure out dependencies, change permission bits,
      download, read files from url, git/hg clones, ftp, etc...)
  • Files 3
  • Comments 0
3 edited 0 added 0 deleted
lib/modP4.py#12
Loading...
lib/p4tools.py#9
Loading...
main.py#11
Loading...
Tip: Use n and p to cycle through the changes.