Commit Graph

5 Commits

Author SHA1 Message Date
Saurabh Singh
f6e0d2d1ee inhibit: remove the extension
Summary:
The logic we care about has been moved to core so we can delete the
`inhibit` extension.

Reviewed By: markbt

Differential Revision: D10276448

fbshipit-source-id: 44cabe5d561344cf8f196127ce52491e4654b598
2018-10-10 10:01:45 -07:00
Mark Thomas
283c1fd469 undo: show a hint when a user might have wanted uncommit or unamend
Summary:
If a user uses `hg undo` to undo a `commit` or `amend` operation, this discards
the changes.  If they wanted to keep them in the working copy, they should have
used `hg uncommit` or `hg unamend`.

Provide a hint telling the user how to get back their changes, and letting them
know that `hg uncommit` and `hg unamend` exist.

Reviewed By: quark-zju

Differential Revision: D9346061

fbshipit-source-id: 300b1ac851a12ccf2432ba2c11fceac619667701
2018-08-22 03:50:55 -07:00
Durham Goode
ef44953866 historypack: make version 1 the default
Summary:
We already have the config set to make version one used in all our main
repositories, but it wasn't being used in all of our tests. Let's change
mutablehistorypack to default to creating version 1 historypacks now.

Reviewed By: quark-zju

Differential Revision: D9367017

fbshipit-source-id: 7d4055455cd8f8e6b2378c5f3a9993b2a40221a8
2018-08-17 09:39:36 -07:00
Jun Wu
3215f476df treemanifest: resolve the amend crash
Summary:
Detect the case when we're writing an commit that already exists and skip
writing the history entries.

Reviewed By: DurhamG

Differential Revision: D8363935

fbshipit-source-id: d8db6233eb0261b49e3903c0345c898f2abffa12
2018-06-11 18:08:31 -07:00
Jun Wu
c0553c8b2d treemanifest: add a test demonstrating histpack crash during amend
Summary:
As demonstrated by the added test. Traceback looks like:

  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 734, in __exit__
    self.close()
  File "/usr/lib/python2.7/site-packages/mercurial/transaction.py", line 40, in _active
    return func(self, *args, **kwds)
  File "/usr/lib/python2.7/site-packages/mercurial/transaction.py", line 468, in close
    self._finalizecallback[cat](self)
  File "/usr/lib/python2.7/site-packages/mercurial/localrepo.py", line 1371, in commitnotransaction
    self.manifestlog.commitpending()
  File "/usr/lib/python2.7/site-packages/hgext/treemanifest/__init__.py", line 681, in commitpending
    hpack.close()
  File "/usr/lib/python2.7/site-packages/hgext/remotefilelog/historypack.py", line 532, in close
    self._write()
  File "/usr/lib/python2.7/site-packages/hgext/remotefilelog/historypack.py", line 513, in _write
    raise ValueError("attempting to add nullid linknode")

Reviewed By: DurhamG

Differential Revision: D8363934

fbshipit-source-id: ea84aa085b37541bce9a5e643a61cf17ae33e0b4
2018-06-11 18:08:31 -07:00