Show More
@@ -784,8 +784,7 class queue(object): | |||
|
784 | 784 | |
|
785 | 785 | def check_localchanges(self, repo, force=False, refresh=True): |
|
786 | 786 | m, a, r, d = repo.status()[:4] |
|
787 | if m or a or r or d: | |
|
788 | if not force: | |
|
787 | if (m or a or r or d) and not force: | |
|
789 | 788 |
|
|
790 | 789 |
|
|
791 | 790 |
|
@@ -804,7 +803,6 class queue(object): | |||
|
804 | 803 | msg: a string or a no-argument function returning a string |
|
805 | 804 | """ |
|
806 | 805 | msg = opts.get('msg') |
|
807 | force = opts.get('force') | |
|
808 | 806 | user = opts.get('user') |
|
809 | 807 | date = opts.get('date') |
|
810 | 808 | if date: |
@@ -821,11 +819,9 class queue(object): | |||
|
821 | 819 | match.bad = badfn |
|
822 | 820 | m, a, r, d = repo.status(match=match)[:4] |
|
823 | 821 | else: |
|
824 | m, a, r, d = self.check_localchanges(repo, force) | |
|
822 | m, a, r, d = self.check_localchanges(repo, force=True) | |
|
825 | 823 | match = cmdutil.matchfiles(repo, m + a + r) |
|
826 | if force: | |
|
827 | p = repo[None].parents() | |
|
828 | if len(p) > 1: | |
|
824 | if len(repo[None].parents()) > 1: | |
|
829 | 825 |
|
|
830 | 826 | commitfiles = m + a + r |
|
831 | 827 | self.check_toppatch(repo) |
@@ -2682,7 +2678,7 cmdtable = { | |||
|
2682 | 2678 | "qnew": |
|
2683 | 2679 | (new, |
|
2684 | 2680 | [('e', 'edit', None, _('edit commit message')), |
|
2685 | ('f', 'force', None, _('import uncommitted changes into patch')), | |
|
2681 | ('f', 'force', None, _('import uncommitted changes into patch (deprecated)')), | |
|
2686 | 2682 | ('g', 'git', None, _('use git extended diff format')), |
|
2687 | 2683 | ('U', 'currentuser', None, _('add "From: <current user>" to patch')), |
|
2688 | 2684 | ('u', 'user', '', _('add "From: <given user>" to patch')), |
@@ -23,11 +23,8 hg add somefile | |||
|
23 | 23 | hg qnew uncommitted.patch |
|
24 | 24 | hg st |
|
25 | 25 | hg qseries |
|
26 | hg revert --no-backup somefile | |
|
27 | rm somefile | |
|
28 | 26 | |
|
29 | 27 | echo '% qnew implies add' |
|
30 | hg qnew test.patch | |
|
31 | 28 | hg -R .hg/patches st |
|
32 | 29 | |
|
33 | 30 | echo '% qnew missing' |
@@ -5,12 +5,11 abort: "status" cannot be used as the na | |||
|
5 | 5 | abort: "guards" cannot be used as the name of a patch |
|
6 | 6 | abort: ".hgignore" cannot be used as the name of a patch |
|
7 | 7 | % qnew with uncommitted changes |
|
8 | abort: local changes found, refresh first | |
|
9 | A somefile | |
|
8 | uncommitted.patch | |
|
10 | 9 | % qnew implies add |
|
11 | 10 | A .hgignore |
|
12 | 11 | A series |
|
13 |
A |
|
|
12 | A uncommitted.patch | |
|
14 | 13 | % qnew missing |
|
15 | 14 | abort: missing: No such file or directory |
|
16 | 15 | % qnew -m |
@@ -22,7 +21,7 abort: patch "first.patch" already exist | |||
|
22 | 21 | % qnew -f from a subdirectory |
|
23 | 22 | popping first.patch |
|
24 | 23 | popping mtest.patch |
|
25 |
popping |
|
|
24 | popping uncommitted.patch | |
|
26 | 25 | patch queue now empty |
|
27 | 26 | adding d/b |
|
28 | 27 | M d/b |
General Comments 0
You need to be logged in to leave comments.
Login now