repository

Merging updated code from parallel Subversion repository

空扰寡人 提交于 2019-12-24 01:16:01
问题 I was wondering what steps people generally take when it comes to merging a live (continually updated) SVN respository with an offline one (updated less often), as an example, take my scenario: A while ago I downloaded the BugTracker.NET system when it was at version 3.2.3. I've subsequently make some enhancements to the code for our business. We develop these under source control using SVN. Meanwhile of course, the core BugTracker.NET code has continued to be developed. I basically want all

Check if entity implements interface and add predicate in generic repo

风流意气都作罢 提交于 2019-12-23 23:29:20
问题 Some of my entities have IEnabledEntity interface. I want to check in repository if entity implements interface then add some predicate. I have the following code: public class Repository<T> : IRepository<T> where T : class, IEntity, new() { public IQueryable<T> Get(Expression<Func<T, bool>> predicate, params string[] includes) IQueryable<T> query = Context.Set<T>(); foreach (var include in includes) { query = query.Include(include); } query = query.Where(predicate); var isEnabledEntity =

nhibernate: how to setup entity validation that uses data from database?

↘锁芯ラ 提交于 2019-12-23 22:27:03
问题 I've setup nhibernate but I have problems with validating entity before the actual save and commit to database. As I load and change persistent entity, validation that goes after is accessing the database and by doing so commiting the transaction, thus saving entity in database before the actual validation result is known. I use Repository pattern in .NET MVC web app and it goes like this: public ActionResult Edit(int id, Entity entity) { var repository = new EntityRepository(); // get

How do I keep GIT repositories inside Dropbox?

两盒软妹~` 提交于 2019-12-23 21:34:58
问题 So I've seen similar questions asked before, but I'm not thinking about pushing/pulling from a repo on Git's servers, this is just as a place to keep the repo locally on my machines. I'd still push/pull to GitHub. I know it can technically live wherever I want it to, but can anyone think of a reason this might end badly? I use Dropbox on a Mac, Windows system and a Linux server, if that makes a difference. 回答1: Saving a git repository on DropBox etc is not a good idea, and in general, you

Delete an unreferenced image from repository in Xcode

白昼怎懂夜的黑 提交于 2019-12-23 18:42:10
问题 I deleted default.png from my resources folder because I wanted a different image for the loading screen, but I just deleted the reference which was apparently a dumb thing to do. I dragged the new image into resources and tried to change the name to Default.png, but it won't let me, which I think is because the first Default.png is still in the repository somewhere. Anyway, how do I delete that image(and others with which I have probably done the same thing) from the repository when it is no

How to run Git commands on remote repository

僤鯓⒐⒋嵵緔 提交于 2019-12-23 17:32:54
问题 I am trying to code an simple PHP application which will retrieve some information from the remote Git repositories with terminal commands. I do not want to create a local working copy or repository. I only want to read information from remote repositories (browse tree, commit history, file diffs, download file), so it will be a read only connection. What I need to do is to run a series of simple commands like those in SVN: log, ls, diff, cat,.. I have allready done that for SVN and it was

Why can't I clone a git repo for readthedocs to build the documentation?

会有一股神秘感。 提交于 2019-12-23 17:24:36
问题 I'm trying to import my project code for readthedocs so that it can generate a documentation for me. However, at the stage of cloning the repo, there is already an error: checkout ----- Failed to import project; skipping build. Error ----- Failed to get code from 'http://mydomain/myproject.git' (git clone): 128 That error code indicates, that the repository is private, and I cannot access it without logging in, unless I have my SSH key that enables a secure connection between my computer and

Doctrine Query Builder nested orX and andX conditions with join

本秂侑毒 提交于 2019-12-23 14:02:56
问题 I have two entities User and CalendarEvent . My users are attached to a factory, and calendarEvent can be used to know if a user is "loaned" to a different factory of the one he belongs to... My two entities are like this : User : class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var string * @ORM\Column(name="firstname", type="string", length=255, nullable=true) */ private $firstname; /** * @var string *

Utility for downloading artifacts from maven repo without mvn/poms [closed]

寵の児 提交于 2019-12-23 13:32:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Is there a maven client that isn't mvn (the binary included with the maven distribution) I could use to pull down an artifact from a maven repository without using a pom? I'd like to use a maven repository as the repo for our ops team to pick up builds (including snapshots of builds) but I don't want them to

Unit testing LINQ to SQL CRUD operations using Moq

有些话、适合烂在心里 提交于 2019-12-23 13:04:52
问题 I've had a look around at other questions, but nothing really matches what I'm looking for... mainly because I'm not 100% certain on what it is I'm looking for! Basically I'm working on a new project at the moment, I've created my abstraction layer for DB entities and set the DAC to be repositories. I'm wanting to use unit testing for this with Mock objects, however I've hit a intellectual wall with CRUD (specifically C) operations, my unit test class: [TestClass] public class RepositoryTest