hgext/drophack.py
changeset 1121 1a39b1b8e092
parent 1001 f7f4a1fac6c0
child 1210 1f8428096078
equal deleted inserted replaced
1120:9bc4857f573b 1121:1a39b1b8e092
   117             return 1
   117             return 1
   118         if repo.revs('. and %ld', revs):
   118         if repo.revs('. and %ld', revs):
   119             newrevs = repo.revs('max(::. - %ld)', revs)
   119             newrevs = repo.revs('max(::. - %ld)', revs)
   120             if newrevs:
   120             if newrevs:
   121                 assert len(newrevs) == 1
   121                 assert len(newrevs) == 1
   122                 newrev = newrevs[0]
   122                 newrev = newrevs.first()
   123             else:
   123             else:
   124                 newrev = -1
   124                 newrev = -1
   125             commands.update(ui, repo, newrev)
   125             commands.update(ui, repo, newrev)
   126             ui.status(_('working directory now at %s\n') % repo[newrev])
   126             ui.status(_('working directory now at %s\n') % repo[newrev])
   127         # get all markers and successors up to root
   127         # get all markers and successors up to root