Closed Bug 1669295 Opened 5 years ago Closed 1 year ago

moz-phab should be able to submit without updating the working directory

Categories

(Conduit :: moz-phab, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glob, Assigned: shtrom)

References

(Blocks 1 open bug)

Details

(Keywords: conduit-triaged)

Attachments

(11 files, 2 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

moz-phab should be able to submit without updating the working directory.

This will make submission much faster on large repositories such as mozilla-central.

Keywords: conduit-triaged
Priority: -- → P2

Found a workaround for me:

  1. create a temporary branch for the commit to upload. git branch -c tmp
  2. go into a different directory created with git-worktree and switch to the branch git switch tmp
  3. upload the patches in the other worktree with moz-phab

The files original worktree doesn't get touched and rebuild times stay low :)

Assignee: nobody → omehani
Status: NEW → ASSIGNED
Depends on: 1924627
No longer depends on: 1924627

Propagate this to gitcommand.output and git.git_out.

This allows to tailor the output of _get_commits_info for the purpose of
the caller.

Also, fix incorrect typehints for start and end.

This is probably a noop, but is good for consistency and may come in
handy if we want to change the order in which tests run.

This gives us a centralised way to rebuild the full commit message, should it be needed.

The repo implementations do the checkouts as needed.

We still need to checkout the latest commit to be on the correct branch,
but this should be a noop.

Attachment #9431751 - Attachment description: Bug 1669295 - test_integration_git: add pathlib.Path type hints (no bug) r?sheehan → test_integration_git: add pathlib.Path type hints (Bug 1669295) r?sheehan
Attachment #9431752 - Attachment description: Bug 1669295 - git/_get_commits_info: fix type hint (no bug) r?sheehan → gitt/_get_commits_info: fix type hint (Bug 1669295) r?sheehan
Attachment #9431753 - Attachment description: Bug 1669295 - test_integration_git: reset call_conduit_mock (no bug) r?sheehan → test_integration_git: reset call_conduit_mock (Bug 1669295) r?sheehan
Attachment #9431752 - Attachment description: gitt/_get_commits_info: fix type hint (Bug 1669295) r?sheehan → git/_get_commits_info: fix type hint (Bug 1669295) r?sheehan
Attachment #9431752 - Attachment description: git/_get_commits_info: fix type hint (Bug 1669295) r?sheehan → gitt/_get_commits_info: fix type hint (Bug 1669295) r?sheehan

This message format is specific for submission, and we don't necessarily
want it to be used more widely as a commit message.

Attachment #9431752 - Attachment description: gitt/_get_commits_info: fix type hint (Bug 1669295) r?sheehan → git/_get_commits_info: fix type hint (Bug 1669295) r?sheehan
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Regressions: 1926924

This step was removed from the main submit logic, as it was no longer
needed by git, and looked unecessary for hg. Not so!

When computing the diffs, the Hg logic seems to take into account the
current state of the working directory. This leads to incorrect diffs
for anything but the last commit of a stack.

Comment on attachment 9433216 [details]
mercurial: checkout target commit before get_diff (Bug 1669295) r?sheehan

Revision D226848 was moved to bug 1926924. Setting attachment 9433216 [details] to obsolete.

Attachment #9433216 - Attachment is obsolete: true

Comment on attachment 9433240 [details]
test_integration_hg: add regression test for diff generation without checkout (Bug 1669295) r?sheehan

Revision D226862 was moved to bug 1926924. Setting attachment 9433240 [details] to obsolete.

Attachment #9433240 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: