Re: [PATCH 1/3] git p4: remove unused P4Submit interactive setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
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@xxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]