Show More
@@ -149,6 +149,7 b' try:' | |||||
149 | pickle.dump # import now |
|
149 | pickle.dump # import now | |
150 | except ImportError: |
|
150 | except ImportError: | |
151 | import pickle |
|
151 | import pickle | |
|
152 | import errno | |||
152 | import os |
|
153 | import os | |
153 | import sys |
|
154 | import sys | |
154 |
|
155 | |||
@@ -761,7 +762,12 b' def writestate(repo, parentnode, rules, ' | |||||
761 | def readstate(repo): |
|
762 | def readstate(repo): | |
762 | """Returns a tuple of (parentnode, rules, keep, topmost, replacements). |
|
763 | """Returns a tuple of (parentnode, rules, keep, topmost, replacements). | |
763 | """ |
|
764 | """ | |
764 | fp = open(os.path.join(repo.path, 'histedit-state')) |
|
765 | try: | |
|
766 | fp = open(os.path.join(repo.path, 'histedit-state')) | |||
|
767 | except IOError, err: | |||
|
768 | if err.errno != errno.ENOENT: | |||
|
769 | raise | |||
|
770 | raise util.Abort(_('no histedit in progress')) | |||
765 | return pickle.load(fp) |
|
771 | return pickle.load(fp) | |
766 |
|
772 | |||
767 |
|
773 |
@@ -41,6 +41,16 b' Repo setup.' | |||||
41 | one |
|
41 | one | |
42 |
|
42 | |||
43 |
|
43 | |||
|
44 | histedit --continue/--abort with no existing state | |||
|
45 | -------------------------------------------------- | |||
|
46 | ||||
|
47 | $ hg histedit --continue | |||
|
48 | abort: no histedit in progress | |||
|
49 | [255] | |||
|
50 | $ hg histedit --abort | |||
|
51 | abort: no histedit in progress | |||
|
52 | [255] | |||
|
53 | ||||
44 | Run a dummy edit to make sure we get tip^^ correctly via revsingle. |
|
54 | Run a dummy edit to make sure we get tip^^ correctly via revsingle. | |
45 | -------------------------------------------------------------------- |
|
55 | -------------------------------------------------------------------- | |
46 |
|
56 |
General Comments 0
You need to be logged in to leave comments.
Login now