| 4306 | |
| 4307 | class P4Clone(P4Sync): |
| 4308 | def __init__(self): |
| 4309 | P4Sync.__init__(self) |
| 4310 | self.description = "Creates a new git repository and imports from Perforce into it" |
| 4311 | self.usage = "usage: %prog [options] //depot/path[@revRange]" |
| 4312 | self.options += [ |
| 4313 | optparse.make_option("--destination", dest="cloneDestination", |
| 4314 | action='store', default=None, |
| 4315 | help="where to leave result of the clone"), |
| 4316 | optparse.make_option("--bare", dest="cloneBare", |
| 4317 | action="store_true", default=False), |
| 4318 | ] |
| 4319 | self.cloneDestination = None |
| 4320 | self.needsGit = False |
| 4321 | self.cloneBare = False |
| 4322 | |
| 4323 | def defaultDestination(self, args): |
| 4324 | # TODO: use common prefix of args? |