##// 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 1872 # this message are here for 80 char limit reason
1873 1873 mso = _("push includes obsolete changeset: %s!")
1874 1874 msu = _("push includes unstable changeset: %s!")
1875 msb = _("push includes bumped changeset: %s!")
1875 1876 # If we are to push if there is at least one
1876 1877 # obsolete or unstable changeset in missing, at
1877 1878 # least one of the missinghead will be obsolete or
@@ -1882,6 +1883,8 b' class localrepository(object):'
1882 1883 raise util.Abort(_(mso) % ctx)
1883 1884 elif ctx.unstable():
1884 1885 raise util.Abort(_(msu) % ctx)
1886 elif ctx.bumped():
1887 raise util.Abort(_(msb) % ctx)
1885 1888 discovery.checkheads(self, remote, outgoing,
1886 1889 remoteheads, newbranch,
1887 1890 bool(inc))
@@ -38,6 +38,7 b' New head replaces old head'
38 38 ==========================
39 39
40 40 setup
41 (we add the 1 flags to prevent bumped error during the test)
41 42
42 43 $ mkcommit old
43 44 $ hg push
@@ -50,7 +51,7 b' setup'
50 51 $ hg up -q '.^'
51 52 $ mkcommit new
52 53 created new head
53 $ hg debugobsolete `getid old` `getid new`
54 $ hg debugobsolete --flags 1 `getid old` `getid new`
54 55 $ hg glog --hidden
55 56 @ 71e3228bffe1 (draft) add new
56 57 |
@@ -171,6 +171,14 b' the public changeset'
171 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 182 Fixing "bumped" situation
175 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