Commit Graph

12 Commits

Author SHA1 Message Date
Brian 3eb7a78339 Fixed a serious output bug, buffers weren't being cleared after flushed.
So I obviously feel much better about this version, looks like it works
how it should.
2014-05-09 11:12:41 -06:00
Brian 97da25ce38 Threaded console, threaded cleanup. Yes!
Made the threaded console to batch messages and so I could manually
flush or clear them.  At some point I would consider a safety maximum
buffer size that triggers it to auto flush. This worked out really well,
though I have to see why in some cases lines appear to double up still,
could be something with the process not completing when I expect it to.

This is possible a naive thread implementation, since it pushes a
directory for every thread which seems too drastic. I'd like to see how
much better it works without all the context switches.  It's also a
matter of figuring out how much to handle yourself before letting
another thread join in.  Right now the threads don't branch out too much
since I think they basically do a breadth-first search, though I have to
double check on that.

Still to come, trying to safely work with fstat across multiple
directories. It's fast, but on the console the script would appear to
stall as it parses everything, so I'd still want to break it down
somewhat so you can see the script making visible progress.  I would
also prefer this because then console messages wouldn't be so short and
blocky.

Improvements to come!
2014-05-08 22:55:12 -06:00
Brian 2b14c4a273 Working on threaded support. 2014-05-08 21:05:55 -06:00
Brian 1f4b52e3a9 Added the version of Python I've tested with.
I'm working on making sure it works in Python 3.4.0
2014-05-08 19:27:29 -06:00
Brian 80163cd15c Update README.md 2014-05-08 19:25:48 -06:00
Brian b327058ccb Added a fix for old now unversioned files with readonly set. 2014-05-08 19:17:36 -06:00
Brian 2bb0fa671d Fixed a bug from old code so the script would work, tweaked output.
I was trying to use `p4 have` for speed, but it doesn't seem to work
with files that are added to a changelist but not to a repo.  So I had
to resort back to `p4 fstat`.
2014-05-08 19:05:07 -06:00
Brian 266c5555ba Improved crawling speed, also cleaned up the output.
So the speed of the script is much faster than before, though it
actually still has much room for improvement, it will just be more
complicated.  Calling 'p4 fstat' on the entire directory will give you
everything you need up front, it's just they're in depot paths, which
makes thing a little annoying to parse when you have workspace mappings
that move things around so the local path may differ from the depot
path, and it becomes harder to determine 100% that you're referring to
the same file.  And I don't want to have to call p4 on every file to be
sure of that, what I'm doing now is the easiest safest way to be sure of
that, as far as I know.

Another way to speed this up is to add thread crawlers, I'm just not yet
sure with HDDs and SSDs how many threads is a good idea to use.
2014-05-08 19:05:07 -06:00
Brian 09a4811be4 Update README.md 2014-05-08 15:52:08 -06:00
Brian e2d660e486 Updated readme, added warning, also figured out I'm not parsing p4ignore correctly. 2014-05-08 15:44:26 -06:00
Brian 32aaab1578 Create README.md 2014-05-08 15:42:50 -06:00
Brian 27e2e32f7e Added the basic script. 2014-05-08 15:37:57 -06:00