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

svn repo being pulled twice #7

Open
hmoffatt opened this issue Aug 4, 2016 · 1 comment
Open

svn repo being pulled twice #7

hmoffatt opened this issue Aug 4, 2016 · 1 comment

Comments

@hmoffatt
Copy link

hmoffatt commented Aug 4, 2016

I've added svn-npm-crutch to my dependencies, and added an svnDependencies section to package.json. The svn-npm-crutch hook has been added to the install script automatically.

Now if I run "npm install" again to refresh things, the SVN repo is fetched twice.

In the output I see:

$ npm install

> svn-npm-crutch@0.5.4 install /home/hamish/.../node_modules/svn-npm-crutch
> node scripts/install.js

svn-crutch Installing foo from svn...
[...]
Checked out revision 14433.
svn-crutch Cleaning up svn repo foo...
Updating '.':
At revision 14433.
svn-crutch Making sure foo is up to date...
Updating '.':
At revision 14433.
svn-crutch Cleaning up svn repo foo...
Updating '.':
At revision 14433.
svn-crutch Running `npm install` on foo...
svn-crutch Successfully installed 
svn-crutch 
svn-crutch ============================================
svn-crutch     Finished installing svn dependencies
svn-crutch ============================================

> rising-software@1.0.0 install /home/hamish/dev/...
> node ./node_modules/svn-npm-crutch/lib/svn-npm-crutch.js

svn-crutch Installing foo from svn...

and then it all gets done again.

Further, is it possible to update the checkout rather than fetching it from scratch? My module is big and the server is remote, so I'd rather not fetch it every time if it hasn't changed.

@jtrussell
Copy link
Owner

Hmm, I'm not certain why you're seeing double installs. I'd certainly be open to a PR that corrects this issue and perhaps one that performs an update instead of a full checkout each time if the dep already exists. A quick look back at the source though reveals this little gem: https://github.com/jtrussell/svn-npm-crutch/blob/master/lib/svn-npm-crutch.js#L50-L61 which maybe suggests why svn updates might be difficult.

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

No branches or pull requests

2 participants