@matheusbsbs / matheus-bagliano / commits / 06bb04454f
Fork 0

Slightly improved help usage output and made specifying the trailing slash for the depot path optional.

Signed-off-by: Simon Hausmann <shausman@trolltech.com>

Simon Hausmann committed Jan 31, 2007 at 09:49 UTC 06bb04454fb91fbc144ed2b3abb3492c923f98f5
1 file changed +7 -2
contrib/fast-import/p4-fast-export.py
+7 -2
@@ -20,8 +20,10 @@ import os, string, sys
20 if len(sys.argv) != 2:
21 sys.stderr.write("usage: %s //depot/path[@revRange]\n" % sys.argv[0]);
22 sys.stderr.write("\n example:\n");
23 - sys.stderr.write(" %s //depot/my/project -- to import everything\n");
24 - sys.stderr.write(" %s //depot/my/project@1,6 -- to import only from revision 1 to 6\n");
23 + sys.stderr.write(" %s //depot/my/project/ -- to import everything\n");
24 + sys.stderr.write(" %s //depot/my/project/@1,6 -- to import only from revision 1 to 6\n");
25 + sys.stderr.write("\n");
26 + sys.stderr.write(" (a ... is not needed in the path p4 specification, it's added implicitly)\n");
27 sys.stderr.write("\n");
28 sys.exit(1)
29
@@ -34,6 +36,9 @@ try:
36 except ValueError:
37 changeRange = ""
38
39 +if not prefix.endswith("/"):
40 + prefix += "/"
41 +
42 def describe(change):
43 output = os.popen("p4 describe %s" % change).readlines()
44