Commit Graph

342 Commits

Author SHA1 Message Date
Kevin Sawicki
c64d07d506 Return false if stat exception is thrown
Calling exists() and then statSync() ends up stat'ing
the file twice so removing the exists() check saves a stat
call.
2013-03-12 17:49:11 -07:00
Kevin Sawicki & Nathan Sobo
879f4e92a6 Remove require.coffee 2013-03-12 14:59:42 -07:00
Kevin Sawicki
eea02cb807 Remove unneeded coffee-script require
This is handled by the wrapper around task-shell
to ensure coffee-script is required before the shell
is.
2013-03-12 13:06:23 -07:00
Kevin Sawicki
6699941da0 Remove unneeded resolved task shell path 2013-03-12 13:05:51 -07:00
Kevin Sawicki & Nathan Sobo
82bfd83da1 Require task shell path in blob snippet 2013-03-12 13:05:22 -07:00
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1 Use node's require instead of internal require 2013-03-12 10:38:05 -07:00
Kevin Sawicki
6f5138a56e Revert "Remove $native.md5ForPath()"
This reverts commit 832df7149e.
2013-03-12 08:23:54 -07:00
Kevin Sawicki
115b960ce7 Handle reading and writing in cson.coffee
Moves helpers from fs.coffee to cson.coffee
2013-03-11 22:40:00 -07:00
Kevin Sawicki
832df7149e Remove $native.md5ForPath() 2013-03-11 20:58:57 -07:00
Kevin Sawicki
ec8a5b368b Use node's crypto from fs.md5ForPath() 2013-03-11 19:20:36 -07:00
Kevin Sawicki
03b32ec29c Use coffee-script node module
This required upgrading underscore which to fix issues
with _.isEqual working across objects created from different
documents.

The upgrade required adding a custom _.isEqual extension that
added back support for object's having an isEqual method that
was removed in underscore 1.4.0.
2013-03-11 13:39:17 -07:00
Kevin Sawicki
2212222c47 Use underscore node module 2013-03-11 11:22:36 -07:00
Kevin Sawicki
f3049681bd Use git-utils module
Removes the need to include libgit2 as this is now handled by the
git-utils module which provides functions that were previously in
git.mm and git.coffee
2013-03-09 14:34:06 -08:00
Kevin Sawicki
99dc796f42 Remove $native calls from require.coffee 2013-03-07 19:00:02 -08:00
Kevin Sawicki
2f8b1d5e3e Remove $native.remove() 2013-03-07 18:36:20 -08:00
Kevin Sawicki
d91c540d47 Remove $native.move() 2013-03-07 18:25:25 -08:00
Kevin Sawicki
5202e846de Remove $native.write() 2013-03-07 18:20:29 -08:00
Kevin Sawicki
6abf1ff1aa Remove $native.makeDirectory() 2013-03-07 18:02:55 -08:00
Kevin Sawicki
e7050b2083 Remove unused $native.lastModified() 2013-03-07 18:00:35 -08:00
Kevin Sawicki
fedf43ca0a Remove $native.exists() 2013-03-07 17:57:28 -08:00
Kevin Sawicki
4bc513a8e3 Remove $native.isFile() and $native.isDirectory 2013-03-07 17:55:13 -08:00
Kevin Sawicki
acf5f4ce5e Remove fs/$native.getAllFilePathsAsync()
This was previously only used by project.getFilePath()
which should have been using fs.traverseTree() instead.
2013-03-07 17:48:36 -08:00
Kevin Sawicki
ce8867fac9 Remove unused ChildProcess class 2013-03-07 17:40:24 -08:00
Kevin Sawicki
c22d14c5b0 Use child_process.spawn from Project.scan 2013-03-07 17:36:21 -08:00
Kevin Sawicki
689088c1a8 Report exit status to callback 2013-03-07 17:01:21 -08:00
Kevin Sawicki
01faf6ea1e Create helper to buffer process lines 2013-03-07 16:58:09 -08:00
Kevin Sawicki
b0ec0cda7f Merge remote-tracking branch 'origin/dev' into cefode 2013-03-07 11:44:46 -08:00
Kevin Sawicki
d34796a78b Use oniguruma node module
This removes all internal native oniguruma
sources and starts using the node module
directly to create onig scanners and regexes.
2013-03-07 10:45:22 -08:00
Kevin Sawicki
8af55a04d8 Use a single worker for status refreshes
There still appear to be crashes occurring when
using libgit2 from multiple workers at the same time.

So only start a new status worker once the current one
completes if a refresh was requested while a worker was
running.

Closes #367
2013-03-06 14:59:12 -08:00
Kevin Sawicki & Nathan Sobo
280a73e7fd Merge remote-tracking branch 'origin/dev' into cefode 2013-03-05 14:54:07 -08:00
Kevin Sawicki & Nathan Sobo
fbd6364f78 Redirect worker console to window console
Use __defineGetter__ instead of setting a
console property on self because cefode
already defines a console via __defineGetter__
and we need to override it.
2013-03-05 14:52:39 -08:00
Kevin Sawicki
07a8a35e48 Migrate fs.traverseTree to use Node's fs 2013-03-05 14:51:28 -08:00
Kevin Sawicki
1c09a1352b Return {} when object is empty 2013-03-05 08:46:17 -08:00
Kevin Sawicki
5ddea28d80 Wrap objects inside arrays in {} 2013-03-05 08:42:24 -08:00
Cheng Zhao
091851ee3d First taste of node. 2013-03-05 09:10:04 +01:00
Kevin Sawicki
ab5043f890 Add method to get line diffs for path and text 2013-03-04 21:43:34 -08:00
Kevin Sawicki
fd82f3f8a4 Add method to get ahead/behind commit counts 2013-03-04 21:43:34 -08:00
Kevin Sawicki
4add7b6213 Support getting status of entire repository
New Git.getAllStatuses() method returns all non-ignored
status entries in the repository.
2013-03-04 21:43:32 -08:00
Kevin Sawicki
7952dfc196 Add command after first argument
This forces the object to be interpreted as the
second argument to the callWorkerMethod function
instead of as the first argument to function returned
from callWorkerMethod.

Closes #338
2013-03-03 11:07:52 -08:00
Adam Roben
beb000ceaf Merge branch 'dev' of github.com:github/atom into ci-testing 2013-02-27 16:27:02 -05:00
Kevin Sawicki
745a3ef9f2 Use class methods to create native object shims
CoffeeScript 1.5 complains if a constructor has
a returns a value.
2013-02-27 13:25:10 -08:00
Corey Johnson
a45bceb02a Remove unused param 2013-02-27 11:15:46 -08:00
Kevin Sawicki
c79fca1adb Use string interpolation for error message 2013-02-22 09:15:47 -08:00
Corey Johnson & Kevin Sawicki
e4f87d522f Rename Task.terminate to Task.abort 2013-02-19 10:57:04 -08:00
Corey Johnson & Kevin Sawicki
7db83662b5 Only terminate worker after the worker completes work 2013-02-19 10:57:04 -08:00
Kevin Sawicki
10430842b0 Use binary icon for .woff and .DS_Store extensions 2013-02-16 09:54:20 -08:00
Corey Johnson
52d4723711 Add underscore, camelize and dasherize to underscore 2013-02-13 10:42:22 -08:00
Kevin Sawicki
1f4aedeb10 Rename isReadme to isReadmePath 2013-02-12 11:47:13 -08:00
Kevin Sawicki
9e39a382e8 DRY up checking if path is .cson or .json 2013-02-12 11:02:07 -08:00
Kevin Sawicki
133d417cad Outdent line previously wrapped in try/catch 2013-02-11 10:33:25 -08:00