-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
113 additions
and
51 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "hg-git-fast-import" | ||
version = "1.2.4" | ||
version = "1.2.5" | ||
authors = ["Alexander Korolev <[email protected]>"] | ||
license = "Unlicense OR MIT" | ||
description = """ | ||
|
@@ -20,10 +20,12 @@ regex = "1" | |
lazy_static = "1" | ||
toml = "0.5" | ||
structopt = "0.3" | ||
hg-parser = "0.2" | ||
hg-parser = "0.3" | ||
ordered-parallel-iterator = "0.1" | ||
indicatif = "0.12" | ||
dialoguer = "0.4" | ||
failure = "0.1" | ||
exitfailure = "0.5" | ||
|
||
[dependencies.serde] | ||
version = "1.0" | ||
|
@@ -33,4 +35,5 @@ features = ["derive"] | |
pretty_assertions = "0.6" | ||
|
||
[profile.release] | ||
lto = true | ||
lto = true | ||
incremental = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ From source: | |
|
||
```bash | ||
$ hg-git-fast-import --help | ||
hg-git-fast-import 1.2.4 | ||
hg-git-fast-import 1.2.5 | ||
Alexander Korolev <[email protected]> | ||
A utility to import single and multiple Mercurial repositories to Git. | ||
|
||
|
@@ -57,7 +57,7 @@ Import of single repository: | |
|
||
```bash | ||
$ hg-git-fast-import single --help | ||
hg-git-fast-import-single 1.2.4 | ||
hg-git-fast-import-single 1.2.5 | ||
Alexander Korolev <[email protected]> | ||
Exports single Mercurial repository to Git fast-import compatible format | ||
|
||
|
@@ -94,7 +94,7 @@ Import of multiple repositories: | |
```bash | ||
$ hg-git-fast-import multi --help | ||
hg-git-fast-import-multi 1.2.4 | ||
hg-git-fast-import-multi 1.2.5 | ||
Alexander Korolev <[email protected]> | ||
Exports multiple Mercurial repositories to single Git repo in fast-import compatible format | ||
|
||
|
@@ -125,7 +125,7 @@ Rebuild saved state of repo: | |
```bash | ||
$ hg-git-fast-import build-marks --help | ||
hg-git-fast-import-build-marks 1.2.4 | ||
hg-git-fast-import-build-marks 1.2.5 | ||
Alexander Korolev <[email protected]> | ||
Rebuilds saved state of repo | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
rm -rf /tmp/pgo-data | ||
|
||
# STEP 1: Build the instrumented binaries | ||
RUSTFLAGS="-Cprofile-generate=/tmp/pgo-data" \ | ||
cargo build --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
PATH=$PATH:~/.rustup/toolchains/`rustup show active-toolchain | cut -f1 -d" "`/lib/rustlib/x86_64-apple-darwin/bin/ | ||
|
||
# STEP 3: Merge the `.profraw` files into a `.profdata` file | ||
llvm-profdata merge -o /tmp/pgo-data/merged.profdata /tmp/pgo-data | ||
|
||
# STEP 4: Use the `.profdata` file for guiding optimizations | ||
RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata" \ | ||
cargo build --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ cargo install --path . | |
```bash | ||
$ hg-git-fast-import --help | ||
hg-git-fast-import 1.2.4 | ||
hg-git-fast-import 1.2.5 | ||
Alexander Korolev <[email protected]> | ||
A utility to import single and multiple Mercurial repositories to Git. | ||
|
@@ -57,7 +57,7 @@ Import of single repository: | |
```bash | ||
$ hg-git-fast-import single --help | ||
hg-git-fast-import-single 1.2.4 | ||
hg-git-fast-import-single 1.2.5 | ||
Alexander Korolev <[email protected]> | ||
Exports single Mercurial repository to Git fast-import compatible format | ||
|
@@ -94,7 +94,7 @@ Import of multiple repositories: | |
```bash | ||
$ hg-git-fast-import multi --help | ||
hg-git-fast-import-multi 1.2.4 | ||
hg-git-fast-import-multi 1.2.5 | ||
Alexander Korolev <[email protected]> | ||
Exports multiple Mercurial repositories to single Git repo in fast-import compatible format | ||
|
@@ -125,7 +125,7 @@ Rebuild saved state of repo: | |
```bash | ||
$ hg-git-fast-import build-marks --help | ||
hg-git-fast-import-build-marks 1.2.4 | ||
hg-git-fast-import-build-marks 1.2.5 | ||
Alexander Korolev <[email protected]> | ||
Rebuilds saved state of repo | ||
|
@@ -320,6 +320,8 @@ use std::path::Path; | |
use std::path::PathBuf; | ||
use std::process::ExitStatus; | ||
|
||
use failure::Fail; | ||
|
||
pub mod config; | ||
pub mod env; | ||
pub mod error; | ||
|
@@ -351,16 +353,25 @@ fn to_string(bytes: &[u8]) -> String { | |
to_str(bytes).into() | ||
} | ||
|
||
#[derive(Debug)] | ||
#[derive(Debug, Fail)] | ||
pub enum TargetRepositoryError { | ||
#[fail(display = "unknown")] | ||
Nope, | ||
#[fail(display = "is not a directory")] | ||
IsNotDir, | ||
#[fail(display = "saved state does not exist")] | ||
SavedStateDoesNotExist, | ||
#[fail(display = "cannot init repository {}", _0)] | ||
CannotInitRepo(ExitStatus), | ||
#[fail(display = "cannot configure repository {}", _0)] | ||
CannotConfigRepo(ExitStatus), | ||
#[fail(display = "import failed {}", _0)] | ||
ImportFailed(ExitStatus), | ||
#[fail(display = "git failure {}", _0)] | ||
GitFailure(ExitStatus), | ||
#[fail(display = "io error {}", _0)] | ||
IOError(std::io::Error), | ||
#[fail(display = "verification failed")] | ||
VerifyFail, | ||
} | ||
|
||
|
@@ -415,8 +426,9 @@ pub trait TargetRepository { | |
} | ||
} | ||
|
||
#[derive(Debug)] | ||
#[derive(Debug, Fail)] | ||
pub enum SourceRepositoryError { | ||
#[fail(display = "pull fail {}", _0)] | ||
PullFail(String), | ||
} | ||
|
||
|
Oops, something went wrong.