w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
SharpSVN with Windows Authentication in ASP.NET MVC 4 Web App
Look into identity inpersonation this will let you run each windows authenticated user in a thread under that user account. This will mean, that your clients must use machines that belong to the same AD domain as the Web server and as the SVN server.

Categories : Asp Net Mvc

SharpSVN update to specific revision c#
You were on the right track. The revision number can be passed in via the SvnUpdateArgs object: SvnUpdateResult result; SvnUpdateArgs args = new SvnUpdateArgs(); // If args.Revision is not set, it defaults to fetch the HEAD revision. if (revision > 0) { args.Revision = revision; } // Perform the update using (SvnClient client = GetClient()) { client.Update(localPath, args, out result); }

Categories : C#

Save locally SVN authentication credentials with SharpSVN
I found the answer! For save credentials in the computer in use using (SvnClient client = new SvnClient()) { //Save localy new Authentication credentials client.Authentication.UserNamePasswordHandlers += delegate(object obj, SharpSvn.Security.SvnUserNamePasswordEventArgs args) { args.UserName = "username"; args.Password = "password"; args.Save= true; }; } Frequently I found the solution to add credentials in cache, but this will not store credentials in computer. This credentials are valid only for SvnClient life. I report the answer for completeness using (SvnClient client = new SvnClient()) { // Clear a previous authentication client.Authentication.Clear(); client.Authentication.DefaultCredentials = new System.Net.NetworkCrede

Categories : C#

SharpSVN - Server certificate verification failed
OK. I solved this problem and now I get an other error. What you need to do is this: client.Authentication.SslServerTrustHandlers += new EventHandler<SharpSvn.Security.SvnSslServerTrustEventArgs>(Authentication_SslServerTrustHandlers); void Authentication_SslServerTrustHandlers(object sender, SharpSvn.Security.SvnSslServerTrustEventArgs e) { // Look at the rest of the arguments of E, whether you wish to accept // If accept: e.AcceptedFailures = e.Failures; e.Save = true; // Save acceptance to authentication store }

Categories : C#

Delete local SVN authentication credentials with SharpSVN
The solution I have found is: using (SvnClient client = new SvnClient()) { //delete all Svn Authentication credential stored in the computer foreach (var svnAuthenticationCacheItem in client.Authentication.GetCachedItems(SvnAuthenticationCacheType.UserNamePassword)) { svnAuthenticationCacheItem.Delete(); } } This solution delete all SVN credentials data stored. The svnAuthenticationCacheItem has a lot of information about credential stored in computer. I found idea for the solution here: http://sharpsvn.open.collab.net/ds/viewMessage.do?dsForumId=728&viewType=browseAll&dsMessageId=319851 I hope this could help someone

Categories : C#

How to get revision date time using sharpsvn (working copy)
Have you tried using the SvnClient class? There's a couple of options you have with that: Firstly: How to get latest revision number from SharpSVN? or this: using (SvnClient client = new SvnClient()) { Collection<SvnLogEventArgs> logEventArgs; SvnLogArgs logArgs = new SvnLogArgs { Limit = 1 }; client.GetLog(target, logArgs, out logEventArgs); DateTime revisionTime = logEventArgs[0].Time; }

Categories : C#

SharpSVN: GetList command ommits Uris if filtered by revision
The .RepositoryRoot value is not really provided by the Subversion api. SharpSvn knows that in most cases it can be calculated from the first output value of the list argument, except in this specific situation where you pass an operative revision. Note the difference between svn list URL -r 123 and svn list URL@123. The first looks at URL as it is known in the head revision and traces its origin back to revision 123 in which it might have existed under a different name. The second one checks what was at URL in revision 123. (When in doubt, you most likely want the second form... See the subversion book for details) This second form is handled as SvnClient.List(new SvnUriTarget(uri, pegrev), ...) and there the calculation works. The Uri is then formed by combining the knowledge from Rep

Categories : C#

How to clean up my git repositories
You need to specify --squash for git merge. See this and this answer for more info.

Categories : GIT

Laravel Repositories
Repositories, like in the provided tutorial, aren't necessary a Laravel concept. Rather, they're a form of IoC injection that is possible with Laravel. Any object that might similarly be injected doesn't mean it's a repository. See the video for a good example from Taylor Otwell, which happens to use a "repository" as well: http://vimeo.com/53029232. In this example, the repository abstracts where the data came from that is passed to the controller. As long as the data passed implements the specified interface, the controller can "blissfully" make use of the interface's defined methods without worry about where the data initially came from. This allows switching the initial source of the data without breaking your controller. You could pull the data from a file, a database, an outside AP

Categories : PHP

Git - multiple repositories?
You can simply define an alias to do this: git config alias.pusheverywhere "!git push github && git push bitbucket && git push production" The && in the command is logical AND, so the command on the right side of it will only execute if the command on the left side succeeds without errors.

Categories : GIT

After putting some git repositories into another, git does not track changes any more
My workaround (basically I re-did it) The real cause of the problem is still unclear. First of all do the composer installation (I am using magento-composer-installer) using the deploy strategy copy - otherwise it would create lots of symlinks. Now copy everything But remove the .git Do a new git init Also remove the vendor/ folder - I do not need it in this specific case of mine not any more git add / git commit

Categories : GIT

SCM-Manager: importing own repositories
Importing your existing repositories is very easy. SCM-Manager stores them into the .scm path that is located in the home directory of the running user. If you are under windows copy your repository files to .scm epositoriessvn After this, start your SCM-Manager server and click on "Import repositories" at the left menu. Activate the checkbox for svn repositories. The new repositories will be displayed immediately.

Categories : Svn

How to combining similar git repositories?
You would need to have each "folder" in its own repository (at least each independant folder). Then you use the concept of submodules ( http://git-scm.com/book/en/Git-Tools-Submodules ) "modules" repository : RepoA, RepoB, RepoC, RepoD "project" repository, using git submodule : Team1, Team 2 If you look at the url I provided, workflow is described.

Categories : GIT

How to sync two repositories with one project
Command to dump the modified repository svnadmin dump originalPath -r98:103 --incremental > dumpfile Command to change the owner of files in the new repository chown -R user path/* Command to change read / write permission chmod -R 664 path/* Command to load the modifications into the new repository svnadmin load path < dumpfile The above steps allow the two repositories to be put in sync.

Categories : Svn

How do I show more 'recent repositories' in Git GUI?
You are nearly there. You have found the place to cause git-gui to record more than 10 previously opened repositories. However, the text widget used to show the list of repositories is only 10 lines high - so if you change that as well at line 151 you will get to both record and see them. Here is a patch that lets you set gui.maxrecentrepo and will fix the maximum number of recent repositories to this value (defaulting to 10): diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl index 657f7d5..c8d8517 100644 --- a/lib/choose_repository.tcl +++ b/lib/choose_repository.tcl @@ -24,6 +24,10 @@ field sorted_recent ; # recent repositories (sorted) constructor pick {} { global M1T M1B use_ttk NS + if {[set maxrecent [get_config gui.maxrecentrepo]] eq {}} { +

Categories : GIT

Created repositories with svn 1.8 have format 5 instead of 6
See the question and answer http://serverfault.com/questions/277441/difference-between-the-format-and-db-format-files-in-a-subversion-repository, that explains the difference between repository format and file system format in great detail. When you look at test6/format, you see there the repository format, you should look at test6/db/format to see the file system format you expect. There, it should be number 6.

Categories : Svn

SharpRepository - Join Between Two Repositories
There is a Join method on the repository that is similar to a LINQ Join statement and will let you join one IRepository<> with another IRepository<>. You pass it an IRepository<> to join with, an inner key selector, an outer key selector and a result selector. You can look here for an integration test that uses it: https://github.com/SharpRepository/SharpRepository/blob/master/SharpRepository.Tests.Integration/RepositoryJoinTests.cs The result of this call is another repository that you can then call GetAll, or FindAll, etc. on just like it was a normal IRepository<> itself. So I think you'll want to do something like this: var accountUserRepo = new AccountUserRepository(); var userRepo = new UserRepository(); // join on the UserId column that is common to both, and selec

Categories : C#

Inject repositories into service?
You could use a dependency injector as Ninject and inject parameter trough contructor Your NinjectModule public class NinjectModule : NinjectModule { public override void Load() { this.Bind<ICategoryRepositoryEF>().To<CategoryRepositoryEF>(); this.Bind<ICategoryRepositoryNH >().To<CategoryRepositoryNH>(); this.Bind<ICategoryService >().To<CategoryService>(); } } Inject dependencies var kernel = new StandardKernel(new NinjectModule()); var categoryService = kernel.Get<ICategoryService>(); This is just an example but take into account that dependencies should be injected on the composition root (entry point) of the application.

Categories : Asp Net Mvc

why kernel repositories' tags are different
Kernels move from "prepatch" to "mainline" to "stable" as described in https://www.kernel.org/releases.html. Another helpful link is https://www.kernel.org/doc/Documentation/development-process/2.Process. The prepatch (3.X-rc) and mainline (3.X) tags are in the "torvalds" repository maintained by Linus Torvalds himself. The "stable" (3.X.Y) and "longterm" (3.X.Y) tags are in the "stable" repository, maintained by desginated maintainers. The Torvalds "mainline" repository represents the latest patches and fixes. Kernel versions that pass some degree of testing are moved to the "stable" repository and tagged. Afterwards, bug fixes are sometimes backported from mainline versions to tagged "stable" versions.

Categories : GIT

ASP.NET MVC, Layers, Models, Repositories etc
Views and Controllers should reside in the presentation layer. Your models should also reside in the presentation layer. Models reflect a view model that is used for presentation only. Entities should represent data and should not be sent to the View. In the presentation later, the models should be populated from the entities. You are correct in that your DbContext and UnitOfWork should be in the data layer.

Categories : Asp Net Mvc

How to remove repositories from Effective POM
The "Effective POM" is what Maven constructs when it parses your project. It's composed of your POM and its (grand)parent POMs. The Effective POM does not exist on your filesystem per se, it's generated on-the-fly whenever your run a Maven build - hence why the view is "read-only". In other words - you haven't added those repositories to your Effective POM, but to one of your project's ancestor POMs, or one of the settings.xml files resolved by mvn and/or Eclipse. Remove those entries from there and your problem will be solved.

Categories : Eclipse

What is the best way to inject repositories into an ASP.NET controller
By far my favorite method is: public class MyController : Controller { public IMyRepository MyRepos {get;set;} public MyController(IMyRepository repo) { MyRepos = repo; } } So you can use a NuGet package, such as Ninject.MVC3 (or MVC4) which has specific support for including the Ninject kernel inside the MVC's own IoC classes https://github.com/ninject/ninject.web.mvc/wiki/MVC3 Once you have Ninject hooks in, you can let it do the work of injection instances into the controller's constructor, which I think is a lot cleaner. EDIT: Ahh, OK. Having read your question a bit more thoroughly, I see where you're going with this. In short, if you want to pick and choose which repo classes are instansiated then you will need to manually call, for example: var myRe

Categories : Asp Net Mvc

best way to synch two remote repositories in GIT
As @g19fanatic says, no need to keep changing the remote URL's. Just git pull <name of stash remote> git push <name of github remote> You need two separate remotes for this; add the second one if needed with git remote add

Categories : GIT

Base repository that all other repositories inherit
Could you not have a seperate class that handles the calling of the web service, which the repos could use? e.g. public class WebServiceCaller : IWebServiceCaller { private NetworkCredentials credentials { get; set; } public WebServiceCaller() { this.credentials = new NetworkCredentials("Name", "Password"); } // .. Whatever else you need. } Thus the repos would have this in their constructors: public RepoA(IWebServiceCaller caller) This way the responsibility of calling the webservice, and authenticating, is taken away from the repos altogether.

Categories : C#

Private Composer repositories in production, what is the best way to go?
I prefer to push code out to the server instead of having it fetch it. I typically use Capistrano for that (but there are many similar tools). Sometimes this just means copying the latest checkout, sometimes the process is customized with a build step in which necessary things are compiled, packaged or otherwise prepared for production. This way all you need is for your server to be accessible via SSH, all your repositories need only be accessible by your workstation which pushes the release.

Categories : PHP

execute repo command for some of the repositories
"repo help forall" answers your question: Usage: repo forall [<project>...] -c <command> [<arg>...] Simply list the project you want the command to be executed on before the command itself. Something like: repo forall project1 project2 -c git log -n 1 work for me.

Categories : GIT

Get list of repositories using gitweb for external use
No, from what I can see of the gitweb.cgi (from gitweb/gitweb.perl) implementation, there is no RPC API with JSON return messages. This is only visible through the web page.

Categories : Misc

Combining data from two repositories MVC4
First question you need to ask yourself is: Do I need those 2 repositories? Does it make sens in your domain definition to have both of them? Does Dwelling make sense without an Owner and vice versa? One of the DDD best practices is to limit one repository per aggregate root. Have a look at this SO question where someone was wondering if there was a need to build both User and Phone repostories. If you do need to have separate repositories then you might have to consider adding a Service layer on top of them. Please have a look at this SO answer where I answered someone how to decouple things (there's a Unit of Work pattern in this example but it doesn't matter)

Categories : Asp Net Mvc

How to tune EGit for large repositories?
increase the window cache limit to a larger value, it's defining the size of jgit's cache used to map pack files into memory do you run gc (either from egit or native git) on your repository ? JGit/EGit don't run it automatically (yet). YOu may check the number of loose object in EGit's repositories view (click "Properties" and select tab "Statistics") how many commits does your repository have (age in year doesn't say anything since it could have an age of 10 years with 2 commits or 2 mio commits) which OS / filesystem are you using ?

Categories : Misc

Does Gradle support classifiers for Ivy repositories?
Ivy does not support classifiers. See the syntax of Ivy patterns at the Ivy documentation: http://ant.apache.org/ivy/history/latest-milestone/concept.html#patterns Where did you get the Ivy definition of JOGL? If you made it yourself I would change the configurations to: <conf name="nativeRuntime32" .../> <conf name="nativeRuntime64" .../> <conf name="nativeRuntime" extends="nativeRuntime32,nativeRuntime64" .../> In Gradle you can than use configuration nativeRuntime32 to get the artifacts that you need. If you did not write the Ivy definition, you might consider asking the JOGL developers to add more flexible Ivy configurations so people can more easily select the artifacts they need.

Categories : Gradle

Alternative python package repositories
If you're asking for PyPI mirrors, there's an up-to-date list at http://www.pypi-mirrors.org. The primary mirrors are under python.org, but there are some under other domains. As of 7 Aug 2013 (in case you can't reach the mirrors site either) they are: pypi.crate.io pypi.douban.com pypi.hustunique.com From your edit, you ask: Can I mirror PyPI myself? Yes, you can. As the main mirrors page says: Use the bandersnatch mirroring client to set up your own mirror.

Categories : Python

Handling Go Git repositories and its non-code resources
I assume you are talking about web development. As you correctly noted, the directory structure is meant for the code, and the go tool suite only takes care of building binaries and putting them in a conventional place (pkg or bin). What you want is a complete deployment procedure for a binary + resource files. You should either roll your own deployment procedure, or use an existing framework. A sketch of a homemade procedure : put all the resources under a specific directory in your project (e.g. resources/) use git archive resources/ to bundle the files copy the files next to your executable choose a way to adjust the local parameters (db server, db name, etc..) choose a way to make to have your server reload the resources (restart your server / systematically re-read the resources

Categories : GIT

add history to git repository or merge git repositories
EDIT: my previous answer does not lead to nothing good. git rebase was not meant to do this. However, something similar already happened on stackoverflow: Merging two git repositories to obtain linear history You can try with this procedure: git init combined cd combined git remote add old url:/to/old git remote add new url:/to/new git remote update You will have a new repo, with references to both repos. then git reset --hard old/master This will make the master branch point to the master branch of the old repo. You can now cherry pick all commits from the master branch of new repo git cherry-pick <sha-1 of first commit on new repo>..new/master We are were we started: master branch is ok, but what about other branches in the new repo? Well, you do not need your old repo an

Categories : GIT

Merging multiple Git repositories with tags
Would it work to use --no-tags with: git fetch fork1 refs/tags/*:refs/tags/fork1/* --no-tags This would drop fork1's tags into refs/tags/fork1 without also dropping them in refs/tags.

Categories : GIT

What path should I place my bare git repositories?
No, there aren't. Put it wherever you want. For permissions, you need to make sure that everybody that should have permissions to use the repositories gets the permissions to do so. In your case that would mean that many persons will have access to the home directory of the git user. Also, you may change your os at some time in the future. In this case, to keep the urls valid, you will need to put the repositories at the same path as on the old system. That can lead to problems if you put the repositories to a location like /media/usbstick/repos. If you change the system the path may change to /mnt/usbstick/repos.

Categories : GIT

Is it okay for my Domain Objects to know about Repositories and ServiceLayer?
which should IMHO iterate through all items and summarice Item.GetPrice(). If you need a repository to go and fetch the Items separately, then it sounds like you might not have well defined aggregates. Ideally the Article and Offer aggregates should already have this information and be able to make the calculation without any external data. If there is a requirement for some external data (perhaps VAT rate for example) then this kind of behaviour ought to be encapsulated in a Domain Service. In this case, perhaps ArticlePriceCalculator and OfferPriceCalculator services. Update It seems as though your legacy database is bleeding into your domain. This is something that needs to be avoided. Keep the domain "pure" in terms of the ubiquitous language, do not allow the nature of the data

Categories : Entity Framework

Best practice using and merging external Git repositories
First off, your error has nothing to do with your merge. I never had such error and, without further context, this is the best I can find about it: git: can't push (unpacker error) You can't push to "server" (git has no server, really) due to history rewrites or if your history is older than the server. That's all. If you pulled from server, did a successful merge, then push, all "atomically" (nobody else touched the server), it will work just fine. So, if I were at your position, and I had that problem pushing, on starting over I would check what that issue is and move on. There's nothing wrong with your merging strategy. Also, avoid cherry-picking. From my experience that's usually a bad thing to do because it saves no reference where it came from (maybe there's a way I'm just un

Categories : GIT

Git workflow multiple repositories and rebasing(?)
It sounds to me like it would be better to 1) enable different configurations of the software and if that fails 2) use Git branches. I think it would be easier to maintain a single code base. Try to enable most of the differences as configurations based on configuration files or something similar. If you really need large and permanent differences in different versions of the code, use permanent Git branches, so that you can at least easily merge or cherry-pick features and patches between the branches.

Categories : GIT

Push multiple Git repositories to one repository
I suppose you are trying to implement SVN workflow but it is not possible with git. There are two suitable approaches: If your project is going to be loose coupled with your modules — use separate repository for your modules, and install it as a separate python packages (usual plugin system, like django plugins). Otherwise — use a single repository for project and modules.

Categories : GIT

Merge one common directory of two different repositories
If these folders don't share a common history in a single git repository (which from your description they do not) you should get a diff tool that supports folder comparison/merge (eg. Beyond Compare) and do the merge manually.

Categories : GIT



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.