[PATCH 2 of 8] push: refuse to push obsolete changeset
Pierre-Yves David
pierre-yves.david at logilab.fr
Fri Jul 6 12:28:35 CDT 2012
On Thu, Jul 05, 2012 at 09:08:03PM -0400, Augie Fackler wrote:
> > + if self.obsstore:
> > + msg = "push includes an obsolete changeset: %s!"
>
> Why is this string outlined rather than inside the util.Abort(_(…))?
Because the abort line start with 40 char intendation making it unsuitable for
adding any text.
The code is small enough to not trigger "make it a function" .
>
> > + for node in outgoing.missing:
> > + ctx = self[node]
> > + if ctx.obsolete():
> > + raise util.Abort(_(msg) % ctx)
> > discovery.checkheads(self, remote, outgoing,
> > remoteheads, newbranch,
> > bool(inc))
--
Pierre-Yves David
http://www.logilab.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120706/ea474f60/attachment.pgp>
More information about the Mercurial-devel
mailing list