Mercurial > hg
comparison hgext/mq.py @ 6603:41eb20cc1c02
match: remove files arg from repo.status and friends
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 May 2008 11:37:08 -0500 |
parents | a57a27b12965 |
children | 2f0522ce43b0 |
comparison
equal
deleted
inserted
replaced
6602:a57a27b12965 | 6603:41eb20cc1c02 |
---|---|
504 repo.dirstate.remove(f) | 504 repo.dirstate.remove(f) |
505 for f in merged: | 505 for f in merged: |
506 repo.dirstate.merge(f) | 506 repo.dirstate.merge(f) |
507 p1, p2 = repo.dirstate.parents() | 507 p1, p2 = repo.dirstate.parents() |
508 repo.dirstate.setparents(p1, merge) | 508 repo.dirstate.setparents(p1, merge) |
509 | |
509 files = patch.updatedir(self.ui, repo, files) | 510 files = patch.updatedir(self.ui, repo, files) |
510 n = repo.commit(files, message, user, date, match=util.never, | 511 match = cmdutil.matchfiles(repo, files or []) |
512 n = repo.commit(files, message, user, date, match=match, | |
511 force=True) | 513 force=True) |
512 | 514 |
513 if n == None: | 515 if n == None: |
514 raise util.Abort(_("repo commit failed")) | 516 raise util.Abort(_("repo commit failed")) |
515 | 517 |
618 self.check_reserved_name(patch) | 620 self.check_reserved_name(patch) |
619 if os.path.exists(self.join(patch)): | 621 if os.path.exists(self.join(patch)): |
620 raise util.Abort(_('patch "%s" already exists') % patch) | 622 raise util.Abort(_('patch "%s" already exists') % patch) |
621 if opts.get('include') or opts.get('exclude') or pats: | 623 if opts.get('include') or opts.get('exclude') or pats: |
622 match = cmdutil.match(repo, pats, opts) | 624 match = cmdutil.match(repo, pats, opts) |
623 m, a, r, d = repo.status(files=match.files(), match=match)[:4] | 625 m, a, r, d = repo.status(match=match)[:4] |
624 else: | 626 else: |
625 m, a, r, d = self.check_localchanges(repo, force) | 627 m, a, r, d = self.check_localchanges(repo, force) |
626 match = cmdutil.match(repo, m + a + r) | 628 match = cmdutil.match(repo, m + a + r) |
627 commitfiles = m + a + r | 629 commitfiles = m + a + r |
628 self.check_toppatch(repo) | 630 self.check_toppatch(repo) |
1045 aaa = aa[:] | 1047 aaa = aa[:] |
1046 if opts.get('short'): | 1048 if opts.get('short'): |
1047 match = cmdutil.matchfiles(repo, mm + aa + dd) | 1049 match = cmdutil.matchfiles(repo, mm + aa + dd) |
1048 else: | 1050 else: |
1049 match = cmdutil.matchall(repo) | 1051 match = cmdutil.matchall(repo) |
1050 m, a, r, d, u = repo.status(files=match.files(), match=match)[:5] | 1052 m, a, r, d, u = repo.status(match=match)[:5] |
1051 | 1053 |
1052 # we might end up with files that were added between | 1054 # we might end up with files that were added between |
1053 # tip and the dirstate parent, but then changed in the | 1055 # tip and the dirstate parent, but then changed in the |
1054 # local dirstate. in this case, we want them to only | 1056 # local dirstate. in this case, we want them to only |
1055 # show up in the added section | 1057 # show up in the added section |