Commits

Sheng Mao  committed 6d0692c

parse arg/opt

  • Participants
  • Parent commits c722bcf

Comments (0)

Files changed (1)

File issue-lit.py

 
 def issue(ui, repo, arg = None, **opts):
     ''' manage issues '''
-    if arg:
-        print arg
-    print opts
     if opts['new']:
-        issuenew(ui, repo, arg)
-    elif opts['list']:
-        issuelist(ui, repo)
-    elif opts['close']:
-        pass
+        creation = True
+    if opts['close']:
+        close = True
+        
+    if not opts['rev']:
+        if not arg:
+            raise Exception('should provide id or rev')
+        else:
+            id = arg
+            useid = True
+    else:
+        rev = int(opts['rev'])
+        useid = False
 
 def issuenew(ui, repo, arg):
     #commands.commit(ui, repo, 'issue', message="A test", addremove=True)
 def issuelist(ui, repo):
     pass
 
-def issueclose(ui, repo, arg, UseID = True):
+def issueclose(ui, repo, arg, useid = True):
     pass
 
 cmdtable = {