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
b91960aed018
Commit
b91960aed018
authored
15 years ago
by
Sune Foldager
Browse files
Options
Downloads
Patches
Plain Diff
rebase: improve error and debug messages
parent
c156bf947e26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hgext/rebase.py
+4
-4
4 additions, 4 deletions
hgext/rebase.py
tests/test-rebase-scenario-global.out
+2
-2
2 additions, 2 deletions
tests/test-rebase-scenario-global.out
with
6 additions
and
6 deletions
hgext/rebase.py
+
4
−
4
View file @
b91960ae
...
...
@@ -381,5 +381,5 @@
if
src
:
commonbase
=
repo
[
src
].
ancestor
(
repo
[
dest
])
if
commonbase
==
repo
[
src
]:
raise
util
.
Abort
(
_
(
'
cannot rebase an ancestor
'
))
raise
util
.
Abort
(
_
(
'
source is ancestor of destination
'
))
if
commonbase
==
repo
[
dest
]:
...
...
@@ -385,5 +385,5 @@
if
commonbase
==
repo
[
dest
]:
raise
util
.
Abort
(
_
(
'
cannot rebase a descendant
'
))
raise
util
.
Abort
(
_
(
'
source is descendant of destination
'
))
source
=
repo
[
src
].
rev
()
else
:
if
base
:
...
...
@@ -392,8 +392,8 @@
cwd
=
repo
[
'
.
'
].
rev
()
if
cwd
==
dest
:
repo
.
ui
.
debug
(
'
already working on current
\n
'
)
repo
.
ui
.
debug
(
'
source and destination are the same
\n
'
)
return
None
targetancestors
=
set
(
repo
.
changelog
.
ancestors
(
dest
))
if
cwd
in
targetancestors
:
...
...
@@ -396,8 +396,8 @@
return
None
targetancestors
=
set
(
repo
.
changelog
.
ancestors
(
dest
))
if
cwd
in
targetancestors
:
repo
.
ui
.
debug
(
'
already working on the current branch
\n
'
)
repo
.
ui
.
debug
(
'
source is ancestor of destination
\n
'
)
return
None
cwdancestors
=
set
(
repo
.
changelog
.
ancestors
(
cwd
))
...
...
This diff is collapsed.
Click to expand it.
tests/test-rebase-scenario-global.out
+
2
−
2
View file @
b91960ae
...
...
@@ -129,5 +129,5 @@
% These will fail
% E onto D - rebase onto an ancestor
abort:
cannot rebase a descendant
abort:
source is descendant of destination
% D onto E - rebase onto a descendant
...
...
@@ -133,4 +133,4 @@
% D onto E - rebase onto a descendant
abort:
cannot rebase an ancestor
abort:
source is ancestor of destination
% E onto B - merge revision with both parents not in ancestors of target
abort: cannot use revision 4 as base, result would have 3 parents
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