##// END OF EJS Templates
largefiles: unlink standins not known to the restored dirstate at rollback...
FUJIWARA Katsunori -
r22286:3f3b9483 default
parent child Browse files
Show More
@@ -1197,6 +1197,8 b' def overriderollback(orig, ui, repo, **o'
1197 wlock = repo.wlock()
1197 wlock = repo.wlock()
1198 try:
1198 try:
1199 before = repo.dirstate.parents()
1199 before = repo.dirstate.parents()
1200 orphans = set(f for f in repo.dirstate
1201 if lfutil.isstandin(f) and repo.dirstate[f] != 'r')
1200 result = orig(ui, repo, **opts)
1202 result = orig(ui, repo, **opts)
1201 after = repo.dirstate.parents()
1203 after = repo.dirstate.parents()
1202 if before == after:
1204 if before == after:
@@ -1205,6 +1207,7 b' def overriderollback(orig, ui, repo, **o'
1205 pctx = repo['.']
1207 pctx = repo['.']
1206 for f in repo.dirstate:
1208 for f in repo.dirstate:
1207 if lfutil.isstandin(f):
1209 if lfutil.isstandin(f):
1210 orphans.discard(f)
1208 if repo.dirstate[f] == 'r':
1211 if repo.dirstate[f] == 'r':
1209 repo.wvfs.unlinkpath(f, ignoremissing=True)
1212 repo.wvfs.unlinkpath(f, ignoremissing=True)
1210 elif f in pctx:
1213 elif f in pctx:
@@ -1214,6 +1217,8 b' def overriderollback(orig, ui, repo, **o'
1214 # content of standin is not so important in 'a',
1217 # content of standin is not so important in 'a',
1215 # 'm' or 'n' (coming from the 2nd parent) cases
1218 # 'm' or 'n' (coming from the 2nd parent) cases
1216 lfutil.writestandin(repo, f, '', False)
1219 lfutil.writestandin(repo, f, '', False)
1220 for standin in orphans:
1221 repo.wvfs.unlinkpath(standin, ignoremissing=True)
1217
1222
1218 lfdirstate = lfutil.openlfdirstate(ui, repo)
1223 lfdirstate = lfutil.openlfdirstate(ui, repo)
1219 orphans = set(lfdirstate)
1224 orphans = set(lfdirstate)
@@ -140,6 +140,8 b' Test that "hg rollback" restores status '
140
140
141 $ hg status -A largeY
141 $ hg status -A largeY
142 ? largeY
142 ? largeY
143 $ test -f .hglf/largeY
144 [1]
143
145
144 Test that "hg rollback" restores standins correctly
146 Test that "hg rollback" restores standins correctly
145
147
General Comments 0
You need to be logged in to leave comments. Login now