Renamed RepoFile to WorkspaceFile
FossilOrigin-Name: 8527bab97be43b2370eb03045dee3818fa8a2edf
This commit is contained in:
parent
1b2cebdc7f
commit
e4aebbe52c
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
|||||||
C Moved\sWorkspace\sto\sseparate\sfile
|
C Renamed\sRepoFile\sto\sWorkspaceFile
|
||||||
D 2015-04-30T11:21:29.350
|
D 2015-04-30T11:29:21.110
|
||||||
F .travis.yml 77966888a81c4ceee1fcc79bce842c9667ad8a35
|
F .travis.yml 77966888a81c4ceee1fcc79bce842c9667ad8a35
|
||||||
F debian/changelog eb4304dfcb6bb66850ec740838090eb50ce1249b
|
F debian/changelog eb4304dfcb6bb66850ec740838090eb50ce1249b
|
||||||
F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b
|
F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b
|
||||||
@ -200,8 +200,8 @@ F src/FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
|
|||||||
F src/FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df
|
F src/FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df
|
||||||
F src/LoggedProcess.cpp 2a1e5c94bc1e57c8984563e66c210e43a14dc60c
|
F src/LoggedProcess.cpp 2a1e5c94bc1e57c8984563e66c210e43a14dc60c
|
||||||
F src/LoggedProcess.h 85df7c635c807a5a0e8c4763f17a0752aaff7261
|
F src/LoggedProcess.h 85df7c635c807a5a0e8c4763f17a0752aaff7261
|
||||||
F src/MainWindow.cpp 4c93bd6ef8391332a153f8e820b3baa4b5405ab6
|
F src/MainWindow.cpp f6ffb8c6d1283a812084094426d51a5ea601fa35
|
||||||
F src/MainWindow.h 59ba144c9a73a1398afc8c49516d93ea56cd9fc4
|
F src/MainWindow.h a10364f15b68ca12a8ed7a48ac35dd4da3645e28
|
||||||
F src/SettingsDialog.cpp a46cff5e5dd425e3dbdd15632abfd5829f5562b4
|
F src/SettingsDialog.cpp a46cff5e5dd425e3dbdd15632abfd5829f5562b4
|
||||||
F src/SettingsDialog.h 4e2790f581e991c744ae9f86580f1972b8c7ff43
|
F src/SettingsDialog.h 4e2790f581e991c744ae9f86580f1972b8c7ff43
|
||||||
F src/Utils.cpp f78728e0817b1db23007ba0d2c5c26980ee7ebca
|
F src/Utils.cpp f78728e0817b1db23007ba0d2c5c26980ee7ebca
|
||||||
@ -215,7 +215,7 @@ F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
|
|||||||
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
|
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
|
||||||
F ui/MainWindow.ui 8677f5c8bca5bf7561d5f64bfdd0cef5157c6ac7
|
F ui/MainWindow.ui 8677f5c8bca5bf7561d5f64bfdd0cef5157c6ac7
|
||||||
F ui/SettingsDialog.ui 2b7c2870e0054b0f4106f495d85d02c0b814df8b
|
F ui/SettingsDialog.ui 2b7c2870e0054b0f4106f495d85d02c0b814df8b
|
||||||
P 3a653a3761f6f6e565762b8730bf5f7447ca2d2b
|
P 4c84ad9b0b25c9a77d935f9598b6705498d8e0ae
|
||||||
R a4168b45358c0251d9f518a38873c7f1
|
R 09e377e3947cb9dc34273000bdb7e135
|
||||||
U kostas
|
U kostas
|
||||||
Z 78ce8dabd7aa41822675709425667809
|
Z acf05986975f53be7b8c33e091697cd2
|
||||||
|
@ -1 +1 @@
|
|||||||
4c84ad9b0b25c9a77d935f9598b6705498d8e0ae
|
8527bab97be43b2370eb03045dee3818fa8a2edf
|
@ -631,16 +631,16 @@ void MainWindow::updateFileView()
|
|||||||
// Clear content except headers
|
// Clear content except headers
|
||||||
getWorkspace().getFileModel().removeRows(0, getWorkspace().getFileModel().rowCount());
|
getWorkspace().getFileModel().removeRows(0, getWorkspace().getFileModel().rowCount());
|
||||||
|
|
||||||
struct { RepoFile::EntryType type; QString text; const char *icon; }
|
struct { WorkspaceFile::Type type; QString text; const char *icon; }
|
||||||
stats[] =
|
stats[] =
|
||||||
{
|
{
|
||||||
{ RepoFile::TYPE_EDITTED, tr("Edited"), ":icons/icons/Button Blank Yellow-01.png" },
|
{ WorkspaceFile::TYPE_EDITTED, tr("Edited"), ":icons/icons/Button Blank Yellow-01.png" },
|
||||||
{ RepoFile::TYPE_UNCHANGED, tr("Unchanged"), ":icons/icons/Button Blank Green-01.png" },
|
{ WorkspaceFile::TYPE_UNCHANGED, tr("Unchanged"), ":icons/icons/Button Blank Green-01.png" },
|
||||||
{ RepoFile::TYPE_ADDED, tr("Added"), ":icons/icons/Button Add-01.png" },
|
{ WorkspaceFile::TYPE_ADDED, tr("Added"), ":icons/icons/Button Add-01.png" },
|
||||||
{ RepoFile::TYPE_DELETED, tr("Deleted"), ":icons/icons/Button Close-01.png" },
|
{ WorkspaceFile::TYPE_DELETED, tr("Deleted"), ":icons/icons/Button Close-01.png" },
|
||||||
{ RepoFile::TYPE_RENAMED, tr("Renamed"), ":icons/icons/Button Reload-01.png" },
|
{ WorkspaceFile::TYPE_RENAMED, tr("Renamed"), ":icons/icons/Button Reload-01.png" },
|
||||||
{ RepoFile::TYPE_MISSING, tr("Missing"), ":icons/icons/Button Help-01.png" },
|
{ WorkspaceFile::TYPE_MISSING, tr("Missing"), ":icons/icons/Button Help-01.png" },
|
||||||
{ RepoFile::TYPE_CONFLICTED, tr("Conflicted"), ":icons/icons/Button Blank Red-01.png" },
|
{ WorkspaceFile::TYPE_CONFLICTED, tr("Conflicted"), ":icons/icons/Button Blank Red-01.png" },
|
||||||
};
|
};
|
||||||
|
|
||||||
QFileIconProvider icon_provider;
|
QFileIconProvider icon_provider;
|
||||||
@ -650,7 +650,7 @@ void MainWindow::updateFileView()
|
|||||||
size_t item_id=0;
|
size_t item_id=0;
|
||||||
for(Workspace::filemap_t::iterator it = getWorkspace().getFiles().begin(); it!=getWorkspace().getFiles().end(); ++it)
|
for(Workspace::filemap_t::iterator it = getWorkspace().getFiles().begin(); it!=getWorkspace().getFiles().end(); ++it)
|
||||||
{
|
{
|
||||||
const RepoFile &e = *it.value();
|
const WorkspaceFile &e = *it.value();
|
||||||
QString path = e.getPath();
|
QString path = e.getPath();
|
||||||
|
|
||||||
// In Tree mode, filter all items not included in the current dir
|
// In Tree mode, filter all items not included in the current dir
|
||||||
@ -918,7 +918,7 @@ void MainWindow::getAllFilenames(QStringList &filenames, int includeMask)
|
|||||||
{
|
{
|
||||||
for(Workspace::filemap_t::iterator it=getWorkspace().getFiles().begin(); it!=getWorkspace().getFiles().end(); ++it)
|
for(Workspace::filemap_t::iterator it=getWorkspace().getFiles().begin(); it!=getWorkspace().getFiles().end(); ++it)
|
||||||
{
|
{
|
||||||
const RepoFile &e = *(*it);
|
const WorkspaceFile &e = *(*it);
|
||||||
|
|
||||||
// Skip unwanted file types
|
// Skip unwanted file types
|
||||||
if(!(includeMask & e.getType()))
|
if(!(includeMask & e.getType()))
|
||||||
@ -942,7 +942,7 @@ void MainWindow::getDirViewSelection(QStringList &filenames, int includeMask, bo
|
|||||||
// Select the actual files form the selected directories
|
// Select the actual files form the selected directories
|
||||||
for(Workspace::filemap_t::iterator it=getWorkspace().getFiles().begin(); it!=getWorkspace().getFiles().end(); ++it)
|
for(Workspace::filemap_t::iterator it=getWorkspace().getFiles().begin(); it!=getWorkspace().getFiles().end(); ++it)
|
||||||
{
|
{
|
||||||
const RepoFile &e = *(*it);
|
const WorkspaceFile &e = *(*it);
|
||||||
|
|
||||||
// Skip unwanted file types
|
// Skip unwanted file types
|
||||||
if(!(includeMask & e.getType()))
|
if(!(includeMask & e.getType()))
|
||||||
@ -998,7 +998,7 @@ void MainWindow::getFileViewSelection(QStringList &filenames, int includeMask, b
|
|||||||
QString filename = data.toString();
|
QString filename = data.toString();
|
||||||
Workspace::filemap_t::iterator e_it = getWorkspace().getFiles().find(filename);
|
Workspace::filemap_t::iterator e_it = getWorkspace().getFiles().find(filename);
|
||||||
Q_ASSERT(e_it!=getWorkspace().getFiles().end());
|
Q_ASSERT(e_it!=getWorkspace().getFiles().end());
|
||||||
const RepoFile &e = *e_it.value();
|
const WorkspaceFile &e = *e_it.value();
|
||||||
|
|
||||||
// Skip unwanted files
|
// Skip unwanted files
|
||||||
if(!(includeMask & e.getType()))
|
if(!(includeMask & e.getType()))
|
||||||
@ -1039,7 +1039,7 @@ bool MainWindow::diffFile(const QString &repoFile)
|
|||||||
void MainWindow::on_actionDiff_triggered()
|
void MainWindow::on_actionDiff_triggered()
|
||||||
{
|
{
|
||||||
QStringList selection;
|
QStringList selection;
|
||||||
getSelectionFilenames(selection, RepoFile::TYPE_REPO);
|
getSelectionFilenames(selection, WorkspaceFile::TYPE_REPO);
|
||||||
|
|
||||||
for(QStringList::iterator it = selection.begin(); it!=selection.end(); ++it)
|
for(QStringList::iterator it = selection.begin(); it!=selection.end(); ++it)
|
||||||
if(!diffFile(*it))
|
if(!diffFile(*it))
|
||||||
@ -1158,7 +1158,7 @@ void MainWindow::on_actionPull_triggered()
|
|||||||
void MainWindow::on_actionCommit_triggered()
|
void MainWindow::on_actionCommit_triggered()
|
||||||
{
|
{
|
||||||
QStringList commit_files;
|
QStringList commit_files;
|
||||||
getSelectionFilenames(commit_files, RepoFile::TYPE_MODIFIED, true);
|
getSelectionFilenames(commit_files, WorkspaceFile::TYPE_MODIFIED, true);
|
||||||
|
|
||||||
if(commit_files.empty())
|
if(commit_files.empty())
|
||||||
return;
|
return;
|
||||||
@ -1191,7 +1191,7 @@ void MainWindow::on_actionCommit_triggered()
|
|||||||
// when committing after a merge where fossil thinks that we are trying to do
|
// when committing after a merge where fossil thinks that we are trying to do
|
||||||
// a partial commit which is not permitted.
|
// a partial commit which is not permitted.
|
||||||
QStringList all_modified_files;
|
QStringList all_modified_files;
|
||||||
getAllFilenames(all_modified_files, RepoFile::TYPE_MODIFIED);
|
getAllFilenames(all_modified_files, WorkspaceFile::TYPE_MODIFIED);
|
||||||
|
|
||||||
if(commit_files.size() != all_modified_files.size())
|
if(commit_files.size() != all_modified_files.size())
|
||||||
files = commit_files;
|
files = commit_files;
|
||||||
@ -1205,7 +1205,7 @@ void MainWindow::on_actionAdd_triggered()
|
|||||||
{
|
{
|
||||||
// Get unknown files only
|
// Get unknown files only
|
||||||
QStringList selection;
|
QStringList selection;
|
||||||
getSelectionFilenames(selection, RepoFile::TYPE_UNKNOWN);
|
getSelectionFilenames(selection, WorkspaceFile::TYPE_UNKNOWN);
|
||||||
|
|
||||||
if(selection.empty())
|
if(selection.empty())
|
||||||
return;
|
return;
|
||||||
@ -1222,10 +1222,10 @@ void MainWindow::on_actionAdd_triggered()
|
|||||||
void MainWindow::on_actionDelete_triggered()
|
void MainWindow::on_actionDelete_triggered()
|
||||||
{
|
{
|
||||||
QStringList repo_files;
|
QStringList repo_files;
|
||||||
getSelectionFilenames(repo_files, RepoFile::TYPE_REPO);
|
getSelectionFilenames(repo_files, WorkspaceFile::TYPE_REPO);
|
||||||
|
|
||||||
QStringList unknown_files;
|
QStringList unknown_files;
|
||||||
getSelectionFilenames(unknown_files, RepoFile::TYPE_UNKNOWN);
|
getSelectionFilenames(unknown_files, WorkspaceFile::TYPE_UNKNOWN);
|
||||||
|
|
||||||
QStringList all_files = repo_files+unknown_files;
|
QStringList all_files = repo_files+unknown_files;
|
||||||
|
|
||||||
@ -1259,7 +1259,7 @@ void MainWindow::on_actionDelete_triggered()
|
|||||||
void MainWindow::on_actionRevert_triggered()
|
void MainWindow::on_actionRevert_triggered()
|
||||||
{
|
{
|
||||||
QStringList modified_files;
|
QStringList modified_files;
|
||||||
getSelectionFilenames(modified_files, RepoFile::TYPE_EDITTED|RepoFile::TYPE_ADDED|RepoFile::TYPE_DELETED|RepoFile::TYPE_MISSING|RepoFile::TYPE_CONFLICTED);
|
getSelectionFilenames(modified_files, WorkspaceFile::TYPE_EDITTED|WorkspaceFile::TYPE_ADDED|WorkspaceFile::TYPE_DELETED|WorkspaceFile::TYPE_MISSING|WorkspaceFile::TYPE_CONFLICTED);
|
||||||
|
|
||||||
if(modified_files.empty())
|
if(modified_files.empty())
|
||||||
return;
|
return;
|
||||||
@ -1276,7 +1276,7 @@ void MainWindow::on_actionRevert_triggered()
|
|||||||
void MainWindow::on_actionRename_triggered()
|
void MainWindow::on_actionRename_triggered()
|
||||||
{
|
{
|
||||||
QStringList repo_files;
|
QStringList repo_files;
|
||||||
getSelectionFilenames(repo_files, RepoFile::TYPE_REPO);
|
getSelectionFilenames(repo_files, WorkspaceFile::TYPE_REPO);
|
||||||
|
|
||||||
if(repo_files.length()!=1)
|
if(repo_files.length()!=1)
|
||||||
return;
|
return;
|
||||||
@ -1614,7 +1614,7 @@ void MainWindow::on_actionRenameFolder_triggered()
|
|||||||
Workspace::filelist_t files_to_move;
|
Workspace::filelist_t files_to_move;
|
||||||
QStringList new_paths;
|
QStringList new_paths;
|
||||||
QStringList operations;
|
QStringList operations;
|
||||||
foreach(RepoFile *r, getWorkspace().getFiles())
|
foreach(WorkspaceFile *r, getWorkspace().getFiles())
|
||||||
{
|
{
|
||||||
if(r->getPath().indexOf(old_path)!=0)
|
if(r->getPath().indexOf(old_path)!=0)
|
||||||
continue;
|
continue;
|
||||||
@ -1641,7 +1641,7 @@ void MainWindow::on_actionRenameFolder_triggered()
|
|||||||
Q_ASSERT(files_to_move.length() == new_paths.length());
|
Q_ASSERT(files_to_move.length() == new_paths.length());
|
||||||
for(int i=0; i<files_to_move.length(); ++i)
|
for(int i=0; i<files_to_move.length(); ++i)
|
||||||
{
|
{
|
||||||
RepoFile *r = files_to_move[i];
|
WorkspaceFile *r = files_to_move[i];
|
||||||
const QString &new_file_path = new_paths[i] + PATH_SEPARATOR + r->getFilename();
|
const QString &new_file_path = new_paths[i] + PATH_SEPARATOR + r->getFilename();
|
||||||
|
|
||||||
if(!fossil().renameFile(r->getFilePath(), new_file_path, false))
|
if(!fossil().renameFile(r->getFilePath(), new_file_path, false))
|
||||||
@ -1677,7 +1677,7 @@ void MainWindow::on_actionRenameFolder_triggered()
|
|||||||
// Now that target directories exist copy files
|
// Now that target directories exist copy files
|
||||||
for(int i=0; i<files_to_move.length(); ++i)
|
for(int i=0; i<files_to_move.length(); ++i)
|
||||||
{
|
{
|
||||||
RepoFile *r = files_to_move[i];
|
WorkspaceFile *r = files_to_move[i];
|
||||||
QString new_file_path = new_paths[i] + PATH_SEPARATOR + r->getFilename();
|
QString new_file_path = new_paths[i] + PATH_SEPARATOR + r->getFilename();
|
||||||
|
|
||||||
if(QFile::exists(new_file_path))
|
if(QFile::exists(new_file_path))
|
||||||
@ -1698,7 +1698,7 @@ void MainWindow::on_actionRenameFolder_triggered()
|
|||||||
// Finally delete old files
|
// Finally delete old files
|
||||||
for(int i=0; i<files_to_move.length(); ++i)
|
for(int i=0; i<files_to_move.length(); ++i)
|
||||||
{
|
{
|
||||||
RepoFile *r = files_to_move[i];
|
WorkspaceFile *r = files_to_move[i];
|
||||||
|
|
||||||
log(tr("Removing old file '%0'").arg(r->getFilePath())+"\n");
|
log(tr("Removing old file '%0'").arg(r->getFilePath())+"\n");
|
||||||
|
|
||||||
@ -1737,7 +1737,7 @@ void MainWindow::on_actionViewStash_triggered()
|
|||||||
void MainWindow::on_actionNewStash_triggered()
|
void MainWindow::on_actionNewStash_triggered()
|
||||||
{
|
{
|
||||||
QStringList stashed_files;
|
QStringList stashed_files;
|
||||||
getSelectionFilenames(stashed_files, RepoFile::TYPE_MODIFIED, true);
|
getSelectionFilenames(stashed_files, WorkspaceFile::TYPE_MODIFIED, true);
|
||||||
|
|
||||||
if(stashed_files.empty())
|
if(stashed_files.empty())
|
||||||
return;
|
return;
|
||||||
|
@ -35,12 +35,12 @@ private:
|
|||||||
void log(const QString &text, bool isHTML=false);
|
void log(const QString &text, bool isHTML=false);
|
||||||
void setStatus(const QString &text);
|
void setStatus(const QString &text);
|
||||||
bool uiRunning() const;
|
bool uiRunning() const;
|
||||||
void getSelectionFilenames(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
|
void getSelectionFilenames(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false);
|
||||||
void getFileViewSelection(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
|
void getFileViewSelection(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false);
|
||||||
void getDirViewSelection(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
|
void getDirViewSelection(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false);
|
||||||
void getStashViewSelection(QStringList &stashNames, bool allIfEmpty=false);
|
void getStashViewSelection(QStringList &stashNames, bool allIfEmpty=false);
|
||||||
void getSelectionPaths(stringset_t &paths);
|
void getSelectionPaths(stringset_t &paths);
|
||||||
void getAllFilenames(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL);
|
void getAllFilenames(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL);
|
||||||
bool startUI();
|
bool startUI();
|
||||||
void stopUI();
|
void stopUI();
|
||||||
void enableActions(bool on);
|
void enableActions(bool on);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user