Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Discard All and Pull' button #1020

Merged

Conversation

navn-r
Copy link
Collaborator

@navn-r navn-r commented Aug 29, 2021

This changes introduces a Pull from remote (Discard all) option to the Git Menu

image

Closes #860


This may lead into the enhancement of #998, specifically

where all pulls completely overwrote (and pruned) local files

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch MLH-Fellowship/jupyterlab-git/feat/discard-all-and-pull

src/model.ts Outdated Show resolved Hide resolved
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting this @navn-r

I left some comments

src/commandsAndMenu.tsx Outdated Show resolved Hide resolved
src/commandsAndMenu.tsx Outdated Show resolved Hide resolved
src/model.ts Outdated Show resolved Hide resolved
@navn-r navn-r requested a review from fcollonval August 30, 2021 12:29
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @navn-r I push a commit to fix missing menu items description for JLab >=3.1.

Other than that we should support that new feature as a fallback if the classical pull operation fails.

src/commandsAndMenu.tsx Show resolved Hide resolved
@navn-r navn-r force-pushed the feat/discard-all-and-pull branch from f772952 to 1b08af6 Compare September 11, 2021 21:41
@navn-r navn-r requested a review from fcollonval September 11, 2021 21:43
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing this (don't worry about the delay any help at any rate is welcomed).

I left some suggestions and it should be good to go.

Small note: for future contributions, I advice you to use a personal fork rather than the MLH one.

src/tokens.ts Outdated Show resolved Hide resolved
src/commandsAndMenu.tsx Outdated Show resolved Hide resolved
src/commandsAndMenu.tsx Show resolved Hide resolved
src/commandsAndMenu.tsx Outdated Show resolved Hide resolved
@navn-r navn-r requested a review from fcollonval September 12, 2021 22:21
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @navn-r I tested the latest version, we need to handle better the cases where the user cancel the discard dialog (see the review comments).

src/commandsAndMenu.tsx Outdated Show resolved Hide resolved
src/commandsAndMenu.tsx Outdated Show resolved Hide resolved
src/widgets/discardAllChanges.ts Outdated Show resolved Hide resolved
src/commandsAndMenu.tsx Outdated Show resolved Hide resolved
@fcollonval fcollonval force-pushed the feat/discard-all-and-pull branch from 1b6f5bd to e98368e Compare November 11, 2021 12:12
@fcollonval fcollonval dismissed their stale review November 11, 2021 12:21

Taking over the PR

@fcollonval fcollonval force-pushed the feat/discard-all-and-pull branch from aec26a4 to 6389e6e Compare November 11, 2021 12:23
@fcollonval fcollonval merged commit 7707fc2 into jupyterlab:master Nov 11, 2021
@fcollonval fcollonval deleted the feat/discard-all-and-pull branch November 11, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add 'Discard All and Pull' button
2 participants