Check-in [487a412c72]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added repo cache unit.
Timelines: family | ancestors | descendants | both | feature/rewrite-multi-async
Files: files | file ages | folders
SHA1: 487a412c725f17febf53933bd173bc8ac07783d6
User & Date: tinus 2016-02-14 17:11:21.148
Context
2016-02-14
18:18
Added View class, implementing all the UI notifiers. check-in: 23ed19ff24 user: tinus tags: feature/rewrite-multi-async
17:11
Added repo cache unit. check-in: 487a412c72 user: tinus tags: feature/rewrite-multi-async
16:09
We're going to be creating a DLL plugin instead of a BPL one. Renamed the old project. Created new plugin unit, added bitmap for splash and about screens. check-in: 7c16f12a17 user: tinus tags: feature/rewrite-multi-async
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/Delphi10/VCSInfo_XSeattle.dpr.
11
12
13
14
15
16
17
18

19
20
21
22
23
  using PChar or ShortString parameters. }

{$R *.dres}

uses
  System.SysUtils,
  System.Classes,
  VCSInfoWzrd in '..\VCSInfoWzrd.pas';


{$R *.res}

begin
end.







|
>





11
12
13
14
15
16
17
18
19
20
21
22
23
24
  using PChar or ShortString parameters. }

{$R *.dres}

uses
  System.SysUtils,
  System.Classes,
  VCSInfoWzrd in '..\VCSInfoWzrd.pas',
  RepoCache in '..\RepoCache.pas';

{$R *.res}

begin
end.
Changes to src/Delphi10/VCSInfo_XSeattle.dproj.
97
98
99
100
101
102
103

104
105
106
107
108
109
110
        <DCC_DebugInformation>0</DCC_DebugInformation>
    </PropertyGroup>
    <ItemGroup>
        <DelphiCompile Include="$(MainSource)">
            <MainSource>MainSource</MainSource>
        </DelphiCompile>
        <DCCReference Include="..\VCSInfoWzrd.pas"/>

        <RcItem Include="..\Res\logo.bmp">
            <ResourceType>BITMAP</ResourceType>
            <ResourceId>BMP_LOGO</ResourceId>
        </RcItem>
        <BuildConfiguration Include="Release">
            <Key>Cfg_2</Key>
            <CfgParent>Base</CfgParent>







>







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
        <DCC_DebugInformation>0</DCC_DebugInformation>
    </PropertyGroup>
    <ItemGroup>
        <DelphiCompile Include="$(MainSource)">
            <MainSource>MainSource</MainSource>
        </DelphiCompile>
        <DCCReference Include="..\VCSInfoWzrd.pas"/>
        <DCCReference Include="..\RepoCache.pas"/>
        <RcItem Include="..\Res\logo.bmp">
            <ResourceType>BITMAP</ResourceType>
            <ResourceId>BMP_LOGO</ResourceId>
        </RcItem>
        <BuildConfiguration Include="Release">
            <Key>Cfg_2</Key>
            <CfgParent>Base</CfgParent>
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
                    </Platform>
                </DeployFile>
                <DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
                    <Platform Name="iOSSimulator">
                        <Overwrite>true</Overwrite>
                    </Platform>
                </DeployFile>
                <DeployFile LocalName="out\Win32\Debug\VCSInfo_XSeattle.dll" Configuration="Debug" Class="ProjectOutput">
                    <Platform Name="Win32">
                        <RemoteName>VCSInfo_XSeattle.dll</RemoteName>
                        <Overwrite>true</Overwrite>
                    </Platform>
                </DeployFile>
                <DeployClass Name="ProjectiOSDeviceResourceRules">




                    <Platform Name="iOSDevice64">
                        <Operation>1</Operation>






                    </Platform>
                    <Platform Name="iOSDevice32">
                        <Operation>1</Operation>





                    </Platform>
                </DeployClass>
                <DeployClass Name="ProjectOSXResource">
                    <Platform Name="OSX32">
                        <RemoteDir>Contents\Resources</RemoteDir>
                        <Operation>1</Operation>
                    </Platform>







|





|
>
>
>
>


>
>
>
>
>
>



>
>
>
>
>







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
183
                    </Platform>
                </DeployFile>
                <DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
                    <Platform Name="iOSSimulator">
                        <Overwrite>true</Overwrite>
                    </Platform>
                </DeployFile>
                <DeployFile LocalName="..\..\out\Win32\Debug\VCSInfo_XSeattle.dll" Configuration="Debug" Class="ProjectOutput">
                    <Platform Name="Win32">
                        <RemoteName>VCSInfo_XSeattle.dll</RemoteName>
                        <Overwrite>true</Overwrite>
                    </Platform>
                </DeployFile>
                <DeployClass Name="DependencyModule">
                    <Platform Name="Win32">
                        <Operation>0</Operation>
                        <Extensions>.dll;.bpl</Extensions>
                    </Platform>
                    <Platform Name="iOSDevice64">
                        <Operation>1</Operation>
                        <Extensions>.dylib</Extensions>
                    </Platform>
                    <Platform Name="OSX32">
                        <RemoteDir>Contents\MacOS</RemoteDir>
                        <Operation>1</Operation>
                        <Extensions>.dylib</Extensions>
                    </Platform>
                    <Platform Name="iOSDevice32">
                        <Operation>1</Operation>
                        <Extensions>.dylib</Extensions>
                    </Platform>
                    <Platform Name="iOSSimulator">
                        <Operation>1</Operation>
                        <Extensions>.dylib</Extensions>
                    </Platform>
                </DeployClass>
                <DeployClass Name="ProjectOSXResource">
                    <Platform Name="OSX32">
                        <RemoteDir>Contents\Resources</RemoteDir>
                        <Operation>1</Operation>
                    </Platform>
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
                </DeployClass>
                <DeployClass Name="Android_LauncherIcon36">
                    <Platform Name="Android">
                        <RemoteDir>res\drawable-ldpi</RemoteDir>
                        <Operation>1</Operation>
                    </Platform>
                </DeployClass>
                <DeployClass Name="DependencyModule">
                    <Platform Name="Win32">
                        <Operation>0</Operation>
                        <Extensions>.dll;.bpl</Extensions>
                    </Platform>
                    <Platform Name="iOSDevice64">
                        <Operation>1</Operation>
                        <Extensions>.dylib</Extensions>
                    </Platform>
                    <Platform Name="OSX32">
                        <RemoteDir>Contents\MacOS</RemoteDir>
                        <Operation>1</Operation>
                        <Extensions>.dylib</Extensions>
                    </Platform>
                    <Platform Name="iOSDevice32">
                        <Operation>1</Operation>
                        <Extensions>.dylib</Extensions>
                    </Platform>
                    <Platform Name="iOSSimulator">
                        <Operation>1</Operation>
                        <Extensions>.dylib</Extensions>
                    </Platform>
                </DeployClass>
                <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
                <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
                <ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
                <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>







|
<
<
<
<


<
<
<
<
<
<



<
<
<
<
<







523
524
525
526
527
528
529
530




531
532






533
534
535





536
537
538
539
540
541
542
                </DeployClass>
                <DeployClass Name="Android_LauncherIcon36">
                    <Platform Name="Android">
                        <RemoteDir>res\drawable-ldpi</RemoteDir>
                        <Operation>1</Operation>
                    </Platform>
                </DeployClass>
                <DeployClass Name="ProjectiOSDeviceResourceRules">




                    <Platform Name="iOSDevice64">
                        <Operation>1</Operation>






                    </Platform>
                    <Platform Name="iOSDevice32">
                        <Operation>1</Operation>





                    </Platform>
                </DeployClass>
                <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
                <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
                <ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
                <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
Added src/RepoCache.pas.
























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
unit RepoCache;

interface
uses
  System.Generics.Collections;

type
  TRepoInfo = class
  private
    FVCSClient: TVCSClient;
    FRoot: string;
    FLastCheckRepo: TDateTime;

    FBranch: string;
    FPending: Integer;
    FUntracked: Integer;
    FLastCheckWorkDir: TDateTime;

    FIncoming: Integer;
    FOutgoing: Integer;
    FLastCheckRemote: TDateTime;

    function GetIsRepo: Boolean;
    function GetBranch: string;
  public
    property IsRepo: Boolean         read GetIsRepo;
    property Client: TVCSClient      read FVCSClient;
    property Root: string            read FRoot;
    property Branch: string          read GetBranch;
    property Pending: Integer        read GetPending;
    property Untracked: Integer      read GetUntracked;
    property Incoming: Integer       read GetIncoming;
    property Outgoing: Integer       read GetOutgoing;
  end;


  TRepoCache = class
  public

  end;

implementation

end.
Changes to src/VCSInfoWzrd.pas.
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
{ TVCSInfoStatusWizard }

constructor TVCSInfoStatusWizard.Create;
begin
  FLogo := TBitmap.Create;
  FLogo.LoadFromResourceName(HInstance, 'BMP_LOGO');
  (BorlandIDEServices as IOTAAboutBoxServices).AddPluginInfo(rsWizardName, rsWizardName, FLogo.Handle,
                                                            False, 'Open Source');
  SplashScreenServices.AddPluginBitmap(rsWizardName, FLogo.Handle,
                                        False, 'Open Source');
  // TODO: set up cache
  // TODO: set up UI
  // TODO: set up thread queue, timer and notifiers
end;

destructor TVCSInfoStatusWizard.Destroy;
begin
  // TODO: destroy all the objects we own
  FLogo.Free;
  inherited;
end;

procedure TVCSInfoStatusWizard.Execute;
begin
  // TODO: when will this be called?

end;

function TVCSInfoStatusWizard.GetIDString: string;
begin
  Result := scWizardID;
end;








|

|
|
|
|












>







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
{ TVCSInfoStatusWizard }

constructor TVCSInfoStatusWizard.Create;
begin
  FLogo := TBitmap.Create;
  FLogo.LoadFromResourceName(HInstance, 'BMP_LOGO');
  (BorlandIDEServices as IOTAAboutBoxServices).AddPluginInfo(rsWizardName, rsWizardName, FLogo.Handle,
                                                            False, 'Open source');
  SplashScreenServices.AddPluginBitmap(rsWizardName, FLogo.Handle,
                                        False, 'Open source');
  // TODO: set up cache (Model)
  // TODO: set up UI, including timer and notifiers (View)
  // TODO: set up thread queue (Controller)
end;

destructor TVCSInfoStatusWizard.Destroy;
begin
  // TODO: destroy all the objects we own
  FLogo.Free;
  inherited;
end;

procedure TVCSInfoStatusWizard.Execute;
begin
  // TODO: when will this be called?

end;

function TVCSInfoStatusWizard.GetIDString: string;
begin
  Result := scWizardID;
end;