Menu

[r568]: / trunk / src / Accurev.h  Maximize  Restore  History

Download this file

116 lines (88 with data), 4.5 kB

  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
// CommitMonitor - simple checker for new commits in svn repositories
// Copyright (C) 2007, 2009-2010 - Stefan Kueng
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#pragma once
#include <vector>
#include <map>
#include "SCCS.h"
#include <string>
using namespace std;
class ACCUREV : public SCCS
{
public:
ACCUREV(void);
~ACCUREV(void);
void SetAuthInfo(const std::wstring& username, const std::wstring& password);
bool Cat(std::wstring sUrl, std::wstring sFile);
/**
* returns the info for the \a path.
* \param path a path or an url
* \param pegrev the peg revision to use
* \param revision the revision to get the info for
* \param recurse if TRUE, then GetNextFileInfo() returns the info also
* for all children of \a path.
*/
const SVNInfoData * GetFirstFileInfo(std::wstring path, svn_revnum_t pegrev, svn_revnum_t revision, bool recurse = false);
size_t GetFileCount() {return (size_t)0;}
/**
* Returns the info of the next file in the file list. If no more files are in the list then NULL is returned.
* See GetFirstFileInfo() for details.
*/
const SVNInfoData * GetNextFileInfo();
svn_revnum_t GetHEADRevision(const std::wstring& repo, const std::wstring& url);
bool GetLog(const std::wstring& repo, const std::wstring& url, svn_revnum_t startrev, svn_revnum_t endrev);
//map<svn_revnum_t,SVNLogEntry> m_logs; ///< contains the gathered log information
bool Diff(const wstring& url1, svn_revnum_t pegrevision, svn_revnum_t revision1,
svn_revnum_t revision2, bool ignoreancestry, bool nodiffdeleted,
bool ignorecontenttype, const wstring& options, bool bAppend,
const wstring& outputfile, const wstring& errorfile);
wstring CanonicalizeURL(const wstring& url);
wstring GetLastErrorMsg();
/**
* Sets and clears the progress info which is shown during lengthy operations.
* \param pProgressDlg the CProgressDlg object to show the progress info on.
* \param bShowProgressBar set to true if the progress bar should be shown. Only makes
* sense if the total amount of the progress is known beforehand. Otherwise the
* progressbar is always "empty".
*/
void SetAndClearProgressInfo(CProgressDlg * pProgressDlg, bool bShowProgressBar = false);
/*
struct SVNProgress
{
apr_off_t progress; ///< operation progress
apr_off_t total; ///< operation progress
apr_off_t overall_total; ///< total bytes transferred, use SetAndClearProgressInfo() to reset this
apr_off_t BytesPerSecond; ///< Speed in bytes per second
wstring SpeedString; ///< String for speed. Either "xxx Bytes/s" or "xxx kBytes/s"
};
bool m_bCanceled;
svn_error_t * Err; ///< Global error object struct
*/
private:
bool logParser(const wstring& repo, const wstring& url, const wstring& rawLog);
bool issueParser(const wstring& rawLog, SVNLogEntry& logEntry);
// Accurev command line calls
bool AccuLogin(const wstring& username, const wstring& password);
bool AccuGetLastPromote(const wstring& repo, const wstring& url, long *pTransactionNo);
bool AccuGetHistory(const wstring& repo, const wstring& url, long startrev, long endrev, wstring& rawLog);
bool AccuIssueList(const wstring& repo, const wstring& url, long issueNo, wstring& rawLog);
size_t ExecuteAccurev(std::wstring Parameters, size_t SecondsToWait, wstring& stdOut, wstring& stdErr);
void ClearErrors();
void SetError(const wchar_t *pErrorString);
private:
svn_error_t errInt;
const wchar_t *pErrorString;
vector<SVNInfoData> m_arInfo; ///< contains all gathered info structs.
unsigned int m_pos; ///< the current position of the vector.
};
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.