Show More
@@ -72,13 +72,12 def state(ctx, ui): | |||
|
72 | 72 | raise |
|
73 | 73 | # handle missing subrepo spec files as removed |
|
74 | 74 | ui.warn(_("warning: subrepo spec file \'%s\' not found\n") % |
|
75 |
|
|
|
75 | repo.pathto(f)) | |
|
76 | 76 | return |
|
77 | 77 | p.parse(f, data, sections, remap, read) |
|
78 | 78 | else: |
|
79 | 79 | raise util.Abort(_("subrepo spec file \'%s\' not found") % |
|
80 |
|
|
|
81 | ||
|
80 | repo.pathto(f)) | |
|
82 | 81 | if '.hgsub' in ctx: |
|
83 | 82 | read('.hgsub') |
|
84 | 83 | |
@@ -97,8 +96,7 def state(ctx, ui): | |||
|
97 | 96 | except ValueError: |
|
98 | 97 | raise util.Abort(_("invalid subrepository revision " |
|
99 | 98 | "specifier in \'%s\' line %d") |
|
100 |
% ( |
|
|
101 | '.hgsubstate'), (i + 1))) | |
|
99 | % (repo.pathto('.hgsubstate'), (i + 1))) | |
|
102 | 100 | rev[path] = revision |
|
103 | 101 | except IOError as err: |
|
104 | 102 | if err.errno != errno.ENOENT: |
@@ -23,8 +23,8 abort more gracefully on .hgsubstate par | |||
|
23 | 23 | |
|
24 | 24 | $ cp .hgsubstate .hgsubstate.old |
|
25 | 25 | >>> file('.hgsubstate', 'wb').write('\ninvalid') |
|
26 | $ hg st --subrepos | |
|
27 | abort: invalid subrepository revision specifier in '.hgsubstate' line 2 | |
|
26 | $ hg st --subrepos --cwd $TESTTMP -R $TESTTMP/repo | |
|
27 | abort: invalid subrepository revision specifier in 'repo/.hgsubstate' line 2 (glob) | |
|
28 | 28 | [255] |
|
29 | 29 | $ mv .hgsubstate.old .hgsubstate |
|
30 | 30 | |
@@ -44,9 +44,9 delete .hgsubstate and revert it | |||
|
44 | 44 | delete .hgsub and update |
|
45 | 45 | |
|
46 | 46 | $ rm .hgsub |
|
47 | $ hg up 0 | |
|
48 | warning: subrepo spec file '.hgsub' not found | |
|
49 | warning: subrepo spec file '.hgsub' not found | |
|
47 | $ hg up 0 --cwd $TESTTMP -R $TESTTMP/repo | |
|
48 | warning: subrepo spec file 'repo/.hgsub' not found (glob) | |
|
49 | warning: subrepo spec file 'repo/.hgsub' not found (glob) | |
|
50 | 50 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
51 | 51 | $ hg st |
|
52 | 52 | warning: subrepo spec file '.hgsub' not found |
General Comments 0
You need to be logged in to leave comments.
Login now