Skip to content

Push pull fetch progress - #1238

Merged
joshaber merged 165 commits into
masterfrom
push-pull-fetch-progress
Apr 24, 2017
Merged

joshaber merged 165 commits into
masterfrom
push-pull-fetch-progress

Conversation

@niik

@niik niik commented Apr 20, 2017 •

Copy link
Copy Markdown
Member

Show progress for push pull and fetch.

Fetch

fetch

Pull

pull

Push

push

I've attempted to unify all our progress parsing under a shared scheme. All logic related to progress now resides under the lib/progress folder.

Fixes #953

if (behind > 0) { return 'Pull' }
if (ahead > 0) { return 'Push' }
return 'Update'
return 'Fetch'

This comment was marked as spam.

This comment was marked as spam.


.toolbar-button {
&.push-pull-button { min-width: 200px; }
&.push-pull-button { width: 230px; }

This comment was marked as spam.

@niik niik changed the title [WIP] Push pull fetch progress Push pull fetch progress Apr 21, 2017
@niik

niik commented Apr 21, 2017

Copy link
Copy Markdown
Member Author

This is ready for review 🎉

@joshaber joshaber self-assigned this Apr 24, 2017

@joshaber joshaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Really nice work 🍯 Just some nits.

Comment thread app/src/lib/app-state.ts

/** Is a push/pull/update in progress? */
readonly pushPullInProgress: boolean
readonly isPushPullFetchInProgress: boolean

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/lib/app-state.ts
readonly pushPullFetchProgress: Progress | null
}

export type Progress = IGenericProgress

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/lib/app-state.ts Outdated

/**
* Base interface containing all the properties that progress events
* needs to support.

This comment was marked as spam.

Comment thread app/src/lib/app-state.ts Outdated
}

/**
* An object describing the progression of a branch checkout operation

This comment was marked as spam.

const otherRemotes = (await getRemotes(repository))
.filter(r => r.name !== remote.name)

// Let's say that a pull takes twice as long as a fetch,

This comment was marked as spam.

import { GitProgressParser } from './git'

/**
* Highly approximate (some would say outright inaccurate) division

This comment was marked as spam.

*/
public constructor(steps: ReadonlyArray<IProgressStep>) {

if (!steps.length) {

This comment was marked as spam.

if (behind > 0) { return 'Pull' }
if (ahead > 0) { return 'Push' }
return 'Update'
return 'Fetch'

This comment was marked as spam.

@niik

niik commented Apr 24, 2017

Copy link
Copy Markdown
Member Author

🐨

@joshaber
joshaber merged commit 16b4264 into master Apr 24, 2017
@joshaber
joshaber deleted the push-pull-fetch-progress branch April 24, 2017 15:46
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.

2 participants