Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68734 > unrolled thread

Re: Question about Source Control

Started byCameron Simpson <cs@zip.com.au>
First post2014-03-22 13:49 +1100
Last post2014-03-22 13:49 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Question about Source Control Cameron Simpson <cs@zip.com.au> - 2014-03-22 13:49 +1100

#68734 — Re: Question about Source Control

FromCameron Simpson <cs@zip.com.au>
Date2014-03-22 13:49 +1100
SubjectRe: Question about Source Control
Message-ID<mailman.8378.1395456594.18130.python-list@python.org>
On 22Mar2014 09:17, Chris Angelico <rosuav@gmail.com> wrote:
> On Sat, Mar 22, 2014 at 8:32 AM, Cameron Simpson <cs@zip.com.au> wrote:
> > Basicly, run "hg log" for the file, and examine each of the diffs
> > WRT to your target line.
> >
> > Refactoring raises the bar somewhat.
> 
> Here's one where git and hg are a lot more different.

You might find it is just a matter of knowing what tool to use.

> When I'm trying to find the origin of some line of code in a git repo,
> I often make a dummy edit to it, then pull up gitk, right-click the
> red "deleted" line, and hit "Show origin of this line". This will
> select the commit that introduced that one line, without annotating
> the whole rest of the file (often a slow job, especially on a big
> file), and then I can go from the green inserted line to the
> corresponding red deleted line and repeat the exercise (eg if some
> trivial change was made, like renaming something). I'm trying that
> workflow with "hg view", the nearest equivalent to gitk, but it's way
> slower and doesn't seem to have a right-click menu at all, so I'm not
> sure this is possible. Is there a convenient way to trace the origin
> of one line back through a few commits?

I don't know.

You might do better to ask this kind of question on the mercurial list:

  http://selenic.com/mailman/listinfo/mercurial

Someone there is bound to have wanted to do this kind of thing, and
may know if there's a tool or extension that makes it easy. There's
a whole expression syntax for getting mercurial to select from the
revision tree, for example; I do not know if it is applicable in
this case.

Cheers,
-- 
Cameron Simpson <cs@zip.com.au>

Do what you think is interesting, do something that you think is fun
and worthwhile, because otherwise you won't do it well anyway.
- Brian Kernighan

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web