hg
changeset 203 0b486b5e0796
parent 198 c88ef31fb5c0
child 206 3295b6b508de
equal deleted inserted replaced
202:e875a0cf7f3a 203:0b486b5e0796
   148     if 1:
   148     if 1:
   149         if len(args) > 0:
   149         if len(args) > 0:
   150             repo.commit(repo.current, args)
   150             repo.commit(repo.current, args)
   151         else:
   151         else:
   152             repo.commit(repo.current)
   152             repo.commit(repo.current)
   153 
   153 elif cmd == "rawcommit":
       
   154     "raw commit interface"
       
   155     rc = {}
       
   156     opts = [('p', 'parent', [], 'parent'),
       
   157             ('d', 'date', "", 'data'),
       
   158             ('u', 'user', "", 'user'),
       
   159             ('F', 'files', "", 'file list'),
       
   160             ('t', 'text', "", 'commit text'),
       
   161             ('l', 'logfile', "", 'commit text file')
       
   162             ]
       
   163     args = fancyopts.fancyopts(args, opts, rc,
       
   164                                "hg rawcommit [options] files")
       
   165     text = rc['text']
       
   166     if not text and rc['logfile']:
       
   167         try: text = open(rc['logfile']).read()
       
   168         except IOError: pass
       
   169     if not text and not rc['logfile']:
       
   170         print "missing commit text"
       
   171         sys.exit(0)
       
   172     if rc['files']:
       
   173         files = open(rc['files']).read().splitlines()
       
   174     else:
       
   175         files = args
       
   176         
       
   177     repo.rawcommit(files, text, rc['user'], rc['date'], *rc['parent'])
       
   178     
       
   179  
   154 elif cmd == "import" or cmd == "patch":
   180 elif cmd == "import" or cmd == "patch":
   155     try:
   181     try:
   156         import psyco
   182         import psyco
   157         psyco.full()
   183         psyco.full()
   158     except:
   184     except: