Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'exercise': 0.04; 'subject:Question': 0.07; '22,': 0.09; 'git': 0.09; 'inserted': 0.09; 'raises': 0.09; 'subject:Source': 0.09; 'cc:addr:python- list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'made,': 0.16; 'nearest': 0.16; 'refactoring': 0.16; 'renaming': 0.16; 'right-click': 0.16; 'simpson': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'trying': 0.19; 'commit': 0.19; 'file,': 0.19; 'select': 0.22; 'cc:addr:python.org': 0.22; 'convenient': 0.24; 'cc:2**0': 0.24; 'equivalent': 0.26; 'header :In-Reply-To:1': 0.27; 'rest': 0.29; 'am,': 0.29; "doesn't": 0.30; 'especially': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'origin': 0.31; 'trace': 0.31; 'trivial': 0.31; 'file': 0.32; 'run': 0.32; 'possible.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'sure': 0.39; 'introduced': 0.61; 'back': 0.62; 'more': 0.64; 'mar': 0.68; 'line,': 0.68; 'repeat': 0.74; 'different.': 0.84; 'subject:Control': 0.84; 'to:none': 0.92; 'examine': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=yUmQ+gXz0fxux6yTJIJM91Vk8hJ82vq+UF/f1zyvtFQ=; b=kqNbiCzpIA/i8VVlajebWIFOZgBih1YbZEKcI+xny6e1C3Isge7FBu2F/OwXFg4i7O Q72NVoONTmzF36tV6QIXrt9n4nBAKryqQKCL3pr+yemc5hCoZtOkYVAt8oeW1JcEMtJL 1b6Ssf+VXwDqo66BLwuco1uGEfeR9kDjkpS/o6J6TH0CQhg3ax3QCN2egk4xJlksRylJ QqIpO1iikQ/9olEYATELtNmbmBMTIZWxKDjxt0/4twqgTEaNeen17IPgGZQjULaPmIEN kV+Ao5qWJl4++TRF0d2LuMdjAg/byGyntOMM3gonXGcIAA/EmmB2zdBWlPX/fbLsWdT8 Q/lg== MIME-Version: 1.0 X-Received: by 10.66.217.133 with SMTP id oy5mr57656291pac.46.1395440227643; Fri, 21 Mar 2014 15:17:07 -0700 (PDT) In-Reply-To: <20140321213236.GA46964@cskk.homeip.net> References: <20140321213236.GA46964@cskk.homeip.net> Date: Sat, 22 Mar 2014 09:17:07 +1100 Subject: Re: Question about Source Control From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395440231 news.xs4all.nl 2841 [2001:888:2000:d::a6]:53923 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68720 On Sat, Mar 22, 2014 at 8:32 AM, Cameron Simpson 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. 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? ChrisA