Show More
@@ -773,8 +773,6 b' def _dispatch(req):' | |||||
773 | repo = hg.repository(ui, path=path) |
|
773 | repo = hg.repository(ui, path=path) | |
774 | if not repo.local(): |
|
774 | if not repo.local(): | |
775 | raise util.Abort(_("repository '%s' is not local") % path) |
|
775 | raise util.Abort(_("repository '%s' is not local") % path) | |
776 | if options['hidden']: |
|
|||
777 | repo = repo.unfiltered() |
|
|||
778 | repo.ui.setconfig("bundle", "mainreporoot", repo.root) |
|
776 | repo.ui.setconfig("bundle", "mainreporoot", repo.root) | |
779 | except error.RequirementError: |
|
777 | except error.RequirementError: | |
780 | raise |
|
778 | raise | |
@@ -794,6 +792,8 b' def _dispatch(req):' | |||||
794 | raise |
|
792 | raise | |
795 | if repo: |
|
793 | if repo: | |
796 | ui = repo.ui |
|
794 | ui = repo.ui | |
|
795 | if options['hidden']: | |||
|
796 | repo = repo.unfiltered() | |||
797 | args.insert(0, repo) |
|
797 | args.insert(0, repo) | |
798 | elif rpath: |
|
798 | elif rpath: | |
799 | ui.warn(_("warning: --repository ignored\n")) |
|
799 | ui.warn(_("warning: --repository ignored\n")) |
@@ -262,6 +262,15 b' def phasecacheafterstrip(server):' | |||||
262 | # shouldn't raise "7966c8e3734d: no node!" |
|
262 | # shouldn't raise "7966c8e3734d: no node!" | |
263 | runcommand(server, ['branches']) |
|
263 | runcommand(server, ['branches']) | |
264 |
|
264 | |||
|
265 | def obsolete(server): | |||
|
266 | readchannel(server) | |||
|
267 | ||||
|
268 | runcommand(server, ['up', 'null']) | |||
|
269 | runcommand(server, ['phase', '-df', 'tip']) | |||
|
270 | os.system('hg debugobsolete `hg log -r tip --template {node}`') | |||
|
271 | runcommand(server, ['log', '--hidden']) | |||
|
272 | runcommand(server, ['log']) | |||
|
273 | ||||
265 | if __name__ == '__main__': |
|
274 | if __name__ == '__main__': | |
266 | os.system('hg init') |
|
275 | os.system('hg init') | |
267 |
|
276 | |||
@@ -285,3 +294,10 b" if __name__ == '__main__':" | |||||
285 | check(branch) |
|
294 | check(branch) | |
286 | check(hgignore) |
|
295 | check(hgignore) | |
287 | check(phasecacheafterstrip) |
|
296 | check(phasecacheafterstrip) | |
|
297 | obs = open('obs.py', 'w') | |||
|
298 | obs.write('import mercurial.obsolete\nmercurial.obsolete._enabled = True\n') | |||
|
299 | obs.close() | |||
|
300 | hgrc = open('.hg/hgrc', 'a') | |||
|
301 | hgrc.write('[extensions]\nobs=obs.py\n') | |||
|
302 | hgrc.close() | |||
|
303 | check(obsolete) |
@@ -191,3 +191,34 b' o 0:eff892de26ec' | |||||
191 | 5: public |
|
191 | 5: public | |
192 | runcommand branches |
|
192 | runcommand branches | |
193 | default 1:731265503d86 |
|
193 | default 1:731265503d86 | |
|
194 | ||||
|
195 | testing obsolete: | |||
|
196 | ||||
|
197 | runcommand up null | |||
|
198 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
199 | runcommand phase -df tip | |||
|
200 | runcommand log --hidden | |||
|
201 | changeset: 1:731265503d86 | |||
|
202 | tag: tip | |||
|
203 | user: test | |||
|
204 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
205 | summary: . | |||
|
206 | ||||
|
207 | changeset: 0:eff892de26ec | |||
|
208 | bookmark: bm1 | |||
|
209 | bookmark: bm2 | |||
|
210 | bookmark: bm3 | |||
|
211 | user: test | |||
|
212 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
213 | summary: 1 | |||
|
214 | ||||
|
215 | runcommand log | |||
|
216 | changeset: 0:eff892de26ec | |||
|
217 | bookmark: bm1 | |||
|
218 | bookmark: bm2 | |||
|
219 | bookmark: bm3 | |||
|
220 | tag: tip | |||
|
221 | user: test | |||
|
222 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
223 | summary: 1 | |||
|
224 |
General Comments 0
You need to be logged in to leave comments.
Login now