Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Svn Class Reference

#include <svn.hpp>

Collaboration diagram for Svn:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  SC_WAIT = 0x0001, SC_APPEND_USER_PASS = 0x0002, SC_HIDE = 0x0004, SC_DISABLE_CURSOR_CHANGE = 0x0008,
  SC_REFRESH = 0x0010
}

Public Slots

void readFromStdout ()
void readFromStderr ()
void procFinished ()

Public Member Functions

 Svn (Principal *parent)
void common (QString command)
int update (const QString &revision="")
int log (const QString &filename, bool is_verbouse, bool stop_on_copy, QStringList &out_txt)
int status ()
int info (const QString &filename, QStringList &out_txt, bool hideOutput=false)
int commit (const QString &wd, QString msg)
int cleanup (QString &wd)
int revert (const QString &filename, bool recursive)
int resolve (const QString &filename)
int add (const QString &filename, bool recursive)
int del (const QString filename)
int copy (QString &src, const QString &dst, const QString &msg, const QString &rev="")
int move (const QString &src, const QString &dst, const QString &msg, const QString &rev="")
int switch_cmd (const QString &url, const QString &rev, bool non_recursive)
int merge (const QString &file_dir_name, const QString &first, const QString &second, const QString &wcpath, bool use_rev, bool non_recursive, bool dryrun)
int diff (const QString &file_dir_name_1, const QString &file_dir_name_2, const QString &rev, bool use_external_cmd, bool non_recursive, bool notice_ancestry, const QString &extensions, QStringList &out_txt)
int cat (const QString &filename, const QString &rev, QStringList &out_txt)
int blame (const QString &filename, const QString &rev, QStringList &out_txt)
int checkout (const QString &rev="", bool non_recursive=false)
int export_cmd (const QString &url, const QString &local_path, const QString &rev)
int import (const QString &url, const QString &local_path, QString msg, bool non_recursive)
int mkdir (const QString &dir)
int proplist (const QString &filename, const QString &rev, QStringList &out_txt)
int propset (const QString &filename, const QString &rev, const QString &key, const QString &value)
int propdel (const QString &filename, const QString &rev, const QString &key)
int list (const QString &url, const QString &rev, QStringList &out_txt, bool is_hide=false, bool recursive=true, bool dont_change_cursor=false)
void setSvn (QString svn)
int getLastRev ()
bool isRunning ()
QString getLastCommand ()

Public Attributes

bool needs_refresh_

Private Member Functions

int execCommand (unsigned int flags, QStringList *out_list=NULL)
QString showCommand ()

Private Attributes

Principalcaller
QProcess * proc
QTextBrowser * out_win_
QStringList out_text_
bool show_enable_
bool is_hide_all_
bool is_refreshable_command_
bool is_ready_for_last_command_
QString svn_
QWidget * parent_
QString diff_cmd_
bool disable_cursor_change_

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
SC_WAIT 
SC_APPEND_USER_PASS 
SC_HIDE 
SC_DISABLE_CURSOR_CHANGE 
SC_REFRESH 

Definition at line 39 of file svn.hpp.


Constructor & Destructor Documentation

Svn::Svn Principal parent  ) 
 

Default Constructor

Definition at line 18 of file svn.cpp.

References caller, is_ready_for_last_command_, proc, procFinished(), readFromStderr(), readFromStdout(), and svn_.


Member Function Documentation

int Svn::add const QString &  filename,
bool  recursive
 

Add files to your working copy and schedule them for addition to the repository. They will be uploaded and added to the repository on your next commit. If you add something and change your mind before committing, you can unschedule the addition using revert.

Definition at line 153 of file svn.cpp.

References common(), execCommand(), proc, SC_REFRESH, and SC_WAIT.

Referenced by Principal::fileSaveAction_activated().

Here is the call graph for this function:

int Svn::blame const QString &  filename,
const QString &  rev,
QStringList &  out_txt
 

Show author and revision information in-line for the specified files or URLs. Each line of text is annotated at the beginning with the author (username) and the revision number for the last change to that line.

Definition at line 242 of file svn.cpp.

References common(), execCommand(), proc, and SC_APPEND_USER_PASS.

Here is the call graph for this function:

int Svn::cat const QString &  filename,
const QString &  rev,
QStringList &  out_txt
 

Output the contents of the specified files or URLs

Definition at line 232 of file svn.cpp.

References common(), execCommand(), proc, and SC_APPEND_USER_PASS.

Here is the call graph for this function:

int Svn::checkout const QString &  rev = "",
bool  non_recursive = false
 

Check out a working copy from a repository. If PATH is omitted, the basename of the URL will be used as the destination

Definition at line 252 of file svn.cpp.

References Principal::adress, caller, common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, SC_WAIT, and Principal::wd.

Referenced by Principal::CVS_activated().

Here is the call graph for this function:

int Svn::cleanup QString &  wd  ) 
 

Recursively clean up the working copy, removing locks resuming unfinished operations. If you ever get a “working copy locked” error, run this command to remove stale locks and get your working copy into a usable state again.

Definition at line 130 of file svn.cpp.

References common(), execCommand(), proc, and SC_WAIT.

Here is the call graph for this function:

int Svn::commit const QString &  wd,
QString  msg
 

Send changes from your working copy to the repository. If you do not supply a log message with your commit by using either the --file or --message switch, svn will launch your editor for you to compose a commit message.

Definition at line 118 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, and SC_WAIT.

Referenced by Principal::commitAction_activated().

Here is the call graph for this function:

void Svn::common QString  command  ) 
 

Commands used in svn subcomamands initioalization

Definition at line 30 of file svn.cpp.

References proc, and svn_.

Referenced by add(), blame(), cat(), checkout(), cleanup(), commit(), copy(), del(), diff(), export_cmd(), import(), info(), list(), log(), merge(), mkdir(), move(), propdel(), proplist(), propset(), resolve(), revert(), status(), switch_cmd(), and update().

int Svn::copy QString &  src,
const QString &  dst,
const QString &  msg,
const QString &  rev = ""
 

Copy a file or directory in a working copy or in the repository.

Definition at line 167 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, and SC_WAIT.

Here is the call graph for this function:

int Svn::del const QString  filename  ) 
 

Items specified by PATH are scheduled for deletion upon the next commit. Files (and directories that have not been committed) are immediately removed from the working copy. The command will not remove any unversioned or modified items; use the --force switch to override this behavior.

Definition at line 161 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, and SC_WAIT.

Referenced by Principal::fileSaveAction_activated().

Here is the call graph for this function:

int Svn::diff const QString &  file_dir_name_1,
const QString &  file_dir_name_2,
const QString &  rev,
bool  use_external_cmd,
bool  non_recursive,
bool  notice_ancestry,
const QString &  extensions,
QStringList &  out_txt
 

Display the differences between two paths.

Definition at line 37 of file svn.cpp.

References common(), execCommand(), proc, and SC_APPEND_USER_PASS.

Here is the call graph for this function:

int Svn::execCommand unsigned int  flags,
QStringList *  out_list = NULL
[private]
 

Execute svn the call

Definition at line 416 of file svn.cpp.

References caller, disable_cursor_change_, is_hide_all_, is_refreshable_command_, Principal::login(), out_text_, parent_, Principal::password(), proc, SC_APPEND_USER_PASS, SC_DISABLE_CURSOR_CHANGE, SC_HIDE, SC_REFRESH, SC_WAIT, show_enable_, and showCommand().

Referenced by add(), blame(), cat(), checkout(), cleanup(), commit(), copy(), del(), diff(), export_cmd(), import(), info(), list(), log(), merge(), mkdir(), move(), propdel(), proplist(), propset(), resolve(), revert(), status(), switch_cmd(), and update().

Here is the call graph for this function:

int Svn::export_cmd const QString &  url,
const QString &  local_path,
const QString &  rev
 

exports a clean directory tree from the repository specified by URL, at revision REV if it is given, otherwise at HEAD, into PATH

Definition at line 268 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, and SC_WAIT.

Here is the call graph for this function:

QString Svn::getLastCommand  ) 
 

Definition at line 401 of file svn.cpp.

References is_ready_for_last_command_, and proc.

int Svn::getLastRev  ) 
 

Return the revision number of the props.graphml file in the remote repository or the revision number of the local props.graphml if the first one is unavaliable (user disconnected , firewall or ...)

Definition at line 350 of file svn.cpp.

References Principal::adress, caller, info(), and Principal::wd.

Referenced by Principal::init().

Here is the call graph for this function:

int Svn::import const QString &  url,
const QString &  local_path,
QString  msg,
bool  non_recursive
 

Recursively commit a copy of PATH to URL. If PATH is omitted “.” is assumed. Parent directories are created in the repository as necessary.

Definition at line 279 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, and SC_WAIT.

Here is the call graph for this function:

int Svn::info const QString &  filename,
QStringList &  out_txt,
bool  hideOutput = false
 

Print information about a file in your working copy, including: Path, Name, URL, Revision, Node Kind, Last Changed Author, Last Changed Revision, Last Changed, Date Text Last Updated, Properties Last Updated, Checksum

Definition at line 109 of file svn.cpp.

References common(), execCommand(), proc, and SC_HIDE.

Referenced by getLastRev().

Here is the call graph for this function:

bool Svn::isRunning  )  [inline]
 

Definition at line 214 of file svn.hpp.

References proc.

int Svn::list const QString &  url,
const QString &  rev,
QStringList &  out_txt,
bool  is_hide = false,
bool  recursive = true,
bool  dont_change_cursor = false
 

List each TARGET file and the contents of each TARGET directory as they exist in the repository. If TARGET is a working copy path, the corresponding repository URL will be used.

Definition at line 332 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_DISABLE_CURSOR_CHANGE, SC_HIDE, and SC_WAIT.

Here is the call graph for this function:

int Svn::log const QString &  filename,
bool  is_verbouse,
bool  stop_on_copy,
QStringList &  out_txt
 

If no arguments are supplied, log shows the log messages for all files and directories inside of (and including) the current working directory of your working copy. You can refine the results by specifying a filename.

Definition at line 91 of file svn.cpp.

References common(), execCommand(), proc, and SC_APPEND_USER_PASS.

Here is the call graph for this function:

int Svn::merge const QString &  file_dir_name,
const QString &  first,
const QString &  second,
const QString &  wcpath,
bool  use_rev,
bool  non_recursive,
bool  dryrun
 

svn merge sourceURL1[] sourceURL2[] [WCPATH] svn merge — Apply the differences between two sources to a working copy path.

Definition at line 211 of file svn.cpp.

References common(), execCommand(), proc, SC_REFRESH, and SC_WAIT.

Here is the call graph for this function:

int Svn::mkdir const QString &  dir  ) 
 

Create a directory with a name given by the final component of the PATH or URL. A directory specified by a working copy PATH is scheduled for addition in the working copy. A directory specified by a URL is created in the repository via an immediate commit. Multiple directory URLs are committed atomically. In both cases all the intermediate directories must already exist.

Definition at line 292 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, and SC_WAIT.

Here is the call graph for this function:

int Svn::move const QString &  src,
const QString &  dst,
const QString &  msg,
const QString &  rev = ""
 

This command moves a file or directory in your working copy or in the repository.

Definition at line 183 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, and SC_WAIT.

Here is the call graph for this function:

void Svn::procFinished  )  [slot]
 

Definition at line 383 of file svn.cpp.

References disable_cursor_change_, is_hide_all_, is_ready_for_last_command_, is_refreshable_command_, needs_refresh_, out_win_, parent_, and proc.

Referenced by Svn().

int Svn::propdel const QString &  filename,
const QString &  rev,
const QString &  key
 

This removes properties from files, directories, or revisions.

Definition at line 321 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, and SC_WAIT.

Here is the call graph for this function:

int Svn::proplist const QString &  filename,
const QString &  rev,
QStringList &  out_txt
 

List all properties on files, directories, or revisions.

Definition at line 298 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, and SC_WAIT.

Here is the call graph for this function:

int Svn::propset const QString &  filename,
const QString &  rev,
const QString &  key,
const QString &  value
 

Set PROPNAME to PROPVAL on files, directories, or revisions.

Definition at line 309 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, and SC_WAIT.

Here is the call graph for this function:

void Svn::readFromStderr  )  [slot]
 

Definition at line 374 of file svn.cpp.

References disable_cursor_change_, out_win_, and proc.

Referenced by Svn().

void Svn::readFromStdout  )  [slot]
 

Definition at line 362 of file svn.cpp.

References out_text_, out_win_, proc, and show_enable_.

Referenced by Svn().

int Svn::resolve const QString &  filename  ) 
 

Remove “conflicted” state on working copy files or directories. This routine does not semantically resolve conflict markers; it merely removes conflict-related artifact files and allows PATH to be committed again; that is, it tells Subversion that the conflicts have been “resolved”.

Definition at line 146 of file svn.cpp.

References common(), execCommand(), proc, SC_REFRESH, and SC_WAIT.

Here is the call graph for this function:

int Svn::revert const QString &  filename,
bool  recursive
 

Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will not only revert the contents of an item in your working copy, but also any property changes. Finally, you can use it to undo any scheduling operations that you may have done (e.g. files scheduled for addition or deletion can be “unscheduled”).

Definition at line 137 of file svn.cpp.

References common(), execCommand(), proc, SC_REFRESH, and SC_WAIT.

Referenced by Principal::CVS_activated(), and Principal::revertAction_activated().

Here is the call graph for this function:

void Svn::setSvn QString  svn  ) 
 

Definition at line 346 of file svn.cpp.

References svn_.

QString Svn::showCommand  )  [private]
 

Display the Svn command in a textBox

Definition at line 469 of file svn.cpp.

References out_win_, and proc.

Referenced by execCommand().

int Svn::status  ) 
 

Print the status of working copy files and directories. With no arguments, it prints only locally modified items (no repository access).

Definition at line 102 of file svn.cpp.

References caller, common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_WAIT, and Principal::wd.

Here is the call graph for this function:

int Svn::switch_cmd const QString &  url,
const QString &  rev,
bool  non_recursive
 

This subcommand updates your working copy to mirror a new URL—usually a URL which shares a common ancestor with your working copy, although not necessarily. This is the Subversion way to move a working copy to a new branch.

Definition at line 199 of file svn.cpp.

References common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, and SC_WAIT.

Here is the call graph for this function:

int Svn::update const QString &  revision = ""  ) 
 

update brings changes from the repository into your working copy. If no revision given, it brings your working copy up-to-date with the HEAD revision. Otherwise, it synchronizes the working copy to the given revision. If filename is set update only the filename.

Definition at line 79 of file svn.cpp.

References caller, common(), execCommand(), proc, SC_APPEND_USER_PASS, SC_REFRESH, SC_WAIT, and Principal::wd.

Referenced by Principal::svnUpdate_to_Older_VersionAction_activated().

Here is the call graph for this function:


Member Data Documentation

Principal* Svn::caller [private]
 

Definition at line 228 of file svn.hpp.

Referenced by checkout(), execCommand(), getLastRev(), status(), Svn(), and update().

QString Svn::diff_cmd_ [private]
 

Definition at line 236 of file svn.hpp.

bool Svn::disable_cursor_change_ [private]
 

Definition at line 237 of file svn.hpp.

Referenced by execCommand(), procFinished(), and readFromStderr().

bool Svn::is_hide_all_ [private]
 

Definition at line 232 of file svn.hpp.

Referenced by execCommand(), and procFinished().

bool Svn::is_ready_for_last_command_ [private]
 

Definition at line 233 of file svn.hpp.

Referenced by getLastCommand(), procFinished(), and Svn().

bool Svn::is_refreshable_command_ [private]
 

Definition at line 233 of file svn.hpp.

Referenced by execCommand(), and procFinished().

bool Svn::needs_refresh_
 

Definition at line 213 of file svn.hpp.

Referenced by procFinished().

QStringList Svn::out_text_ [private]
 

Definition at line 231 of file svn.hpp.

Referenced by execCommand(), and readFromStdout().

QTextBrowser* Svn::out_win_ [private]
 

Definition at line 230 of file svn.hpp.

Referenced by procFinished(), readFromStderr(), readFromStdout(), and showCommand().

QWidget* Svn::parent_ [private]
 

Definition at line 235 of file svn.hpp.

Referenced by execCommand(), and procFinished().

QProcess* Svn::proc [private]
 

Definition at line 229 of file svn.hpp.

Referenced by add(), blame(), cat(), checkout(), cleanup(), commit(), common(), copy(), del(), diff(), execCommand(), export_cmd(), getLastCommand(), import(), info(), isRunning(), list(), log(), merge(), mkdir(), move(), procFinished(), propdel(), proplist(), propset(), readFromStderr(), readFromStdout(), resolve(), revert(), showCommand(), status(), Svn(), switch_cmd(), and update().

bool Svn::show_enable_ [private]
 

Definition at line 232 of file svn.hpp.

Referenced by execCommand(), and readFromStdout().

QString Svn::svn_ [private]
 

Definition at line 234 of file svn.hpp.

Referenced by common(), setSvn(), and Svn().


The documentation for this class was generated from the following files: Untitled Document Pesquisa Psi SourceForge.net Logo