[Frugalware-darcs] vmexam: dg: implement check 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=20070614194228-e2957-ef77fa3517db957cb57b3c1e644ff2c03c10d3b3.gz;

[dg: implement check subcommand
VMiklos <vmiklos at frugalware.org>**20070614194228] {
hunk ./python/dg.py 564
+def check(argv):
+	def usage(ret):
+		print """Usage: darcs-git check [OPTION]...
+Check the repository for consistency.
+This is an alias for "git fsck".
+
+Options:
+  -h         --help                shows brief description of command and its arguments"""
+		sys.exit(ret)
+	if len(argv) and argv[0] in ("-h", "--help"):
+		usage(0)
+	os.system("git fsck")
+
hunk ./python/dg.py 630
-  FIXME check         Check the repository for consistency.
-  FIXME repair        Repair the corrupted repository.
+  A check         Check the repository for consistency.
+  N repair        Repair the corrupted repository.
hunk ./python/dg.py 657
+		elif sys.argv[1] == "check":
+			check(argv[1:])
}


More information about the Frugalware-darcs mailing list