Commit 322db54a authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Squash: honouring squash_in_progress?

This works with the same principle as rebase_in_progress?,
see parent commit.

--HG--
branch : heptapod
parent d7a0e368784b
......@@ -501,7 +501,7 @@ def squash(user, squash_id, branch:, start_sha:, end_sha:, author:, message:)
end_hgsha = hgsha_from_sha(end_sha)
username = hg_prepare_user_encoding(hg_env, author, message)
hg_tmp_workdir(nil) do |share_path|
hg_tmp_workdir(nil, prefix: "squash-#{squash_id}") do |share_path|
# TODO: gracinet not 100% sure we need a workdir, but I don't see
# an explicit "inmemory" option as there is for `hg rebase`
......@@ -553,7 +553,7 @@ def squash(user, squash_id, branch:, start_sha:, end_sha:, author:, message:)
# Actually at this point, reading the resulting changeset is not,
# but it doesn't matter much: there's no risk of repo corruption.
def squash_in_progress?(squash_id)
false
has_tmp_workdir?("squash-#{squash_id}")
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment