Merge branch 'ld/p4-submit-hint'
authorJunio C Hamano <gitster@pobox.com>
Wed, 11 Feb 2015 21:39:44 +0000 (13:39 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Feb 2015 21:39:44 +0000 (13:39 -0800)
* ld/p4-submit-hint:
git-p4: correct --prepare-p4-only instructions

1  2 
git-p4.py
diff --combined git-p4.py
index ad91057c5c215e891679cc1ccfe6cf67f4646820,90447de6a1fece922d1f6ccfecc3e92e92537da5..549022e97c83e4a2f1898dc005331e5bca3f0ded
+++ b/git-p4.py
@@@ -1442,7 -1442,7 +1442,7 @@@ class P4Submit(Command, P4UserMap)
              print "  " + self.clientPath
              print
              print "To submit, use \"p4 submit\" to write a new description,"
-             print "or \"p4 submit -i %s\" to use the one prepared by" \
+             print "or \"p4 submit -i <%s\" to use the one prepared by" \
                    " \"git p4\"." % fileName
              print "You can delete the file \"%s\" when finished." % fileName
  
@@@ -1915,10 -1915,7 +1915,10 @@@ class P4Sync(Command, P4UserMap)
                  optparse.make_option("--keep-path", dest="keepRepoPath", action='store_true',
                                       help="Keep entire BRANCH/DIR/SUBDIR prefix during import"),
                  optparse.make_option("--use-client-spec", dest="useClientSpec", action='store_true',
 -                                     help="Only sync files that are included in the Perforce Client Spec")
 +                                     help="Only sync files that are included in the Perforce Client Spec"),
 +                optparse.make_option("-/", dest="cloneExclude",
 +                                     action="append", type="string",
 +                                     help="exclude depot path"),
          ]
          self.description = """Imports from Perforce into a git repository.\n
      example:
          if gitConfig("git-p4.syncFromOrigin") == "false":
              self.syncWithOrigin = False
  
 +    # This is required for the "append" cloneExclude action
 +    def ensure_value(self, attr, value):
 +        if not hasattr(self, attr) or getattr(self, attr) is None:
 +            setattr(self, attr, value)
 +        return getattr(self, attr)
 +
      # Force a checkpoint in fast-import and wait for it to finish
      def checkpoint(self):
          self.gitStream.write("checkpoint\n\n")
@@@ -3110,6 -3101,9 +3110,6 @@@ class P4Clone(P4Sync)
              optparse.make_option("--destination", dest="cloneDestination",
                                   action='store', default=None,
                                   help="where to leave result of the clone"),
 -            optparse.make_option("-/", dest="cloneExclude",
 -                                 action="append", type="string",
 -                                 help="exclude depot path"),
              optparse.make_option("--bare", dest="cloneBare",
                                   action="store_true", default=False),
          ]
          self.needsGit = False
          self.cloneBare = False
  
 -    # This is required for the "append" cloneExclude action
 -    def ensure_value(self, attr, value):
 -        if not hasattr(self, attr) or getattr(self, attr) is None:
 -            setattr(self, attr, value)
 -        return getattr(self, attr)
 -
      def defaultDestination(self, args):
          ## TODO: use common prefix of args?
          depotPath = args[0]