Implement CLI command for tagging
This commit is contained in:
10
ugit/cli.py
10
ugit/cli.py
@@ -49,6 +49,11 @@ def parse_args():
|
|||||||
checkout_parser.set_defaults(func=checkout)
|
checkout_parser.set_defaults(func=checkout)
|
||||||
checkout_parser.add_argument("oid")
|
checkout_parser.add_argument("oid")
|
||||||
|
|
||||||
|
tag_parser = commands.add_parser("tag")
|
||||||
|
tag_parser.set_defaults(func=tag)
|
||||||
|
tag_parser.add_argument("name")
|
||||||
|
tag_parser.add_argument("oid", nargs="?")
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
@@ -93,3 +98,8 @@ def log(args):
|
|||||||
|
|
||||||
def checkout(args):
|
def checkout(args):
|
||||||
base.checkout(args.oid)
|
base.checkout(args.oid)
|
||||||
|
|
||||||
|
|
||||||
|
def tag(args):
|
||||||
|
oid = args.oid or data.get_HEAD()
|
||||||
|
base.create_tag(args.name, oid)
|
||||||
|
|||||||
Reference in New Issue
Block a user