%PDF- %PDF-
Direktori : /proc/985914/root/data/old/home/stash/atlassian-stash/static/model/ |
Current File : //proc/985914/root/data/old/home/stash/atlassian-stash/static/model/file-change-min.js |
define("model/file-change",["backbone-brace","model/commit-range","model/conflict","model/file-change-types","model/path","model/repository"],function(C,B,G,E,D,A){var F=C.Model.extend({namedAttributes:{repository:A,commitRange:B,srcPath:D,path:D,type:null,nodeType:null,conflict:G,diff:null,srcExecutable:null,executable:null},initialize:function(){this.setType(F._mapChangeType(this.getType(),this.getSrcPath(),this.getPath()))}},{fromDiff:function(I,H,L){var K;var J=I.hunks[0];if(J){if(J.sourceLine===0){K=E.ADD}else{if(J.destinationLine===0){K=E.DELETE}else{K=E.MODIFY}}}return new F({repository:L,commitRange:H,srcPath:I.source,path:I.destination,diff:I,type:K})},_mapChangeType:function(H,J,I){return(H===E.MOVE&&J&&J.isSameDirectory(I))?E.RENAME:E.changeTypeFromId(H)}});return F});