mercurial/commands.py
changeset 403 fda7bb480020
parent 401 af4848f83e68
child 404 a1ecef497721
equal deleted inserted replaced
402:2fe8d66e3075 403:fda7bb480020
   518     else:
   518     else:
   519         r = os.system(cmd)
   519         r = os.system(cmd)
   520         os.kill(child, signal.SIGTERM)
   520         os.kill(child, signal.SIGTERM)
   521         return r
   521         return r
   522 
   522 
   523 def rawcommit(ui, repo, flist, **rc):
   523 def rawcommit(ui, repo, *flist, **rc):
   524     "raw commit interface"
   524     "raw commit interface"
   525 
   525 
   526     text = rc['text']
   526     text = rc['text']
   527     if not text and rc['logfile']:
   527     if not text and rc['logfile']:
   528         try: text = open(rc['logfile']).read()
   528         try: text = open(rc['logfile']).read()
   529         except IOError: pass
   529         except IOError: pass
   530     if not text and not rc['logfile']:
   530     if not text and not rc['logfile']:
   531         print "missing commit text"
   531         print "missing commit text"
   532         return 1
   532         return 1
   533 
   533 
   534     files = relpath(repo, flist)
   534     files = relpath(repo, list(flist))
   535     if rc['files']:
   535     if rc['files']:
   536         files += open(rc['files']).read().splitlines()
   536         files += open(rc['files']).read().splitlines()
   537         
   537         
   538     repo.rawcommit(files, text, rc['user'], rc['date'], *rc['parent'])
   538     repo.rawcommit(files, text, rc['user'], rc['date'], *rc['parent'])
   539  
   539