[PATCH] version: always overwrite __version__
Alexis S. L. Carvalho
alexis at cecm.usp.br
Tue Feb 6 20:04:52 UTC 2007
Thus spake Christian Ebert:
> * Alexis S. L. Carvalho on Tuesday, February 06, 2007 at 16:06:53 -0200:
> > Thus spake Christian Ebert:
> >> version: always overwrite __version__
> >
> > I've pushed a different fix to crew-stable - the "don't overwrite if it
> > hasn't changed" logic was added back in 7eb694a1c1af, so I thought it
> > was better to keep it.
>
> But have you tried my test with your patch?
Yeah - things looked fine (current crew-stable):
$ hg up -C
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg parents -q
3933:c620376b8fd6
$ python setup.py --version
c620376b8fd6
$ hg up -C 3932
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg parents -q
3932:cff3e4b4a8de
$ python setup.py --version
cff3e4b4a8de
> I experimented with
> reload too, but, at least here, this doesn't change anything.
Can you try current crew-stable? BTW, where did you test this? Mac?
> That's why, in practice, I've found no other way to adapt the
> version on first run but by always overwriting.
As mentioned in the log message from 7eb694a1c1af, we don't overwrite
the file if it hasn't changed, so that the following sequence doesn't
leave files owned by root in the current directory:
python setup.py build
sudo python setup.py install
> See also issue460, or
> Message-ID: <9246b6b50612221117i9e84d56ge27f9d69bbcf9e7 at mail.gmail.com>
> in the mercurial list.
I remembered there were some problems with the version number, but I
didn't remember the specific issue.
If reload really doesn't work, I'd say it's likely that python is not
looking at the current directory while loading modules, which would be
problematic in this situation... Matt's suggestion of putting
everything in setup.py could help here...
Alexis
More information about the Mercurial-devel
mailing list