]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Allow mr register to be used with mrconfig file that does not yet exist. Closes:...
authorJoey Hess <joey@kitenet.net>
Sat, 11 Jun 2011 16:31:24 +0000 (12:31 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 11 Jun 2011 16:31:24 +0000 (12:31 -0400)
debian/changelog
mr

index f5f4e7cd8263466011818c13be70b35c4ca21db5..21683829a7abac4d72049f7471b8f68821849fde 100644 (file)
@@ -1,6 +1,8 @@
 mr (1.04) UNRELEASED; urgency=low
 
   * Improve trust errors displayed while bootstrapping. Closes: #628234
+  * Allow mr register to be used with mrconfig file that does not yet
+    exist. Closes: #629217
 
  -- Joey Hess <joeyh@debian.org>  Mon, 30 May 2011 14:55:09 -0400
 
diff --git a/mr b/mr
index c58c3e17ab8b45171d50f38de948fc6c6a681f19..4235151895fa70daf0e917de9f9006b326aa3277 100755 (executable)
--- a/mr
+++ b/mr
@@ -1085,10 +1085,6 @@ sub loadconfig {
                $trusted=1;
        }
        else {
-               if (! -e $f) {
-                       return;
-               }
-
                my $absf=abs_path($f);
                if ($loaded{$absf}) {
                        return;
@@ -1123,6 +1119,10 @@ sub loadconfig {
                        }
                }
                
+               if (! -e $f) {
+                       return;
+               }
+
                print "mr: loading config $f\n" if $verbose;
                open($in, "<", $f) || die "mr: open $f: $!\n";
        }