This will help us in plugging the use of state.cmdstate() to read rebasestate.
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG19076e2d62e7: rebase: refactor logic to read rebasestate in a separate function
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Queued, thanks.
f = repo.vfs("rebasestate") for i, l in enumerate(f.read().splitlines()): if i == 0:
- originalwd = repo[l].rev()
+ data['originalwd'] = repo[l].rev()
FWIW, I don't have any better idea to keep old hg not crash with new state
file, other than:
a. use separate file (e.g. "rebasestate2") and leave "rebasestate" in old
format (or make it an empty file to trigger error.)
b. abuse repo[l].rev() to abort with lookup error with somewhat descriptive
message.
Yeah, I was preventing this for a long time but feels like I can't anymore. How about having a .hg/state/ where we will have our new histedit and rebase state files?
b. abuse repo[l].rev() to abort with lookup error with somewhat descriptive
message.
This is more bad. Let's not do that.
> FWIW, I don't have any better idea to keep old hg not crash with new state > file, other than: > > a. use separate file (e.g. "rebasestate2") and leave "rebasestate" in old > format (or make it an empty file to trigger error.) Yeah, I was preventing this for a long time but feels like I can't anymore. How about having a `.hg/state/` where we will have our new histedit and rebase state files?
A separate directory wouldn't make the situation better. We can't stop writing
a v1 state file anyway since missing v1 state file means "no rebase in progress"
in old hg versions.