Mercurial > hg > easyhg
annotate common.cpp @ 30:45bfb8dc1faf
UpdateToRev has more power. Copyrights updated. Mrulist of repos added.
author | Jari Korhonen <jtkorhonen@gmail.com> |
---|---|
date | Mon, 14 Jun 2010 21:55:17 +0300 |
parents | a9098eba2ee5 |
children | 5986d0758069 |
rev | line source |
---|---|
jtkorhonen@30 | 1 /**************************************************************************** |
jtkorhonen@30 | 2 ** Copyright (C) Jari Korhonen, 2010 (under lgpl) |
jtkorhonen@30 | 3 ****************************************************************************/ |
jtkorhonen@0 | 4 |
jtkorhonen@0 | 5 |
jtkorhonen@0 | 6 #include "common.h" |
jtkorhonen@0 | 7 |
jtkorhonen@0 | 8 QString getSystem() |
jtkorhonen@0 | 9 { |
jtkorhonen@0 | 10 #ifdef Q_WS_X11 |
jtkorhonen@0 | 11 return QString("Linux"); |
jtkorhonen@0 | 12 #endif |
jtkorhonen@0 | 13 |
jtkorhonen@0 | 14 #ifdef Q_WS_MAC |
jtkorhonen@0 | 15 return QString("Mac"); |
jtkorhonen@0 | 16 #endif |
jtkorhonen@0 | 17 |
jtkorhonen@0 | 18 #ifdef Q_WS_WIN |
jtkorhonen@0 | 19 return QString("Windows"); |
jtkorhonen@0 | 20 #endif |
jtkorhonen@0 | 21 |
jtkorhonen@0 | 22 return QString(""); |
jtkorhonen@0 | 23 } |
jtkorhonen@0 | 24 |
jtkorhonen@0 | 25 QString getHgBinaryName() |
jtkorhonen@0 | 26 { |
jtkorhonen@0 | 27 if (getSystem() == "Windows") |
jtkorhonen@0 | 28 return QString("hg.exe"); |
jtkorhonen@0 | 29 else |
jtkorhonen@0 | 30 return QString("hg"); |
jtkorhonen@0 | 31 } |
jtkorhonen@0 | 32 |
jtkorhonen@0 | 33 QString getDiffMergeDefaultPath() |
jtkorhonen@0 | 34 { |
jtkorhonen@0 | 35 if (getSystem() == "Windows") |
jtkorhonen@0 | 36 return QString("c:\\program files\\sourcegear\\diffmerge\\diffmerge.exe"); |
jtkorhonen@0 | 37 else |
jtkorhonen@0 | 38 return QString("/usr/bin/diffmerge"); |
jtkorhonen@0 | 39 } |
jtkorhonen@0 | 40 |
jtkorhonen@0 | 41 |
jtkorhonen@0 | 42 QString getHgDirName() |
jtkorhonen@0 | 43 { |
jtkorhonen@0 | 44 if (getSystem() == "Windows") |
jtkorhonen@0 | 45 { |
jtkorhonen@0 | 46 return QString(".hg\\"); |
jtkorhonen@0 | 47 } |
jtkorhonen@0 | 48 else |
jtkorhonen@0 | 49 { |
jtkorhonen@0 | 50 return QString(".hg/"); |
jtkorhonen@0 | 51 } |
jtkorhonen@0 | 52 } |
jtkorhonen@0 | 53 |
jtkorhonen@0 | 54 |
jtkorhonen@0 | 55 |
jtkorhonen@0 | 56 |
jtkorhonen@0 | 57 |
jtkorhonen@0 | 58 |