Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Add support for file request paging to Remote::FindParentById #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add support for file request paging to Remote::FindParentById #24

wants to merge 1 commit into from

Conversation

arolett2
Copy link

While issuing pull requests on a few of my directories I noticed that
I was missing files. Implement paging so pull requests on directories
that have more than 100 files work.

@rakyll
Copy link
Owner

rakyll commented Nov 20, 2014

We should have a better and interactive pagination strategy. We shouldn't stall if a directory contains too many children.

@arolett2
Copy link
Author

Thanks for taking a look!
So I understand are you suggesting a change to the user workflow (pull only operates on a set number of files unless you tell it otherwise ... and just warns you if there are too many files) or are you just talking about the internal API?

For the internal API flow are you imagining FindParentByIdFirst/Next/Close flow for the API?

For a pull request it seems like we need to know all of the files for changes.go so we can figure out what to sync down. But I see how we could improve things by processing the changes in batches. I'll take a look a bit later.

@rakyll
Copy link
Owner

rakyll commented Nov 24, 2014

Sorry for catching up so lately.

The more pleasant behavior is to have interactive cursoring, so the user can cancel on any time. But it will require some more work, will break some upcoming features as well. So, let's merge this PR first and I'll make improvements on the top this change.

return files, err
}
for _, f := range results.Items {
if !strings.HasPrefix(f.Title, ".") { // ignore hidden files
Copy link
Owner

Choose a reason for hiding this comment

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

There is a flag now that allows you not to ignore the hidden files. Could you honor that?

Copy link
Author

Choose a reason for hiding this comment

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

Changed.

While issuing pull requests on a few of my directories I noticed that
I was missing files. Implement paging so pull requests on directories
that have more than 100 files work.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants