repository

Cloning Android sources to a local repository server

主宰稳场 提交于 2019-11-28 18:21:34
I want to develop on top of Android using a local Android repository server. I need to add several new git repositories to the hierarchy of gits, and I need to modify existing android sources for a custom tailoring of Android. What is the "correct" way to clone the entire Android source tree of git repositories, such that I can push/pull to/from a common local repository server, and still easily pull new changes from Android upstream? I am specifically looking for advice on how to use the repo script for interaction with my own server, and how to set up the manifest git repository and managing

Subversion revision number across multiple projects

ぐ巨炮叔叔 提交于 2019-11-28 18:18:39
When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names): /NinjaProg/branches /tags /trunk /StealthApp/branches /tags /trunk /SnailApp/branches /tags /trunk When I perform a commit to the trunk of the Ninja Program, let's say I get that it has been updated to revision 7. The next day let's say that I make a small change to the Stealth Application and it comes back as revision 8. The question is this: Is it common accepted practice to,

git - Is it possible to exclude file from `git push`, but keep them in the local repository?

筅森魡賤 提交于 2019-11-28 17:50:56
In my home directory I have files in a local git repository, because I want track them all under version control. Most of these files I want to push to a remote repository, but a few I want to keep in my local repository only (they contain mildly sensitive information). How can I achieve this with git? Can I configure a " .gitignore-for-push " file? I cannot use the local .gitignore file, because it would exclude these files completely from being tracked. ps: I am aware of question Is there an exclude file-equivalent... , but the answer goes down the .gitignore path which I cannot use. The

How to Link 1 git repository to some other repositories?

大城市里の小女人 提交于 2019-11-28 17:33:48
How to Link 1 git repository to some other repositories ? Assume I have following repositories : /var/Common.git /var/Project1.git /var/Project2.git Now, I want to use Common.git in other repositories. how can I do it ? You're probably looking for submodules : Submodules allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a particular commit. A key word there is embedded : an actual clone of Common.git would be embedded inside each of the other projects. This is generally good for when you're not going to modify it inside the other

How can I log all entities change, during .SaveChanges() using EF code first?

こ雲淡風輕ζ 提交于 2019-11-28 17:31:57
I'm using EF code first . I'm using a base Repository for all my repositories and an IUnitofWork that inject to the repositories, too: public interface IUnitOfWork : IDisposable { IDbSet<TEntity> Set<TEntity>() where TEntity : class; int SaveChanges(); } public class BaseRepository<T> where T : class { protected readonly DbContext _dbContext; protected readonly IDbSet<T> _dbSet; public BaseRepository(IUnitOfWork uow) { _dbContext = (DbContext)uow; _dbSet = uow.Set<T>(); } //other methods } e.g my OrderRepository is like this: class OrderRepository: BaseRepository<Order> { IUnitOfWork _uow;

Install a local R package with dependencies from CRAN mirror

限于喜欢 提交于 2019-11-28 17:25:40
I have built an R package, i.e. I have the mypackage.tar.gz file. This package depends on several other packages, all downloadable and installable from any CRAN mirror. Now I want to install this package on a system where the dependencies are not yet installed, and I would like that the dependencies will be downloaded and installed automatically when I install my package. I tried: install.packages("mypackage.tar.gz",type="source",dependencies=TRUE,repos="http://a.cran.mirror") but it searches for mypackage.tar.gz on the mirror (and obviously it does not find), while if I set repos=NULL it

Specification Pattern in Domain Driven Design

坚强是说给别人听的谎言 提交于 2019-11-28 17:05:15
I've been struggling around an DDD related issue with Specifications and I've read much into DDD and specifications and repositories. However, there is an issue if trying to combine all 3 of these without breaking the domain driven design. It boils down to how to apply filters with performance in mind. First a few obvious facts: Repositories to got DataAccess/Infrastructure Layer Domain Models represent Business Logic and go to the Domain layer Data Access Models represent Persistence layer and go to the Persistance/Infrastructure/DataAccess layer Business Logic goes to Domain Layer

Repository pattern with Entity framework

我是研究僧i 提交于 2019-11-28 16:25:26
Repository pattern is used to abstract from particular database and object-relation-mapping technology(like EF) used. So I can easily replace (for example) my Entity framework mappings with Linq to SQL in the future if I decide to do so. But when I use EF I have my entity classes from the model - that is they are generated from that visual diagram. If I use this generated entity classes in my repository and then decide to replace EF by something else then I will delete that visual entity diagram and that means also to delete classes right ? The point I'm addressing is that my repository will

Generic repository - IRepository<T> or IRepository

倖福魔咒の 提交于 2019-11-28 16:22:47
I have seen two different approaches for creating generic repositories. What are differences between those two approaches (pros and cons) ? Please diregard difference in the methods because I am interested in difference between public interface IRepository<T> where T : class and public interface IRepository : IDisposable Is there any difference in functionality, flexibility, unit testing ... ? What will I get or lose ? Is there any difference how they are registered in Dependency Injection frameworks ? Option 1 public interface IRepository<T> where T : class { T Get(object id); void Attach(T

Automatically keep a secondary repo in sync with a primary repo?

╄→гoц情女王★ 提交于 2019-11-28 16:20:03
问题 We have a two tier setup. We have a primary repository (called 'primary' below). And a secondary repository (called 'secondary' below) that was created like so: $ git clone --bare --shared $REPO_A/primary secondary.git People working on the secondary repository view the branches which originated from the primary repository as read only but base their own branches off these branches. We want to sync up the secondary repository with the primary repository once a day. I.e. we want commits and