Changeset - de5f6c9f50b0
[Not reviewed]
default
2 6 0
Sean Farley - 11 years ago 2014-07-16 02:15:34
sean.michael.farley@gmail.com
arrow_refresh.png: use new icon-arrows-cw font
8 files changed with 7 insertions and 16 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/bootstrap.css
Show inline comments
 
@@ -2355,385 +2355,385 @@ input[type="submit"].btn-block,
 
input[type="reset"].btn-block,
 
input[type="button"].btn-block {
 
  width: 100%;
 
}
 

	
 
.fade {
 
  opacity: 0;
 
  -webkit-transition: opacity 0.15s linear;
 
          transition: opacity 0.15s linear;
 
}
 

	
 
.fade.in {
 
  opacity: 1;
 
}
 

	
 
.collapse {
 
  display: none;
 
}
 

	
 
.collapse.in {
 
  display: block;
 
}
 

	
 
.collapsing {
 
  position: relative;
 
  height: 0;
 
  overflow: hidden;
 
  -webkit-transition: height 0.35s ease;
 
          transition: height 0.35s ease;
 
}
 

	
 
@font-face {
 
  font-family: 'Glyphicons Halflings';
 
  src: url('../fonts/glyphicons-halflings-regular.eot');
 
  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
 
}
 

	
 
.glyphicon {
 
  position: relative;
 
  top: 1px;
 
  display: inline-block;
 
  font-family: 'Glyphicons Halflings';
 
  -webkit-font-smoothing: antialiased;
 
  font-style: normal;
 
  font-weight: normal;
 
  line-height: 1;
 
}
 

	
 
.glyphicon-asterisk:before {
 
  content: "\2a";
 
}
 

	
 
.glyphicon-plus:before {
 
  content: "\2b";
 
}
 

	
 
.glyphicon-euro:before {
 
  content: "\20ac";
 
}
 

	
 
.glyphicon-minus:before {
 
  content: "\2212";
 
}
 

	
 
.glyphicon-cloud:before {
 
  content: "\2601";
 
}
 

	
 
.glyphicon-envelope:before {
 
  content: "\2709";
 
}
 

	
 
.glyphicon-pencil:before {
 
  content: "\270f";
 
}
 

	
 
.glyphicon-glass:before {
 
  content: "\e001";
 
}
 

	
 
.glyphicon-music:before {
 
  content: "\e002";
 
}
 

	
 
.glyphicon-search:before {
 
  content: "\e003";
 
}
 

	
 
.glyphicon-heart:before {
 
  content: "\e005";
 
}
 

	
 
.glyphicon-star:before {
 
  content: "\e006";
 
}
 

	
 
.glyphicon-star-empty:before {
 
  content: "\e007";
 
}
 

	
 
.glyphicon-user:before {
 
  content: "\e008";
 
}
 

	
 
.glyphicon-film:before {
 
  content: "\e009";
 
}
 

	
 
.glyphicon-th-large:before {
 
  content: "\e010";
 
}
 

	
 
.glyphicon-th:before {
 
  content: "\e011";
 
}
 

	
 
.glyphicon-th-list:before {
 
  content: "\e012";
 
}
 

	
 
.glyphicon-ok:before {
 
  content: "\e013";
 
}
 

	
 
.glyphicon-remove:before {
 
  content: "\e014";
 
}
 

	
 
.glyphicon-zoom-in:before {
 
  content: "\e015";
 
}
 

	
 
.glyphicon-zoom-out:before {
 
  content: "\e016";
 
}
 

	
 
.glyphicon-off:before {
 
  content: "\e017";
 
}
 

	
 
.glyphicon-signal:before {
 
  content: "\e018";
 
}
 

	
 
.glyphicon-cog:before {
 
  content: "\e019";
 
}
 

	
 
.glyphicon-trash:before {
 
  content: "\e020";
 
}
 

	
 
.glyphicon-home:before {
 
  content: "\e021";
 
}
 

	
 
.glyphicon-file:before {
 
  content: "\e022";
 
}
 

	
 
.glyphicon-time:before {
 
  content: "\e023";
 
}
 

	
 
.glyphicon-road:before {
 
  content: "\e024";
 
}
 

	
 
.glyphicon-download-alt:before {
 
  content: "\e025";
 
}
 

	
 
.glyphicon-download:before {
 
  content: "\e026";
 
}
 

	
 
.glyphicon-upload:before {
 
  content: "\e027";
 
}
 

	
 
.glyphicon-inbox:before {
 
  content: "\e028";
 
}
 

	
 
.glyphicon-play-circle:before {
 
  content: "\e029";
 
}
 

	
 
.glyphicon-repeat:before {
 
  content: "\e030";
 
}
 

	
 
.glyphicon-refresh:before {
 
.glyphicon-arrows-cw:before {
 
  content: "\e031";
 
}
 

	
 
.glyphicon-list-alt:before {
 
  content: "\e032";
 
}
 

	
 
.glyphicon-flag:before {
 
  content: "\e034";
 
}
 

	
 
.glyphicon-headphones:before {
 
  content: "\e035";
 
}
 

	
 
.glyphicon-volume-off:before {
 
  content: "\e036";
 
}
 

	
 
.glyphicon-volume-down:before {
 
  content: "\e037";
 
}
 

	
 
.glyphicon-volume-up:before {
 
  content: "\e038";
 
}
 

	
 
.glyphicon-qrcode:before {
 
  content: "\e039";
 
}
 

	
 
.glyphicon-barcode:before {
 
  content: "\e040";
 
}
 

	
 
.glyphicon-tag:before {
 
  content: "\e041";
 
}
 

	
 
.glyphicon-tags:before {
 
  content: "\e042";
 
}
 

	
 
.glyphicon-book:before {
 
  content: "\e043";
 
}
 

	
 
.glyphicon-print:before {
 
  content: "\e045";
 
}
 

	
 
.glyphicon-font:before {
 
  content: "\e047";
 
}
 

	
 
.glyphicon-bold:before {
 
  content: "\e048";
 
}
 

	
 
.glyphicon-italic:before {
 
  content: "\e049";
 
}
 

	
 
.glyphicon-text-height:before {
 
  content: "\e050";
 
}
 

	
 
.glyphicon-text-width:before {
 
  content: "\e051";
 
}
 

	
 
.glyphicon-align-left:before {
 
  content: "\e052";
 
}
 

	
 
.glyphicon-align-center:before {
 
  content: "\e053";
 
}
 

	
 
.glyphicon-align-right:before {
 
  content: "\e054";
 
}
 

	
 
.glyphicon-align-justify:before {
 
  content: "\e055";
 
}
 

	
 
.glyphicon-list:before {
 
  content: "\e056";
 
}
 

	
 
.glyphicon-indent-left:before {
 
  content: "\e057";
 
}
 

	
 
.glyphicon-indent-right:before {
 
  content: "\e058";
 
}
 

	
 
.glyphicon-facetime-video:before {
 
  content: "\e059";
 
}
 

	
 
.glyphicon-picture:before {
 
  content: "\e060";
 
}
 

	
 
.glyphicon-map-marker:before {
 
  content: "\e062";
 
}
 

	
 
.glyphicon-adjust:before {
 
  content: "\e063";
 
}
 

	
 
.glyphicon-tint:before {
 
  content: "\e064";
 
}
 

	
 
.glyphicon-edit:before {
 
  content: "\e065";
 
}
 

	
 
.glyphicon-share:before {
 
  content: "\e066";
 
}
 

	
 
.glyphicon-check:before {
 
  content: "\e067";
 
}
 

	
 
.glyphicon-move:before {
 
  content: "\e068";
 
}
 

	
 
.glyphicon-step-backward:before {
 
  content: "\e069";
 
}
 

	
 
.glyphicon-fast-backward:before {
 
  content: "\e070";
 
}
 

	
 
.glyphicon-backward:before {
 
  content: "\e071";
 
}
 

	
 
.glyphicon-play:before {
 
  content: "\e072";
 
}
 

	
 
.glyphicon-pause:before {
 
  content: "\e073";
 
}
 

	
 
.glyphicon-stop:before {
 
  content: "\e074";
 
}
 

	
 
.glyphicon-forward:before {
 
  content: "\e075";
 
}
 

	
 
.glyphicon-fast-forward:before {
 
  content: "\e076";
 
}
 

	
 
.glyphicon-step-forward:before {
 
  content: "\e077";
 
}
 

	
 
.glyphicon-eject:before {
 
  content: "\e078";
 
}
 

	
 
.glyphicon-chevron-left:before {
 
  content: "\e079";
 
}
 

	
 
.glyphicon-chevron-right:before {
 
  content: "\e080";
 
}
 

	
 
.glyphicon-plus-sign:before {
 
  content: "\e081";
 
}
 

	
 
.glyphicon-minus-sign:before {
 
  content: "\e082";
 
}
 

	
 
.glyphicon-remove-sign:before {
kallithea/public/css/contextbar.css
Show inline comments
 
/**
 
 * Stylesheets for the context bar
 
 */
 

	
 
i.icon-arrow-right { background-image: url('../images/icons/arrow_right.png');}
 
i.icon-bar-chart { background-image: url("../images/icons/chart_bar.png"); }
 
i.icon-code-merge { background-image: url("../images/icons/arrow_merge.png"); } /* unused! */
 
i.icon-ellipsis-horizontal:after { content: ' ...';}
 
i.icon-eye-open { background-image: url("../images/icons/eye.png"); }
 
i.icon-file-txt { background-image: url("../images/icons/note_error.png"); }
 
i.icon-git { background-image: url('../images/icons/giticon.png');}
 
i.icon-hg { background-image: url('../images/icons/hgicon.png');}
 
i.icon-refresh { background-image: url('../images/icons/arrow_refresh.png');}
 
i.icon-disabled { background-image: url('../images/icons/shading.png');} /* todo: use instead of minus sign */
 

	
 
i[class^='icon-'] {
 
    background-repeat: no-repeat;
 
    background-position: center;
 
    display: inline-block;
 
    min-width: 16px;
 
    min-height: 16px;
 
    margin: -2px 0 -4px 0;
 
    /* background-color: red; /* for debugging */
 

	
 
}
 

	
 
/* css classes for diff file status ... it'd be nice if css had a way to
 
   inherit from another class but alas, we must make sure this content is the
 
   same from the icon font file */
 

	
 
.icon-diff-M:before {
 
    font-family: 'kallithea';
 
    content: '\e805';
 
    color: #d0b44c;
 
}
 

	
 
.icon-diff-D:before {
 
    font-family: 'kallithea';
 
    content: '\e807';
 
    color: #bd2c00;
 
}
 

	
 
.icon-diff-A:before {
 
    font-family: 'kallithea';
 
    content: '\e806';
 
    color: #6cc644;
 
}
 

	
 
.icon-diff-R:before {
 
    font-family: 'kallithea';
 
    content: '\e81f';
 
    color: #677a85;
 
}
 

	
 
#content #context-bar {
 
    position: relative;
 
    overflow: visible;
 
    background-color: #577632;
 
    padding: 0 5px;
 
    min-height: 36px;
 
}
 

	
 
#content #context-bar h2 {
 
    display: inline-block;
 
    color: #FFF;
 
}
 

	
 
#header #header-inner #quick a,
 
#content #context-bar,
 
#content #context-bar a {
 
    color: #FFFFFF;
 
}
 

	
 
#header #header-inner #quick a:hover,
 
#content #context-bar a:hover {
 
    text-decoration: none;
 
}
 

	
 
#content #context-bar .icon {
 
    display: inline-block;
 
    width: 16px;
 
    height: 16px;
 
    vertical-align: text-bottom;
 
}
 

	
 
ul.horizontal-list {
 
    display: block;
 
}
 

	
 
ul.horizontal-list > li {
 
    float: left;
 
    position: relative;
 
}
 

	
 
#header #header-inner #quick ul,
 
ul.horizontal-list > li ul {
 
    position: absolute;
 
    display: none;
 
    right: 0;
 
    z-index: 999;
 
}
 

	
 
#header #header-inner #quick li:hover > ul,
 
ul.horizontal-list li:hover > ul {
 
    display: block;
 
}
 

	
 
#header #header-inner #quick li ul li,
 
ul.horizontal-list ul li {
 
    position: relative;
 
    border-bottom: 1px solid rgba(0,0,0,0.1);
 
    border-top: 1px solid rgba(255,255,255,0.1);
 
}
 

	
 
ul.horizontal-list > li ul ul {
 
    position: absolute;
 
    right: 100%;
 
    top: -1px;
 
    min-width: 200px;
 
    max-height: 400px;
 
    overflow-x: hidden;
 
    overflow-y: auto;
 
}
 

	
 
#header #header-inner #quick ul a,
 
ul.horizontal-list li a {
 
    white-space: nowrap;
 
}
 

	
 
#breadcrumbs {
 
    float: left;
 
    padding: 6px 0 5px 0;
 
    padding-left: 5px;
 
    font-weight: bold;
 
    font-size: 14px;
 
}
 

	
 
#breadcrumbs span {
 
    font-weight: bold;
 
    font-size: 1.4em;
 
}
 

	
 
#header #header-inner #quick ul,
 
#revision-changer,
 
#context-pages,
 
#context-pages ul {
 
    background: #3b6998; /* Old browsers */
 
    background: -moz-linear-gradient(top, #577632 0%, #577632 100%); /* FF3.6+ */
 
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#577632), color-stop(100%,#577632)); /* Chrome,Safari4+ */
 
    background: -webkit-linear-gradient(top, #577632 0%, #577632 100%); /* Chrome10+,Safari5.1+ */
 
    background: -o-linear-gradient(top, #577632 0%, #577632 100%); /* Opera 11.10+ */
 
    background: -ms-linear-gradient(top, #577632 0%, #577632 100%); /* IE10+ */
 
    background: linear-gradient(to bottom, #577632 0%, #577632 100%); /* W3C */
 
    /*Filter on IE will also use overflow:hidden implicitly, and that would clip our inner menus.*/
 
    /*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#577632', endColorstr='#577632',GradientType=0 ); /* IE6-9 */*/
 
}
 

	
 
#header #header-inner #quick a,
 
#context-actions a,
 
#context-pages a {
 
    background-repeat: no-repeat;
 
    background-position: 10px 50%;
 
    padding-left: 30px;
 
}
 

	
 
#quick a,
 
#context-pages ul ul a {
 
    padding-left: 10px;
 
}
 

	
 
ul#context-actions {
 
    display: inline-block;
 
    float: right;
 
    border-radius: 4px;
 
    background-image: linear-gradient(top, #577632 0%, #577632 100%);
 
}
 

	
 
#content ul#context-actions li {
 
    padding: 0px;
 
    border-right: 1px solid rgba(0,0,0,0.1);
 
    border-left: 1px solid rgba(255,255,255,0.1);
 
}
 

	
 
#context-actions a {
 
    display: block;
 
    cursor: pointer;
 
    background: none;
 
    border: none;
 
    margin: 0px;
 
    height: auto;
 
    padding: 10px 10px 10px 30px;
 
    background-repeat: no-repeat;
 
    background-position: 10px 50%;
 
    font-size: 1em;
 
}
 

	
 
#context-actions a {
 
    padding: 11px 10px 12px 30px;
 
}
 

	
 
#header #header-inner #quick li:hover,
 
#revision-changer:hover,
 
#context-pages li:hover,
 
#context-actions li:hover,
 
#content #context-actions li:hover,
kallithea/public/css/style.css
Show inline comments
 
@@ -3112,392 +3112,384 @@ table.code-browser i[class^='icon-'] {
 
    border-bottom: 1px solid #eaeaea;
 
    color: #000;
 
    font-size: 12px;
 
    margin: 0;
 
    padding: 1px 5px 1px;
 
}
 

	
 
.info_box input#view {
 
    text-align: center;
 
    padding: 4px 3px 2px 2px;
 
}
 

	
 
.info_box_elem {
 
    display: inline-block;
 
    padding: 0 2px;
 
}
 

	
 
.yui-overlay, .yui-panel-container {
 
    visibility: hidden;
 
    position: absolute;
 
    z-index: 2;
 
}
 

	
 
#tip-box {
 
    position: absolute;
 

	
 
    background-color: #FFF;
 
    border: 2px solid #577632;
 
    font: 100% sans-serif;
 
    width: auto;
 
    opacity: 1;
 
    padding: 8px;
 

	
 
    white-space: pre-wrap;
 
    -webkit-border-radius: 8px 8px 8px 8px;
 
    -khtml-border-radius: 8px 8px 8px 8px;
 
    border-radius: 8px 8px 8px 8px;
 
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
 
    -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
 
    z-index: 100000;
 
}
 

	
 
.hl-tip-box {
 
    z-index: 1;
 
    position: absolute;
 
    color: #666;
 
    background-color: #FFF;
 
    border: 2px solid #577632;
 
    font: 100% sans-serif;
 
    width: auto;
 
    opacity: 1;
 
    padding: 8px;
 
    white-space: pre-wrap;
 
    -webkit-border-radius: 8px 8px 8px 8px;
 
    -khtml-border-radius: 8px 8px 8px 8px;
 
    border-radius: 8px 8px 8px 8px;
 
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
 
}
 

	
 

	
 
.mentions-container {
 
    width: 90% !important;
 
}
 
.mentions-container .yui-ac-content {
 
    width: 100% !important;
 
}
 

	
 
.ac {
 
    vertical-align: top;
 
}
 

	
 
.ac .yui-ac {
 
    position: inherit;
 
    font-size: 100%;
 
}
 

	
 
.ac .perm_ac {
 
    width: 20em;
 
}
 

	
 
.ac .yui-ac-input {
 
    width: 100%;
 
}
 

	
 
.ac .yui-ac-container {
 
    position: absolute;
 
    top: 1.6em;
 
    width: auto;
 
}
 

	
 
.ac .yui-ac-content {
 
    position: absolute;
 
    border: 1px solid gray;
 
    background: #fff;
 
    z-index: 9050;
 
}
 

	
 
.ac .yui-ac-shadow {
 
    position: absolute;
 
    width: 100%;
 
    background: #000;
 
    opacity: .10;
 
    filter: alpha(opacity = 10);
 
    z-index: 9049;
 
    margin: .3em;
 
}
 

	
 
.ac .yui-ac-content ul {
 
    width: 100%;
 
    margin: 0;
 
    padding: 0;
 
    z-index: 9050;
 
}
 

	
 
.ac .yui-ac-content li {
 
    cursor: default;
 
    white-space: nowrap;
 
    margin: 0;
 
    padding: 2px 5px;
 
    height: 18px;
 
    z-index: 9050;
 
    display: block;
 
    width: auto !important;
 
}
 

	
 
.ac .yui-ac-content li .ac-container-wrap {
 
    width: auto;
 
}
 

	
 
.ac .yui-ac-content li.yui-ac-prehighlight {
 
    background: #B3D4FF;
 
    z-index: 9050;
 
}
 

	
 
.ac .yui-ac-content li.yui-ac-highlight {
 
    background: #556CB5;
 
    color: #FFF;
 
    z-index: 9050;
 
}
 
.ac .yui-ac-bd {
 
    z-index: 9050;
 
}
 

	
 
.reposize {
 
    background: url("../images/icons/server.png") no-repeat scroll 3px;
 
    height: 16px;
 
    width: 20px;
 
    cursor: pointer;
 
    display: block;
 
    float: right;
 
    margin-top: 2px;
 
}
 

	
 
#repo_size {
 
    display: block;
 
    margin-top: 4px;
 
    color: #666;
 
    float: right;
 
}
 

	
 
.locking_locked {
 
    background: #FFF url("../images/icons/block_16.png") no-repeat scroll 3px;
 
    height: 16px;
 
    width: 20px;
 
    cursor: pointer;
 
    display: block;
 
    float: right;
 
    margin-top: 2px;
 
}
 

	
 
.locking_unlocked {
 
    background: #FFF url("../images/icons/accept.png") no-repeat scroll 3px;
 
    height: 16px;
 
    width: 20px;
 
    cursor: pointer;
 
    display: block;
 
    float: right;
 
    margin-top: 2px;
 
}
 

	
 
.currently_following {
 
    padding-left: 10px;
 
    padding-bottom: 5px;
 
}
 

	
 
.accept_icon {
 
    background: url("../images/icons/accept.png") no-repeat scroll 3px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 

	
 
.refresh_icon {
 
    background: url("../images/icons/arrow_refresh.png") no-repeat scroll
 
        3px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 

	
 
.pull_icon {
 
    background: url("../images/icons/connect.png") no-repeat scroll 3px;
 
    padding-left: 20px;
 
    padding-top: 0px;
 
    text-align: left;
 
}
 

	
 
.archive_icon {
 
    background: url("../images/icons/compress.png") no-repeat scroll 3px;
 
    padding-left: 20px;
 
    text-align: left;
 
    padding-top: 1px;
 
}
 

	
 
.start_following_icon {
 
    background: url("../images/icons/heart_add.png") no-repeat scroll 3px;
 
    padding-left: 20px;
 
    text-align: left;
 
    padding-top: 0px;
 
}
 

	
 
.action_button {
 
    border: 0;
 
    display: inline;
 
}
 

	
 
.action_button:hover {
 
    border: 0;
 
    text-decoration: underline;
 
    cursor: pointer;
 
}
 

	
 
#switch_repos {
 
    position: absolute;
 
    height: 25px;
 
    z-index: 1;
 
}
 

	
 
#switch_repos select {
 
    min-width: 150px;
 
    max-height: 250px;
 
    z-index: 1;
 
}
 

	
 
.breadcrumbs {
 
    border: medium none;
 
    color: #FFF;
 
    float: left;
 
    font-weight: 700;
 
    font-size: 14px;
 
    margin: 0;
 
    padding: 11px 0 11px 10px;
 
}
 

	
 
.breadcrumbs .hash {
 
    text-transform: none;
 
    color: #fff;
 
}
 

	
 
.breadcrumbs a {
 
    color: #FFF;
 
}
 

	
 
.flash_msg {
 
}
 

	
 
.flash_msg ul {
 
}
 

	
 
.error_red {
 
    color: red;
 
}
 

	
 
.flash_msg .alert-error {
 
    background-color: #c43c35;
 
    background-repeat: repeat-x;
 
    background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35) );
 
    background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
 
    background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
 
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35) );
 
    background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
 
    background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
 
    background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);
 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#c43c35', GradientType=0 );
 
    border-color: #c43c35 #c43c35 #882a25;
 
}
 

	
 
.flash_msg .alert-error a {
 
    text-decoration: underline;
 
}
 

	
 
.flash_msg .alert-warning {
 
    color: #404040 !important;
 
    background-color: #eedc94;
 
    background-repeat: repeat-x;
 
    background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94) );
 
    background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
 
    background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
 
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94) );
 
    background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
 
    background-image: -o-linear-gradient(top, #fceec1, #eedc94);
 
    background-image: linear-gradient(to bottom, #fceec1, #eedc94);
 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0 );
 
    border-color: #eedc94 #eedc94 #e4c652;
 
}
 

	
 
.flash_msg .alert-warning a {
 
    text-decoration: underline;
 
}
 

	
 
.flash_msg .alert-success {
 
    background-color: #57a957;
 
    background-repeat: repeat-x !important;
 
    background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957) );
 
    background-image: -moz-linear-gradient(top, #62c462, #57a957);
 
    background-image: -ms-linear-gradient(top, #62c462, #57a957);
 
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957) );
 
    background-image: -webkit-linear-gradient(top, #62c462, #57a957);
 
    background-image: -o-linear-gradient(top, #62c462, #57a957);
 
    background-image: linear-gradient(to bottom, #62c462, #57a957);
 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0 );
 
    border-color: #57a957 #57a957 #3d773d;
 
}
 

	
 
.flash_msg .alert-success a {
 
    text-decoration: underline;
 
    color: #FFF !important;
 
}
 

	
 
.flash_msg .alert-info {
 
    background-color: #339bb9;
 
    background-repeat: repeat-x;
 
    background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9) );
 
    background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
 
    background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
 
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9) );
 
    background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
 
    background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
 
    background-image: linear-gradient(to bottom, #5bc0de, #339bb9);
 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0 );
 
    border-color: #339bb9 #339bb9 #22697d;
 
}
 

	
 
.flash_msg .alert-info a {
 
    text-decoration: underline;
 
}
 

	
 
.flash_msg .alert-error,
 
.flash_msg .alert-warning,
 
.flash_msg .alert-success,
 
.flash_msg .alert-info {
 
    font-size: 12px;
 
    font-weight: 700;
 
    min-height: 14px;
 
    line-height: 14px;
 
    margin-bottom: 10px;
 
    margin-top: 0;
 
    display: block;
 
    overflow: auto;
 
    padding: 6px 10px 6px 10px;
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
    position: relative;
 
    color: #FFF;
 
    border-width: 1px;
 
    border-style: solid;
 
    -webkit-border-radius: 4px;
 
    border-radius: 4px;
 
    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
 
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
 
}
 

	
 
#msg_close {
 
    background: transparent url("../images/cross_grey_small.png") no-repeat scroll 0 0;
 
    cursor: pointer;
 
    height: 16px;
 
    position: absolute;
 
    right: 5px;
 
    top: 5px;
 
    width: 16px;
 
}
 
div#legend_data {
 
    padding-left: 10px;
 
}
 
div#legend_container table {
 
    border: none !important;
 
}
 
div#legend_container table,
 
div#legend_choices table {
 
    width: auto !important;
 
}
 

	
 
table#permissions_manage {
kallithea/public/images/icons/arrow_refresh.png
Show inline comments
 
deleted file
 
binary diff not shown
Show images
kallithea/public/images/icons/arrow_refresh_small.png
Show inline comments
 
deleted file
 
binary diff not shown
Show images
kallithea/templates/compare/compare_diff.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    %if c.compare_home:
 
        ${_('%s Compare') % c.repo_name}
 
    %else:
 
        ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.a_repo.repo_name, c.a_ref_name)} &gt; ${'%s@%s' % (c.cs_repo.repo_name, c.cs_ref_name)}
 
    %endif
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
  ${_('Compare Revisions')}
 
</%def>
 

	
 
<%def name="page_nav()">
 
    ${self.menu('repositories')}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog')}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
        <div id="body" class="diffblock">
 
            <div class="code-header">
 
                <div>
 
                    ${h.hidden('compare_org')} <i class="icon-arrow-right"></i> ${h.hidden('compare_other')}
 
                    %if not c.compare_home:
 
                        <a class="btn btn-small" href="${c.swap_url}"><i class="icon-refresh"></i> ${_('Swap')}</a>
 
                        <a class="btn btn-small" href="${c.swap_url}"><i class="icon-arrows-cw"></i> ${_('Swap')}</a>
 
                    %endif
 
                    <div id="compare_revs" class="btn btn-small"><i class="icon-git-compare"></i> ${_('Compare Revisions')}</div>
 
                </div>
 
            </div>
 
        </div>
 

	
 
    %if c.compare_home:
 
        <div id="changeset_compare_view_content">
 
         <div style="color:#999;font-size: 18px">${_('Compare revisions, branches, bookmarks, or tags.')}</div>
 
        </div>
 
    %else:
 
        <div id="changeset_compare_view_content">
 
                ##CS
 
                <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
 
                <%include file="compare_cs.html" />
 

	
 
                ## FILES
 
                <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 

	
 
                % if c.limited_diff:
 
                    ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
 
                % else:
 
                    ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}:
 
                %endif
 

	
 
                ${c.ignorews_url(request.GET)}
 
                ${c.context_url(request.GET)}
 

	
 
                </div>
 
                <div class="cs_files">
 
                  %if not c.files:
 
                     <span class="empty_data">${_('No files')}</span>
 
                  %endif
 
                  %for fid, change, f, stat in c.files:
 
                     <div class="cs_${change}">
 
                         <div class="node">
 
                             <i class="icon-diff-${change}"></i>
 
                             ${h.link_to(h.safe_unicode(f), '#' + fid)}
 
                         </div>
 
                         <div class="changes">${h.fancy_file_stats(stat)}</div>
 
                     </div>
 
                  %endfor
 
                </div>
 
                % if c.limited_diff:
 
                  <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff')}</a></h5>
 
                % endif
 
         </div>
 

	
 
        ## diff block
 
        <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
        ${diff_block.diff_block_js()}
 
        %for fid, change, f, stat in c.files:
 
          ${diff_block.diff_block_simple([c.changes[fid]])}
 
        %endfor
 
        % if c.limited_diff:
 
          <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff')}</a></h4>
 
        % endif
 
    %endif
 
    </div>
 

	
 
</div>
 
    <script type="text/javascript">
 

	
 
   $(document).ready(function(){
 
    var cache = {}
 
    $("#compare_org").select2({
 
        placeholder: "${'%s@%s' % (c.a_repo.repo_name, c.a_ref_name)}",
 
        formatSelection: function(obj){
 
            return '{0}@{1}'.format("${c.a_repo.repo_name}", obj.text)
 
        },
 
        dropdownAutoWidth: true,
 
        query: function(query){
 
          var key = 'cache';
 
          var cached = cache[key] ;
 
          if(cached) {
 
            var data = {results: []};
 
            //filter results
 
            $.each(cached.results, function(){
 
                var section = this.text;
 
                var children = [];
 
                $.each(this.children, function(){
 
                    if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
 
                        children.push({'id': this.id, 'text': this.text})
 
                    }
 
                })
 
                data.results.push({'text': section, 'children': children})
 
            });
 
            //push the typed in changeset
 
            data.results.push({'text':_TM['Specify changeset'],
 
                               'children': [{'id': query.term, 'text': query.term, 'type': 'rev'}]})
 
            query.callback(data);
 
          }else{
 
              $.ajax({
 
                url: pyroutes.url('repo_refs_data', {'repo_name': '${c.a_repo.repo_name}'}),
 
                data: {},
 
                dataType: 'json',
 
                type: 'GET',
 
                success: function(data) {
 
                  cache[key] = data;
 
                  query.callback(data);
 
                }
 
              })
 
          }
 
        }
 
    });
 
    $("#compare_other").select2({
 
        placeholder: "${'%s@%s' % (c.cs_repo.repo_name, c.cs_ref_name)}",
 
        dropdownAutoWidth: true,
 
        formatSelection: function(obj){
 
            return '{0}@{1}'.format("${c.cs_repo.repo_name}", obj.text)
 
        },
 
        query: function(query){
 
          var key = 'cache2';
 
          var cached = cache[key] ;
 
          if(cached) {
 
            var data = {results: []};
 
            //filter results
 
            $.each(cached.results, function(){
 
                var section = this.text;
 
                var children = [];
 
                $.each(this.children, function(){
 
                    if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
 
                        children.push({'id': this.id, 'text': this.text})
 
                    }
 
                })
 
                data.results.push({'text': section, 'children': children})
 
            });
 
            //push the typed in changeset
 
            data.results.push({'text':_TM['Specify changeset'],
 
                               'children': [{'id': query.term, 'text': query.term, 'type': 'rev'}]})
 
            query.callback(data);
 
          }else{
 
              $.ajax({
 
                url: pyroutes.url('repo_refs_data', {'repo_name': '${c.cs_repo.repo_name}'}),
 
                data: {},
 
                dataType: 'json',
 
                type: 'GET',
 
                success: function(data) {
 
                  cache[key] = data;
 
                  query.callback({results: data.results});
 
                }
 
              })
 
          }
 
        }
 
    });
 

	
 
    var values_changed = function() {
 
        var values = $('#compare_org').select2('data') && $('#compare_other').select2('data');
 
        if (values) {
 
             $('#compare_revs').removeClass("disabled");
 
             // TODO: the swap button ... if any
 
        } else {
 
             $('#compare_revs').addClass("disabled");
 
             // TODO: the swap button ... if any
 
        }
 
    }
 
    values_changed();
 
    $('#compare_org').change(values_changed);
 
    $('#compare_other').change(values_changed);
 
    $('#compare_revs').on('click', function(e){
 
        var org = $('#compare_org').select2('data');
 
        var other = $('#compare_other').select2('data');
 
        if (!org || !other) {
 
            return;
 
        }
 

	
 
        var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='__other_ref_type__',org_ref_name='__org__',other_ref_type='__org_ref_type__',other_ref_name='__other__', other_repo=c.cs_repo.repo_name)}";
 
        var u = compare_url.replace('__other_ref_type__',org.type)
 
                           .replace('__org__',org.text)
 
                           .replace('__org_ref_type__',other.type)
 
                           .replace('__other__',other.text);
 
        window.location = u;
 
    });
 
   });
 
    </script>
 
</%def>
kallithea/templates/journal/journal.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 
<%def name="title()">
 
    ${_('Journal')}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 
<%def name="breadcrumbs()">
 
    <h5>
 
    <form id="filter_form">
 
    <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/>
 
    <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span>
 
    <input type='submit' value="${_('Filter')}" class="btn btn-small" style="padding:0px 2px 0px 2px;margin:0px"/>
 
    ${_('Journal')} - ${ungettext('%s Entry', '%s Entries', c.journal_pager.item_count) % (c.journal_pager.item_count)}
 
    </form>
 
    ${h.end_form()}
 
    </h5>
 
</%def>
 
<%def name="page_nav()">
 
    ${self.menu('journal')}
 
</%def>
 
<%def name="head_extra()">
 
<link href="${h.url('journal_atom', api_key=c.authuser.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
 
<link href="${h.url('journal_rss', api_key=c.authuser.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
 
</%def>
 
<%def name="main()">
 

	
 
    <div class="box box-left">
 
        <!-- box / title -->
 
        <div class="title">
 
         ${self.breadcrumbs()}
 
         <ul class="links icon-only-links">
 
           <li>
 
             <span><a id="refresh" href="${h.url('journal')}"><i class="icon-refresh"></i></a></span>
 
             <span><a id="refresh" href="${h.url('journal')}"><i class="icon-arrows-cw"></i></a></span>
 
           </li>
 
           <li>
 
             <span><a href="${h.url('journal_atom', api_key=c.authuser.api_key)}"><i class="icon-rss-squared"></i></a></span>
 
           </li>
 
         </ul>
 
        </div>
 
        <div id="journal">${c.journal_data}</div>
 
    </div>
 
    <div class="box box-right">
 
        <!-- box / title -->
 

	
 
        <div class="title">
 
            <h5>
 
            <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value="" style="display: none"/>
 
            <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value="" style="display: none"/>
 
            </h5>
 
            <ul class="links nav nav-tabs">
 
                <li class="active" id="show_watched_li">
 
                    <a id="show_watched" href="#watched"><i class="icon-eye-open"></i> ${_('Watched')}</a>
 
                </li>
 
                <li id="show_my_li">
 
                    <a id="show_my" href="#my"><i class="icon-database"></i> ${_('My Repos')}</a>
 
               </li>
 
            </ul>
 
        </div>
 

	
 
        <!-- end box / title -->
 
        <div id="my_container" style="display:none">
 
            <div class="table-grid table yui-skin-sam" id="repos_list_wrap"></div>
 
            <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>
 
        </div>
 

	
 
        <div id="watched_container">
 
            <div class="table-grid table yui-skin-sam" id="watched_repos_list_wrap"></div>
 
            <div id="watched-user-paginator" style="padding: 0px 0px 0px 20px"></div>
 
        </div>
 
    </div>
 

	
 
    <script type="text/javascript">
 

	
 
    $('#j_filter').click(function(){
 
        var $jfilter = $('#j_filter');
 
        if($jfilter.hasClass('initial')){
 
            $jfilter.val('');
 
        }
 
    });
 
    var fix_j_filter_width = function(len){
 
        $('#j_filter').css('width', Math.max(80, len*6.50)+'px');
 
    };
 
    $('#j_filter').keyup(function(){
 
        fix_j_filter_width($('#j_filter').val().length);
 
    });
 
    $('#filter_form').submit(function(e){
 
        e.preventDefault();
 
        var val = $('#j_filter').val();
 
        window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
 
    });
 
    fix_j_filter_width($('#j_filter').val().length);
 

	
 
    $('#refresh').click(function(e){
 
        asynchtml("${h.url.current(filter=c.search_term)}", $("#journal"), function(){
 
            show_more_event();
 
            tooltip_activate();
 
            show_changeset_tooltip();
 
            });
 
        e.preventDefault();
 
    });
 

	
 
    var show_my = function(e){
 
        $('#watched_container').hide();
 
        $('#my_container').show();
 
        $('#q_filter').show();
 
        $('#q_filter_watched').hide();
 

	
 
        $('#show_my_li').addClass('active');
 
        $('#show_watched_li').removeClass('active');
 
        if(!$('#show_my').hasClass('loaded')){
 
            table_renderer(${c.data |n});
 
            $('#show_my').addClass('loaded');
 
        }
 
    };
 
    $('#show_my').click(function(){
 
        show_my();
 
    });
 
    var show_watched = function(){
 
        $('#my_container').hide();
 
        $('#watched_container').show();
 
        $('#q_filter_watched').show();
 
        $('#q_filter').hide();
 

	
 
        $('#show_watched_li').addClass('active');
 
        $('#show_my_li').removeClass('active');
 
        if(!$('#show_watched').hasClass('loaded')){
 
            watched_renderer(${c.watched_data |n});
 
            $('#show_watched').addClass('loaded');
 
        }
 
    };
 
    $('#show_watched').click(function(){
 
        show_watched();
 
    });
 
    //init watched
 
    show_watched();
 

	
 
    var tabs = {
 
        'watched': show_watched,
 
        'my': show_my
 
    }
 
    var url = location.href.split('#');
 
    if (url[1]) {
 
        //We have a hash
 
        var tabHash = url[1];
 
        var func = tabs[tabHash]
 
        if (func){
 
            func();
 
        }
 
    }
 
    function watched_renderer(data){
 
        var myDataSource = new YAHOO.util.DataSource(data);
 
        myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
 

	
 
        myDataSource.responseSchema = {
 
            resultsList: "records",
 
            fields: [
 
               {key:"menu"},
 
               {key:"raw_name"},
 
               {key:"name"},
 
               {key:"last_changeset"},
 
               {key:"last_rev_raw"},
 
               {key:"action"}
 
            ]
 
         };
 
        myDataSource.doBeforeCallback = function(req,raw,res,cb) {
 
            // This is the filter function
 
            var data     = res.results || [],
 
                filtered = [],
 
                i,l;
 

	
 
            if (req) {
 
                req = req.toLowerCase();
 
                for (i = 0; i<data.length; i++) {
 
                    var pos = data[i].raw_name.toLowerCase().indexOf(req)
 
                    if (pos != -1) {
 
                        filtered.push(data[i]);
 
                    }
 
                }
 
                res.results = filtered;
 
            }
 
            return res;
 
        }
 
        // main table sorting
 
        var myColumnDefs = [
 
            {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"},
 
            {key:"name",label:"${_('Name')}",sortable:true,
 
                sortOptions: { sortFunction: nameSort }},
 
            {key:"last_changeset",label:"${_('Tip')}",sortable:true,
 
                sortOptions: { sortFunction: revisionSort }},
 
            {key:"action",label:"${_('Action')}",sortable:false}
 
        ];
 

	
 
        var myDataTable = new YAHOO.widget.DataTable("watched_repos_list_wrap", myColumnDefs, myDataSource,{
 
          sortedBy:{key:"name",dir:"asc"},
 
          paginator: YUI_paginator(25, ['watched-user-paginator']),
 

	
 
          MSG_SORTASC:"${_('Click to sort ascending')}",
 
          MSG_SORTDESC:"${_('Click to sort descending')}",
 
          MSG_EMPTY:"${_('No records found.')}",
 
          MSG_ERROR:"${_('Data error.')}",
 
          MSG_LOADING:"${_('Loading...')}"
 
        }
 
        );
 
        myDataTable.subscribe('postRenderEvent',function(oArgs) {
 
            tooltip_activate();
 
            quick_repo_menu();
 
        });
 

	
 
        var filterTimeout = null;
 

	
 
        updateFilter  = function () {
 
            // Reset timeout
 
            filterTimeout = null;
 

	
 
            // Reset sort
 
            var state = myDataTable.getState();
 
            state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC};
 

	
 
            // Get filtered data
 
            myDataSource.sendRequest(YUD.get('q_filter_watched').value,{
 
                success : myDataTable.onDataReturnInitializeTable,
 
                failure : myDataTable.onDataReturnInitializeTable,
 
                scope   : myDataTable,
 
                argument: state
 
            });
kallithea/tests/functional/test_compare.py
Show inline comments
 
# -*- coding: utf-8 -*-
 
from kallithea.tests import *
 
from kallithea.model.repo import RepoModel
 
from kallithea.model.meta import Session
 
from kallithea.model.db import Repository
 
from kallithea.model.scm import ScmModel
 
from kallithea.lib.vcs.backends.base import EmptyChangeset
 
from kallithea.tests.fixture import Fixture
 

	
 
fixture = Fixture()
 

	
 

	
 
def _commit_change(repo, filename, content, message, vcs_type, parent=None, newfile=False):
 
    repo = Repository.get_by_repo_name(repo)
 
    _cs = parent
 
    if not parent:
 
        _cs = EmptyChangeset(alias=vcs_type)
 

	
 
    if newfile:
 
        nodes = {
 
            filename: {
 
                'content': content
 
            }
 
        }
 
        cs = ScmModel().create_nodes(
 
            user=TEST_USER_ADMIN_LOGIN, repo=repo,
 
            message=message,
 
            nodes=nodes,
 
            parent_cs=_cs,
 
            author=TEST_USER_ADMIN_LOGIN,
 
        )
 
    else:
 
        cs = ScmModel().commit_change(
 
            repo=repo.scm_instance, repo_name=repo.repo_name,
 
            cs=parent, user=TEST_USER_ADMIN_LOGIN,
 
            author=TEST_USER_ADMIN_LOGIN,
 
            message=message,
 
            content=content,
 
            f_path=filename
 
        )
 
    return cs
 

	
 

	
 
def _commit_div(sha, msg):
 
    return """<div id="C-%s" class="message">%s</div>""" % (sha, msg)
 

	
 

	
 
class TestCompareController(TestController):
 

	
 
    def setUp(self):
 
        self.r1_id = None
 
        self.r2_id = None
 

	
 
    def tearDown(self):
 
        if self.r2_id:
 
            RepoModel().delete(self.r2_id)
 
        if self.r1_id:
 
            RepoModel().delete(self.r1_id)
 
        Session().commit()
 
        Session.remove()
 

	
 
    def test_compare_forks_on_branch_extra_commits_hg(self):
 
        self.log_user()
 
        repo1 = fixture.create_repo('one', repo_type='hg',
 
                                    repo_description='diff-test',
 
                                    cur_user=TEST_USER_ADMIN_LOGIN)
 
        self.r1_id = repo1.repo_id
 
        #commit something !
 
        cs0 = _commit_change(repo1.repo_name, filename='file1', content='line1\n',
 
                             message='commit1', vcs_type='hg', parent=None, newfile=True)
 

	
 
        #fork this repo
 
        repo2 = fixture.create_fork('one', 'one-fork')
 
        self.r2_id = repo2.repo_id
 

	
 
        #add two extra commit into fork
 
        cs1 = _commit_change(repo2.repo_name, filename='file1', content='line1\nline2\n',
 
                             message='commit2', vcs_type='hg', parent=cs0)
 

	
 
        cs2 = _commit_change(repo2.repo_name, filename='file1', content='line1\nline2\nline3\n',
 
                             message='commit3', vcs_type='hg', parent=cs1)
 

	
 
        rev1 = 'default'
 
        rev2 = 'default'
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=repo1.repo_name,
 
                                    org_ref_type="branch",
 
                                    org_ref_name=rev2,
 
                                    other_repo=repo2.repo_name,
 
                                    other_ref_type="branch",
 
                                    other_ref_name=rev1,
 
                                    merge='1',))
 

	
 
        response.mustcontain('%s@%s' % (repo1.repo_name, rev2))
 
        response.mustcontain('%s@%s' % (repo2.repo_name, rev1))
 
        response.mustcontain("""Showing 2 commits""")
 
        response.mustcontain("""1 file changed with 2 insertions and 0 deletions""")
 

	
 
        response.mustcontain(_commit_div(cs1.raw_id, 'commit2'))
 
        response.mustcontain(_commit_div(cs2.raw_id, 'commit3'))
 

	
 
        response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
 
        response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
 
        ## files
 
        response.mustcontain("""<a href="#C--826e8142e6ba">file1</a>""")
 
        #swap
 
        response.mustcontain("""<a class="btn btn-small" href="/%s/compare/branch@%s...branch@%s?other_repo=%s&amp;merge=True"><i class="icon-refresh"></i> Swap</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 
        response.mustcontain("""<a class="btn btn-small" href="/%s/compare/branch@%s...branch@%s?other_repo=%s&amp;merge=True"><i class="icon-arrows-cw"></i> Swap</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 

	
 
    def test_compare_forks_on_branch_extra_commits_git(self):
 
        self.log_user()
 
        repo1 = fixture.create_repo('one-git', repo_type='git',
 
                                    repo_description='diff-test',
 
                                    cur_user=TEST_USER_ADMIN_LOGIN)
 
        self.r1_id = repo1.repo_id
 
        #commit something !
 
        cs0 = _commit_change(repo1.repo_name, filename='file1', content='line1\n',
 
                             message='commit1', vcs_type='git', parent=None, newfile=True)
 

	
 
        #fork this repo
 
        repo2 = fixture.create_fork('one-git', 'one-git-fork')
 
        self.r2_id = repo2.repo_id
 

	
 
        #add two extra commit into fork
 
        cs1 = _commit_change(repo2.repo_name, filename='file1', content='line1\nline2\n',
 
                             message='commit2', vcs_type='git', parent=cs0)
 

	
 
        cs2 = _commit_change(repo2.repo_name, filename='file1', content='line1\nline2\nline3\n',
 
                             message='commit3', vcs_type='git', parent=cs1)
 

	
 
        rev1 = 'master'
 
        rev2 = 'master'
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=repo1.repo_name,
 
                                    org_ref_type="branch",
 
                                    org_ref_name=rev2,
 
                                    other_repo=repo2.repo_name,
 
                                    other_ref_type="branch",
 
                                    other_ref_name=rev1,
 
                                    merge='1',))
 

	
 
        response.mustcontain('%s@%s' % (repo1.repo_name, rev2))
 
        response.mustcontain('%s@%s' % (repo2.repo_name, rev1))
 
        response.mustcontain("""Showing 2 commits""")
 
        response.mustcontain("""1 file changed with 2 insertions and 0 deletions""")
 

	
 
        response.mustcontain(_commit_div(cs1.raw_id, 'commit2'))
 
        response.mustcontain(_commit_div(cs2.raw_id, 'commit3'))
 

	
 
        response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
 
        response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
 
        ## files
 
        response.mustcontain("""<a href="#C--826e8142e6ba">file1</a>""")
 
        #swap
 
        response.mustcontain("""<a class="btn btn-small" href="/%s/compare/branch@%s...branch@%s?other_repo=%s&amp;merge=True"><i class="icon-refresh"></i> Swap</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 
        response.mustcontain("""<a class="btn btn-small" href="/%s/compare/branch@%s...branch@%s?other_repo=%s&amp;merge=True"><i class="icon-arrows-cw"></i> Swap</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 

	
 
    def test_compare_forks_on_branch_extra_commits_origin_has_incomming_hg(self):
 
        self.log_user()
 

	
 
        repo1 = fixture.create_repo('one', repo_type='hg',
 
                                    repo_description='diff-test',
 
                                    cur_user=TEST_USER_ADMIN_LOGIN)
 

	
 
        self.r1_id = repo1.repo_id
 

	
 
        #commit something !
 
        cs0 = _commit_change(repo1.repo_name, filename='file1', content='line1\n',
 
                             message='commit1', vcs_type='hg', parent=None, newfile=True)
 

	
 
        #fork this repo
 
        repo2 = fixture.create_fork('one', 'one-fork')
 
        self.r2_id = repo2.repo_id
 

	
 
        #now commit something to origin repo
 
        cs1_prim = _commit_change(repo1.repo_name, filename='file2', content='line1file2\n',
 
                                  message='commit2', vcs_type='hg', parent=cs0, newfile=True)
 

	
 
        #add two extra commit into fork
 
        cs1 = _commit_change(repo2.repo_name, filename='file1', content='line1\nline2\n',
 
                             message='commit2', vcs_type='hg', parent=cs0)
 

	
 
        cs2 = _commit_change(repo2.repo_name, filename='file1', content='line1\nline2\nline3\n',
 
                             message='commit3', vcs_type='hg', parent=cs1)
 

	
 
        rev1 = 'default'
 
        rev2 = 'default'
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=repo1.repo_name,
 
                                    org_ref_type="branch",
 
                                    org_ref_name=rev2,
 
                                    other_repo=repo2.repo_name,
 
                                    other_ref_type="branch",
 
                                    other_ref_name=rev1,
 
                                    merge='1',))
 

	
 
        response.mustcontain('%s@%s' % (repo1.repo_name, rev2))
 
        response.mustcontain('%s@%s' % (repo2.repo_name, rev1))
 
        response.mustcontain("""Showing 2 commits""")
 
        response.mustcontain("""1 file changed with 2 insertions and 0 deletions""")
 

	
 
        response.mustcontain(_commit_div(cs1.raw_id, 'commit2'))
 
        response.mustcontain(_commit_div(cs2.raw_id, 'commit3'))
 

	
 
        response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
 
        response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
 
        ## files
 
        response.mustcontain("""<a href="#C--826e8142e6ba">file1</a>""")
 
        #swap
 
        response.mustcontain("""<a class="btn btn-small" href="/%s/compare/branch@%s...branch@%s?other_repo=%s&amp;merge=True"><i class="icon-refresh"></i> Swap</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 
        response.mustcontain("""<a class="btn btn-small" href="/%s/compare/branch@%s...branch@%s?other_repo=%s&amp;merge=True"><i class="icon-arrows-cw"></i> Swap</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 

	
 
    def test_compare_forks_on_branch_extra_commits_origin_has_incomming_git(self):
 
        self.log_user()
 

	
 
        repo1 = fixture.create_repo('one-git', repo_type='git',
 
                                    repo_description='diff-test',
 
                                    cur_user=TEST_USER_ADMIN_LOGIN)
 

	
 
        self.r1_id = repo1.repo_id
 

	
 
        #commit something !
 
        cs0 = _commit_change(repo1.repo_name, filename='file1', content='line1\n',
 
                             message='commit1', vcs_type='git', parent=None, newfile=True)
 

	
 
        #fork this repo
 
        repo2 = fixture.create_fork('one-git', 'one-git-fork')
 
        self.r2_id = repo2.repo_id
 

	
 
        #now commit something to origin repo
 
        cs1_prim = _commit_change(repo1.repo_name, filename='file2', content='line1file2\n',
 
                                  message='commit2', vcs_type='git', parent=cs0, newfile=True)
 

	
 
        #add two extra commit into fork
 
        cs1 = _commit_change(repo2.repo_name, filename='file1', content='line1\nline2\n',
 
                             message='commit2', vcs_type='git', parent=cs0)
 

	
 
        cs2 = _commit_change(repo2.repo_name, filename='file1', content='line1\nline2\nline3\n',
 
                             message='commit3', vcs_type='git', parent=cs1)
 

	
 
        rev1 = 'master'
 
        rev2 = 'master'
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=repo1.repo_name,
 
                                    org_ref_type="branch",
 
                                    org_ref_name=rev2,
 
                                    other_repo=repo2.repo_name,
 
                                    other_ref_type="branch",
 
                                    other_ref_name=rev1,
 
                                    merge='1',))
 

	
 
        response.mustcontain('%s@%s' % (repo1.repo_name, rev2))
 
        response.mustcontain('%s@%s' % (repo2.repo_name, rev1))
 
        response.mustcontain("""Showing 2 commits""")
 
        response.mustcontain("""1 file changed with 2 insertions and 0 deletions""")
 

	
 
        response.mustcontain(_commit_div(cs1.raw_id, 'commit2'))
 
        response.mustcontain(_commit_div(cs2.raw_id, 'commit3'))
 

	
 
        response.mustcontain("""<a href="/%s/changeset/%s">r1:%s</a>""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
 
        response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
 
        ## files
 
        response.mustcontain("""<a href="#C--826e8142e6ba">file1</a>""")
 
        #swap
 
        response.mustcontain("""<a class="btn btn-small" href="/%s/compare/branch@%s...branch@%s?other_repo=%s&amp;merge=True"><i class="icon-refresh"></i> Swap</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 
        response.mustcontain("""<a class="btn btn-small" href="/%s/compare/branch@%s...branch@%s?other_repo=%s&amp;merge=True"><i class="icon-arrows-cw"></i> Swap</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 

	
 
    def test_compare_cherry_pick_changesets_from_bottom(self):
 

	
 
#        repo1:
 
#            cs0:
 
#            cs1:
 
#        repo1-fork- in which we will cherry pick bottom changesets
 
#            cs0:
 
#            cs1:
 
#            cs2: x
 
#            cs3: x
 
#            cs4: x
 
#            cs5:
 
        #make repo1, and cs1+cs2
 
        self.log_user()
 

	
 
        repo1 = fixture.create_repo('repo1', repo_type='hg',
 
                                    repo_description='diff-test',
 
                                    cur_user=TEST_USER_ADMIN_LOGIN)
 
        self.r1_id = repo1.repo_id
 

	
 
        #commit something !
 
        cs0 = _commit_change(repo1.repo_name, filename='file1', content='line1\n',
 
                             message='commit1', vcs_type='hg', parent=None,
 
                             newfile=True)
 
        cs1 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\n',
 
                             message='commit2', vcs_type='hg', parent=cs0)
 
        #fork this repo
 
        repo2 = fixture.create_fork('repo1', 'repo1-fork')
 
        self.r2_id = repo2.repo_id
 
        #now make cs3-6
 
        cs2 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\n',
 
                             message='commit3', vcs_type='hg', parent=cs1)
 
        cs3 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\n',
 
                             message='commit4', vcs_type='hg', parent=cs2)
 
        cs4 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\n',
 
                             message='commit5', vcs_type='hg', parent=cs3)
 
        cs5 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\nline6\n',
 
                             message='commit6', vcs_type='hg', parent=cs4)
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=repo2.repo_name,
 
                                    org_ref_type="rev",
 
                                    org_ref_name=cs1.short_id,  # parent of cs2, in repo2
 
                                    other_repo=repo1.repo_name,
 
                                    other_ref_type="rev",
 
                                    other_ref_name=cs4.short_id,
 
                                    merge='True',
 
                                    ))
 
        response.mustcontain('%s@%s' % (repo2.repo_name, cs1.short_id))
 
        response.mustcontain('%s@%s' % (repo1.repo_name, cs4.short_id))
 
        response.mustcontain("""Showing 3 commits""")
 
        response.mustcontain("""1 file changed with 3 insertions and 0 deletions""")
 

	
 
        response.mustcontain(_commit_div(cs2.raw_id, 'commit3'))
 
        response.mustcontain(_commit_div(cs3.raw_id, 'commit4'))
 
        response.mustcontain(_commit_div(cs4.raw_id, 'commit5'))
 

	
 
        response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo1.repo_name, cs2.raw_id, cs2.short_id))
 
        response.mustcontain("""<a href="/%s/changeset/%s">r3:%s</a>""" % (repo1.repo_name, cs3.raw_id, cs3.short_id))
 
        response.mustcontain("""<a href="/%s/changeset/%s">r4:%s</a>""" % (repo1.repo_name, cs4.raw_id, cs4.short_id))
 
        ## files
 
        response.mustcontain("""#C--826e8142e6ba">file1</a>""")
 

	
 
    def test_compare_cherry_pick_changesets_from_top(self):
 
#        repo1:
 
#            cs0:
 
#            cs1:
 
#        repo1-fork- in which we will cherry pick bottom changesets
 
#            cs0:
 
#            cs1:
 
#            cs2:
 
#            cs3: x
 
#            cs4: x
 
#            cs5: x
 
#
 
        #make repo1, and cs1+cs2
 
        self.log_user()
 
        repo1 = fixture.create_repo('repo1', repo_type='hg',
 
                                    repo_description='diff-test',
 
                                    cur_user=TEST_USER_ADMIN_LOGIN)
 
        self.r1_id = repo1.repo_id
 

	
 
        #commit something !
 
        cs0 = _commit_change(repo1.repo_name, filename='file1', content='line1\n',
 
                             message='commit1', vcs_type='hg', parent=None,
 
                             newfile=True)
 
        cs1 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\n',
 
                             message='commit2', vcs_type='hg', parent=cs0)
 
        #fork this repo
 
        repo2 = fixture.create_fork('repo1', 'repo1-fork')
 
        self.r2_id = repo2.repo_id
 
        #now make cs3-6
 
        cs2 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\n',
 
                             message='commit3', vcs_type='hg', parent=cs1)
 
        cs3 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\n',
 
                             message='commit4', vcs_type='hg', parent=cs2)
 
        cs4 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\n',
 
                             message='commit5', vcs_type='hg', parent=cs3)
 
        cs5 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\nline6\n',
 
                             message='commit6', vcs_type='hg', parent=cs4)
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=repo1.repo_name,
 
                                    org_ref_type="rev",
 
                                    org_ref_name=cs2.short_id, # parent of cs3, not in repo2
 
                                    other_ref_type="rev",
 
                                    other_ref_name=cs5.short_id,
 
                                    merge='1',))
 

	
 
        response.mustcontain('%s@%s' % (repo1.repo_name, cs2.short_id))
 
        response.mustcontain('%s@%s' % (repo1.repo_name, cs5.short_id))
 
        response.mustcontain("""Showing 3 commits""")
 
        response.mustcontain("""1 file changed with 3 insertions and 0 deletions""")
 

	
 
        response.mustcontain(_commit_div(cs3.raw_id, 'commit4'))
 
        response.mustcontain(_commit_div(cs4.raw_id, 'commit5'))
 
        response.mustcontain(_commit_div(cs5.raw_id, 'commit6'))
 

	
 
        response.mustcontain("""<a href="/%s/changeset/%s">r3:%s</a>""" % (repo1.repo_name, cs3.raw_id, cs3.short_id))
 
        response.mustcontain("""<a href="/%s/changeset/%s">r4:%s</a>""" % (repo1.repo_name, cs4.raw_id, cs4.short_id))
 
        response.mustcontain("""<a href="/%s/changeset/%s">r5:%s</a>""" % (repo1.repo_name, cs5.raw_id, cs5.short_id))
 
        ## files
 
        response.mustcontain("""#C--826e8142e6ba">file1</a>""")
 

	
 
    def test_compare_cherry_pick_changeset_mixed_branches(self):
 
        #TODO: write this
 
        assert 1
 

	
 
    def test_compare_remote_branches_hg(self):
 
        self.log_user()
 

	
 
        repo2 = fixture.create_fork(HG_REPO, HG_FORK)
 
        self.r2_id = repo2.repo_id
 
        rev1 = '56349e29c2af'
 
        rev2 = '7d4bc8ec6be5'
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=HG_REPO,
 
                                    org_ref_type="rev",
 
                                    org_ref_name=rev1,
 
                                    other_ref_type="rev",
 
                                    other_ref_name=rev2,
 
                                    other_repo=HG_FORK,
 
                                    merge='1',))
 

	
 
        response.mustcontain('%s@%s' % (HG_REPO, rev1))
 
        response.mustcontain('%s@%s' % (HG_FORK, rev2))
 
        ## outgoing changesets between those revisions
 

	
 
        response.mustcontain("""<a href="/%s/changeset/2dda4e345facb0ccff1a191052dd1606dba6781d">r4:2dda4e345fac</a>""" % (HG_FORK))
 
        response.mustcontain("""<a href="/%s/changeset/6fff84722075f1607a30f436523403845f84cd9e">r5:6fff84722075</a>""" % (HG_FORK))
 
        response.mustcontain("""<a href="/%s/changeset/7d4bc8ec6be56c0f10425afb40b6fc315a4c25e7">r6:%s</a>""" % (HG_FORK, rev2))
 

	
 
        ## files
 
        response.mustcontain("""<a href="#C--9c390eb52cd6">vcs/backends/hg.py</a>""")
 
        response.mustcontain("""<a href="#C--41b41c1f2796">vcs/backends/__init__.py</a>""")
 
        response.mustcontain("""<a href="#C--2f574d260608">vcs/backends/base.py</a>""")
 

	
 
    def test_compare_remote_branches_git(self):
 
        self.log_user()
 

	
 
        repo2 = fixture.create_fork(GIT_REPO, GIT_FORK)
 
        self.r2_id = repo2.repo_id
 
        rev1 = '102607b09cdd60e2793929c4f90478be29f85a17'
 
        rev2 = 'd7e0d30fbcae12c90680eb095a4f5f02505ce501'
 

	
 
        response = self.app.get(url('compare_url',
 
                                    repo_name=GIT_REPO,
 
                                    org_ref_type="rev",
 
                                    org_ref_name=rev1,
 
                                    other_ref_type="rev",
 
                                    other_ref_name=rev2,
 
                                    other_repo=GIT_FORK,
 
                                    merge='1',))
 

	
 
        response.mustcontain('%s@%s' % (GIT_REPO, rev1))
 
        response.mustcontain('%s@%s' % (GIT_FORK, rev2))
 
        ## outgoing changesets between those revisions
 

	
 
        response.mustcontain("""<a href="/%s/changeset/49d3fd156b6f7db46313fac355dca1a0b94a0017">r4:49d3fd156b6f</a>""" % (GIT_FORK))
 
        response.mustcontain("""<a href="/%s/changeset/2d1028c054665b962fa3d307adfc923ddd528038">r5:2d1028c05466</a>""" % (GIT_FORK))
 
        response.mustcontain("""<a href="/%s/changeset/d7e0d30fbcae12c90680eb095a4f5f02505ce501">r6:%s</a>""" % (GIT_FORK, rev2[:12]))
 

	
 
        ## files
 
        response.mustcontain("""<a href="#C--9c390eb52cd6">vcs/backends/hg.py</a>""")
 
        response.mustcontain("""<a href="#C--41b41c1f2796">vcs/backends/__init__.py</a>""")
 
        response.mustcontain("""<a href="#C--2f574d260608">vcs/backends/base.py</a>""")
 

	
 
    def test_org_repo_new_commits_after_forking_simple_diff_hg(self):
 
        self.log_user()
 

	
0 comments (0 inline, 0 general)