Mercurial > hg > easyhg
view common.cpp @ 41:94bbc4b30b2a
Handle filenames starting with "-"
Such filenames are mistaken for command line options, unless we tell
Mercurial to stop processing command line options with the special
"--" option.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Thu, 24 Jun 2010 11:38:50 +0200 |
parents | 5986d0758069 |
children | f583e44d9d31 |
line wrap: on
line source
/**************************************************************************** ** Copyright (C) Jari Korhonen, 2010 (under lgpl) ****************************************************************************/ #include "common.h" QString getSystem() { #ifdef Q_WS_X11 return QString("Linux"); #endif #ifdef Q_WS_MAC return QString("Mac"); #endif #ifdef Q_WS_WIN return QString("Windows"); #endif return QString(""); } QString getHgBinaryName() { if (getSystem() == "Windows") return QString("hg.exe"); else return QString("hg"); } QString getHgDirName() { if (getSystem() == "Windows") { return QString(".hg\\"); } else { return QString(".hg/"); } }