Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-p4: After submission to p4 always synchronize from p4 again (into refs/remotes). Whether to rebase HEAD or not is still left as question to the end-user.
author
Simon Hausmann
<simon@lst.de>
Wed, 22 Aug 2007 07:07:15 +0000
(09:07 +0200)
committer
Simon Hausmann
<simon@lst.de>
Mon, 3 Sep 2007 18:27:02 +0000
(20:27 +0200)
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
31f9ec1
)
diff --git
a/contrib/fast-import/git-p4
b/contrib/fast-import/git-p4
index 3728cbf9aa21c7cf2d245a3199aa3e0d5559b0dc..16e0a7bc81124c024f1149ae752ab508c76085c5 100755
(executable)
--- a/
contrib/fast-import/git-p4
+++ b/
contrib/fast-import/git-p4
@@
-704,10
+704,14
@@
class P4Submit(Command):
else:
print "All changes applied!"
os.chdir(self.oldWorkingDirectory)
else:
print "All changes applied!"
os.chdir(self.oldWorkingDirectory)
- response = raw_input("Do you want to sync from Perforce now using git-p4 rebase? [y]es/[n]o ")
+
+ sync = P4Sync()
+ sync.run([])
+
+ response = raw_input("Do you want to rebase current HEAD from Perforce now using git-p4 rebase? [y]es/[n]o ")
if response == "y" or response == "yes":
rebase = P4Rebase()
if response == "y" or response == "yes":
rebase = P4Rebase()
- rebase.r
un([]
)
+ rebase.r
ebase(
)
os.remove(self.configFile)
return True
os.remove(self.configFile)
return True
@@
-1439,6
+1443,9
@@
class P4Rebase(Command):
sync = P4Sync()
sync.run([])
sync = P4Sync()
sync.run([])
+ return self.rebase()
+
+ def rebase(self):
[upstream, settings] = findUpstreamBranchPoint()
if len(upstream) == 0:
die("Cannot find upstream branchpoint for rebase")
[upstream, settings] = findUpstreamBranchPoint()
if len(upstream) == 0:
die("Cannot find upstream branchpoint for rebase")