##// END OF EJS Templates
copies: follow copies across merge base without source file (issue6163)...
copies: follow copies across merge base without source file (issue6163) As in the previous patch, consider these two histories: @ 4 'rename x to y' | o 3 'add x again' | o 2 'remove x' | | o 1 'modify x' |/ o 0 'add x' @ 4 'rename x to y' | o 3 'add x again' | | o 2 'modify x' | | | o 1 'add x' |/ o 0 'base' We trace copies from the 'modify x' commit to commit 4 by going via the merge base (commit 0). When tracing file 'y' (_tracefile()) in the first case, we immediately find the rename from 'x'. We check to see if 'x' exists in the merge base, which it does, so we consider it a valid copy. In the second case, 'x' does not exist in the merge base, so it's not considered a valid copy. As a workaround, this patch makes it so we also attempt the check in mergecopies's base commit (commit 1 in the second case). That feels pretty ugly to me, but I don't have any better ideas. Note that we actually also check not only that the filename matches, but also that the file's nodeid matches. I don't know why we do that, but it was like that already before I rewrote mergecopies(). That means that the rebase will still fail in cases like this (again, it already failed before my rewrite): @ 4 'rename x to y' | o 3 'add x again with content X2' | o 2 'remove x' | | o 1 'modify x to content X2' |/ o 1 'modify x to content X1' | o 0 'add x with content X0' Differential Revision: https://phab.mercurial-scm.org/D6604

File last commit:

r40013:74da9d99 default
r42798:819712de default
Show More
lib.rs
23 lines | 535 B | application/rls-services+xml | RustLexer
Yuya Nishihara
rust-chg: add wrapper around C function
r40006 // Copyright 2018 Yuya Nishihara <yuya@tcha.org>
//
// This software may be used and distributed according to the terms of the
// GNU General Public License version 2 or any later version.
Yuya Nishihara
rust-chg: add parser for request messages sent to "S" channel...
r40007 extern crate bytes;
Yuya Nishihara
rust-chg: add future that handles "attachio" request...
r40008 #[macro_use]
extern crate futures;
Yuya Nishihara
rust-chg: add wrapper around C function
r40006 extern crate libc;
Yuya Nishihara
rust-chg: add future that handles "attachio" request...
r40008 extern crate tokio;
Yuya Nishihara
rust-chg: add parser for request messages sent to "S" channel...
r40007 extern crate tokio_hglib;
Yuya Nishihara
rust-chg: add callback to handle pager and shell command requests...
r40010 extern crate tokio_process;
Yuya Nishihara
rust-chg: add wrapper around C function
r40006
Yuya Nishihara
rust-chg: add Client extensions to run cHg-specific requests...
r40013 mod attachio;
mod clientext;
Yuya Nishihara
rust-chg: port basic socket path handling from cHg of C...
r40012 pub mod locator;
Yuya Nishihara
rust-chg: add parser for request messages sent to "S" channel...
r40007 pub mod message;
Yuya Nishihara
rust-chg: add wrapper around C function
r40006 pub mod procutil;
Yuya Nishihara
rust-chg: add Client extensions to run cHg-specific requests...
r40013 mod runcommand;
Yuya Nishihara
rust-chg: add callback to handle pager and shell command requests...
r40010 mod uihandler;
Yuya Nishihara
rust-chg: add Client extensions to run cHg-specific requests...
r40013 pub use clientext::ChgClientExt;
Yuya Nishihara
rust-chg: add callback to handle pager and shell command requests...
r40010 pub use uihandler::{ChgUiHandler, SystemHandler};