[Frugalware-darcs] vmexam: dg: new optimize subcommand

VMiklos vmiklos at frugalware.org
Thu Jun 14 22:12:42 CEST 2007

Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=vmexam;a=darcs_commitdiff;h=20070614192359-e2957-2d04c8dca878e4cccc2104bb0db2286621612fec.gz;

[dg: new optimize subcommand
VMiklos <vmiklos at frugalware.org>**20070614192359] {
hunk ./python/dg.py 548
+def optimize(argv):
+	def usage(ret):
+		print """Usage: darcs-git optimize [OPTION]...
+Optimize the repository.
+This is an alias for "git gc".
+  -h         --help                shows brief description of command and its arguments"""
+		sys.exit(ret)
+	if len(argv) and argv[0] in ("-h", "--help"):
+		usage(0)
+	print "Checking how much disk space is wasted..."
+	os.system("git count-objects")
+	print "Chleaning up..."
+	os.system("git gc")
hunk ./python/dg.py 616
-  FIXME optimize      Optimize the repository.
+  A optimize      Optimize the repository.
hunk ./python/dg.py 642
+		elif sys.argv[1][:3] == "opt":
+			optimize(argv[1:])

More information about the Frugalware-darcs mailing list