comparison hgext/mq.py @ 2699:f8bcaf5696d5

mq: strip should not blow away local changes This changes the mq strip command to abort if there are any changes in the working directory.
author Chris Mason <mason@suse.com>
date Thu, 27 Jul 2006 09:27:45 -0700
parents c1123e83c8e2
children ca97be5babf8
comparison
equal deleted inserted replaced
2698:c1123e83c8e2 2699:f8bcaf5696d5
528 # TODO delete the undo files, and handle undo of merge sets 528 # TODO delete the undo files, and handle undo of merge sets
529 pp = chlog.parents(rev) 529 pp = chlog.parents(rev)
530 revnum = chlog.rev(rev) 530 revnum = chlog.rev(rev)
531 531
532 if update: 532 if update:
533 (c, a, r, d, u) = repo.changes(None, None)
534 if c or a or d or r:
535 raise util.Abort(_("Local changes found"))
533 urev = self.qparents(repo, rev) 536 urev = self.qparents(repo, rev)
534 repo.update(urev, allow=False, force=True, wlock=wlock) 537 repo.update(urev, allow=False, force=True, wlock=wlock)
535 repo.dirstate.write() 538 repo.dirstate.write()
536 539
537 # save is a list of all the branches we are truncating away 540 # save is a list of all the branches we are truncating away