Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Tuesday, November 24, 2015

Serena Dimensions: open Files with correct Filename

At work we use Serena Dimensions for Version Control.
Double-clicking a sourcefile opens the code in the editor of your choice, but unfortunately Dimensions doesn't provide a meaningful filename as the clicked element is downloaded to a temporary file and the editor shows just the name of the temporary file.

After requesting an improvement in the Dimensions community i got some great hints from Paul Caruana and finally implemented the following workaround:

  • Create a batch file
    echo off 
    set dimexe="c:\program files (x86)\serena\dimensions 12.2\cm\prog\dmcli"
    set ueexe="c:\program files (x86)\ultraedit\uedit32"
    set fi=%2
    set fi=%fi:"=%
    set ver=%3
    set ver=%ver:"=%
    set typ=%5
    set typ=%typ:"=%
    set tmpfile=C:\tmp\%fi%.%ver%.%typ%
    
    echo parms: %* 
    echo file: %fi% 
    %dimexe% FI %1 /USER_FILENAME="%tmpfile%" /EXPAND /OVERWRITE 
    %ueexe% %tmpfile%
    
  • Create a new "Tool" inside Dimensions:
    •  Menu "Tools" -> ""Customize Menu and Toolbar"; Tab "Tools" -> Create a new Tool (Star-Button), choose a name (e.g. "MyEdit").
      Configuration: 
      • Command: C:\foo\projects\cmedit\cmedit.cmd
      • Arguments: $[Specification] $[Filename] $[Revision] $(Product):$(Workset) $[type]
      • Start In: c:\foo
This gives me a "MyEdit" Entry in the Context Menu which downloads the file & launches Ultraedit with a meaningful filename - Mission accomplished!

Sunday, November 22, 2015

Serena Dimensions & KDiff3

At work we use Serena Dimensions for Version Control.
Dimensions seems to use "pvcsmerge" for Diff-view which is imho a bit out-of-date regarding functionality and usability.

My personal favorite would be BeyondCompare, but i have no budget for buying such stuff, so i looked into a way to integrate Kdiff3 (imho next-best) into Serena Dimensions.

I did some investigation and finaly came to the conclusion that calling "Diff" lets Dimensions download the Files-to-be-diff'ed to temporary files and call "pvcsmerge" with those files.

So i created an executable that takes the same parameter as "pvcsmerge," but launches Kdiff3 with reformated parameters.
Replacing the original "pvcsmerge.exe" with the homebrewn executable provided exactly the functionality i wanted!


Implementation (feedback welcome, but pls. don't flame me because of the poor C :-)):

Source:
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

main(int argc, char *argv[])
{
   int c;
   char ch;
   
     // file contains the name of the files-to-be-compared
   char* filename;
   filename = argv[2];
   
   FILE *fi = fopen(filename, "r");
   #define MAXLINE 200
   char bufr[MAXLINE];
   char para[MAXLINE];
   char value[MAXLINE];
   char v1 [MAXLINE];
   char v2 [MAXLINE];
   char n1 [MAXLINE];
   char n2 [MAXLINE];

   if(fi != NULL) {
     while( !feof(fi)) {
       // String2parse: <para>=<value>
       fscanf(fi, "%[^=] %*c %s\n", para, value);
       
       if (strcmp(para, "ANCESTOR") == 0) {
         // String2parse: "C:\Users\xxxxx\AppData\Local\Temp\SRC(yyyyy)_12.pt1646c2.tmp","SRC(yyyyy);12 - Derivative"
         sscanf( value, "\"%[^\"]\",\"%[^\"]\"", v1, n1);
       }
       
       if (strcmp(para, "DERIVATIVES") == 0) {
         sscanf( value, "\"%[^\"]\",\"%[^\"]\"", v2, n2);
       }
     }
        
   } else {
   }
   
   // start kdiff3  
   char start[1024];
   strcpy (start, "c:\\xxxxxx\\kdiff3\\kdiff3.exe ");
   strcat (start, v1);
   strcat (start, " ");
   strcat (start, v2);
   strcat (start, " --L1 ");
   strcat (start, n1);
   strcat (start, " --L2 ");
   strcat (start, n2);
   system(start);
      
   return 0;
}

Compile (i'm using mingw):
gcc pvcsmerge.c -o pvcsmerge.exe




Tuesday, October 30, 2012

svn2svn

Svn2svn - http://kennethxu.blogspot.de/2012/01/svn2svn-copy-and-sync-between-svn.html.

Ever needed to copy/move parts of a repo but svnadmin dump + svndumpfilter failed?
Svn2svn will save your day!

Tuesday, April 24, 2012

soapui II

Haha, the posting regarding soapui (which won't affect most of my readers anyway) was automagically sent to twitter (i set up the link ages ago and nearly forgot about it) which grabbed the attention of official soapui account (i'm sure by some automatism too), which follows me now.
I begin to understand how this whole "networking" thing is working in reality :-).

Thursday, July 21, 2011

g+ integration

Irgendwie würd ich mir wünschen dass g+, Buzz, gReader-sharing und Blogger enger verzahnt sind. 
Od. find ich die notwendigen Einstellungen einfach nicht?

Monday, July 11, 2011

ha, hab soeben meine g+ einladung bekommen und kam gleich rein. wenn wer eingeladen werden will bitte melden.eigentlich poste ich das nur um zu sehen wie das in g+ aussieht.

Wednesday, July 06, 2011

google+

jetzt halt ich hier schon seit monaten google die stange, und trotzdem lassen die keinen google+ account rüberwachsen. verd....t. schon >1000 members haben den standard in circles: https://plus.google.com/109235746095230317755. why not meeeeeee :-).
https://plus.google.com/109235746095230317755

Thursday, March 24, 2011

Thursday, February 24, 2011

computertips-blog rip

ich werd den computertips blog nicht getrennt weiterführen. war sowieso ein totes pferd. dafür gleich hier eine nochmalige lobende erwähnung: http://www.ninite.com. installiert die sw basics auf einen rutsch. nebensatz: hab gebraucht einen fujitsu rechner erwerben können. da gibts ein "desk update" tool welches alle treiber online aktualisiert. auch nicht uncool.

Wednesday, August 25, 2010

Warum ich Buzz sympathischer finde als Facebook/Twitter

Abgesehen davon, dass Google Buzz ein Schattendasein führt, finde ich das Konzept sympathisch:
  • es ist möglich Postings an geschlossene Gruppen zu schicken. Wenige "Nachrichten" sind für alle meine Facebook-Kontakte gleichermaßen bestimmt. Freunde, Arbeitskollegen, ehemalige Schulkollegen, .... unterschiedliche Gruppen halt. In Facebook geht eine Nachricht an alle od. keinen.
  • keine Spiele a'la Farmeville

Friday, July 09, 2010

Just for-the-records: http://www.happy-foto.at, mein bevorzugter Foto-Ausarbeiter aus Freistadt, scannt auch Dias.
0.35€ pro Dia (ab 11 Stück) ist zwar keine Kleinigkeit, aber wenn sie so gut Scannen wie Ausarbeiten ist das Geld nicht schlecht angelegt.

Friday, June 04, 2010

Google Wave

Nachdem Google den Dienst "Wave" nun für alle freigegeben hat, hab ich mir das ganze nochmal angesehen. Irgendwie scheint Wave ja daran zu leiden, dass die wenigsten (mich selbst eingeschlossen) verstehen, was sie damit anfangen sollen. http://completewaveguide.com/ ist ein prächtiger Einstieg. Irgendwie glaub' ich langsam den Sinn / die Möglichkeiten zu verstehen. Wenn sich wer austauschen will möge er/sie mich einfach zur entsprechenden Wave einladen :-).
[update]
"Anwendungen" von Wave die mir eingefallen sind bzw. die Erwähnung finden und mir plausibel erscheinen:
- Alternative zu wiki, kollaboratives Erstellen von Dokumenten
- Alternative zu Mailthreads, klären von Sachverhalten, organisieren von Veranstaltungen
- Alternative zu z.b. Evernote, formlose Notizen