Changeset dbaba83c560c…
Parent 15afcda19cb4…
by Benjamin Pollack <benjamin@fogcreek.com>
Changes to one file · Browse files at dbaba83c560c Showing diff from parent 15afcda19cb4 Diff from another changeset...
@@ -96,6 +96,18 @@ return nil
}
+// Makes sure the client has credentials, taking them through the logon
+// sequence if not
+func (k *KilnClient) EnsureCredentials() error {
+ if k.credentials.Token == "" && !k.LoadCredentials() {
+ if err := k.Logon(); err != nil {
+ return err
+ }
+ k.StoreCredentials()
+ }
+ return nil
+}
+
// Browses the history tab of the repository
func (k *KilnClient) BrowseHistory(repo string) error {
return browse(k.repoRoute(repo, ""))
|
Loading...