Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
4c1aa6af
Commit
4c1aa6af
authored
17 years ago
by
Matt Mackall
Browse files
Options
Downloads
Plain Diff
Merge with crew
parents
210ee620
bd61e44e
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hgext/fetch.py
+7
-3
7 additions, 3 deletions
hgext/fetch.py
tests/test-fetch
+7
-0
7 additions, 0 deletions
tests/test-fetch
tests/test-fetch.out
+2
-0
2 additions, 0 deletions
tests/test-fetch.out
with
16 additions
and
3 deletions
hgext/fetch.py
+
7
−
3
View file @
4c1aa6af
...
...
@@ -65,5 +65,6 @@
message
=
(
cmdutil
.
logmessage
(
opts
)
or
(
_
(
'
Automated merge with %s
'
)
%
util
.
removeauth
(
other
.
url
())))
force_editor
=
opts
.
get
(
'
force_editor
'
)
or
opts
.
get
(
'
edit
'
)
n
=
repo
.
commit
(
mod
+
add
+
rem
,
message
,
opts
[
'
user
'
],
opts
[
'
date
'
],
...
...
@@ -68,6 +69,6 @@
n
=
repo
.
commit
(
mod
+
add
+
rem
,
message
,
opts
[
'
user
'
],
opts
[
'
date
'
],
force_editor
=
opts
.
get
(
'
force_editor
'
)
)
force_editor
=
force_editor
)
ui
.
status
(
_
(
'
new changeset %d:%s merges remote changes
'
'
with local
\n
'
)
%
(
repo
.
changelog
.
rev
(
n
),
short
(
n
)))
...
...
@@ -102,6 +103,6 @@
try
:
wlock
=
repo
.
wlock
()
lock
=
repo
.
lock
()
mod
,
add
,
rem
=
repo
.
status
()[:
3
]
mod
,
add
,
rem
,
del_
=
repo
.
status
()[:
4
]
if
mod
or
add
or
rem
:
raise
util
.
Abort
(
_
(
'
outstanding uncommitted changes
'
))
...
...
@@ -106,5 +107,7 @@
if
mod
or
add
or
rem
:
raise
util
.
Abort
(
_
(
'
outstanding uncommitted changes
'
))
if
del_
:
raise
util
.
Abort
(
_
(
'
working directory is missing some files
'
))
if
len
(
repo
.
heads
())
>
1
:
raise
util
.
Abort
(
_
(
'
multiple heads in this repository
'
'
(use
"
hg heads
"
and
"
hg merge
"
to merge)
'
))
...
...
@@ -116,7 +119,8 @@
'
fetch
'
:
(
fetch
,
[(
'
r
'
,
'
rev
'
,
[],
_
(
'
a specific revision you would like to pull
'
)),
(
'
f
'
,
'
force-editor
'
,
None
,
_
(
'
edit commit message
'
)),
(
'
e
'
,
'
edit
'
,
None
,
_
(
'
edit commit message
'
)),
(
''
,
'
force-editor
'
,
None
,
_
(
'
edit commit message (DEPRECATED)
'
)),
(
''
,
'
switch-parent
'
,
None
,
_
(
'
switch parents when merging
'
)),
]
+
commands
.
commitopts
+
commands
.
commitopts2
+
commands
.
remoteopts
,
_
(
'
hg fetch [SOURCE]
'
)),
...
...
This diff is collapsed.
Click to expand it.
tests/test-fetch
+
7
−
0
View file @
4c1aa6af
...
...
@@ -52,5 +52,8 @@
echo
g
>
g/g
hg
--cwd
g ci
-d
'6 0'
-Amg
hg clone
-q
f h
hg clone
-q
g i
echo
% should merge f into g
hg
--cwd
g fetch
-d
'7 0'
--switch
-m
'automated merge'
../f
...
...
@@ -55,2 +58,6 @@
echo
% should merge f into g
hg
--cwd
g fetch
-d
'7 0'
--switch
-m
'automated merge'
../f
rm
i/g
echo
% should abort, because i is modified
hg
--cwd
i fetch ../h
This diff is collapsed.
Click to expand it.
tests/test-fetch.out
+
2
−
0
View file @
4c1aa6af
...
...
@@ -71,3 +71,5 @@
merging with 3:cc6a3744834d
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
new changeset 4:55aa4f32ec59 merges remote changes with local
% should abort, because i is modified
abort: working directory is missing some files
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment