##// END OF EJS Templates
revert: evaluate filesets against working directory (issue4497)...
Martin von Zweigbergk -
r24438:5b85a5bc default
parent child Browse files
Show More
@@ -765,7 +765,7 b' def overriderevert(orig, ui, repo, ctx, '
765
765
766 def tostandin(f):
766 def tostandin(f):
767 standin = lfutil.standin(f)
767 standin = lfutil.standin(f)
768 if standin in mctx:
768 if standin in ctx or standin in mctx:
769 return standin
769 return standin
770 elif standin in repo[None] or lfdirstate[f] == 'r':
770 elif standin in repo[None] or lfdirstate[f] == 'r':
771 return None
771 return None
@@ -777,7 +777,7 b' def overriderevert(orig, ui, repo, ctx, '
777 def matchfn(f):
777 def matchfn(f):
778 if lfutil.isstandin(f):
778 if lfutil.isstandin(f):
779 return (origmatchfn(lfutil.splitstandin(f)) and
779 return (origmatchfn(lfutil.splitstandin(f)) and
780 (f in repo[None] or f in mctx))
780 (f in ctx or f in mctx))
781 return origmatchfn(f)
781 return origmatchfn(f)
782 m.matchfn = matchfn
782 m.matchfn = matchfn
783 return m
783 return m
@@ -2828,7 +2828,6 b' def revert(ui, repo, ctx, parents, *pats'
2828 return
2828 return
2829 ui.warn("%s: %s\n" % (m.rel(path), msg))
2829 ui.warn("%s: %s\n" % (m.rel(path), msg))
2830
2830
2831 m = scmutil.match(ctx, pats, opts)
2832 m.bad = badfn
2831 m.bad = badfn
2833 for abs in ctx.walk(m):
2832 for abs in ctx.walk(m):
2834 if abs not in names:
2833 if abs not in names:
@@ -141,39 +141,34 b' Test log'
141
141
142 Test revert
142 Test revert
143
143
144 BROKEN: the files that get undeleted were not modified, they were removed,
145 and content1_content2_missing-tracked was also not modified, it was deleted
146
147 $ hg revert 'set:modified()'
144 $ hg revert 'set:modified()'
148 reverting content1_content1_content3-tracked
145 reverting content1_content1_content3-tracked
149 reverting content1_content2_content1-tracked
146 reverting content1_content2_content1-tracked
150 undeleting content1_content2_content1-untracked
151 undeleting content1_content2_content2-untracked
152 reverting content1_content2_content3-tracked
147 reverting content1_content2_content3-tracked
153 undeleting content1_content2_content3-untracked
154 reverting content1_content2_missing-tracked
155 undeleting content1_content2_missing-untracked
156 reverting missing_content2_content3-tracked
148 reverting missing_content2_content3-tracked
157
149
158 BROKEN: only the files that get forgotten are correct
159
160 $ hg revert 'set:added()'
150 $ hg revert 'set:added()'
161 forgetting content1_missing_content1-tracked
151 forgetting content1_missing_content1-tracked
162 forgetting content1_missing_content3-tracked
152 forgetting content1_missing_content3-tracked
163 undeleting missing_content2_content2-untracked
164 undeleting missing_content2_content3-untracked
165 reverting missing_content2_missing-tracked
166 undeleting missing_content2_missing-untracked
167 forgetting missing_missing_content3-tracked
153 forgetting missing_missing_content3-tracked
168
154
169 $ hg revert 'set:removed()'
155 $ hg revert 'set:removed()'
170 undeleting content1_content1_content1-untracked
156 undeleting content1_content1_content1-untracked
171 undeleting content1_content1_content3-untracked
157 undeleting content1_content1_content3-untracked
172 undeleting content1_content1_missing-untracked
158 undeleting content1_content1_missing-untracked
159 undeleting content1_content2_content1-untracked
160 undeleting content1_content2_content2-untracked
161 undeleting content1_content2_content3-untracked
162 undeleting content1_content2_missing-untracked
163 undeleting missing_content2_content2-untracked
164 undeleting missing_content2_content3-untracked
165 undeleting missing_content2_missing-untracked
173
166
174 $ hg revert 'set:deleted()'
167 $ hg revert 'set:deleted()'
175 reverting content1_content1_missing-tracked
168 reverting content1_content1_missing-tracked
169 reverting content1_content2_missing-tracked
176 forgetting content1_missing_missing-tracked
170 forgetting content1_missing_missing-tracked
171 reverting missing_content2_missing-tracked
177 forgetting missing_missing_missing-tracked
172 forgetting missing_missing_missing-tracked
178
173
179 $ hg revert 'set:unknown()'
174 $ hg revert 'set:unknown()'
General Comments 0
You need to be logged in to leave comments. Login now