hgkw/keyword.py
changeset 992 df7e78af0d9f
parent 991 68475648cd7e
child 993 e50f10baa81a
equal deleted inserted replaced
990:ab082912af32 992:df7e78af0d9f
   588                 kwt.overwrite(self[n], sorted(ctx.added() + ctx.modified()),
   588                 kwt.overwrite(self[n], sorted(ctx.added() + ctx.modified()),
   589                               False, True)
   589                               False, True)
   590                 kwt.restrict = restrict
   590                 kwt.restrict = restrict
   591             return n
   591             return n
   592 
   592 
   593         def rollback(self, dryrun=False):
   593         def rollback(self, dryrun=False, force=False):
   594             wlock = self.wlock()
   594             wlock = self.wlock()
   595             try:
   595             try:
   596                 if not dryrun:
   596                 if not dryrun:
   597                     changed = self['.'].files()
   597                     changed = self['.'].files()
   598                 ret = super(kwrepo, self).rollback(dryrun)
   598                 ret = super(kwrepo, self).rollback(dryrun, force)
   599                 if not dryrun:
   599                 if not dryrun:
   600                     ctx = self['.']
   600                     ctx = self['.']
   601                     modified, added = _preselect(self[None].status(), changed)
   601                     modified, added = _preselect(self[None].status(), changed)
   602                     kwt.overwrite(ctx, modified, True, True)
   602                     kwt.overwrite(ctx, modified, True, True)
   603                     kwt.overwrite(ctx, added, True, False)
   603                     kwt.overwrite(ctx, added, True, False)