hg mv old new equivalent to mv old new hg addremove

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jul 28 19:24:20 UTC 2020


In you simple example they will be "the same" because the content of 
old/new did not change betwen the `mv` and the `hg addremove`. So the 
addremove will successfully detect the rename and record the copy 
information. However if you know that you are doing a move for `hg move` 
will be safer because it avoid the risk of `hg addremove` failing to 
pick up the rename (eg: because of content change) or have unintended 
side effect (because other file are in the repository)

On 7/25/20 7:26 PM, Uwe Brauer wrote:
> 
> Hi
> 
> This seems trivial but I want to be 100 % sure:
> 
> Is
> 
> hg mv old new
> equivalent to
> mv old new
> hg addremove
> 
> 
> Regards
> 
> Uwe Brauer
> 
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> 

-- 
Pierre-Yves David



More information about the Mercurial mailing list