From 09b75758cf75f008e9300736fd69e34e6bffff1b Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 14 Sep 2014 16:53:58 -0700 Subject: [PATCH] shlib.sh: be more robust generating new hg2git-marks file Take more care to make sure that only valid entries end up in the marks file in case of odd failures. --- shlib.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shlib.sh b/shlib.sh index 4472e15..db84339 100644 --- a/shlib.sh +++ b/shlib.sh @@ -289,7 +289,9 @@ git_hg_fetch() ( else touch hg2git-marks.old fi - cat hg2git-marks.old hg2git-marks.new | LC_ALL=C uniq > hg2git-marks + cat hg2git-marks.old hg2git-marks.new | \ + LC_ALL=C sort -t : -k2,2n -u | \ + sed -ne "/^:[1-9][0-9]* $octet20\$/p" > hg2git-marks rm hg2git-marks.old hg2git-marks.new rm -f hg2git-heads git branch --no-color | \ -- 2.11.4.GIT