[PATCH] Added support for --branch to git p4 rebase in git-p4.py

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

 



git p4 can be made to support branches as streams to an extent
(https://stackoverflow.com/questions/15305357/how-to-clone-branch-with-git-p4).
Unfortunately the git p4 rebase command uses the git p4 sync command,
but it doesn't support any of the git p4 sync options. I added the
--branch option to git p4 rebase so that it can be used with multiple
branches.
---
 git-p4.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/git-p4.py b/git-p4.py
index f1ab31d54036be..17a83e8dc07b4b 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -4270,14 +4270,17 @@ class P4Rebase(Command):
     def __init__(self):
         Command.__init__(self)
         self.options = [
+                optparse.make_option("--branch", dest="branch"),
                 optparse.make_option("--import-labels",
dest="importLabels", action="store_true"),
         ]
+        self.branch = ""
         self.importLabels = False
         self.description = ("Fetches the latest revision from perforce and "
                             + "rebases the current work (branch) against it")

     def run(self, args):
         sync = P4Sync()
+        sync.branch = self.branch
         sync.importLabels = self.importLabels
         sync.run([])




[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]

  Powered by Linux