##// END OF EJS Templates
push: refuse to push bumped changeset...
Pierre-Yves David -
r17834:743d04dd default
parent child Browse files
Show More
@@ -1872,6 +1872,7 b' class localrepository(object):'
1872 # this message are here for 80 char limit reason
1872 # this message are here for 80 char limit reason
1873 mso = _("push includes obsolete changeset: %s!")
1873 mso = _("push includes obsolete changeset: %s!")
1874 msu = _("push includes unstable changeset: %s!")
1874 msu = _("push includes unstable changeset: %s!")
1875 msb = _("push includes bumped changeset: %s!")
1875 # If we are to push if there is at least one
1876 # If we are to push if there is at least one
1876 # obsolete or unstable changeset in missing, at
1877 # obsolete or unstable changeset in missing, at
1877 # least one of the missinghead will be obsolete or
1878 # least one of the missinghead will be obsolete or
@@ -1882,6 +1883,8 b' class localrepository(object):'
1882 raise util.Abort(_(mso) % ctx)
1883 raise util.Abort(_(mso) % ctx)
1883 elif ctx.unstable():
1884 elif ctx.unstable():
1884 raise util.Abort(_(msu) % ctx)
1885 raise util.Abort(_(msu) % ctx)
1886 elif ctx.bumped():
1887 raise util.Abort(_(msb) % ctx)
1885 discovery.checkheads(self, remote, outgoing,
1888 discovery.checkheads(self, remote, outgoing,
1886 remoteheads, newbranch,
1889 remoteheads, newbranch,
1887 bool(inc))
1890 bool(inc))
@@ -38,6 +38,7 b' New head replaces old head'
38 ==========================
38 ==========================
39
39
40 setup
40 setup
41 (we add the 1 flags to prevent bumped error during the test)
41
42
42 $ mkcommit old
43 $ mkcommit old
43 $ hg push
44 $ hg push
@@ -50,7 +51,7 b' setup'
50 $ hg up -q '.^'
51 $ hg up -q '.^'
51 $ mkcommit new
52 $ mkcommit new
52 created new head
53 created new head
53 $ hg debugobsolete `getid old` `getid new`
54 $ hg debugobsolete --flags 1 `getid old` `getid new`
54 $ hg glog --hidden
55 $ hg glog --hidden
55 @ 71e3228bffe1 (draft) add new
56 @ 71e3228bffe1 (draft) add new
56 |
57 |
@@ -171,6 +171,14 b' the public changeset'
171 summary: add new_3_c
171 summary: add new_3_c
172
172
173
173
174 And that we can't push bumped changeset
175
176 $ hg push ../tmpa
177 pushing to ../tmpa
178 searching for changes
179 abort: push includes bumped changeset: 5601fb93a350!
180 [255]
181
174 Fixing "bumped" situation
182 Fixing "bumped" situation
175 We need to create a clone of 5 and add a special marker with a flag
183 We need to create a clone of 5 and add a special marker with a flag
176
184
General Comments 0
You need to be logged in to leave comments. Login now