mercurial/commands.py
changeset 354 e3667e3a18ac
parent 353 dda243bb34b3
child 355 3e18360a8912
equal deleted inserted replaced
353:dda243bb34b3 354:e3667e3a18ac
   244     text = opts['text']
   244     text = opts['text']
   245     if not text and opts['logfile']:
   245     if not text and opts['logfile']:
   246         try: text = open(opts['logfile']).read()
   246         try: text = open(opts['logfile']).read()
   247         except IOError: pass
   247         except IOError: pass
   248 
   248 
       
   249     if opts['addremove']:
       
   250         addremove(ui, repo, *files)
   249     repo.commit(relpath(repo, files), text, opts['user'], opts['date'])
   251     repo.commit(relpath(repo, files), text, opts['user'], opts['date'])
   250 
   252 
   251 def debugaddchangegroup(ui, repo):
   253 def debugaddchangegroup(ui, repo):
   252     data = sys.stdin.read()
   254     data = sys.stdin.read()
   253     repo.addchangegroup(data)
   255     repo.addchangegroup(data)
   594                       ('c', 'changeset', None, 'show changeset')],
   596                       ('c', 'changeset', None, 'show changeset')],
   595                      'hg annotate [-u] [-c] [-n] [-r id] [files]'),
   597                      'hg annotate [-u] [-c] [-n] [-r id] [files]'),
   596     "cat|dump": (cat, [], 'hg cat <file> [rev]'),
   598     "cat|dump": (cat, [], 'hg cat <file> [rev]'),
   597     "commit|ci": (commit,
   599     "commit|ci": (commit,
   598                   [('t', 'text', "", 'commit text'),
   600                   [('t', 'text', "", 'commit text'),
       
   601                    ('A', 'addremove', None, 'run add/remove during commit'),
   599                    ('l', 'logfile', "", 'commit text file'),
   602                    ('l', 'logfile', "", 'commit text file'),
   600                    ('d', 'date', "", 'data'),
   603                    ('d', 'date', "", 'data'),
   601                    ('u', 'user', "", 'user')],
   604                    ('u', 'user', "", 'user')],
   602                   'hg commit [files]'),
   605                   'hg commit [files]'),
   603     "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'),
   606     "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'),