Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
hggitforge
Commits
2b39f1fea3bf
Commit
7a815a4f
authored
Oct 14, 2020
by
Elouan Martinet
Browse files
Change to root directory when executing commands
parent
a5fb8fa7457c
Changes
1
Hide whitespace changes
Inline
Side-by-side
hggithub.py
View file @
2b39f1fe
...
...
@@ -143,6 +143,7 @@ def ghclone(ui, git_fork_url, git_upstream_url, working_directory, **opts):
@
command
(
"ghpull"
,
[],
_
(
""
))
def
ghpull
(
ui
,
repo
,
**
opts
):
os
.
chdir
(
repo
.
root
)
"""Prepare working directory to work with github"""
git_repo
=
ui
.
config
(
"gitrepo"
,
"gitrepo"
)
try
:
...
...
@@ -154,6 +155,7 @@ def ghpull(ui, repo, **opts):
@
command
(
"ghpush"
,
[],
_
(
"bookmark"
))
def
ghpush
(
ui
,
repo
,
bookmark
,
**
opts
):
"""Prepare working directory to work with github"""
os
.
chdir
(
repo
.
root
)
git_repo
=
ui
.
config
(
"gitrepo"
,
"gitrepo"
)
try
:
_ghpush
(
git_repo
,
bookmark
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment