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