1. Matthew Schinckel
  2. hg_adapter_changes

Commits

Matthew Schinckel  committed fa77c2f

Some small changes to remove apparently non-required function calls.

  • Participants
  • Parent commits f1685cc
  • Branches default

Comments (0)

Files changed (1)

File hg_adapter.py

View file
     return "hg"
 
 def repositoryPath(arg0):
+    return None
     while len(arg0) > 1:
         if os.path.isdir(arg0):
             testdir = os.path.join(arg0, '.hg')
     
     returnCode = p.wait()
     err = child_stderr.read()
-    out = child_stdout.read()
     
-    isManaged = not len(err) and not out.startswith("?")
+    isManaged = not len(err) and not child_stdout.read().startswith("?")
     
     if isManaged:
         returnCode = 0
     sys.stdout.write(plistData.bytes())
         
 def url_for_export(arg0):
-    """ tests to see if arg0 is under SCM, prints a plist containing TRUE if it does, FALSE 
-        if it does not
+    """ Not really that meaningful for hg.
+    Supposed to return a real URL in svn, but not needed for hg.
     """
-    arg0 = os.path.abspath(arg0)
+    returnDict = dict(exportURL=arg0, returnCode=0, stdErr='')
     
-    hgReposPath = repositoryPath(arg0)
+    # Just comment this out to save time until it is really needed.
     
-    commonPath = os.path.commonprefix([hgReposPath, arg0])
-    
-    exportURL = arg0[len(commonPath):]
-    
-    if exportURL[0] == os.sep:
-        exportURL = exportURL[1:]
-    
-    returnDict = dict(exportURL=exportURL, returnCode=0, stdErr='')
+    # arg0 = os.path.abspath(arg0)
+    # 
+    # hgReposPath = repositoryPath(arg0)
+    # 
+    # commonPath = os.path.commonprefix([hgReposPath, arg0])
+    # 
+    # exportURL = arg0[len(commonPath):]
+    # 
+    # if exportURL[0] == os.sep:
+    #     exportURL = exportURL[1:]
+    # 
+    # returnDict = dict(exportURL=exportURL, returnCode=0, stdErr='')
     
     plistData, errorString = \
         NSPropertyListSerialization.dataFromPropertyList_format_errorDescription_(returnDict,