git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin C Meyer <bmeyer@rim.com>
To: git@vger.kernel.org
Cc: Benjamin C Meyer <bmeyer@rim.com>
Subject: [PATCH] Add the option to not sync after a submitting to Perforce.
Date: Fri,  4 Jun 2010 13:33:04 -0400	[thread overview]
Message-ID: <1275672784-16371-1-git-send-email-bmeyer@rim.com> (raw)

When p4->git syncing occurs not on the users machine, but on a central
mirror server there is no local remote.  When a user performs a
'git p4 submit' in this configuration after successfully applying the
patches the p4 submit command will then output a failure because it could
not p4 sync.  This causes users to think their submit failed when in
fact it was successful.

Signed-off-by: Benjamin C Meyer <bmeyer@rim.com>
---
 contrib/fast-import/git-p4 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index d42b865..2a9771b 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -823,6 +823,9 @@ class P4Submit(Command):
             print "All changes applied!"
             chdir(self.oldWorkingDirectory)
 
+            if gitConfig("git-p4.syncAfterSubmit") == "false":
+                return True
+
             sync = P4Sync()
             sync.run([])
 
-- 
1.7.1

                 reply	other threads:[~2010-06-04 17:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1275672784-16371-1-git-send-email-bmeyer@rim.com \
    --to=bmeyer@rim.com \
    --cc=git@vger.kernel.org \
    /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).