Show More
@@ -588,7 +588,7 b' def between(repo, old, new, keep):' | |||||
588 |
|
588 | |||
589 | When keep is false, the specified set can't have children.""" |
|
589 | When keep is false, the specified set can't have children.""" | |
590 | revs = list(repo.set('%n::%n', old, new)) |
|
590 | revs = list(repo.set('%n::%n', old, new)) | |
591 | if not keep and repo.revs('(%ld::) - %ld', revs, revs): |
|
591 | if not keep and repo.revs('(%ld::) - (%ld + hidden())', revs, revs): | |
592 | raise util.Abort(_('cannot edit history that would orphan nodes')) |
|
592 | raise util.Abort(_('cannot edit history that would orphan nodes')) | |
593 | return [c.node() for c in revs] |
|
593 | return [c.node() for c in revs] | |
594 |
|
594 |
@@ -92,3 +92,32 b' Enable obsolete' | |||||
92 | d2ae7f538514cd87c17547b0de4cea71fe1af9fb 0 {'date': '*', 'user': 'test'} (glob) |
|
92 | d2ae7f538514cd87c17547b0de4cea71fe1af9fb 0 {'date': '*', 'user': 'test'} (glob) | |
93 | 055a42cdd88768532f9cf79daa407fc8d138de9b ae467701c5006bf21ffcfdb555b3d6b63280b6b7 0 {'date': '*': 'test'} (glob) |
|
93 | 055a42cdd88768532f9cf79daa407fc8d138de9b ae467701c5006bf21ffcfdb555b3d6b63280b6b7 0 {'date': '*': 'test'} (glob) | |
94 | 177f92b773850b59254aa5e923436f921b55483b d36c0562f908c692f5204d606d4ff3537d41f1bf 0 {'date': '*', 'user': 'test'} (glob) |
|
94 | 177f92b773850b59254aa5e923436f921b55483b d36c0562f908c692f5204d606d4ff3537d41f1bf 0 {'date': '*', 'user': 'test'} (glob) | |
|
95 | ||||
|
96 | Ensure hidden revision does not prevent histedit | |||
|
97 | ------------------------------------------------- | |||
|
98 | ||||
|
99 | create an hidden revision | |||
|
100 | ||||
|
101 | $ cat > commands.txt <<EOF | |||
|
102 | > pick d36c0562f908 6 c | |||
|
103 | > drop ae467701c500 7 d | |||
|
104 | > pick 0efacef7cb48 8 f | |||
|
105 | > EOF | |||
|
106 | $ hg histedit 6 --commands commands.txt | |||
|
107 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |||
|
108 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
109 | $ hg log --graph | |||
|
110 | @ 9:7c044e3e33a9 f | |||
|
111 | | | |||
|
112 | o 6:d36c0562f908 c | |||
|
113 | | | |||
|
114 | o 0:cb9a9f314b8b a | |||
|
115 | ||||
|
116 | check hidden revision are ignored (6 have hidden children 7 and 8) | |||
|
117 | ||||
|
118 | $ cat > commands.txt <<EOF | |||
|
119 | > pick d36c0562f908 6 c | |||
|
120 | > pick 7c044e3e33a9 8 f | |||
|
121 | > EOF | |||
|
122 | $ hg histedit 6 --commands commands.txt | |||
|
123 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now