f7860432ecc5 — Sean Farley 0.2 11 years ago
fast-remote: add new program that outputs the remote distance
2 files changed, 19 insertions(+), 1 deletions(-)

A => fast-hg-remote.c
M makefile
A => fast-hg-remote.c +18 -0
@@ 0,0 1,18 @@ 
+/*
+ * Copyright 2012 Sean Farley
+ *
+ * This guy called Sean wrote this sweet code. You are hereby granted
+ * permission to do whatever you feel like doing with it on the understanding
+ * that he's not responsible for anything that results from your use of this
+ * sweet code.
+ */
+
+#include "fast-hg-common.h"
+
+int parse_remotedistance(const char *pwd) {
+  return cat_file(pwd, ".hg/remotedistance");
+}
+
+int main() {
+  return map(parse_remotedistance);
+}

          
M makefile +1 -1
@@ 1,4 1,4 @@ 
-program_NAME=fast-hg-status fast-hg-bookmark
+program_NAME=fast-hg-status fast-hg-bookmark fast-hg-remote
 program_OBJS=fast-hg-common.o
 DESTDIR=
 PREFIX=$(HOME)/.local