equal
deleted
inserted
replaced
1621 rev = cmdutil.revrange(repo, rev) |
1621 rev = cmdutil.revrange(repo, rev) |
1622 rev.sort(reverse=True) |
1622 rev.sort(reverse=True) |
1623 if (len(files) > 1 or len(rev) > 1) and patchname: |
1623 if (len(files) > 1 or len(rev) > 1) and patchname: |
1624 raise util.Abort(_('option "-n" not valid when importing multiple ' |
1624 raise util.Abort(_('option "-n" not valid when importing multiple ' |
1625 'patches')) |
1625 'patches')) |
1626 self.added = [] |
|
1627 if rev: |
1626 if rev: |
1628 # If mq patches are applied, we can only import revisions |
1627 # If mq patches are applied, we can only import revisions |
1629 # that form a linear path to qbase. |
1628 # that form a linear path to qbase. |
1630 # Otherwise, they should form a linear path to a head. |
1629 # Otherwise, they should form a linear path to a head. |
1631 heads = repo.changelog.heads(repo.changelog.node(rev[-1])) |
1630 heads = repo.changelog.heads(repo.changelog.node(rev[-1])) |
1811 finally: |
1810 finally: |
1812 q.save_dirty() |
1811 q.save_dirty() |
1813 qrepo = q.qrepo() |
1812 qrepo = q.qrepo() |
1814 if qrepo: |
1813 if qrepo: |
1815 qrepo[None].add(q.added) |
1814 qrepo[None].add(q.added) |
|
1815 q.added = [] |
1816 |
1816 |
1817 if opts.get('push') and not opts.get('rev'): |
1817 if opts.get('push') and not opts.get('rev'): |
1818 return q.push(repo, None) |
1818 return q.push(repo, None) |
1819 return 0 |
1819 return 0 |
1820 |
1820 |