msaccess-vcs-addin
msaccess-vcs-addin copied to clipboard
Support TortoiseGitDiff as Diff Tool
I am trying to set the Diff Tool to Tortoise Git. Being as it has a command line including defining File 1 and File 2, I created a batch file to accept the 2 file properties in the "else" case of clsViewDiff.RunCompare. When I do a Merge Build with a issue and click Show Diff, I get the vbNullString case asking for me to enter a value for Diff Tool.
The batch file is in the FE folder.
I also tried putting it in the VCS addon-folder.
What am I missing?
PS: The batch file could be eliminated if the "Else" case did string replacement instead of concatenation. strCmd = Replace(Replace(Me.ToolName,"<File1>",strFile1),"<File2>",strFile2)
Originally posted by @ronmcca in https://github.com/joyfullservice/msaccess-vcs-addin/discussions/579
Great suggestion, @ronmcca! I have created an issue for this feature request so we can collaborate and track progress on implementing this.
This should be included in the core add-in in the next release!
Thank you, I will install and test when released.
I installed and tested the Dev branch.
clsViewDiff. RunCompare has an array() call in MultiReplace that was passing a 2-dimensional array. I removed the Array() and the diff now works.
I am attaching the modified file because I have not been able to push it up to my fork of the add-on.
Thank you,
Ron McCarry It Manager Pack Air Inc. Leave Testimonialhttps://g.page/r/CehZz65pBzwFEBM/review | Bloghttps://packairinc.com/blog/ @.***> | LinkedInhttps://www.linkedin.com/company/pack-air-inc-/ | Websitehttps://www.packairinc.com/
From: Adam Waller @.> Sent: Monday, February 10, 2025 5:33 PM To: joyfullservice/msaccess-vcs-addin @.> Cc: Ron McCarry @.>; Mention @.> Subject: Re: [joyfullservice/msaccess-vcs-addin] Support TortoiseGitDiff as Diff Tool (Issue #580)
Closed #580https://github.com/joyfullservice/msaccess-vcs-addin/issues/580 as completed via 3c2ea8bhttps://github.com/joyfullservice/msaccess-vcs-addin/commit/3c2ea8b24cb2d2dc41483ba05843a77108772df3.
— Reply to this email directly, view it on GitHubhttps://github.com/joyfullservice/msaccess-vcs-addin/issues/580#event-16256596641, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AENTBJWSGEWNDSWXWOXDM4T2PEZKVAVCNFSM6AAAAABWX2D7PGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJWGI2TMNJZGY3DIMI. You are receiving this because you were mentioned.Message ID: @.@.>>
Sorry about the 2 pull requests. Delete the 1 to main. They both should be 1 change to 1 file.
Thanks for the feedback! I will get that fixed before I roll out the 4.10 release... While you are at it, can you test out the new button on the toolbar? Set the repository tool in the options,
Then click the new button on the toolbar to jump right to TortoiseGit in your repository...
I don't have TortoiseGit installed on my system, but if you could verify that this works as intended, that would be helpful!
Thanks for letting me know about the array issue. That was my bad. 🤦♂
TortoiseGit installs itself as an explore add-on with right click menus for each repository.
TortoisGitProc.exe pops up the about window. @.***
clsVersionControl.OpenRepository ShellEx "TortoiseGitProc.exe", "/command:repostatus /closeonend:0 /path:" & strFolder Note: The commands need to be passed in strParams and the commands are case sensitive. Opens a view to preview and commit changes. @.***
clsVersionControl.OpenRepository ShellEx "TortoiseGitProc.exe", "/command:repobrowser /closeonend:0 /path:" & strFolder Opens a view of the repository. @.***
clsVersionControl.OpenRepository
D.1. TortoiseGit Commands The TortoiseGit GUI program is called TortoiseGitProc.exe. All commands are specified with the parameter /command:abcd where abcd is the required command name. Most of these commands need at least one path argument, which is given with /path:"some\path". In the following table the command refers to the /command:abcd parameter and the path refers to the /path:"some\path" parameter. Since some of the commands can take a list of target paths (e.g. committing several specific files) the /path parameter can take several paths, separated by a * character. TortoiseGit uses temporary files to pass multiple arguments between the shell extension and the main program. From TortoiseGit 1.5.0 on and later, /notempfile parameter is obsolete and there is no need to add it anymore. The progress dialog which is used for commits, updates and many more git.exe commands usually stays open after the command has finished until the user presses the OK button. This can be changed in the settings dialog. You may use /closeonend parameter to override the this setting from your batch file. To close the (git.exe) progress dialog at the end of a command automatically without using the permanent setting you can pass the /closeonend parameter.
-
/closeonend:0 Close manually
-
/closeonend:1 Auto-close if no further options are available
-
/closeonend:2 Auto-close if no errors The table below lists all the commands which can be accessed using the TortoiseGitProc.exe command line. As described above, these should be used in the form /command:abcd. In the table, the /command prefix is omitted to save space. Table D.1. List of available commands and options Command Description :about Shows the about dialog. This is also shown if no command is given. :bisect Allows to control the bisect @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-bisect.html> of TortoiseGit. Use the /start parameter to start a bisect you can specify /good:REF and /bad:REF here). When bisect is active, you can use /good, /bad, /skip and /reset to control the bisect process. :fetch Opens the fetch @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-pull.html>. Use the /remote parameter to control the remote which should be pre-selected. :firststart Shows the first start wizard. :log Opens the log @.***:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-showlog.html>. The /path specifies the file or folder for which the log should be shown. Additional options can be set: /rev:"SHA1" highlights and automatically scrolls to the specified revision, /endrev:"SHA1/branch", shows the log of the specified revision, /startrev:"SHA1/branch" (only in combination with endrev), shows the log of the revision range startrev..endrev, /range:"gitrevision", shows the log of the entered gitrevision (e.g. "branch1...branch2"), /limit:"N SCALE", SCALE could be "Commit", "Year", "Month", "Week"; it shows last N commit(s), last N year(s), last N month(s), last N week(s). Use /limit:0 to disable any default limit. /findstring:"filterstring" fills in the filter text, /findtext forces the filter to use text, not regex, or /findregex forces the filter to use regex, not simple text search, and /findtype:X with X being a number between 0 and 127. The numbers are the sum of the following options:
-
/findtype:0 filter by everything
-
/findtype:1 filter by messages
-
/findtype:2 filter by path
-
/findtype:4 filter by authors
-
/findtype:8 filter by revisions
-
/findtype:16 not used
-
/findtype:32 filter by bug ID
-
/findtype:64 filter by subject If /outfile:path\to\file is specified, the selected revision is written to that file when the log dialog is closed. :clone Opens the clone @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-clone.html>. The /url specifies the URL to clone from. The /path specifies the target directory to clone to. If /exactpath is not specified, the repository name (without trailing .git) will be appended to target directory. This is the default behavior. If /exactpath is specified, the exact /path is considered the target directory, without appending repository name to it. :commit Opens the commit @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-commit.html>. The /path specifies the target directory or the list of files to commit. You can also specify the /logmsg switch to pass a predefined log message to the commit dialog. Or, if you don't want to pass the log message on the command line, use /logmsgfile:path, where path points to a file containing the log message. To pre-fill the bug ID box (in case you've set up integration with bug trackers properly), you can use the /bugid:"the bug id here" to do that. :add Adds the files in /path to version control. :revert Reverts local modifications of a working tree. The /path tells which items to revert. :cleanup Cleans up the working @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-cleanup.html> in /path. :resolve Marks a conflicted file specified in /path as resolved. If /noquestion is given, then resolving is done without asking the user first if it really should be done. :repocreate Creates a @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-create.html> in /path :switch Opens the switch @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-checkout.html>. The /path specifies the target directory. :export Exports a @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-export.html> of the repository in /path to a zip file. :merge Opens the merge @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-merge.html>. The /path specifies the target directory. The /abort opens abort merge @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-reset.html>. :settings Opens the settings @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-settings.html>. :remove Removes the file(s) in /path from version control. :rename Renames the file in /path. The new name for the file is asked with a dialog. :diff Starts the external diff program specified in the TortoiseGit settings. The /path specifies the first file. If the option /path2 is set, then the diff program is started with those two files. If /path2 is omitted, then the diff is done between the file in /path and its BASE. To explicitly set the revision use /startrev:xxx (BASE revision) and /endrev:xxx. Add /unified to get a unified diff. Add /line:NN to get scroll to the mentioned line. :showcompare Depending on revisions to compare and the path, this either shows a unified diff (if the option unified is set), a dialog with a list of files that have changed (filtered by a possibly entered sub path) or if the path point to a file starts the diff viewer for those the file in the different revisions. Use /revision1:xxx and /revision2:xxx to specify the revisions to compare, whereas /revision1:xxx indicates the base revision to compare with. :conflicteditor Starts the conflict editor specified in the TortoiseGit settings with the correct files for the conflicted file in /path. :help Opens the help file. :repostatus Opens the check-for-modifications dialog. The /path specifies the working tree directory. :repobrowser Starts the repository browser @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-repobrowser.html>, pointing to the working tree given in /path. An additional option /rev:xxx can be used to specify the revision which the repository browser should show. If the /rev:xxx is omitted, it defaults to HEAD. :ignore Adds all targets in /path to the ignore list, i.e. adds file(s) to the .gitignore file. :blame Opens @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-blame.html> for the file specified in /path. If the option /endrev is set TortoiseGitBlame ends at that revision. If the option /line:nnn is set, TortoiseGitBlame will open with the specified line number showing. :cat Saves a file from an URL or working tree path given in /path to the location given in /savepath:path. The revision is given in /revision:xxx. This can be used to get a file with a specific revision. :pull Opens the pull @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-pull.html> in the working tree located in /path. :push Opens the push @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-push.html> in the working tree located in /path. :rebase Opens the rebase @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-rebase.html> for the working tree located in /path. To select the upstream branch/commit use the /upstream option. For activating the force option use /force. :stashsave Opens the stash save @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-stash.html> for the working tree located in /path. A pre-filled message can be achieved by using the /msg parameter. :stashapply Applies to latest stash to the working tree located in /path. :stashpop Applies to latest stash to the working tree located in /path and drops the latest stash entry. :subadd Opens the submodule add @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-submodules.html>. /path. :subupdate Opens the submodule update @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-submodules.html> for and filters the submodules regarding the folder /path. :subsync Syncs the submodule information for the working tree located in /path. :reflog Opens the RefLog dialog for the repository located in /path. :refbrowse Opens the browse references @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-browse-ref.html> for the repository located in /path. :updatecheck /visible: Shows the dialog even if no newer TortoiseGit version is available. /force: Shows file list for download even if the latest TortoiseGit has been installed. :revisiongraph Shows the revision @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-revgraph.html> for the repository given in /path. To create an image file of the revision graph for a specific path, but without showing the graph window, pass /output:path with the path to the output file. The output file must have an extension that the revision graph can actually export to. These are: .svg, .wmf, .gv, .png, .jpg, .bmp and .gif. :daemon Launches the Git @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-daemon.html> for the repository given in /path. :pgpfp Prints the TortoiseGit Release Signing Key fingerprint. If you trust the current TortoiseGit installation, this can be used as a trust anchor to future releases. :tag Opens the Create Tag @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-branchtag.html>. The /path specifies the repository folder. Additional options can be set: /rev:"ref" tags on the specified ref/commit, /name:"tag_name" fills the Tag name in Create Tag dialog. :branch Opens the Create Branch @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-branchtag.html>. The /path specifies the repository folder. Additional options can be set: /rev:"ref" tags on the specified ref/commit, /name:"tag_name" fills the Tag name in Create Tag dialog. :lfslocks Opens the Show Locks @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-lfslocking.html#tgit-dug-lfslocking-locks>. More info in LFS @.:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-lfslocking.html>. :worktreelist Opens the Worktree List @.***:C:\Program%20Files\TortoiseGit\bin\TortoiseGit_en.chm::/tgit-dug-worktrees.html>.
Examples (which should be entered on one line): TortoiseGitProc.exe /command:commit /path:"d:\git_wc\file1.txt*c:\git_wc\file2.txt" /logmsg:"test log message" /closeonend:2
TortoiseGitProc.exe /command:log /path:"c:\git_wc\file1.txt" /startrev:master~100 /endrev:master [[Tip]] Tip When calling TortoiseGit from within the MSYS environment, you can also use more nix style command line parameters: TortoiseGitProc.exe -command commit -path "d:\git_wc\file1.txtc:\git_wc\file2.txt" -logmsg "test log message" -closeonend 2
Thank you for the additional detail on using TortoiseGitProc. What command do you think would be most helpful to users when clicking the button on the ribbon in Microsoft Access? I don't really intend to implement all of the functionality of the Git integration programs, since they already do that very well as purpose-built applications. Instead, I am looking for an efficient bridge to jump from Microsoft Access over to the desired Git integration program so that the developer can review the changes, add commit messages, review diffs, etc...
Do you think reprostatus or reprobrowser would be a better landing point from a developer workflow perspective? We can consider adding more than one option if different approaches are widely used in different workflows. Again, the goal here is to just make it as efficient as possible for developers as they jump between tools.
Most of the time I use reprostatus to review and commit the exported changes. Everything else is available by right clicking on the folder or files.
Thank you,
Ron McCarry It Manager Pack Air Inc. Leave Testimonialhttps://g.page/r/CehZz65pBzwFEBM/review | Bloghttps://packairinc.com/blog/ @.***> | LinkedInhttps://www.linkedin.com/company/pack-air-inc-/ | Websitehttps://www.packairinc.com/
From: Adam Waller @.> Sent: Tuesday, February 11, 2025 12:29 PM To: joyfullservice/msaccess-vcs-addin @.> Cc: Ron McCarry @.>; Mention @.> Subject: Re: [joyfullservice/msaccess-vcs-addin] Support TortoiseGitDiff as Diff Tool (Issue #580)
Thank you for the additional detail on using TortoiseGitProc. What command do you think would be most helpful to users when clicking the button on the ribbon in Microsoft Access? I don't really intend to implement all of the functionality of the Git integration programs, since they already do that very well as purpose-built applications. Instead, I am looking for an efficient bridge to jump from Microsoft Access over to the desired Git integration program so that the developer can review the changes, add commit messages, review diffs, etc...
Do you think reprostatus or reprobrowser would be a better landing point from a developer workflow perspective? We can consider adding more than one option if different approaches are widely used in different workflows. Again, the goal here is to just make it as efficient as possible for developers as they jump between tools.
— Reply to this email directly, view it on GitHubhttps://github.com/joyfullservice/msaccess-vcs-addin/issues/580#issuecomment-2651667816, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AENTBJTOFJDWFI2NUJ2RIBL2PI6QTAVCNFSM6AAAAABWX2D7PGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJRGY3DOOBRGY. You are receiving this because you were mentioned.Message ID: @.@.>>