Matthew Schinckel avatar Matthew Schinckel committed fa77c2f

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

Comments (0)

Files changed (1)

     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, 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.