Show More
@@ -2614,8 +2614,6 b' def rename(ui, repo, patch, name=None, *' | |||||
2614 | r.dirstate.drop(patch) |
|
2614 | r.dirstate.drop(patch) | |
2615 | r.dirstate.add(name) |
|
2615 | r.dirstate.add(name) | |
2616 | else: |
|
2616 | else: | |
2617 | if r.dirstate[name] == 'r': |
|
|||
2618 | wctx.undelete([name]) |
|
|||
2619 | wctx.copy(patch, name) |
|
2617 | wctx.copy(patch, name) | |
2620 | wctx.forget([patch]) |
|
2618 | wctx.forget([patch]) | |
2621 | finally: |
|
2619 | finally: |
@@ -76,8 +76,8 b' Test overlapping renames (issue2388)' | |||||
76 | $ hg qrename patchb patchc |
|
76 | $ hg qrename patchb patchc | |
77 | $ hg qrename patcha patchb |
|
77 | $ hg qrename patcha patchb | |
78 | $ hg st --mq |
|
78 | $ hg st --mq | |
79 | M patchb |
|
|||
80 | M series |
|
79 | M series | |
|
80 | A patchb | |||
81 | A patchc |
|
81 | A patchc | |
82 | R patcha |
|
82 | R patcha | |
83 | $ cd .. |
|
83 | $ cd .. | |
@@ -94,3 +94,32 b' Test renames with mq repo (issue2097)' | |||||
94 | nothing changed |
|
94 | nothing changed | |
95 | [1] |
|
95 | [1] | |
96 | $ cd .. |
|
96 | $ cd .. | |
|
97 | ||||
|
98 | Test renaming to a folded patch (issue3058) | |||
|
99 | ||||
|
100 | $ hg init issue3058 | |||
|
101 | $ cd issue3058 | |||
|
102 | $ hg init --mq | |||
|
103 | $ echo a > a | |||
|
104 | $ hg add a | |||
|
105 | $ hg qnew adda | |||
|
106 | $ echo b >> a | |||
|
107 | $ hg qnew addb | |||
|
108 | $ hg qpop | |||
|
109 | popping addb | |||
|
110 | now at: adda | |||
|
111 | $ hg ci --mq -m "save mq" | |||
|
112 | $ hg qfold addb | |||
|
113 | $ hg qmv addb | |||
|
114 | $ cat .hg/patches/addb | |||
|
115 | # HG changeset patch | |||
|
116 | # Parent 0000000000000000000000000000000000000000 | |||
|
117 | ||||
|
118 | diff -r 000000000000 a | |||
|
119 | --- /dev/null * (glob) | |||
|
120 | +++ b/a * (glob) | |||
|
121 | @@ -0,0 +1,2 @@ | |||
|
122 | +a | |||
|
123 | +b | |||
|
124 | $ cd .. | |||
|
125 |
General Comments 0
You need to be logged in to leave comments.
Login now