Git Your Web Reference
-
I don't know what the "yours/theirs" thing is. Can you explain?
If you think 'goto' is evil, try writing an Assembly program without JMP.
Most git clients allow you to resolve conflicts by either replacing the remote copy with your local one (resolve using yours) or to ignore your local copy and use the remote copy (resolve using theirs).
-
Most git clients allow you to resolve conflicts by either replacing the remote copy with your local one (resolve using yours) or to ignore your local copy and use the remote copy (resolve using theirs).
-
We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?
If you think 'goto' is evil, try writing an Assembly program without JMP.
TNCaver wrote:
they have both sandbox and production environments, and the WSDL for each are different.
Sounds like a poor design. The WSDL should be the same for both; you should just need to change the endpoint in the config file to switch between environments. As it stands, you've got two completely different services. There's no guarantee that code written against one version will work against the other.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?
If you think 'goto' is evil, try writing an Assembly program without JMP.
I can recommend this user friendly Git client (for Windows and Mac): https://www.slant.co/topics/2089/viewpoints/21/~git-clients-for-windows~fork[^]
-
TNCaver wrote:
they have both sandbox and production environments, and the WSDL for each are different.
Sounds like a poor design. The WSDL should be the same for both; you should just need to change the endpoint in the config file to switch between environments. As it stands, you've got two completely different services. There's no guarantee that code written against one version will work against the other.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
:thumbsup:
Wrong is evil and must be defeated. - Jeff Ello
-
TNCaver wrote:
they have both sandbox and production environments, and the WSDL for each are different.
Sounds like a poor design. The WSDL should be the same for both; you should just need to change the endpoint in the config file to switch between environments. As it stands, you've got two completely different services. There's no guarantee that code written against one version will work against the other.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
It may be poor design, I don't know. It's Salesforce, and I've been impressed by the design behind most of their stuff. It's not perfect, but it's very clever. The differences are only in the user-customized pieces, and in the endpoint URL embedded in the WSDL.
If you think 'goto' is evil, try writing an Assembly program without JMP.
-
We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?
If you think 'goto' is evil, try writing an Assembly program without JMP.
-
We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?
If you think 'goto' is evil, try writing an Assembly program without JMP.
One solution might be a submodule. Git submodules are versioned, so a branch can point at a specific version of the submodule (or, better yet, a specific branch or tag). You could have your wsdl code in a submodule which you reference from the main repo. The dev branch references the submodule commit with the dev wsdl and the prod branch references the submodule commit with the live wsdl. When merging from dev into master, you could ignore the submodule (ie, use the "take mine" approach mentioned elsewhere in this thread). The advantage is that it's really easy to see which wsdl you're using, especially if you use branches, because a "git branch" in the submodule folder could show you, for instance: * production development (meaning you have the production branch of the wsdl) -- in this way, you don't have to manually check the contents of the file, just that you're pointing at the correct branch.
-
We use a 3rd party web API that supplies a WSDL downloaded and set as a web reference in our .NET app, which is, itself, an internal web API compiled to a DLL. Like most good service providers, they have both sandbox and production environments, and the WSDL for each are different. Our Git repo maintains at least two branches, dev and master, which naturally map to the 3rd party's sandbox and production. We want these included in the Git repo so that the proper web reference is checked out with the associated branch. But this causes Git to whine about differences in the web reference files when we merge new changes from dev into master. Is there a simple solution to this?
If you think 'goto' is evil, try writing an Assembly program without JMP.
This post discusses using the "lock" command of git lfs. lock the master branch with the production version. [TFS 2017 using Git, lock specific files and folders? : git](https://www.reddit.com/r/git/comments/7x11sl/tfs\_2017\_using\_git\_lock\_specific\_files\_and\_folders/)
-
You could use a post-checkout hook to make sure the appropriate DLL based on the branch name is copied in from an external location. I've never tried it but can't see why it wouldn't work?