git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pete Wyckoff <pw@padd.com>
To: git@vger.kernel.org
Cc: Michael Horowitz <mike@horowitz.name>
Subject: Re: [PATCH 1/3] git p4: remove unused P4Submit interactive setting
Date: Wed, 4 Jul 2012 09:49:18 -0400	[thread overview]
Message-ID: <20120704134918.GA28164@padd.com> (raw)
In-Reply-To: <1341408860-26965-2-git-send-email-pw@padd.com>

The "diff -w" version looks like this.  A bit easier to review.

--->8---

>From 3327945176be35081f2c86bc40b294ed9f73ea9a Mon Sep 17 00:00:00 2001
From: Pete Wyckoff <pw@padd.com>
Date: Sun, 24 Jun 2012 15:39:18 -0400
Subject: [PATCH] git p4: remove unused P4Submit interactive setting

The code is unused.  Delete.

Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 git-p4.py | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/git-p4.py b/git-p4.py
index f895a24..542c20a 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -844,7 +844,6 @@ class P4Submit(Command, P4UserMap):
         ]
         self.description = "Submit changes from git to the perforce depot."
         self.usage += " [name of git branch to submit into perforce depot]"
-        self.interactive = True
         self.origin = ""
         self.detectRenames = False
         self.preserveUser = gitConfig("git-p4.preserveUser").lower() == "true"
@@ -1209,7 +1208,6 @@ class P4Submit(Command, P4UserMap):
 
         template = self.prepareSubmitTemplate()
 
-        if self.interactive:
         submitTemplate = self.prepareLogMessage(template, logMessage)
 
         if self.preserveUser:
@@ -1281,14 +1279,6 @@ class P4Submit(Command, P4UserMap):
                 os.remove(f)
 
         os.remove(fileName)
-        else:
-            fileName = "submit.txt"
-            file = open(fileName, "w+")
-            file.write(self.prepareLogMessage(template, logMessage))
-            file.close()
-            print ("Perforce submit template written as %s. "
-                   + "Please review/edit and then use p4 submit -i < %s to submit directly!"
-                   % (fileName, fileName))
 
     # Export git tags as p4 labels. Create a p4 label and then tag
     # with that.
@@ -1437,8 +1427,6 @@ class P4Submit(Command, P4UserMap):
             commit = commits[0]
             commits = commits[1:]
             self.applyCommit(commit)
-            if not self.interactive:
-                break
 
         if len(commits) == 0:
             print "All changes applied!"
-- 
1.7.11.1.125.g4a65fea

  reply	other threads:[~2012-07-04 13:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04 13:34 [PATCH 0/3] git p4: notice Jobs: section in submit Pete Wyckoff
2012-07-04 13:34 ` [PATCH 1/3] git p4: remove unused P4Submit interactive setting Pete Wyckoff
2012-07-04 13:49   ` Pete Wyckoff [this message]
2012-07-05  7:20   ` Luke Diamand
2012-07-05 12:30     ` Pete Wyckoff
2012-07-14 13:53       ` Pete Wyckoff
2012-07-04 13:34 ` [PATCH 2/3] git p4 test: refactor marshal_dump Pete Wyckoff
2012-07-04 13:34 ` [PATCH 3/3] git p4: notice Jobs lines in git commit messages Pete Wyckoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120704134918.GA28164@padd.com \
    --to=pw@padd.com \
    --cc=git@vger.kernel.org \
    --cc=mike@horowitz.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).