Patchwork [3,of,3,stable] hg: note that islocal only accepts paths pointing to repos

login
register
mail settings
Submitter Siddharth Agarwal
Date Feb. 3, 2014, 11:12 p.m.
Message ID <67d654780ba7446e3743.1391469133@dev998.prn1.facebook.com>
Download mbox | patch
Permalink /patch/3452/
State Accepted
Commit 7d269e7620c48eee93871d33e673b7a8acb503cc
Headers show

Comments

Siddharth Agarwal - Feb. 3, 2014, 11:12 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1391466980 28800
#      Mon Feb 03 14:36:20 2014 -0800
# Branch stable
# Node ID 67d654780ba7446e374396b74590a431d08607b4
# Parent  a2661fa3b83547321cdd07bb7b24210b35870198
hg: note that islocal only accepts paths pointing to repos

hg.islocal doesn't work for paths pointing to non-repos, such as patch files.
Matt Mackall - Feb. 3, 2014, 11:25 p.m.
On Mon, 2014-02-03 at 15:12 -0800, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1391466980 28800
> #      Mon Feb 03 14:36:20 2014 -0800
> # Branch stable
> # Node ID 67d654780ba7446e374396b74590a431d08607b4
> # Parent  a2661fa3b83547321cdd07bb7b24210b35870198
> hg: note that islocal only accepts paths pointing to repos

These are queued for stable, thanks.

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -82,7 +82,7 @@ 
         return thing
 
 def islocal(repo):
-    '''return true if repo or path is local'''
+    '''return true if repo (or path pointing to repo) is local'''
     if isinstance(repo, str):
         try:
             return _peerlookup(repo).islocal(repo)