Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch new-workspace Excluding Merge-Ins
This is equivalent to a diff from 54059126ae to 7ebac37b32
|
2015-05-26
| ||
| 18:03 | Merged new workspace check-in: 322729110f user: kostas tags: trunk | |
|
2015-05-25
| ||
| 12:27 | Initial work on remote management check-in: 13d3a5222d user: kostas tags: remote-management | |
|
2015-05-24
| ||
| 18:37 | Removed Create Stash from toolbar Changed "Open Containing" icon Minor cosmetic changes Closed-Leaf check-in: 7ebac37b32 user: kostas tags: new-workspace | |
| 18:19 | Separated Application and Fossil settings into separate dialogs. check-in: 97d0d1e240 user: kostas tags: new-workspace | |
|
2015-04-30
| ||
| 17:43 | Merged refactor Added missing status UPDATED_BY_MERGE Fixed parsing of file status check-in: f82fab4145 user: kostas tags: new-workspace | |
| 16:23 | Renamed tableView to fileTableView Renamed treeView to workspaceTreeView Renamed tableViewStash to stashTableView Closed-Leaf check-in: 54059126ae user: kostas tags: refactor | |
| 12:15 | Renamed Bridge to Fossil check-in: 77abfe4126 user: kostas tags: refactor | |
Changes to fuel.pro.
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + + | #------------------------------------------------- # Fuel #------------------------------------------------- |
| ︙ | |||
42 43 44 45 46 47 48 49 50 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | + + + - - + + + + + + - - + + + + - + + | INCLUDEPATH += src SOURCES += src/main.cpp\ src/MainWindow.cpp \ src/CommitDialog.cpp \ src/FileActionDialog.cpp \ src/SettingsDialog.cpp \ src/FslSettingsDialog.cpp \ src/CloneDialog.cpp \ src/RevisionDialog.cpp \ src/Utils.cpp \ src/FileTableView.cpp \ |
| ︙ |
Changes to rsrc/resources.qrc.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | <RCC> |
Changes to src/CommitDialog.cpp.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + - - + + - + - - - + + - - | #include "CommitDialog.h" #include <QPushButton> #include <QShortcut> #include "ui_CommitDialog.h" #include "MainWindow.h" // Ugly. I know. |
| ︙ | |||
73 74 75 76 77 78 79 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + - + - - - - + - + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + |
//------------------------------------------------------------------------------
CommitDialog::~CommitDialog()
{
delete ui;
}
//------------------------------------------------------------------------------
|
| ︙ | |||
138 139 140 141 142 143 144 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | + + + + + + + |
QStandardItem *si = itemModel.item(i);
if(si->checkState()==Qt::Checked)
++num_selected;
}
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(num_selected>0);
}
//------------------------------------------------------------------------------
void CommitDialog::on_chkNewBranch_toggled(bool checked)
{
ui->chkPrivateBranch->setEnabled(checked);
ui->lineBranchName->setEnabled(checked);
}
|
Changes to src/CommitDialog.h.
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + - + - - + + + - + + - + |
#ifndef COMMITDIALOG_H
#define COMMITDIALOG_H
#include <QDialog>
#include <QStandardItemModel>
namespace Ui {
|
Changes to src/Fossil.cpp.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + | #include "Fossil.h" #include <QStringList> #include <QCoreApplication> |
| ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | + + + + + + + + + + + + + + + |
if(run_ok)
{
if(key=="project-name")
projectName = value;
else if(key=="repository")
repositoryFile = value;
else if(key=="checkout")
{
// f2121dad5e4565f55ed9ef882484dd5934af565f 2015-04-26 17:27:39 UTC
QStringList tokens = value.split(' ', QString::SkipEmptyParts);
Q_ASSERT(tokens.length()>0);
currentRevision = tokens[0].trimmed();
}
else if(key=="tags")
{
currentTags.clear();
QStringList tokens = value.split(',', QString::SkipEmptyParts);
foreach(const QString &tag, tokens)
currentTags.append(tag);
currentTags.sort();
}
}
}
return run_ok ? REPO_OK : REPO_NOT_FOUND;
}
//------------------------------------------------------------------------------
|
| ︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | + + + + + + |
}
//------------------------------------------------------------------------------
bool Fossil::listFiles(QStringList &files)
{
return runFossil(QStringList() << "ls" << "-l", &files, RUNFLAGS_SILENT_ALL);
}
//------------------------------------------------------------------------------
bool Fossil::status(QStringList &result)
{
return runFossil(QStringList() << "status", &result, RUNFLAGS_SILENT_ALL);
}
//------------------------------------------------------------------------------
bool Fossil::pushRepository()
{
return runFossil(QStringList() << "push");
}
|
| ︙ | |||
172 173 174 175 176 177 178 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + |
bool Fossil::diffFile(const QString &repoFile)
{
// Run the diff detached
return runFossil(QStringList() << "gdiff" << QuotePath(repoFile), 0, RUNFLAGS_DETACHED);
}
//------------------------------------------------------------------------------
|
| ︙ | |||
198 199 200 201 202 203 204 205 206 207 208 209 210 211 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | + + + + + + + + + + + |
// Write Comment
comment_file.write(comment.toUtf8());
comment_file.close();
// Generate fossil parameters.
QStringList params;
params << "commit" << "--message-file" << QuotePath(comment_fname);
// Commit to new branch
if(!newBranchName.isEmpty())
{
params << "--branch" << newBranchName.trimmed();
// Private branches are not synced with remotes
if(isPrivateBranch)
params << "--private";
}
params << QuotePaths(fileList);
runFossil(params);
QFile::remove(comment_fname);
return true;
}
|
| ︙ | |||
282 283 284 285 286 287 288 | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | - + + + + + + + | params << "--explain"; result.clear(); return runFossil(params, &result); } //------------------------------------------------------------------------------ |
| ︙ | |||
412 413 414 415 416 417 418 419 420 421 422 423 424 425 | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
}
//------------------------------------------------------------------------------
bool Fossil::stashDiff(const QString& name)
{
return runFossil(QStringList() << "stash" << "diff" << name, 0);
}
//------------------------------------------------------------------------------
bool Fossil::tagList(QStringMap& tags)
{
tags.clear();
QStringList tagnames;
if(!runFossil(QStringList() << "tag" << "ls", &tagnames, RUNFLAGS_SILENT_ALL))
return false;
QStringList info;
foreach(const QString &line, tagnames)
{
QString tag = line.trimmed();
if(tag.isEmpty())
continue;
info.clear();
if(!runFossil(QStringList() << "info" << "tag:"+tag, &info, RUNFLAGS_SILENT_ALL))
return false;
QStringMap props;
ParseProperties(props, info, ':');
Q_ASSERT(props.contains("uuid"));
// uuid: 0e29a46f036d2e0cc89727190ad34c2dfdc5737c 2015-04-27 15:41:45 UTC
QStringList uuid = props["uuid"].trimmed().split(' ');
Q_ASSERT(uuid.length()>0);
QString revision = uuid[0].trimmed();
tags.insert(tag, revision);
}
return true;
}
//------------------------------------------------------------------------------
bool Fossil::tagNew(const QString& name, const QString& revision)
{
QStringList res;
if(!runFossil(QStringList() << "tag" << "add" << name << revision, &res))
return false;
return true;
}
//------------------------------------------------------------------------------
bool Fossil::tagDelete(const QString& name, const QString &revision)
{
QStringList res;
if(!runFossil(QStringList() << "tag" << "cancel" << "tag:"+name << revision, &res))
return false;
return true;
}
//------------------------------------------------------------------------------
bool Fossil::branchList(QStringList& branches, QStringList& activeBranches)
{
branches.clear();
activeBranches.clear();
QStringList res;
if(!runFossil(QStringList() << "branch" , &res, RUNFLAGS_SILENT_ALL))
return false;
foreach(const QString &line, res)
{
QString name = line.trimmed();
if(name.isEmpty())
continue;
// Active branches start with a start
int active_index = name.indexOf('*');
bool is_active = (active_index != -1) && active_index==0;
// Strip
if(is_active)
{
name = name.mid(is_active+1).trimmed();
activeBranches.append(name);
}
else
branches.append(name);
}
branches.sort();
activeBranches.sort();
return true;
}
//------------------------------------------------------------------------------
bool Fossil::branchNew(const QString& name, const QString& revisionBasis, bool isPrivate)
{
QStringList params;
params <<"branch" << "new" << name << revisionBasis;
if(isPrivate)
params << "--private";
QStringList res;
if(!runFossil(params, &res))
return false;
return true;
}
//------------------------------------------------------------------------------
bool Fossil::branchMerge(QStringList &res, const QString& revision, bool integrate, bool force, bool testOnly)
{
QStringList params;
params <<"merge";
if(integrate)
params << "--integrate";
if(force)
params << "--force";
if(testOnly)
params << "--dry-run";
params << revision;
if(!runFossil(params, &res))
return false;
return true;
}
//------------------------------------------------------------------------------
static QString ParseFossilQuery(QString line)
{
// Extract question
int qend = line.lastIndexOf('(');
if(qend == -1)
|
| ︙ | |||
561 562 563 564 565 566 567 | 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + | break; } QByteArray input; process.getLogAndClear(input); #ifdef QT_DEBUG // Log fossil output in debug builds |
| ︙ | |||
589 590 591 592 593 594 595 | 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 | + - + + + |
{
last_line = buffer.mid(last_line_start+1); // Including the EOL
// Detect previous line
if(last_line_start>0)
{
int before_last_line_start = buffer.lastIndexOf(EOL_MARK, last_line_start-1);
|
| ︙ | |||
615 616 617 618 619 620 621 | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 | - - + + + + + + + + + |
bool have_query = ends_qmark && (have_yn_query || have_yna_query || have_an_query || have_acyn_query);
// Flush all complete lines to the log and output
QStringList log_lines = buffer.left(last_line_start).split(EOL_MARK);
for(int l=0; l<log_lines.length(); ++l)
{
|
| ︙ | |||
789 790 791 792 793 794 795 | 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 | + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
fossilUI.setProcessChannelMode(QProcess::MergedChannels);
fossilUI.setWorkingDirectory(getCurrentWorkspace());
log("<b>> fossil ui</b><br>", true);
log(QObject::tr("Starting Fossil browser UI. Please wait.")+"\n");
QString fossil = getFossilPath();
QStringList params;
|
Changes to src/Fossil.h.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - + + + - + + | #ifndef FOSSIL_H #define FOSSIL_H class QStringList; #include <QString> |
| ︙ | |||
79 80 81 82 83 84 85 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | - + + + - + + + + + + + + + + + + + + + + + - + + | bool openRepository(const QString &repositoryPath, const QString& workspacePath); bool newRepository(const QString &repositoryPath); bool closeRepository(); bool pushRepository(); bool pullRepository(); bool cloneRepository(const QString &repository, const QUrl &url, const QUrl &proxyUrl); bool undoRepository(QStringList& result, bool explainOnly); |
Added src/FslSettingsDialog.cpp.
|
Added src/FslSettingsDialog.h.
|
Changes to src/MainWindow.cpp.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - | #include "MainWindow.h" #include "ui_MainWindow.h" #include <QDateTime> #include <QDebug> #include <QDesktopServices> #include <QDrag> #include <QDragEnterEvent> #include <QFileDialog> |
| ︙ | |||
104 105 106 107 108 109 110 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + | ui->fileTableView->horizontalHeader()->setMovable(true); #else ui->fileTableView->horizontalHeader()->setSectionsMovable(true); #endif ui->fileTableView->horizontalHeader()->setStretchLastSection(true); // workspaceTreeView |
| ︙ | |||
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + | recentWorkspaceActs[i]->setVisible(false); connect(recentWorkspaceActs[i], SIGNAL(triggered()), this, SLOT(onOpenRecent())); ui->menuFile->insertAction(recent_sep, recentWorkspaceActs[i]); } // TabWidget ui->tabWidget->setCurrentIndex(TAB_LOG); lblRevision = new QLabel(); ui->statusBar->insertPermanentWidget(0, lblRevision); lblRevision->setVisible(true); lblTags = new QLabel(); ui->statusBar->insertPermanentWidget(1, lblTags); lblTags->setVisible(true); // Construct ProgressBar progressBar = new QProgressBar(); progressBar->setMinimum(0); progressBar->setMaximum(0); progressBar->setMaximumSize(170, 16); progressBar->setAlignment(Qt::AlignCenter); progressBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); |
| ︙ | |||
317 318 319 320 321 322 323 324 325 326 327 328 329 330 | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | + |
workspaceHistory.removeAll(path);
rebuildRecent();
return false;
}
// Select the Root of the tree to update the file view
selectRootDir();
searchBox->clear();
return true;
}
//------------------------------------------------------------------------------
void MainWindow::on_actionOpenRepository_triggered()
{
QString filter(tr("Fossil Files") + QString(" (*." FOSSIL_EXT " " FOSSIL_CHECKOUT1 " " FOSSIL_CHECKOUT2 ")" ));
|
| ︙ | |||
475 476 477 478 479 480 481 | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 | + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + |
openWorkspace(workspace);
}
//------------------------------------------------------------------------------
void MainWindow::enableActions(bool on)
{
QAction *actions[] = {
|
| ︙ | |||
550 551 552 553 554 555 556 | 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 | - + - + + + + + + + + + + + + + - + | ui->actionViewIgnored->isChecked(), ui->actionViewModified->isChecked(), ui->actionViewUnchanged->isChecked(), settings.GetFossilValue(FOSSIL_SETTING_IGNORE_GLOB).toString(), uiCallback, operationAborted ); |
| ︙ | |||
585 586 587 588 589 590 591 | 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 | - - + + - + + + + + + - - - - - - + + + + + + + + + + + + + + + - - - + + + - - - - - - + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - + + + - + + + + + + + - - + + - + - - + + + + + - + + + - + - + - + - - - - - - - - - - - - - - - - - - - |
parent = child;
found = true;
}
}
if(!found) // Generate it
{
|
| ︙ | |||
810 811 812 813 814 815 816 817 818 | 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | + - + - - - - - |
if(store->contains("ViewUnchanged"))
ui->actionViewUnchanged->setChecked(store->value("ViewUnchanged").toBool());
if(store->contains("ViewIgnored"))
ui->actionViewIgnored->setChecked(store->value("ViewIgnored").toBool());
if(store->contains("ViewAsList"))
{
ui->actionViewAsList->setChecked(store->value("ViewAsList").toBool());
ui->actionViewAsFolders->setChecked(!store->value("ViewAsList").toBool());
viewMode = store->value("ViewAsList").toBool()? VIEWMODE_LIST : VIEWMODE_TREE;
}
|
| ︙ | |||
856 857 858 859 860 861 862 | 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 | - + - + |
store->setValue("WindowWidth", width());
store->setValue("WindowHeight", height());
store->setValue("ViewUnknown", ui->actionViewUnknown->isChecked());
store->setValue("ViewModified", ui->actionViewModified->isChecked());
store->setValue("ViewUnchanged", ui->actionViewUnchanged->isChecked());
store->setValue("ViewIgnored", ui->actionViewIgnored->isChecked());
store->setValue("ViewAsList", ui->actionViewAsList->isChecked());
|
| ︙ | |||
901 902 903 904 905 906 907 | 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 | - + + + - - - + + + + + + |
}
//------------------------------------------------------------------------------
void MainWindow::getSelectionPaths(stringset_t &paths)
{
// Determine the directories selected
QModelIndexList selection = ui->workspaceTreeView->selectionModel()->selectedIndexes();
|
| ︙ | |||
1004 1005 1006 1007 1008 1009 1010 | 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 | - + - + - - + - - + - - - + - - + + + + - - + - - + + + | if(!(includeMask & e.getType())) continue; filenames.append(filename); } } //------------------------------------------------------------------------------ |
| ︙ | |||
1045 1046 1047 1048 1049 1050 1051 | 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 | - - + |
if(!diffFile(*it))
return;
}
//------------------------------------------------------------------------------
bool MainWindow::startUI()
{
|
| ︙ | |||
1156 1157 1158 1159 1160 1161 1162 | 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 | - + + + - + - + - + |
//------------------------------------------------------------------------------
void MainWindow::on_actionCommit_triggered()
{
QStringList commit_files;
getSelectionFilenames(commit_files, WorkspaceFile::TYPE_MODIFIED, true);
|
| ︙ | |||
1255 1256 1257 1258 1259 1260 1261 | 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 | - + |
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionRevert_triggered()
{
QStringList modified_files;
|
| ︙ | |||
1370 1371 1372 1373 1374 1375 1376 | 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 | - + - - - - + - - + - - - + - - - + - - - - + + |
"emansije: pt_PT\n"
);
}
//------------------------------------------------------------------------------
void MainWindow::on_actionUpdate_triggered()
{
|
| ︙ | |||
1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 | 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 | + + + + + + + + - + |
}
}
}
//------------------------------------------------------------------------------
void MainWindow::on_actionSettings_triggered()
{
// Run the dialog
if(!SettingsDialog::run(this, settings))
return;
}
//------------------------------------------------------------------------------
void MainWindow::on_actionFossilSettings_triggered()
{
loadFossilSettings();
// Run the dialog
|
| ︙ | |||
1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 | 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 | + |
}
Q_ASSERT(type == Settings::Setting::TYPE_FOSSIL_GLOBAL || type == Settings::Setting::TYPE_FOSSIL_LOCAL);
QString value = it.value().Value.toString();
fossil().setFossilSetting(name, value, type == Settings::Setting::TYPE_FOSSIL_GLOBAL);
}
}
//------------------------------------------------------------------------------
void MainWindow::on_actionViewModified_triggered()
{
refresh();
}
|
| ︙ | |||
1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 | 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 | + + + + + + + + + + + - - + + + - + - - + + + + - + - - + + - + + - + + + + - - - + + + + + + + + + + + - + + + + + - - + + + + + |
}
//------------------------------------------------------------------------------
void MainWindow::on_actionViewIgnored_triggered()
{
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionViewAll_triggered()
{
ui->actionViewModified->setChecked(true);
ui->actionViewUnchanged->setChecked(true);
ui->actionViewUnknown->setChecked(true);
ui->actionViewIgnored->setChecked(true);
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionViewAsList_triggered()
{
ui->actionViewAsFolders->setChecked(!ui->actionViewAsList->isChecked());
|
| ︙ | |||
1724 1725 1726 1727 1728 1729 1730 | 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 | - + + + - + + + - + - - + + |
//------------------------------------------------------------------------------
QMenu * MainWindow::createPopupMenu()
{
return NULL;
}
//------------------------------------------------------------------------------
|
| ︙ | |||
1772 1773 1774 1775 1776 1777 1778 | 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 | + - + + + |
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionApplyStash_triggered()
{
QStringList stashes;
getSelectionStashes(stashes);
|
| ︙ | |||
1811 1812 1813 1814 1815 1816 1817 | 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 | - + |
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionDeleteStash_triggered()
{
QStringList stashes;
|
| ︙ | |||
1839 1840 1841 1842 1843 1844 1845 | 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 | - + |
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionDiffStash_triggered()
{
QStringList stashes;
|
| ︙ | |||
1884 1885 1886 1887 1888 1889 1890 | 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 | - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
menu->addAction(ui->actionClearLog);
menu->popup(ui->textBrowser->mapToGlobal(pos));
}
//------------------------------------------------------------------------------
void MainWindow::on_fileTableView_customContextMenuRequested(const QPoint &pos)
{
|
| ︙ | |||
2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 | 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
}
//------------------------------------------------------------------------------
void MainWindow::MainWinUICallback::beginProcess(const QString& text)
{
Q_ASSERT(mainWindow);
mainWindow->ui->statusBar->showMessage(text);
mainWindow->lblTags->setHidden(true);
mainWindow->lblRevision->setHidden(true);
mainWindow->progressBar->setHidden(false);
QCoreApplication::processEvents();
}
//------------------------------------------------------------------------------
void MainWindow::MainWinUICallback::updateProcess(const QString& text)
{
Q_ASSERT(mainWindow);
mainWindow->ui->statusBar->showMessage(text);
QCoreApplication::processEvents();
}
//------------------------------------------------------------------------------
void MainWindow::MainWinUICallback::endProcess()
{
Q_ASSERT(mainWindow);
mainWindow->ui->statusBar->clearMessage();
mainWindow->lblTags->setHidden(false);
mainWindow->lblRevision->setHidden(false);
mainWindow->progressBar->setHidden(true);
QCoreApplication::processEvents();
}
//------------------------------------------------------------------------------
QMessageBox::StandardButton MainWindow::MainWinUICallback::Query(const QString &title, const QString &query, QMessageBox::StandardButtons buttons)
{
return DialogQuery(mainWindow, title, query, buttons);
}
//------------------------------------------------------------------------------
void MainWindow::updateRevision(const QString &revision)
{
const QString latest = tr(REVISION_LATEST);
QString defaultval = latest;
if(!revision.isEmpty())
defaultval = revision;
QString selected_revision = RevisionDialog::runUpdate(this, tr("Update workspace"), versionList, defaultval).trimmed();
if(selected_revision.isEmpty())
return;
else if(selected_revision == latest)
selected_revision = ""; // Empty revision is "latest"
QStringList res;
// Do test update
if(!fossil().updateRepository(res, selected_revision, true))
return;
if(res.length()==0)
return;
QStringMap kv;
ParseProperties(kv, res, ':');
// If no changes exit
if(kv.contains("changes") && kv["changes"].indexOf("None.")!=-1)
return;
if(!FileActionDialog::run(this, tr("Update"), tr("The following files will be updated.")+"\n"+tr("Are you sure?"), res))
return;
// Do update
fossil().updateRepository(res, selected_revision, false);
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionCreateTag_triggered()
{
// Default to current revision
QString revision = fossil().getCurrentRevision();
QString name;
if(!RevisionDialog::runNewTag(this, tr("Create Tag"), versionList, revision, revision, name))
return;
if(name.isEmpty() || getWorkspace().getTags().contains(name) || getWorkspace().getBranches().contains(name))
{
QMessageBox::critical(this, tr("Error"), tr("Invalid name."), QMessageBox::Ok );
return;
}
fossil().tagNew(name, revision);
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionDeleteTag_triggered()
{
if(selectedTags.size()!=1)
return;
const QString &tagname = selectedTags.first();
if(QMessageBox::Yes != DialogQuery(this, tr("Delete Tag"), tr("Are you sure want to delete the tag '%0' ?").arg(tagname)))
return;
Q_ASSERT(getWorkspace().getTags().contains(tagname));
const QString &revision = getWorkspace().getTags()[tagname];
fossil().tagDelete(tagname, revision);
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionCreateBranch_triggered()
{
// Default to current revision
QString revision = fossil().getCurrentRevision();
QString branch_name;
if(!RevisionDialog::runNewTag(this, tr("Create Branch"), versionList, revision, revision, branch_name))
return;
if(branch_name.isEmpty() || getWorkspace().getTags().contains(branch_name) || getWorkspace().getBranches().contains(branch_name))
{
QMessageBox::critical(this, tr("Error"), tr("Invalid name."), QMessageBox::Ok );
return;
}
if(!fossil().branchNew(branch_name, revision, false))
return;
// Update to this branch.
updateRevision(branch_name);
}
//------------------------------------------------------------------------------
void MainWindow::MergeRevision(const QString &defaultRevision)
{
QStringList res;
QString revision = defaultRevision;
bool integrate = false;
bool force = false;
revision = RevisionDialog::runMerge(this, tr("Merge Branch"), versionList, revision, integrate, force);
if(revision.isEmpty())
return;
// Do test merge
if(!fossil().branchMerge(res, revision, integrate, force, true))
return;
if(!FileActionDialog::run(this, tr("Merge"), tr("The following changes will be applied.")+"\n"+tr("Are you sure?"), res))
return;
// Do update
fossil().branchMerge(res, revision, integrate, force, false);
log(tr("Merge completed. Don't forget to commit!")+"\n");
refresh();
}
//------------------------------------------------------------------------------
void MainWindow::on_actionMergeBranch_triggered()
{
QString revision;
if(!selectedBranches.isEmpty())
revision = selectedBranches.first();
MergeRevision(revision);
}
//------------------------------------------------------------------------------
void MainWindow::onSearchBoxTextChanged(const QString &)
{
updateFileView();
}
//------------------------------------------------------------------------------
void MainWindow::onSearch()
{
searchBox->selectAll();
searchBox->setFocus();
}
|
Changes to src/MainWindow.h.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + - + | #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QStringList> #include <QFileIconProvider> |
| ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | + - + - - + - + + + + + | void fullRefresh(); private: bool refresh(); void scanWorkspace(); void applySettings(); void updateSettings(); void updateRevision(const QString& revision); const QString &getCurrentWorkspace(); void setCurrentWorkspace(const QString &workspace); void log(const QString &text, bool isHTML=false); void setStatus(const QString &text); bool uiRunning() const; void getSelectionFilenames(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false); void getFileViewSelection(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false); void getDirViewSelection(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false); |
| ︙ | |||
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | + + + - - + + + + + + | void on_actionRevert_triggered(); void on_actionOpenContaining_triggered(); void on_actionRename_triggered(); void on_actionUndo_triggered(); void on_actionAbout_triggered(); void on_actionUpdate_triggered(); void on_actionSettings_triggered(); void on_actionFossilSettings_triggered(); void on_actionViewUnchanged_triggered(); void on_actionViewModified_triggered(); void on_actionViewUnknown_triggered(); void on_actionViewIgnored_triggered(); void on_actionViewAll_triggered(); void on_actionViewAsList_triggered(); void on_actionViewAsFolders_triggered(); void on_actionOpenFolder_triggered(); void on_actionRenameFolder_triggered(); void on_actionNewRepository_triggered(); void on_actionOpenRepository_triggered(); void on_actionCloseRepository_triggered(); void on_actionCloneRepository_triggered(); |
| ︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | + + + + + + + + + + + + + + + + |
friend class MainWinUICallback;
enum
{
MAX_RECENT=5
};
typedef QMap<QString, QIcon> icon_map_t;
Ui::MainWindow *ui;
QFileIconProvider iconProvider;
icon_map_t iconCache;
class QAction *recentWorkspaceActs[MAX_RECENT];
class QProgressBar *progressBar;
class QLabel *lblRevision;
class QLabel *lblTags;
class QShortcut *abortShortcut;
class SearchBox *searchBox;
class QShortcut *searchShortcut;
QMenu *menuWorkspace;
QMenu *menuStashes;
QMenu *menuTags;
QMenu *menuBranches;
bool operationAborted;
stringset_t selectedDirs; // The directory selected in the tree
QStringList selectedTags;
QStringList selectedBranches;
QStringList versionList;
Workspace workspace;
Workspace & getWorkspace() { return workspace; }
Fossil & fossil() { return workspace.fossil(); }
const Fossil & fossil() const { return workspace.fossil(); }
|
| ︙ |
Added src/RevisionDialog.cpp.