2
0
Эх сурвалжийг харах

Implement 'dulwich push'.

Jelmer Vernooij 7 жил өмнө
parent
commit
9cfaa3da58
1 өөрчлөгдсөн 14 нэмэгдсэн , 0 устгасан
  1. 14 0
      bin/dulwich

+ 14 - 0
bin/dulwich

@@ -480,6 +480,19 @@ class cmd_pull(Command):
         porcelain.pull('.', from_location)
 
 
+class cmd_push(Command):
+
+    def run(self, args):
+        parser = optparse.OptionParser()
+        options, args = parser.parse_args(args)
+        if len(args) < 2:
+            print("Usage: dulwich push TO-LOCATION REFSPEC..")
+            sys.exit(1)
+        to_location = args[0]
+        refspecs = args[1:]
+        porcelain.push('.', to_location, refspecs)
+
+
 class cmd_remote_add(Command):
 
     def run(self, args):
@@ -562,6 +575,7 @@ commands = {
     "ls-tree": cmd_ls_tree,
     "pack-objects": cmd_pack_objects,
     "pull": cmd_pull,
+    "push": cmd_push,
     "receive-pack": cmd_receive_pack,
     "remote": cmd_remote,
     "repack": cmd_repack,