Show More
@@ -386,15 +386,21 b' class queue:' | |||||
386 | self.ui.write("Local changes found, refresh first\n") |
|
386 | self.ui.write("Local changes found, refresh first\n") | |
387 | sys.exit(1) |
|
387 | sys.exit(1) | |
388 | def new(self, repo, patch, msg=None, force=None): |
|
388 | def new(self, repo, patch, msg=None, force=None): | |
|
389 | commitfiles = [] | |||
|
390 | (c, a, r, d, u) = repo.changes(None, None) | |||
|
391 | if c or a or d or r: | |||
389 | if not force: |
|
392 | if not force: | |
390 | self.check_localchanges(repo) |
|
393 | raise util.Abort(_("Local changes found, refresh first")) | |
|
394 | else: | |||
|
395 | commitfiles = c + a + r | |||
391 | self.check_toppatch(repo) |
|
396 | self.check_toppatch(repo) | |
392 | wlock = repo.wlock() |
|
397 | wlock = repo.wlock() | |
393 | insert = self.series_end() |
|
398 | insert = self.series_end() | |
394 | if msg: |
|
399 | if msg: | |
395 |
n = repo.commit( |
|
400 | n = repo.commit(commitfiles, "[mq]: %s" % msg, force=True, | |
|
401 | wlock=wlock) | |||
396 | else: |
|
402 | else: | |
397 |
n = repo.commit( |
|
403 | n = repo.commit(commitfiles, | |
398 | "New patch: %s" % patch, force=True, wlock=wlock) |
|
404 | "New patch: %s" % patch, force=True, wlock=wlock) | |
399 | if n == None: |
|
405 | if n == None: | |
400 | self.ui.warn("repo commit failed\n") |
|
406 | self.ui.warn("repo commit failed\n") | |
@@ -412,6 +418,8 b' class queue:' | |||||
412 | wlock = None |
|
418 | wlock = None | |
413 | r = self.qrepo() |
|
419 | r = self.qrepo() | |
414 | if r: r.add([patch]) |
|
420 | if r: r.add([patch]) | |
|
421 | if commitfiles: | |||
|
422 | self.refresh(repo, short=True) | |||
415 |
|
423 | |||
416 | def strip(self, repo, rev, update=True, backup="all", wlock=None): |
|
424 | def strip(self, repo, rev, update=True, backup="all", wlock=None): | |
417 | def limitheads(chlog, stop): |
|
425 | def limitheads(chlog, stop): |
General Comments 0
You need to be logged in to leave comments.
Login now