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