416 |
416 |
417 if opts['addremove']: |
417 if opts['addremove']: |
418 cmdutil.addremove(repo, pats, opts) |
418 cmdutil.addremove(repo, pats, opts) |
419 fns, match, anypats = cmdutil.matchpats(repo, pats, opts) |
419 fns, match, anypats = cmdutil.matchpats(repo, pats, opts) |
420 if pats: |
420 if pats: |
421 modified, added, removed = repo.status(files=fns, match=match)[:3] |
421 status = repo.status(files=fns, match=match) |
|
422 modified, added, removed, deleted, unknown = status[:5] |
422 files = modified + added + removed |
423 files = modified + added + removed |
|
424 for f in fns: |
|
425 if f not in modified + added + removed: |
|
426 if f in unknown: |
|
427 raise util.Abort(_("file %s not tracked!") % f) |
|
428 else: |
|
429 raise util.Abort(_("file %s not found!") % f) |
423 else: |
430 else: |
424 files = [] |
431 files = [] |
425 try: |
432 try: |
426 repo.commit(files, message, opts['user'], opts['date'], match, |
433 repo.commit(files, message, opts['user'], opts['date'], match, |
427 force_editor=opts.get('force_editor')) |
434 force_editor=opts.get('force_editor')) |