Skip to content

Conversation

@JohnstonCode
Copy link
Owner

This is currently a WIP

@codecov
Copy link

codecov bot commented Aug 10, 2018

Codecov Report

Merging #313 into master will decrease coverage by 1.68%.
The diff coverage is 26.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #313      +/-   ##
==========================================
- Coverage   60.65%   58.96%   -1.69%     
==========================================
  Files          38       44       +6     
  Lines        2613     2737     +124     
  Branches      478      487       +9     
==========================================
+ Hits         1585     1614      +29     
- Misses       1021     1116      +95     
  Partials        7        7
Impacted Files Coverage Δ
src/svn.ts 78.21% <ø> (ø) ⬆️
src/svnRepository.ts 51.9% <0%> (-1.64%) ⬇️
src/treeView/nodes/baseNode.ts 0% <0%> (ø)
src/extension.ts 73.52% <100%> (+1.22%) ⬆️
src/commands.ts 48.92% <16.66%> (-1.08%) ⬇️
src/treeView/nodes/incomingChangeNode.ts 19.04% <19.04%> (ø)
src/treeView/nodes/incomingChangesNode.ts 27.77% <27.77%> (ø)
src/treeView/nodes/repositoryNode.ts 27.77% <27.77%> (ø)
src/treeView/nodes/noIncomingChangesNode.ts 28.57% <28.57%> (ø)
src/treeView/dataProviders/svnProvider.ts 30.43% <30.43%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c79124e...58eaebe. Read the comment docs.

@JohnstonCode
Copy link
Owner Author

@edgardmessias can you have a look through. Got it working and hocked up to the status change event. Should i remove the remotechanged resource group?

@JohnstonCode
Copy link
Owner Author

I also need to do #312

@JohnstonCode
Copy link
Owner Author

Should also use regex for commands example

@edgardmessias
Copy link
Contributor

I will take a look

@edgardmessias
Copy link
Contributor

@JohnstonCode, for treeview, add support to folders of files

@JohnstonCode
Copy link
Owner Author

@edgardmessias i did run into issues with folders. How do we know what is a file and what is a folder if it is added. I didn't want to make more requests to query each type.

Do you have any ideas?

@edgardmessias
Copy link
Contributor

In getChildren() of incomingChangesNode.ts and incomingChangeNode.ts

Check the path.relative(folderPath, this.uri.fsPath), the folderPath start with this.repository.workspaceRoot.
Split using .split(/[\\/]/, 1)

Group changes by folder and update the folderPath with new part

@edgardmessias
Copy link
Contributor

For folder, create a new node type

@JohnstonCode
Copy link
Owner Author

@edgardmessias i see what you mean so have the elements nested in their folder?

But my questiong is if the incoming change is a folder how do you tell its a folder. For example

src/test/makefile vs src/test/folder

How do you work out whats a folder as you cant use fs.lstatSync as the changes only exist on remote.

@edgardmessias
Copy link
Contributor

Another single solution:
Edit the incomingChangeNode.ts with:

  get label() {
    return path.relative(this.repository.workspaceRoot, this.uri.fsPath);
  }

@edgardmessias
Copy link
Contributor

SVN return only file in this.repository.remoteChanged.resourceStates, to get the folder, split the relative path

@edgardmessias
Copy link
Contributor

Example: src/test/makefile, src/test/folder/a.txt, src/test/folder/b.txt

Generate:
(root)(IncomingChangesNode)

  • src (FolderChangesNode, path: src)
    • test (FolderChangesNode, path: src/test)
      • makefile (IncomingChangeNode)
      • folder (FolderChangesNode, path: src/test/folder)
        • a.txt (IncomingChangeNode)
        • b.txt (IncomingChangeNode)

@JohnstonCode
Copy link
Owner Author

I get you now. I’ll get that sorted tomorrow

@edgardmessias
Copy link
Contributor

Ok, first, merge the master branch and resolve the conflicts

@JohnstonCode
Copy link
Owner Author

@edgardmessias Changes have been made. Went with updating the label.

@JohnstonCode JohnstonCode changed the title Tree view incoming changes feat:Incoming changes shown in TreeView Aug 16, 2018
@JohnstonCode
Copy link
Owner Author

@edgardmessias ping!

@JohnstonCode
Copy link
Owner Author

JohnstonCode commented Aug 21, 2018

To-Do:

  • Fix "remoteChanged" typo
  • Remove remotechanged SourceControlResourceGroup

@JohnstonCode JohnstonCode merged commit 38b3f9e into master Aug 21, 2018
@JohnstonCode
Copy link
Owner Author

🎉 This PR is included in version 1.32.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@JohnstonCode JohnstonCode deleted the tree-view-incomming-changes branch August 21, 2018 17:53
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.

3 participants