зеркало из https://github.com/microsoft/git.git
Added basic support for specifying the depot path to import from as well as the range of perforce changes.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
This commit is contained in:
Родитель
16d6b8ab6f
Коммит
da96cd9e24
|
@ -17,10 +17,22 @@
|
||||||
#
|
#
|
||||||
import os, string, sys
|
import os, string, sys
|
||||||
|
|
||||||
# yep, that's hardcoded right. will fix to a commandline option rsn :)
|
if len(sys.argv) != 2:
|
||||||
prefix = "//depot/qt/main/"
|
sys.stderr.write("usage: %s //depot/path[@revRange]\n" % sys.argv[0]);
|
||||||
# that's in revision range syntax, for example @2342,523634
|
sys.stderr.write("\n example:\n");
|
||||||
|
sys.stderr.write(" %s //depot/my/project -- to import everything\n");
|
||||||
|
sys.stderr.write(" %s //depot/my/project@1,6 -- to import only from revision 1 to 6\n");
|
||||||
|
sys.stderr.write("\n");
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
prefix = sys.argv[1]
|
||||||
changeRange = ""
|
changeRange = ""
|
||||||
|
try:
|
||||||
|
atIdx = prefix.index("@")
|
||||||
|
changeRange = prefix[atIdx:]
|
||||||
|
prefix = prefix[0:atIdx]
|
||||||
|
except ValueError:
|
||||||
|
changeRange = ""
|
||||||
|
|
||||||
def describe(change):
|
def describe(change):
|
||||||
output = os.popen("p4 describe %s" % change).readlines()
|
output = os.popen("p4 describe %s" % change).readlines()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче