Show More
@@ -254,7 +254,7 b' def stripcmd(ui, repo, *revs, **opts):' | |||
|
254 | 254 | |
|
255 | 255 | # only reset the dirstate for files that would actually change |
|
256 | 256 | # between the working context and uctx |
|
257 |
descendantrevs = repo.revs(b"%d |
|
|
257 | descendantrevs = repo.revs(b"only(., %d)", uctx.rev()) | |
|
258 | 258 | changedfiles = [] |
|
259 | 259 | for rev in descendantrevs: |
|
260 | 260 | # blindly reset the files, regardless of what actually changed |
@@ -1177,6 +1177,14 b' test stripping a working directory paren' | |||
|
1177 | 1177 | summary: commitA |
|
1178 | 1178 | |
|
1179 | 1179 | |
|
1180 | stripping a set containing a merge properly reset file content, including items on other branches | |
|
1181 | ||
|
1182 | The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call. | |
|
1183 | ||
|
1184 | stripping a set containing a merge properly reset file content, including items on other branches | |
|
1185 | ||
|
1186 | The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call. | |
|
1187 | ||
|
1180 | 1188 | $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg |
|
1181 | 1189 | adding changesets |
|
1182 | 1190 | adding manifests |
@@ -1185,6 +1193,50 b' test stripping a working directory paren' | |||
|
1185 | 1193 | new changesets 35358f982181:4cf5e92caec2 (2 drafts) |
|
1186 | 1194 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1187 | 1195 | |
|
1196 | $ hg id | |
|
1197 | 4cf5e92caec2 (new-branch) tip | |
|
1198 | $ hg status --rev "f62c6c09b707" | |
|
1199 | A bar.txt | |
|
1200 | $ hg diff --rev "f62c6c09b707" | |
|
1201 | diff -r f62c6c09b707 bar.txt | |
|
1202 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
1203 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 | |
|
1204 | @@ -0,0 +1,1 @@ | |
|
1205 | +bar | |
|
1206 | $ hg log -G -v --rev 35358f982181:: --patch | |
|
1207 | @ changeset: 5:4cf5e92caec2 | |
|
1208 | |\ branch: new-branch | |
|
1209 | | ~ tag: tip | |
|
1210 | | parent: 3:f62c6c09b707 | |
|
1211 | | parent: 4:35358f982181 | |
|
1212 | | user: test | |
|
1213 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1214 | | description: | |
|
1215 | | merge | |
|
1216 | | | |
|
1217 | | | |
|
1218 | | diff -r f62c6c09b707 -r 4cf5e92caec2 bar.txt | |
|
1219 | | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
1220 | | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 | |
|
1221 | | @@ -0,0 +1,1 @@ | |
|
1222 | | +bar | |
|
1223 | | | |
|
1224 | o changeset: 4:35358f982181 | |
|
1225 | | parent: 1:eca11cf91c71 | |
|
1226 | ~ user: test | |
|
1227 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1228 | files: bar.txt | |
|
1229 | description: | |
|
1230 | bar | |
|
1231 | ||
|
1232 | ||
|
1233 | diff -r eca11cf91c71 -r 35358f982181 bar.txt | |
|
1234 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
1235 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 | |
|
1236 | @@ -0,0 +1,1 @@ | |
|
1237 | +bar | |
|
1238 | ||
|
1239 | ||
|
1188 | 1240 | $ hg strip -k -r 35358f982181 |
|
1189 | 1241 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg |
|
1190 | 1242 | $ hg log -G |
@@ -1211,12 +1263,14 b' test stripping a working directory paren' | |||
|
1211 | 1263 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1212 | 1264 | summary: commitA |
|
1213 | 1265 | |
|
1214 | $ hg diff | |
|
1215 | diff -r f62c6c09b707 bar.txt | |
|
1216 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
1217 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 | |
|
1218 | @@ -0,0 +1,1 @@ | |
|
1219 | +bar | |
|
1266 | ||
|
1267 | $ hg status -A | |
|
1268 | ? bar.txt | |
|
1269 | C a | |
|
1270 | C b | |
|
1271 | C foo.txt | |
|
1272 | $ cat bar.txt | |
|
1273 | bar | |
|
1220 | 1274 | |
|
1221 | 1275 | Use delayedstrip to strip inside a transaction |
|
1222 | 1276 |
General Comments 0
You need to be logged in to leave comments.
Login now