mercurial/HGRepository.st
changeset 88 1ad71a063a20
parent 69 17045d49309f
child 103 04731ef44417
--- a/mercurial/HGRepository.st	Tue Nov 20 21:32:08 2012 +0000
+++ b/mercurial/HGRepository.st	Wed Nov 21 01:21:47 2012 +0000
@@ -29,6 +29,16 @@
     "Clones repository at given URL to given directory.
      Returns an instance HGRepository representing the clone."
 
+    ^self clone: aFilenameOrUrlOrString to: aStringOrFilename update: true
+
+    "Created: / 14-11-2012 / 22:46:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-11-2012 / 00:20:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+clone: aFilenameOrUrlOrString to: aStringOrFilename update: update
+    "Clones repository at given URL to given directory.
+     Returns an instance HGRepository representing the clone."
+
     | url dst dir |
 
     url := aFilenameOrUrlOrString asString.
@@ -51,10 +61,11 @@
     HGCommand clone
         url: url;
         path: dst pathName;
+        update: update;
         execute.
     ^HGRepository on: dst.
 
-    "Created: / 14-11-2012 / 22:46:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 21-11-2012 / 00:20:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGRepository class methodsFor:'utilities'!
@@ -166,6 +177,17 @@
     "Created: / 14-11-2012 / 22:43:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+cloneTo: aStringOrFilename update: update
+    "Creates a clone of the receiver into given directory.
+     Returns an instance HGRepository representing the clone.
+     If update is true, repository working copy is updated, otherwise
+     it's left empty"
+
+    ^self class clone: path to: aStringOrFilename update: update
+
+    "Created: / 21-11-2012 / 00:21:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 pull
     "Pulls changesets from default upstream repository.
      See .hg/hgrc, section path"