Fixed displaying import progress by calling flush on stdout.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Permit calling p4-fast-export with a depot path that has the typical ... wildcard at the end.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Avoid calling fstat for every imported file (slow!) and instead read the file data first into the python process and use the length of the bytes read for the size field of git fast-import.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Ported the remaining functions that parsed p4 shell output over to the p4 python interface.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Instead of parsing the output of "p4 users" use the python objects of "p4 -G users".
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Minor code cleanups and ported some p4 interfacing code over to the p4 python mode.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Changed the import mechanism to write to git fast-import through a pipe instead of having p4-fast-export write to stdout and let the caller connect it to git fast-import.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
17 years agoRemoved unused p4cat function and added helper function for the perforce python inter...
Removed unused p4cat function and added helper function for the perforce python interface (p4Cmd).
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Speed up the import of individual files from Perforce into git by passing the output of "p4 print" directly to git fast-import. Also try to set the mode of the file in git correctly based on file type heuristics.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Some fixes to the timezone conversion between the date of a perforce change and the git commit.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Implemented basic support for converting the date of the perforce change to the git format. The timezone isn't correctly set up yet though.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Slightly improved help usage output and made specifying the trailing slash for the depot path optional.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
17 years agoAdded basic support for specifying the depot path to import from as well as the range...
Added basic support for specifying the depot path to import from as well as the range of perforce changes.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Initial import of a python script to import changesets from Perforce into git.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Signed-off-by: Simon Hausmann <shausman@trolltech.com>