21af973bf0d5 — Oben Sonne 10 years ago
Don't crash in virgin repositories
1 files changed, 3 insertions(+), 2 deletions(-)

M compass.py
M compass.py +3 -2
@@ 365,8 365,9 @@ def compass(ui, repo, **opts):
     prints a warning if a commit will create a new head.
     
     """
-    
-    #print(opts)
+    if not repo.changelog:
+        ui.write(_header("You are in a virgin repository", fc="="))    
+        return
     
     opts["verbose"] = ui.verbose