Show More
@@ -1147,9 +1147,13 b' def overriderollback(orig, ui, repo, **o' | |||||
1147 | partial=lfutil.isstandin) |
|
1147 | partial=lfutil.isstandin) | |
1148 |
|
1148 | |||
1149 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
1149 | lfdirstate = lfutil.openlfdirstate(ui, repo) | |
|
1150 | orphans = set(lfdirstate) | |||
1150 | lfiles = lfutil.listlfiles(repo) |
|
1151 | lfiles = lfutil.listlfiles(repo) | |
1151 | for file in lfiles: |
|
1152 | for file in lfiles: | |
1152 | lfutil.synclfdirstate(repo, lfdirstate, file, True) |
|
1153 | lfutil.synclfdirstate(repo, lfdirstate, file, True) | |
|
1154 | orphans.discard(file) | |||
|
1155 | for lfile in orphans: | |||
|
1156 | lfdirstate.drop(lfile) | |||
1153 | lfdirstate.write() |
|
1157 | lfdirstate.write() | |
1154 | finally: |
|
1158 | finally: | |
1155 | wlock.release() |
|
1159 | wlock.release() |
@@ -107,12 +107,16 b' Test that "hg rollback" restores status ' | |||||
107 | $ echo largeX > largeX |
|
107 | $ echo largeX > largeX | |
108 | $ hg add --large largeX |
|
108 | $ hg add --large largeX | |
109 | $ hg commit -m 'will be rollback-ed soon' |
|
109 | $ hg commit -m 'will be rollback-ed soon' | |
|
110 | $ echo largeY > largeY | |||
|
111 | $ hg add --large largeY | |||
110 | $ hg status -A large1 |
|
112 | $ hg status -A large1 | |
111 | large1: No such file or directory |
|
113 | large1: No such file or directory | |
112 | $ hg status -A large2 |
|
114 | $ hg status -A large2 | |
113 | ? large2 |
|
115 | ? large2 | |
114 | $ hg status -A largeX |
|
116 | $ hg status -A largeX | |
115 | C largeX |
|
117 | C largeX | |
|
118 | $ hg status -A largeY | |||
|
119 | A largeY | |||
116 | $ hg rollback |
|
120 | $ hg rollback | |
117 | repository tip rolled back to revision 3 (undo commit) |
|
121 | repository tip rolled back to revision 3 (undo commit) | |
118 | working directory now based on revision 3 |
|
122 | working directory now based on revision 3 | |
@@ -122,5 +126,7 b' Test that "hg rollback" restores status ' | |||||
122 | R large2 |
|
126 | R large2 | |
123 | $ hg status -A largeX |
|
127 | $ hg status -A largeX | |
124 | A largeX |
|
128 | A largeX | |
|
129 | $ hg status -A largeY | |||
|
130 | ? largeY | |||
125 |
|
131 | |||
126 |
$ |
|
132 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now