equal
deleted
inserted
replaced
2104 q = repo.mq |
2104 q = repo.mq |
2105 |
2105 |
2106 if not files: |
2106 if not files: |
2107 raise util.Abort(_('qfold requires at least one patch name')) |
2107 raise util.Abort(_('qfold requires at least one patch name')) |
2108 if not q.check_toppatch(repo)[0]: |
2108 if not q.check_toppatch(repo)[0]: |
2109 raise util.Abort(_('No patches applied')) |
2109 raise util.Abort(_('no patches applied')) |
2110 q.check_localchanges(repo) |
2110 q.check_localchanges(repo) |
2111 |
2111 |
2112 message = cmdutil.logmessage(opts) |
2112 message = cmdutil.logmessage(opts) |
2113 if opts['edit']: |
2113 if opts['edit']: |
2114 if message: |
2114 if message: |
2131 if ph.message: |
2131 if ph.message: |
2132 messages.append(ph.message) |
2132 messages.append(ph.message) |
2133 pf = q.join(p) |
2133 pf = q.join(p) |
2134 (patchsuccess, files, fuzz) = q.patch(repo, pf) |
2134 (patchsuccess, files, fuzz) = q.patch(repo, pf) |
2135 if not patchsuccess: |
2135 if not patchsuccess: |
2136 raise util.Abort(_('Error folding patch %s') % p) |
2136 raise util.Abort(_('error folding patch %s') % p) |
2137 patch.updatedir(ui, repo, files) |
2137 patch.updatedir(ui, repo, files) |
2138 |
2138 |
2139 if not message: |
2139 if not message: |
2140 ph = patchheader(q.join(parent), q.plainmode) |
2140 ph = patchheader(q.join(parent), q.plainmode) |
2141 message, user = ph.message, ph.user |
2141 message, user = ph.message, ph.user |
2881 raise util.Abort(_('only a local queue repository ' |
2881 raise util.Abort(_('only a local queue repository ' |
2882 'may be initialized')) |
2882 'may be initialized')) |
2883 else: |
2883 else: |
2884 repopath = cmdutil.findrepo(os.getcwd()) |
2884 repopath = cmdutil.findrepo(os.getcwd()) |
2885 if not repopath: |
2885 if not repopath: |
2886 raise util.Abort(_('There is no Mercurial repository here ' |
2886 raise util.Abort(_('there is no Mercurial repository here ' |
2887 '(.hg not found)')) |
2887 '(.hg not found)')) |
2888 repo = hg.repository(ui, repopath) |
2888 repo = hg.repository(ui, repopath) |
2889 return qinit(ui, repo, True) |
2889 return qinit(ui, repo, True) |
2890 |
2890 |
2891 def mqcommand(orig, ui, repo, *args, **kwargs): |
2891 def mqcommand(orig, ui, repo, *args, **kwargs): |