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

Recognize when local folder is pushed to team project #27

Closed
chrisdias opened this issue Jul 25, 2016 · 3 comments
Closed

Recognize when local folder is pushed to team project #27

chrisdias opened this issue Jul 25, 2016 · 3 comments

Comments

@chrisdias
Copy link
Member

The extension recognizes when a local git repository is also a remote repository in VSTS but it does not recognize when the folder becomes a remote repository unless I change a setting or reload VS Code.

Here's how to repro:

  • ensure you have your PAT set up
  • create a new folder, new file, and commit it to a git repo:
mkdir a1b2c3 
cd a1b2c3  
echo "VSTS Rocks" >> ./test.txt 
git init 
git add . 
git commit -m "initial commit" 
code .

-create a new team project in VSTS, which creates a corresponding git repository

  • in the terminal, push the local repository to VSTS (replacing XXXXX with the appropriate account and repo):
git remote add origin https://XXXXXX.visualstudio.com/DefaultCollection/_git/XXXXXX
git push -u origin --all

Result

In VS Code (regardless of the pollingInterval setting) the extension never recognizes that the repository is now in VSTS. If you change a setting (e.g. set pollingInterval = 1) then the extension reinitializes and the folder is recognized as a VSTS repo. Alternatively you can refresh VS Code which reloads the extension.

Expected

It would be ideal for the extension to automatically recognize that the repository is now in VSTS. I expected that when the extension polled it would figure this out. Ideally it is instant and I don't have to wait 1-5 min. Perhaps you can have a file watcher for a .git folder.

@jeffyoung
Copy link
Contributor

Thanks for trying this out! I'll find some time to investigate and see what I can do. I'm using a filewatcher already on HEAD to re-initialize when the branch is changed in the VS Code UI (via the dropdown in the lower-left corner), so maybe I can do something similar here.

jeffyoung pushed a commit that referenced this issue Jul 28, 2016
#27 Fix the issue where the extension wouldn't detect that a local repository, after being pushed to Team Services, and not initialize until VS Code was restarted.
jeffyoung pushed a commit that referenced this issue Jul 28, 2016
#27 Fix the issue where the extension wouldn't detect that a local repository, after being pushed to Team Services, and not initialize until VS Code was restarted.
@jeffyoung
Copy link
Contributor

I pushed the changes needed for this functionality in release 104. Please let me know if you have issues with this scenario again. Thanks @chrisdias

@chrisdias
Copy link
Member Author

looks good!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants