Mercurial > hg
comparison tests/test-mq-qnew.out @ 10397:8cb81d75730c
mq: add parent node IDs to MQ patches on qrefresh/qnew
The goal of this patch is to add the IDs of the parents of applied MQ patches
into the patch file headers whenever qnew or qrefresh are run.
This will serve as a reminder of when the patches last applied cleanly and
will let us do more intelligent things in the future, such as:
* Resolve conflicts found when qpushing to a new location by merging
instead of simply showing rejects.
* Display better diffs of versioned MQ patches because we can tell how the
patched files have changed in the meantime.
Here are the new rules this patch introduces. They are checked in this order:
* If a patch currently has old, plain-style patch headers ("From:" and
"Date:") do not change the style or add any new headers.
* If the 'mq.plain' configuration setting is true, only plain-style
headers will be used for all MQ patches.
* qnew will initialize new patches with HG-style headers and fill in the
"# Parent" header with the appropriate parent node.
* qrefresh will refresh the "# Parent" header with the current parent of
the current patch.
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Sun, 07 Feb 2010 10:47:54 -0500 |
parents | 27d542bc0f5b |
children | b0b19d61d79a |
comparison
equal
deleted
inserted
replaced
10396:65a90c8e11ee | 10397:8cb81d75730c |
---|---|
1 %%% plain headers | |
1 adding a | 2 adding a |
2 % qnew should refuse bad patch names | 3 % qnew should refuse bad patch names |
3 abort: "series" cannot be used as the name of a patch | 4 abort: "series" cannot be used as the name of a patch |
4 abort: "status" cannot be used as the name of a patch | 5 abort: "status" cannot be used as the name of a patch |
5 abort: "guards" cannot be used as the name of a patch | 6 abort: "guards" cannot be used as the name of a patch |
42 warning: conflicts during merge. | 43 warning: conflicts during merge. |
43 merging a failed! | 44 merging a failed! |
44 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | 45 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
45 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | 46 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon |
46 abort: cannot manage merge changesets | 47 abort: cannot manage merge changesets |
48 %%% hg headers | |
49 adding a | |
50 % qnew should refuse bad patch names | |
51 abort: "series" cannot be used as the name of a patch | |
52 abort: "status" cannot be used as the name of a patch | |
53 abort: "guards" cannot be used as the name of a patch | |
54 abort: ".hgignore" cannot be used as the name of a patch | |
55 % qnew with uncommitted changes | |
56 uncommitted.patch | |
57 % qnew implies add | |
58 A .hgignore | |
59 A series | |
60 A uncommitted.patch | |
61 % qnew missing | |
62 abort: missing: No such file or directory | |
63 % qnew -m | |
64 # HG changeset patch | |
65 # Parent | |
66 foo bar | |
67 | |
68 % qnew twice | |
69 abort: patch "first.patch" already exists | |
70 abort: patch "first.patch" already exists | |
71 % qnew -f from a subdirectory | |
72 popping first.patch | |
73 popping mtest.patch | |
74 popping uncommitted.patch | |
75 patch queue now empty | |
76 adding d/b | |
77 M d/b | |
78 # HG changeset patch | |
79 # Parent | |
80 diff --git a/d/b b/d/b | |
81 --- a/d/b | |
82 +++ b/d/b | |
83 @@ -1,1 +1,2 @@ | |
84 b | |
85 +b | |
86 % qnew -u with no username configured | |
87 # HG changeset patch | |
88 # Parent | |
89 # User blue | |
90 % fail when trying to import a merge | |
91 adding a | |
92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
93 created new head | |
94 merging a | |
95 warning: conflicts during merge. | |
96 merging a failed! | |
97 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
98 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |
99 abort: cannot manage merge changesets |