authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-28 13:13:23 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-28 13:13:23 -08:00
log337d392073fa5613f8f7be01bb096c97a86c39d7
tree69434c28ccf2bd97b75924060694f07dbecf9ad1
parentde608bf1d26bc8b5ac39c6e657d5d9b70cb0c9b0

add mercurial commands to deptype


2 files changed, 4 insertions(+), 2 deletions(-)

src/cmd_fetch.zig+2-2
......@@ -112,10 +112,10 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module {
112112 },
113113 .hg => {
114114 if (!try u.does_file_exist(p)) {
115 _= try u.run_cmd(null, &[_][]const u8{"hg", "clone", d.path, p});
115 _ = try d.type.pull(d.path, p);
116116 }
117117 else {
118 _= try u.run_cmd(p, &[_][]const u8{"hg", "pull"});
118 _ = try d.type.update(p, d.path);
119119 }
120120 },
121121 }
src/util/dep_type.zig+2
......@@ -12,6 +12,7 @@ pub const DepType = enum {
1212 .git => {
1313 _ = try u.run_cmd(null, &[_][]const u8{"git", "clone", rpath, dpath});
1414 },
15 .hg => { _ = try u.run_cmd(null, &[_][]const u8{"hg", "clone", rpath, dpath}); },
1516 else => {
1617 u.assert(false, "dep type {} not configured for pull: {}", .{@tagName(self), rpath});
1718 },
......@@ -24,6 +25,7 @@ pub const DepType = enum {
2425 _ = try u.run_cmd(dpath, &[_][]const u8{"git", "fetch"});
2526 _ = try u.run_cmd(dpath, &[_][]const u8{"git", "pull"});
2627 },
28 .hg => { _ = try u.run_cmd(dpath, &[_][]const u8{"hg", "pull"}); },
2729 else => {
2830 u.assert(false, "dep type {} not configured for update: {}", .{@tagName(self), rpath});
2931 },