##// END OF EJS Templates
tests: pass "rev" argument to commands.update() as string...
Martin von Zweigbergk -
r38499:ecaa0ad4 default
parent child Browse files
Show More
@@ -1,103 +1,103 b''
1 Create a repository:
1 Create a repository:
2
2
3 #if no-extraextensions
3 #if no-extraextensions
4 $ hg config
4 $ hg config
5 devel.all-warnings=true
5 devel.all-warnings=true
6 devel.default-date=0 0
6 devel.default-date=0 0
7 extensions.fsmonitor= (fsmonitor !)
7 extensions.fsmonitor= (fsmonitor !)
8 largefiles.usercache=$TESTTMP/.cache/largefiles
8 largefiles.usercache=$TESTTMP/.cache/largefiles
9 lfs.usercache=$TESTTMP/.cache/lfs
9 lfs.usercache=$TESTTMP/.cache/lfs
10 ui.slash=True
10 ui.slash=True
11 ui.interactive=False
11 ui.interactive=False
12 ui.mergemarkers=detailed
12 ui.mergemarkers=detailed
13 ui.promptecho=True
13 ui.promptecho=True
14 web.address=localhost
14 web.address=localhost
15 web\.ipv6=(?:True|False) (re)
15 web\.ipv6=(?:True|False) (re)
16 web.server-header=testing stub value
16 web.server-header=testing stub value
17 #endif
17 #endif
18
18
19 $ hg init t
19 $ hg init t
20 $ cd t
20 $ cd t
21
21
22 Prepare a changeset:
22 Prepare a changeset:
23
23
24 $ echo a > a
24 $ echo a > a
25 $ hg add a
25 $ hg add a
26
26
27 $ hg status
27 $ hg status
28 A a
28 A a
29
29
30 Writes to stdio succeed and fail appropriately
30 Writes to stdio succeed and fail appropriately
31
31
32 #if devfull
32 #if devfull
33 $ hg status 2>/dev/full
33 $ hg status 2>/dev/full
34 A a
34 A a
35
35
36 $ hg status >/dev/full
36 $ hg status >/dev/full
37 abort: No space left on device
37 abort: No space left on device
38 [255]
38 [255]
39 #endif
39 #endif
40
40
41 #if devfull
41 #if devfull
42 $ hg status >/dev/full 2>&1
42 $ hg status >/dev/full 2>&1
43 [255]
43 [255]
44
44
45 $ hg status ENOENT 2>/dev/full
45 $ hg status ENOENT 2>/dev/full
46 [255]
46 [255]
47 #endif
47 #endif
48
48
49 $ hg commit -m test
49 $ hg commit -m test
50
50
51 This command is ancient:
51 This command is ancient:
52
52
53 $ hg history
53 $ hg history
54 changeset: 0:acb14030fe0a
54 changeset: 0:acb14030fe0a
55 tag: tip
55 tag: tip
56 user: test
56 user: test
57 date: Thu Jan 01 00:00:00 1970 +0000
57 date: Thu Jan 01 00:00:00 1970 +0000
58 summary: test
58 summary: test
59
59
60
60
61 Verify that updating to revision 0 via commands.update() works properly
61 Verify that updating to revision 0 via commands.update() works properly
62
62
63 $ cat <<EOF > update_to_rev0.py
63 $ cat <<EOF > update_to_rev0.py
64 > from mercurial import ui, hg, commands
64 > from mercurial import ui, hg, commands
65 > myui = ui.ui.load()
65 > myui = ui.ui.load()
66 > repo = hg.repository(myui, path=b'.')
66 > repo = hg.repository(myui, path=b'.')
67 > commands.update(myui, repo, rev=0)
67 > commands.update(myui, repo, rev=b"0")
68 > EOF
68 > EOF
69 $ hg up null
69 $ hg up null
70 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
70 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
71 $ $PYTHON ./update_to_rev0.py
71 $ $PYTHON ./update_to_rev0.py
72 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
72 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
73 $ hg identify -n
73 $ hg identify -n
74 0
74 0
75
75
76
76
77 Poke around at hashes:
77 Poke around at hashes:
78
78
79 $ hg manifest --debug
79 $ hg manifest --debug
80 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
80 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
81
81
82 $ hg cat a
82 $ hg cat a
83 a
83 a
84
84
85 Verify should succeed:
85 Verify should succeed:
86
86
87 $ hg verify
87 $ hg verify
88 checking changesets
88 checking changesets
89 checking manifests
89 checking manifests
90 crosschecking files in changesets and manifests
90 crosschecking files in changesets and manifests
91 checking files
91 checking files
92 1 files, 1 changesets, 1 total revisions
92 1 files, 1 changesets, 1 total revisions
93
93
94 Repository root:
94 Repository root:
95
95
96 $ hg root
96 $ hg root
97 $TESTTMP/t
97 $TESTTMP/t
98 $ hg log -l1 -T '{reporoot}\n'
98 $ hg log -l1 -T '{reporoot}\n'
99 $TESTTMP/t
99 $TESTTMP/t
100
100
101 At the end...
101 At the end...
102
102
103 $ cd ..
103 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now