aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-vcs/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart-vcs/src/driver')
-rw-r--r--crates/mozart-vcs/src/driver/bitbucket.rs7
-rw-r--r--crates/mozart-vcs/src/driver/forgejo.rs7
-rw-r--r--crates/mozart-vcs/src/driver/git.rs9
-rw-r--r--crates/mozart-vcs/src/driver/github.rs7
-rw-r--r--crates/mozart-vcs/src/driver/gitlab.rs7
-rw-r--r--crates/mozart-vcs/src/driver/hg.rs7
-rw-r--r--crates/mozart-vcs/src/driver/svn.rs7
7 files changed, 29 insertions, 22 deletions
diff --git a/crates/mozart-vcs/src/driver/bitbucket.rs b/crates/mozart-vcs/src/driver/bitbucket.rs
index d47987d..77704fa 100644
--- a/crates/mozart-vcs/src/driver/bitbucket.rs
+++ b/crates/mozart-vcs/src/driver/bitbucket.rs
@@ -1,4 +1,5 @@
-use std::collections::{BTreeMap, HashMap};
+use indexmap::IndexMap;
+use std::collections::BTreeMap;
use anyhow::{Result, bail};
use regex::Regex;
@@ -16,7 +17,7 @@ pub struct BitbucketDriver {
root_identifier: Option<String>,
tags: Option<BTreeMap<String, String>>,
branches: Option<BTreeMap<String, String>>,
- info_cache: HashMap<String, Option<serde_json::Value>>,
+ info_cache: IndexMap<String, Option<serde_json::Value>>,
git_driver: Option<Box<GitDriver>>,
http_client: Client,
config: DriverConfig,
@@ -34,7 +35,7 @@ impl BitbucketDriver {
root_identifier: None,
tags: None,
branches: None,
- info_cache: HashMap::new(),
+ info_cache: IndexMap::new(),
git_driver: None,
http_client: Client::new(),
config,
diff --git a/crates/mozart-vcs/src/driver/forgejo.rs b/crates/mozart-vcs/src/driver/forgejo.rs
index ec2ca14..488e165 100644
--- a/crates/mozart-vcs/src/driver/forgejo.rs
+++ b/crates/mozart-vcs/src/driver/forgejo.rs
@@ -1,4 +1,5 @@
-use std::collections::{BTreeMap, HashMap};
+use indexmap::IndexMap;
+use std::collections::BTreeMap;
use anyhow::{Result, bail};
use regex::Regex;
@@ -20,7 +21,7 @@ pub struct ForgejoDriver {
root_identifier: Option<String>,
tags: Option<BTreeMap<String, String>>,
branches: Option<BTreeMap<String, String>>,
- info_cache: HashMap<String, Option<serde_json::Value>>,
+ info_cache: IndexMap<String, Option<serde_json::Value>>,
git_driver: Option<Box<GitDriver>>,
http_client: Client,
config: DriverConfig,
@@ -39,7 +40,7 @@ impl ForgejoDriver {
root_identifier: None,
tags: None,
branches: None,
- info_cache: HashMap::new(),
+ info_cache: IndexMap::new(),
git_driver: None,
http_client: Client::new(),
config,
diff --git a/crates/mozart-vcs/src/driver/git.rs b/crates/mozart-vcs/src/driver/git.rs
index cc9a210..43f4ecb 100644
--- a/crates/mozart-vcs/src/driver/git.rs
+++ b/crates/mozart-vcs/src/driver/git.rs
@@ -1,4 +1,5 @@
-use std::collections::{BTreeMap, HashMap};
+use indexmap::IndexMap;
+use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use anyhow::Result;
@@ -17,7 +18,7 @@ pub struct GitDriver {
root_identifier: Option<String>,
tags: Option<BTreeMap<String, String>>,
branches: Option<BTreeMap<String, String>>,
- info_cache: HashMap<String, Option<serde_json::Value>>,
+ info_cache: IndexMap<String, Option<serde_json::Value>>,
git_util: GitUtil,
is_local: bool,
}
@@ -37,7 +38,7 @@ impl GitDriver {
root_identifier: None,
tags: None,
branches: None,
- info_cache: HashMap::new(),
+ info_cache: IndexMap::new(),
git_util,
is_local,
}
@@ -85,7 +86,7 @@ impl GitDriver {
fn parse_tags(output: &str) -> BTreeMap<String, String> {
let mut tags = BTreeMap::new();
// First pass: collect dereferenced tags (^{})
- let mut dereferenced = HashMap::new();
+ let mut dereferenced = IndexMap::new();
for line in output.lines() {
let line = line.trim();
if line.is_empty() {
diff --git a/crates/mozart-vcs/src/driver/github.rs b/crates/mozart-vcs/src/driver/github.rs
index c47c2fe..9c11389 100644
--- a/crates/mozart-vcs/src/driver/github.rs
+++ b/crates/mozart-vcs/src/driver/github.rs
@@ -1,4 +1,5 @@
-use std::collections::{BTreeMap, HashMap};
+use indexmap::IndexMap;
+use std::collections::BTreeMap;
use anyhow::{Result, bail};
use regex::Regex;
@@ -19,7 +20,7 @@ pub struct GitHubDriver {
tags: Option<BTreeMap<String, String>>,
branches: Option<BTreeMap<String, String>>,
repo_data: Option<serde_json::Value>,
- info_cache: HashMap<String, Option<serde_json::Value>>,
+ info_cache: IndexMap<String, Option<serde_json::Value>>,
git_driver: Option<Box<GitDriver>>,
http_client: Client,
config: DriverConfig,
@@ -37,7 +38,7 @@ impl GitHubDriver {
tags: None,
branches: None,
repo_data: None,
- info_cache: HashMap::new(),
+ info_cache: IndexMap::new(),
git_driver: None,
http_client: Client::new(),
config,
diff --git a/crates/mozart-vcs/src/driver/gitlab.rs b/crates/mozart-vcs/src/driver/gitlab.rs
index f96c078..c1afbcb 100644
--- a/crates/mozart-vcs/src/driver/gitlab.rs
+++ b/crates/mozart-vcs/src/driver/gitlab.rs
@@ -1,4 +1,5 @@
-use std::collections::{BTreeMap, HashMap};
+use indexmap::IndexMap;
+use std::collections::BTreeMap;
use anyhow::{Result, bail};
use regex::Regex;
@@ -21,7 +22,7 @@ pub struct GitLabDriver {
root_identifier: Option<String>,
tags: Option<BTreeMap<String, String>>,
branches: Option<BTreeMap<String, String>>,
- info_cache: HashMap<String, Option<serde_json::Value>>,
+ info_cache: IndexMap<String, Option<serde_json::Value>>,
git_driver: Option<Box<GitDriver>>,
http_client: Client,
config: DriverConfig,
@@ -41,7 +42,7 @@ impl GitLabDriver {
root_identifier: None,
tags: None,
branches: None,
- info_cache: HashMap::new(),
+ info_cache: IndexMap::new(),
git_driver: None,
http_client: Client::new(),
config,
diff --git a/crates/mozart-vcs/src/driver/hg.rs b/crates/mozart-vcs/src/driver/hg.rs
index f884c50..0782775 100644
--- a/crates/mozart-vcs/src/driver/hg.rs
+++ b/crates/mozart-vcs/src/driver/hg.rs
@@ -1,4 +1,5 @@
-use std::collections::{BTreeMap, HashMap};
+use indexmap::IndexMap;
+use std::collections::BTreeMap;
use std::path::PathBuf;
use anyhow::Result;
@@ -17,7 +18,7 @@ pub struct HgDriver {
root_identifier: Option<String>,
tags: Option<BTreeMap<String, String>>,
branches: Option<BTreeMap<String, String>>,
- info_cache: HashMap<String, Option<serde_json::Value>>,
+ info_cache: IndexMap<String, Option<serde_json::Value>>,
hg_util: HgUtil,
config: DriverConfig,
}
@@ -31,7 +32,7 @@ impl HgDriver {
root_identifier: None,
tags: None,
branches: None,
- info_cache: HashMap::new(),
+ info_cache: IndexMap::new(),
hg_util: HgUtil::new(process),
config,
}
diff --git a/crates/mozart-vcs/src/driver/svn.rs b/crates/mozart-vcs/src/driver/svn.rs
index eea2d08..16363e1 100644
--- a/crates/mozart-vcs/src/driver/svn.rs
+++ b/crates/mozart-vcs/src/driver/svn.rs
@@ -1,4 +1,5 @@
-use std::collections::{BTreeMap, HashMap};
+use indexmap::IndexMap;
+use std::collections::BTreeMap;
use anyhow::Result;
use regex::Regex;
@@ -20,7 +21,7 @@ pub struct SvnDriver {
root_identifier: Option<String>,
tags: Option<BTreeMap<String, String>>,
branches: Option<BTreeMap<String, String>>,
- info_cache: HashMap<String, Option<serde_json::Value>>,
+ info_cache: IndexMap<String, Option<serde_json::Value>>,
svn_util: SvnUtil,
}
@@ -36,7 +37,7 @@ impl SvnDriver {
root_identifier: None,
tags: None,
branches: None,
- info_cache: HashMap::new(),
+ info_cache: IndexMap::new(),
svn_util: SvnUtil::new(process),
}
}