Provide a tree summary after git-p4 rebase
authorSimon Hausmann <simon@lst.de>
Sat, 7 Apr 2007 22:07:02 +0000 (00:07 +0200)
committerSimon Hausmann <simon@lst.de>
Sat, 7 Apr 2007 22:07:02 +0000 (00:07 +0200)
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4
index aa85800d697f25518886dcd5d1826eb1eef91958..170af90abc963a1fb5b1f679a9d4ee4acf14de4e 100755 (executable)
@@ -974,7 +974,7 @@ class P4Sync(Command):
             if len(changes) == 0:
                 if not self.silent:
                     print "no changes to import!"
-                sys.exit(1)
+                return True
 
             cnt = 1
             for change in changes:
@@ -1053,7 +1053,9 @@ class P4Rebase(Command):
         sync = P4Sync()
         sync.run([])
         print "Rebasing the current branch"
+        oldHead = os.popen("git rev-parse HEAD").read()[:-1]
         system("git rebase p4")
+        system("git diff-tree --stat --summary -M %s HEAD" % oldHead)
         return True
 
 class HelpFormatter(optparse.IndentedHelpFormatter):