This looks really great until I realized it did not print dirty state.

There is probably no way to get the state without, say, `git status
--porcelain --u=no`, right?

On Tue, Aug 16, 2016 at 4:09 AM, Gregory Szorc <g...@mozilla.com> wrote:

> I use Facebook's scm-prompt.sh from
> https://bitbucket.org/facebook/hg-experimental/src/
> 3a45413794a0252a817e7e1fda02182658b85183/scripts/scm-prompt.sh.
> It works with both Git and Mercurial and is fast because it pokes at the
> repo internals directly instead of going through `git` or `hg`.
>
> On Mon, Aug 15, 2016 at 12:46 PM, Botond Ballo <bba...@mozilla.com> wrote:
>
> > Cross-posting to dev-version-control
> >
> > On Mon, Aug 15, 2016 at 3:39 PM,  <zbranie...@mozilla.com> wrote:
> > > For the last few months I've been mostly using git clone of
> > mozilla-central because I'm used to git. Now I'm trying to set up my
> > mercurial environment to match what I have for git in order to reduce the
> > bias toward the latter.
> > >
> > > One of the crucial parts of my workflow is the git completion shell
> > prompt that gives me information about branch I'm on and
> untracked/modified
> > files.
> > >
> > > This is how my shell prompt looks like on gecko-dev (git clone):
> > >
> > > zbraniecki@cintra:~/projects/mozilla/gecko-dev (master %=)$
> > >
> > > and if I modify any file it may look like this:
> > >
> > > zbraniecki@cintra:~/projects/mozilla/gecko-dev (master +%>)$
> > >
> > > I tried to get something similar for HG, including hg-prompt (written
> in
> > python), and vcsprompt (written in C), but both are painfully slow.
> > >
> > > What's striking, on the same repo, the git is 3 times faster than hg to
> > get me the prompt shell.
> > >
> > > zbraniecki@cintra:~/projects/mozilla/gecko-dev (master %=)$ time
> > vcprompt -f "( %b %u%%%m)"
> > > ( master ?%)
> > > real    0m0.472s
> > > user    0m0.236s
> > > sys     0m0.384s
> > >
> > > vs
> > >
> > > zbraniecki@cintra:~/projects/mozilla/mozilla-central$ time vcprompt -f
> > "( %b %u%%%m)"
> > > ( default %+)
> > > real    0m1.643s
> > > user    0m1.224s
> > > sys     0m0.396s
> > >
> > >
> > > I thought that maybe it's just vcprompt, so I tried status:
> > >
> > > zbraniecki@cintra:~/projects/mozilla/mozilla-central$ time hg status
> > >
> > > real    0m1.706s
> > > user    0m1.380s
> > > sys     0m0.316s
> > >
> > > vs.
> > >
> > > zbraniecki@cintra:~/projects/mozilla/gecko-dev (master %=)$ time git
> > status
> > > On branch master
> > > Your branch is up-to-date with 'origin/master'.
> > >
> > > real    0m0.399s
> > > user    0m0.204s
> > > sys     0m0.332s
> > >
> > > If I understand correctly our choice of using mercurial over git was
> > driven by the performance. Am I doing something wrong?
> > >
> > > It seems like the performance difference is quite substantial.
> > >
> > > zb.
> > > _______________________________________________
> > > dev-platform mailing list
> > > dev-platform@lists.mozilla.org
> > > https://lists.mozilla.org/listinfo/dev-platform
> > _______________________________________________
> > dev-version-control mailing list
> > dev-version-cont...@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-version-control
> >
> _______________________________________________
> dev-version-control mailing list
> dev-version-cont...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-version-control
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to