Expected to expose HgRepo or Hg.getRepo()
Closed this issue · 1 comments
code2933 commented
It is a common situation that there has been a cloned repo in local, then I need to pull and update the repo. What I need is a HgRepo
instance.
However, Hg.clone
is wasteful and Hg.create
goes with repo.init
which leads to an error.
Maybe it's a good idea to expose HgRepo
or Hg.getRepo()
to get the HgRepo
instance.
const repo = new HgRepo({
name: 'name',
path: 'my/local/cloned/repo'
})
await repo.pull()
or
const repo = Hg.getRepo({
name: 'name',
path: 'my/local/cloned/repo'
})
await repo.pull()
jdalrymple commented
Good idea!
Sent from TypeApp
…On Jul 26, 2017, 12:12, at 12:12, 52linyuepeng ***@***.***> wrote:
It is a common situation that there has been a cloned repo in local,
then I need to pull and update the repo. What I need is a `HgRepo`
instance.
However, `Hg.clone` is wasteful and `Hg.create` goes with `repo.init`
which leads to an error.
Maybe it's a good idea to expose `HgRepo` or `Hg.getRepo()` to get the
`HgRepo` instance.
```
const repo = new HgRepo({
name: 'name',
path: 'my/local/cloned/repo'
})
await repo.pull()
```
or
```
const repo = Hg.getRepo({
name: 'name',
path: 'my/local/cloned/repo'
})
await repo.pull()
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#4