comparison mercurial/commands.py @ 333:d60a3060f9e2

hg rawcommit: fix files arg conflict -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hg rawcommit: fix files arg conflict I try to sync with tip again. I found out the raw commit is broken for me because the keyword "files" is list as named argument as well so it will not show up in the rc dictionary. Here is my quick fix to make it work with my script again. Chris manifest hash: 10f85636e02cb4b19b319b7ebbfd2ec5096c3a6d -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCr1HSywK+sNU5EO8RArWMAJoD67SPN4QJcVaHBVh9FiNXWy80FQCePpA/ BZ63h+bqXESeMMLb7Kh5ytA= =69X0 -----END PGP SIGNATURE-----
author mpm@selenic.com
date Tue, 14 Jun 2005 13:53:22 -0800
parents 27d08c0c2a7e
children 74b9332faece
comparison
equal deleted inserted replaced
332:6c869059beb4 333:d60a3060f9e2
455 else: 455 else:
456 r = os.system(cmd) 456 r = os.system(cmd)
457 os.kill(child, signal.SIGTERM) 457 os.kill(child, signal.SIGTERM)
458 return r 458 return r
459 459
460 def rawcommit(ui, repo, files, **rc): 460 def rawcommit(ui, repo, flist, **rc):
461 "raw commit interface" 461 "raw commit interface"
462 462
463 text = rc['text'] 463 text = rc['text']
464 if not text and rc['logfile']: 464 if not text and rc['logfile']:
465 try: text = open(rc['logfile']).read() 465 try: text = open(rc['logfile']).read()
466 except IOError: pass 466 except IOError: pass
467 if not text and not rc['logfile']: 467 if not text and not rc['logfile']:
468 print "missing commit text" 468 print "missing commit text"
469 return 1 469 return 1
470 470
471 files = relpath(repo, files) 471 files = relpath(repo, flist)
472 if rc['files']: 472 if rc['files']:
473 files += open(rc['files']).read().splitlines() 473 files += open(rc['files']).read().splitlines()
474 474
475 repo.rawcommit(files, text, rc['user'], rc['date'], *rc['parent']) 475 repo.rawcommit(files, text, rc['user'], rc['date'], *rc['parent'])
476 476