D8211: rust-pathauditor: actually split Windows shortname aliases at `~`

2020-03-11 Thread Raphaël Gomès
Closed by commit rHGe63b4a1f2271: rust-pathauditor: actually split Windows 
shortname aliases at `~` (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs 
Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8211?vs=20446=20726

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8211/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8211

AFFECTED FILES
  rust/hg-core/src/utils/path_auditor.rs

CHANGE DETAILS

diff --git a/rust/hg-core/src/utils/path_auditor.rs 
b/rust/hg-core/src/utils/path_auditor.rs
--- a/rust/hg-core/src/utils/path_auditor.rs
+++ b/rust/hg-core/src/utils/path_auditor.rs
@@ -67,7 +67,7 @@
 // Windows shortname aliases
 for part in parts.iter() {
 if part.contains('~') {
-let mut split = part.splitn(1, |b| *b == b'~');
+let mut split = part.splitn(2, |b| *b == b'~');
 let first =
 split.next().unwrap().to_owned().to_ascii_uppercase();
 let last = split.next().unwrap();



To: Alphare, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D8211: rust-pathauditor: actually split Windows shortname aliases at `~`

2020-03-04 Thread Raphaël Gomès
Alphare created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Right now, splitting with a max of 1 parts is useless.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8211

AFFECTED FILES
  rust/hg-core/src/utils/path_auditor.rs

CHANGE DETAILS

diff --git a/rust/hg-core/src/utils/path_auditor.rs 
b/rust/hg-core/src/utils/path_auditor.rs
--- a/rust/hg-core/src/utils/path_auditor.rs
+++ b/rust/hg-core/src/utils/path_auditor.rs
@@ -67,7 +67,7 @@
 // Windows shortname aliases
 for part in parts.iter() {
 if part.contains('~') {
-let mut split = part.splitn(1, |b| *b == b'~');
+let mut split = part.splitn(2, |b| *b == b'~');
 let first =
 split.next().unwrap().to_owned().to_ascii_uppercase();
 let last = split.next().unwrap();



To: Alphare, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel