Files modified after an update
Christophe HENRY
listes at sbgodin.fr
Wed Feb 13 12:52:11 UTC 2013
Le Wed, 13 Feb 2013 12:32:46 +0000
"Kastner Masilko, Friedrich" <kastner-masilko at at.festo.com> a écrit :
> > From: mercurial-bounces at selenic.com
> > [mailto:mercurial-bounces at selenic.com] On Behalf Of Christophe
> > HENRY
> >
> > After an update to a previous revset, some files are marked as
> > modified by the update. I can even commit, even it there's nothing
> > inside.
> >
> > Here is an example involving one single file inside a repository
> > you may know a bit:
> > $ cd /tmp
> > $ hg clone http://selenic.com/hg/ mercurial
> > (...)
> > $ cd mercurial
> > (...)
> > $ hg update 1094
> > $ hg status
> > M mercurial/dirstate.py
> > $ hg diff
> > (nothing)
> > $ $ hg --version
> > Mercurial Distributed SCM (version 2.2.2)
> > (...)
> >
> > How can this happen? I didn't find anything about that behavior.
>
> Mercurial merges a dirty working copy into the new target revision,
> if you use update without "-C" in the situation of direct ancestry.
> So I guess inside one of the "(..)", you did something to the file
> in question. Depending on your diff settings, the "(nothing)" diff
> is probably because of a settings-filtered whitespace-only change or
> a file attribute change.
> But of course this is only a guess for the "(..)". Please try to
> reproduce it with an exact reproduction recipe. Alternatively, try
> to use the "--check" flag with update, this will stop the implicit
> working copy merge when the working copy is dirty.
I made a shell script that I strictly executed. There were no error
message (file &2 empty) and the standard output is in the attached
text file.
cd /tmp
rm -rf mercurial
hg clone http://selenic.com/hg/ mercurial
cd mercurial
hg update -C 1094
hg diff
hg status
I did it with "-C" and without. No change in the program output. The
attached file, IMHO, reveals nothing but the last line:
M mercurial/dirstate.py
--
Christophe HENRY
FR EO EN - http://www.sbgodin.fr
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output.txt
URL: <http://selenic.com/pipermail/mercurial/attachments/20130213/d19ae400/attachment.txt>
More information about the Mercurial
mailing list