0
Hi,

i am using pvcs 8.4.0.0 and trying to setup automatic email notification once anyone checkin a file with particular extension.
My team access PVCS using web client.
Is it possible to take out difference of particular work file with tip of that file using vdiff on server machine when anyone checkin from web client ?
Please suggest if any other way possible.

Accepted Answer

Monday, March 06 2017, 01:25 PM - #Permalink
0
Hi Vivek,

Yes, this can be done using an Event Trigger. Providing you have a command line utility that can send emails, you can write a batch file that gets executed after each checkin. In that batch file you would have to check for the file extension (and return quickly if it doesn't match), then run a vdiff and send the results to your email app.

Take a look at the chapter on Even Triggers in the VM Admin Guide. To give you a general idea on sending emails from a trigger, also take a look at KB doc S121812.

Instead of passing parameters to the trigger as shown there, I recommend tapping directly into the environment variables that get created for you. So instead of passing "__EventArchive__" to the trigger as the first argument and having the trigger use %1 to access the first argument, the trigger can use %EVENTARCHIVE% instead. Be sure to wrap variables in double-quotes if their values can contain spaces (e.g "%EVENTARCHIVE%")

If you want to compare between the workfile and the tip revision, the trigger has to run before the checkin completes (PrePut trigger) as the tip revision will match the workfile afterwards (PostPut trigger). Alternatively you can run vdiff against the tip revision and tip-1, as those should reflect the operation that just completed.

Does your project database have branch revisions at all? That is, do you have to deal with possibly tip-of-branch checkins or would it always be tip-of-trunk?

Kind regards,

- Richard.

P.S. I am surprised the VM 8.4 web client still works with current OS versions. May I recommend you look into upgrading? VM 8.5.3 is current and VM 8.6 is coming out real soon.
  • vivek jaiswal
    more than a month ago
    Thanks Richard for this information.

    For the particular extension file, i need to deal with tip-of-trunk only.
    Also, i will suggest to management for upgrading to latest version.

    Can you please help with new features added in new versions?
  • vivek jaiswal
    more than a month ago
    Also, the output of vdiff contains symbols .
    Is there any way i can get just the difference only or do i need to parse the output of vdiff?
The reply is currently minimized Show
Responses (1)
  • Accepted Answer

    Tuesday, March 07 2017, 10:45 AM - #Permalink
    0
    The vdiff output is intended for human eyes, and the symbols you see help to identify the type of change. From my view it's perfectly fine to send this straight into an email.

    If you want diff type output (as opposed to vdiff) the trigger would have to be change to fetch revisions to temporary files and run a diff command on those. Definitely more work. Unless people are allergic to the vdiff output, not something I'd recommend doing.

    For the vdiff command I recommend running:
    vdiff -r"%EVENTREVISION%-1" -r"%EVENTREVISION%" "%EVENTARCHIVE%"

    as a PostPut trigger. It will run the diff between the revision being checked in and the one before. I do recommend adding some code along the lines of:
    if "%EVENTREVISION%" == "1.0" goto BypassVdiff

    before running the vdiff command, as there's nothing to do when the first revision is checked in.

    On upgrading: the changes between 8.4.0.0 and 8.6.0.0 consist of:

    • A very large list of defect fixes (check the release notes for the version you want to switch to and read through the list showing changes per release until you hit VM 8.4.0.0)
    • Platform currency (OS, browsers, Java plug-in, IDE)
    • Install-less applet support for the VM I-Net Web Client
    • Support for server-side processing in the Visual Studio and Eclipse RIDE integrations, significantly speeding up operations (especially when a slow/high-latency network is involved).
    • File rename in GUI, Web Client and PCLI.
    • Logging of Administrative changes (Configure Project + Security)
    • Logging of Workspace changes
    • Native 64-bit support (allow much more memory to be assigned to the VM I-Net server process for scalability)

    The last 3 are VM 8.6 specific and therefore not out just yet, but coming very soon.

    Kind regards,
    - Richard.
    The reply is currently minimized Show
Your Reply

Recent Tweets